# Latest

**URL:** https://discourse.julialang.org/latest.md?page=455

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

**Page:** 456

---

## [Hamiltonian Monte Carlo gets stuck at tiny local maxima](https://discourse.julialang.org/t/hamiltonian-monte-carlo-gets-stuck-at-tiny-local-maxima/108389)

<div class="topic-metadata">

**Author:** [@marcsgil](https://discourse.julialang.org/u/marcsgil)\
**Replies:** 14\
**Last updated:** [March 18, 2024, 6:22pm UTC](https://discourse.julialang.org/t/hamiltonian-monte-carlo-gets-stuck-at-tiny-local-maxima/108389 "2024-03-18T18:22:40Z")

</div>

Hello! This is my first time trying to perform Bayesian inference, and I have found some problematic behavior when using Hamiltonian Monte Carlo. I’d like some help in figuring out what may be going wrong. I have a like…

---

## [Implementing Laplacian operator acting on a 2D array](https://discourse.julialang.org/t/implementing-laplacian-operator-acting-on-a-2d-array/111615)

<div class="topic-metadata">

**Author:** [@matt1](https://discourse.julialang.org/u/matt1)\
**Replies:** 6\
**Last updated:** [March 18, 2024, 5:41pm UTC](https://discourse.julialang.org/t/implementing-laplacian-operator-acting-on-a-2d-array/111615 "2024-03-18T17:41:03Z")

</div>

Hello, I’m interested in implementing the laplacian operator \\nabla^2=\\partial\_x^2+\\partial\_y^2, such that I can apply it to a matrix A\_{ij} and obtain the corresponding matrix: B\_{ij}=(\\nabla^2A)\_{i,j}. For example, th…

---

## [Solving nonlinear constrained optimization problem](https://discourse.julialang.org/t/solving-nonlinear-constrained-optimization-problem/111255)

<div class="topic-metadata">

**Author:** [@rtapia](https://discourse.julialang.org/u/rtapia)\
**Replies:** 35\
**Last updated:** [March 18, 2024, 5:32pm UTC](https://discourse.julialang.org/t/solving-nonlinear-constrained-optimization-problem/111255 "2024-03-18T17:32:29Z")

</div>

Hello, I am trying to solve the following nonconvex problem in Julia using Optim.jl: min x’Px s.t: 1 -x’\*x \<=0 where P is a positive definite matrix. I have defined the following using JuMP, Optim n = 1500; A = 10…

---

## [Documenter.jl failing to push -- I'm a bit lost](https://discourse.julialang.org/t/documenter-jl-failing-to-push-im-a-bit-lost/111777)

<div class="topic-metadata">

**Author:** [@lrnv](https://discourse.julialang.org/u/lrnv)\
**Replies:** 4\
**Last updated:** [March 18, 2024, 5:30pm UTC](https://discourse.julialang.org/t/documenter-jl-failing-to-push-im-a-bit-lost/111777 "2024-03-18T17:30:01Z")

</div>

Hey, A friend of mine started out on a package without asking PkgTemplate to produce online documentation (there were no CI at all on the whole package). I tried to port some of it from other packages that I have but I …

---

## [JuliaFormatter for imports / using](https://discourse.julialang.org/t/juliaformatter-for-imports-using/111704)

<div class="topic-metadata">

**Author:** [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Replies:** 3\
**Last updated:** [March 18, 2024, 4:57pm UTC](https://discourse.julialang.org/t/juliaformatter-for-imports-using/111704 "2024-03-18T16:57:43Z")

</div>

I like writing my imports / using statements in the following style: import CairoMakie import CSV import HDF5 import KernelDensity import Makie import StatsBase using DataFrames: DataFrame using Distributions: Gamma usi…

---

## [Threading behavior on multiple-cpu systems](https://discourse.julialang.org/t/threading-behavior-on-multiple-cpu-systems/111780)

<div class="topic-metadata">

**Author:** [@astro-kevin](https://discourse.julialang.org/u/astro-kevin)\
**Replies:** 1\
**Last updated:** [March 18, 2024, 4:53pm UTC](https://discourse.julialang.org/t/threading-behavior-on-multiple-cpu-systems/111780 "2024-03-18T16:53:09Z")

</div>

I have written some code which runs faster on a system with 2x16 core intel chip than a system with a 4x16 core AMD cpu. The AMD cpu is of a slightly slower clockspeed, and I have ensured my Threading.@threads loop has m…

---

## [Bounds Error In code](https://discourse.julialang.org/t/bounds-error-in-code/111766)

<div class="topic-metadata">

**Author:** [@bongodrums4659](https://discourse.julialang.org/u/bongodrums4659)\
**Replies:** 3\
**Last updated:** [March 18, 2024, 4:30pm UTC](https://discourse.julialang.org/t/bounds-error-in-code/111766 "2024-03-18T16:30:15Z")

</div>

Hi! I keep getting a bounds error and im not sure how to fix it # Define a function to simulate worker paths function simulate\_worker\_paths(solution, a0, y0, T, N) @unpack kgrid, ygrid, policy\_c, policy\_k, P = so…

---

## [Question: using imdecode in OpenCV.jl](https://discourse.julialang.org/t/question-using-imdecode-in-opencv-jl/111779)

<div class="topic-metadata">

**Author:** [@Dhom\_Bios](https://discourse.julialang.org/u/Dhom_Bios)\
**Replies:** 0\
**Last updated:** [March 18, 2024, 4:18pm UTC](https://discourse.julialang.org/t/question-using-imdecode-in-opencv-jl/111779 "2024-03-18T16:18:48Z")

</div>

Hi everyone! I’m new to Julia and I’m trying to port an opencv script made in python to Julia. Since I haven’t seen an specific subforum dedicated to computer vision, I’m posting this question to general usage. The scr…

---

## [\[ANN\] SIMDMathFunctions.jl : Fast vectorized mathematical functions for SIMD.jl , using SLEEFPirates.jl](https://discourse.julialang.org/t/ann-simdmathfunctions-jl-fast-vectorized-mathematical-functions-for-simd-jl-using-sleefpirates-jl/111021)

<div class="topic-metadata">

**Author:** [@dubosipsl](https://discourse.julialang.org/u/dubosipsl)\
**Replies:** 10\
**Last updated:** [March 18, 2024, 3:26pm UTC](https://discourse.julialang.org/t/ann-simdmathfunctions-jl-fast-vectorized-mathematical-functions-for-simd-jl-using-sleefpirates-jl/111021 "2024-03-18T15:26:44Z")

</div>

Feedback welcome, especially on the package name which I intend to register in a matter of days. The name could be SIMDFunctions for instance. From the README (GitHub - ClimFlows/SIMDMathFunctions.jl): \] add https://gi…

---

## [How to assist the LSP when it comes to function outputs, and Julia Language "Good Code"](https://discourse.julialang.org/t/how-to-assist-the-lsp-when-it-comes-to-function-outputs-and-julia-language-good-code/111770)

<div class="topic-metadata">

**Author:** [@Qfl3x](https://discourse.julialang.org/u/Qfl3x)\
**Replies:** 1\
**Last updated:** [March 18, 2024, 2:57pm UTC](https://discourse.julialang.org/t/how-to-assist-the-lsp-when-it-comes-to-function-outputs-and-julia-language-good-code/111770 "2024-03-18T14:57:43Z")

</div>

One of the key features of an LSP is auto-completion based on the type. Suppose this code: struct Foo x y end Foo\_constructor(i) = Foo(i,i) a = Foo\_constructor(3) Now, the LSP does not recognize a as an object…

---

## [Problem installing Plots.jl (a FFMPEG issue)](https://discourse.julialang.org/t/problem-installing-plots-jl-a-ffmpeg-issue/28766)

<div class="topic-metadata">

**Author:** [@aerdely](https://discourse.julialang.org/u/aerdely)\
**Replies:** 47\
**Last updated:** [March 18, 2024, 1:54pm UTC](https://discourse.julialang.org/t/problem-installing-plots-jl-a-ffmpeg-issue/28766 "2024-03-18T13:54:57Z")

</div>

After import Pkg Pkg.add("Plots") Pkg.add("GR") using Plots I get the message: FFMPEG not installed properly, run \] build FFMPEG, restart Julia and try again which I already did, but didn’t work. Any suggestions?

---

## [Benchmarking surprises with type assertions](https://discourse.julialang.org/t/benchmarking-surprises-with-type-assertions/111660)

<div class="topic-metadata">

**Author:** [@sijo](https://discourse.julialang.org/u/sijo)\
**Replies:** 10\
**Last updated:** [March 18, 2024, 1:48pm UTC](https://discourse.julialang.org/t/benchmarking-surprises-with-type-assertions/111660 "2024-03-18T13:48:23Z")

</div>

While looking at another post I got surprised by the following differences when using type assertions: using Chairmarks tup = (10, 100im, 1.0, 2//3, 3.0im, 2//3+im) idx = 5 type = typeof(tup\[idx\]) function test1(tup, …

---

## [Visual code error running Julia: requested but not present in the JLS](https://discourse.julialang.org/t/visual-code-error-running-julia-requested-but-not-present-in-the-jls/111762)

<div class="topic-metadata">

**Author:** [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Replies:** 1\
**Last updated:** [March 18, 2024, 1:37pm UTC](https://discourse.julialang.org/t/visual-code-error-running-julia-requested-but-not-present-in-the-jls/111762 "2024-03-18T13:37:35Z")

</div>

I am running a Julia script on the REPL provided by VS code. When launching a line of code, I get a pop up window with the alert “ requested but not present in the JLS” as below What is this alert? How can I get rid o…

---

## [Multiplication of matrix expression and variables leads to stack overflow and matmul error](https://discourse.julialang.org/t/multiplication-of-matrix-expression-and-variables-leads-to-stack-overflow-and-matmul-error/111760)

<div class="topic-metadata">

**Author:** [@Rahul\_Narwar](https://discourse.julialang.org/u/Rahul_Narwar)\
**Replies:** 2\
**Last updated:** [March 18, 2024, 12:00pm UTC](https://discourse.julialang.org/t/multiplication-of-matrix-expression-and-variables-leads-to-stack-overflow-and-matmul-error/111760 "2024-03-18T12:00:10Z")

</div>

I have an optimal orbital transfer problem: h = 2 n = 6 m = 3 model = Model(NLopt.Optimizer) set\_optimizer\_attribute(model, "algorithm", :AUGLAG) local\_optimizer = NLopt.Opt(:LD\_LBFGS, n\*(h+1) + m\*h) local\_optimizer.xt…

---

## [How to handle floating point observable to keep rounding at two digits?](https://discourse.julialang.org/t/how-to-handle-floating-point-observable-to-keep-rounding-at-two-digits/111764)

<div class="topic-metadata">

**Author:** [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Replies:** 0\
**Last updated:** [March 18, 2024, 11:14am UTC](https://discourse.julialang.org/t/how-to-handle-floating-point-observable-to-keep-rounding-at-two-digits/111764 "2024-03-18T11:14:46Z")

</div>

I am trying to draw an interactive plot of a SIV model with GLMakie. I have added the sliders and forced the values associated to these sliders to two decimal digits. While the sliders for the parameters mu and omega wor…

---

## [Where should Julia feature requests go?](https://discourse.julialang.org/t/where-should-julia-feature-requests-go/102835)

<div class="topic-metadata">

**Author:** [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Replies:** 41\
**Last updated:** [March 18, 2024, 10:34am UTC](https://discourse.julialang.org/t/where-should-julia-feature-requests-go/102835 "2024-03-18T10:34:32Z")

</div>

The PR by @Sukera on a new issue template triggered a wider discussion about what GitHub issues are for, and how they should be used in the Julia language repo. On the aspect of feature requests, @viralbshah said the fol…

---

## [Is \`cumsum\` differentiable with Zygote when used in a Flux model?](https://discourse.julialang.org/t/is-cumsum-differentiable-with-zygote-when-used-in-a-flux-model/111738)

<div class="topic-metadata">

**Author:** [@MattSainsbury-Dale](https://discourse.julialang.org/u/MattSainsbury-Dale)\
**Replies:** 2\
**Last updated:** [March 18, 2024, 10:24am UTC](https://discourse.julialang.org/t/is-cumsum-differentiable-with-zygote-when-used-in-a-flux-model/111738 "2024-03-18T10:24:16Z")

</div>

I have a call to cumsum in my Flux model that works as intended in the forward pass, but throws an error when I try to differentiate it. A minimum working example: using Flux n = 5 x = \[rand(1, n), rand(1, n)\] # dumm…

---

## [Creating variables using JuMP](https://discourse.julialang.org/t/creating-variables-using-jump/111562)

<div class="topic-metadata">

**Author:** [@heiwie](https://discourse.julialang.org/u/heiwie)\
**Replies:** 3\
**Last updated:** [March 18, 2024, 9:40am UTC](https://discourse.julialang.org/t/creating-variables-using-jump/111562 "2024-03-18T09:40:35Z")

</div>

I am trying to define variables corresponding to nodes in a lattice consisting of one root node and two other time steps with two nodes each. I have defined a 2D list with all the nodes which I want to use for the indexi…

---

## [Is “repeat“ mousebutton action implemented in Makie?](https://discourse.julialang.org/t/is-repeat-mousebutton-action-implemented-in-makie/111647)

<div class="topic-metadata">

**Author:** [@oniehuis](https://discourse.julialang.org/u/oniehuis)\
**Replies:** 2\
**Last updated:** [March 18, 2024, 9:15am UTC](https://discourse.julialang.org/t/is-repeat-mousebutton-action-implemented-in-makie/111647 "2024-03-18T09:15:02Z")

</div>

I got a bit confused by one of the examples provided on the Makie web page on events (Events · Makie). In the code example that illustrates the implementation of dragging a point, one of the conditions checks whether the…

---

## [Trying to put together our own MARL environment](https://discourse.julialang.org/t/trying-to-put-together-our-own-marl-environment/111732)

<div class="topic-metadata">

**Author:** [@artisakov](https://discourse.julialang.org/u/artisakov)\
**Replies:** 0\
**Last updated:** [March 17, 2024, 7:47pm UTC](https://discourse.julialang.org/t/trying-to-put-together-our-own-marl-environment/111732 "2024-03-17T19:47:03Z")

</div>

Hi, I’m from a university student RL team and we are going to make a new multi-agent cooperative-adversarial environment for learning optimal strategies for short-term scheduling of incoming bids (surgical procedures in …

---

## [How to read/process tuple data file](https://discourse.julialang.org/t/how-to-read-process-tuple-data-file/111754)

<div class="topic-metadata">

**Author:** [@tushargayan2324](https://discourse.julialang.org/u/tushargayan2324)\
**Replies:** 2\
**Last updated:** [March 18, 2024, 7:47am UTC](https://discourse.julialang.org/t/how-to-read-process-tuple-data-file/111754 "2024-03-18T07:47:30Z")

</div>

I have saved some data in Julia without any thought for formatting it. The saved file look something like the following; (\[0.123, 0.124, ... ,0.999\], \[0.222, 0.223, ..., 0.999\]) Link: Perc\_SARW\_analysis/data\_files/datf…

---

## [Making Package](https://discourse.julialang.org/t/making-package/111728)

<div class="topic-metadata">

**Author:** [@AbdelazimHussien](https://discourse.julialang.org/u/AbdelazimHussien)\
**Replies:** 4\
**Last updated:** [March 18, 2024, 6:38am UTC](https://discourse.julialang.org/t/making-package/111728 "2024-03-18T06:38:03Z")

</div>

Hello I have a lot of files that runs correctly as individuals. Now, I wanna put them all together in a package. I now that i can test my code using @test but my question is how to go to specific file from terminal? I…

---

## [Deep Learning VScode Windows](https://discourse.julialang.org/t/deep-learning-vscode-windows/111747)

<div class="topic-metadata">

**Author:** [@jared\_rl](https://discourse.julialang.org/u/jared_rl)\
**Replies:** 0\
**Last updated:** [March 18, 2024, 4:27am UTC](https://discourse.julialang.org/t/deep-learning-vscode-windows/111747 "2024-03-18T04:27:27Z")

</div>

Hello! I have been doing some deep reinforcement learning experiments with reinforcementlearning.jl and flux.jl in VScode windows. I have noticed that the first experiment i run after opening Vscode or after restarting …

---

## [An error occurred when I \`add JuMPeR\`](https://discourse.julialang.org/t/an-error-occurred-when-i-add-jumper/111726)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 4\
**Last updated:** [March 18, 2024, 3:48am UTC](https://discourse.julialang.org/t/an-error-occurred-when-i-add-jumper/111726 "2024-03-18T03:48:49Z")

</div>

I add JuMPeR after add JuMP, but it reported an error (P.S. JuMP is correctly installed): (myenv) pkg\> add JuMPeR Resolving package versions... Updating \`D:\\myenv\\Project.toml\` \[707a9f91\] + JuMPeR v0.6.0 Up…

---

## [Is there any overview of current solvers compatible with \`JuMP\`?](https://discourse.julialang.org/t/is-there-any-overview-of-current-solvers-compatible-with-jump/111720)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 4\
**Last updated:** [March 18, 2024, 3:47am UTC](https://discourse.julialang.org/t/is-there-any-overview-of-current-solvers-compatible-with-jump/111720 "2024-03-18T03:47:56Z")

</div>

The JuMP documentation enumerates several optional optimization solvers. I am curious if this represents the complete collection of optional solvers currently compatible with JuMP, and whether there exists a consolidated…

---

## [Simple example of calling Rust from Julia](https://discourse.julialang.org/t/simple-example-of-calling-rust-from-julia/111742)

<div class="topic-metadata">

**Author:** [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Replies:** 0\
**Last updated:** [March 18, 2024, 3:31am UTC](https://discourse.julialang.org/t/simple-example-of-calling-rust-from-julia/111742 "2024-03-18T03:31:57Z")

</div>

Introduction I was asked for a simple example about how to call Rust from Julia on Slack. I thought I would post it here for posterity. Just to emphasize, my goal here is simplicity. For practical use, you would probabl…

---

## [Correct use of promotion and conversion](https://discourse.julialang.org/t/correct-use-of-promotion-and-conversion/111739)

<div class="topic-metadata">

**Author:** [@mdsalerno](https://discourse.julialang.org/u/mdsalerno)\
**Replies:** 1\
**Last updated:** [March 18, 2024, 1:07am UTC](https://discourse.julialang.org/t/correct-use-of-promotion-and-conversion/111739 "2024-03-18T01:07:36Z")

</div>

I defined the following: import Base: promote\_rule struct RationalNumber{T\<:Integer} \<: Real num::T den::T end #RationalNumber{T}(x::S) where {T\<:Integer, S\<:Integer} = RationalNumber(x, 1) RationalNumber(n:…

---

## [Unstablities when solving initial value problem with Julia DifferentialEquations.jl](https://discourse.julialang.org/t/unstablities-when-solving-initial-value-problem-with-julia-differentialequations-jl/110910)

<div class="topic-metadata">

**Author:** [@paho](https://discourse.julialang.org/u/paho)\
**Replies:** 3\
**Last updated:** [March 18, 2024, 12:05am UTC](https://discourse.julialang.org/t/unstablities-when-solving-initial-value-problem-with-julia-differentialequations-jl/110910 "2024-03-18T00:05:23Z")

</div>

I’m trying to numerically determine the stationary solution of Fokker-Plank equations \\frac{\\partial P}{\\partial t}(x,t) = -\\frac{\\partial }{\\partial x}\\left\[A(x,t) P(x,t)\\right\]+\\frac{1}{2}\\frac{\\partial^2}{\\partial^2 x…

---

## [Gurobi and non linear](https://discourse.julialang.org/t/gurobi-and-non-linear/111665)

<div class="topic-metadata">

**Author:** [@Fabrizio](https://discourse.julialang.org/u/Fabrizio)\
**Replies:** 7\
**Last updated:** [March 17, 2024, 10:47pm UTC](https://discourse.julialang.org/t/gurobi-and-non-linear/111665 "2024-03-17T22:47:33Z")

</div>

Hi, the (python) inteface of Gurobi, since 9.0 ver, enables to consider non linear/non convex OF/cns. Notably square roots of variables in the form \\sum\_i \\sqrt(z\_i) \\leq k . This by means of the function that let y…

---

## [Creating nodes with the same variables/constraints in Plasmo](https://discourse.julialang.org/t/creating-nodes-with-the-same-variables-constraints-in-plasmo/111651)

<div class="topic-metadata">

**Author:** [@evrenmturan](https://discourse.julialang.org/u/evrenmturan)\
**Replies:** 1\
**Last updated:** [March 17, 2024, 8:26pm UTC](https://discourse.julialang.org/t/creating-nodes-with-the-same-variables-constraints-in-plasmo/111651 "2024-03-17T20:26:07Z")

</div>

I posted this on Slack, and was recommended to also post it here. I am setting up a problem in Plasmo, in which some nodes have (some of) the same variables & constraints as other nodes. So I wanted to write a function …

[Previous page](https://discourse.julialang.org/latest.md?page=454)

[Next page](https://discourse.julialang.org/latest.md?page=456)
