# Latest

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

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

**Page:** 570

---

## [ExtraVariablesSystemException when using structural\_simplify in Modelingtoolkit](https://discourse.julialang.org/t/extravariablessystemexception-when-using-structural-simplify-in-modelingtoolkit/105351)

<div class="topic-metadata">

**Author:** [@aoifehealy](https://discourse.julialang.org/u/aoifehealy)\
**Replies:** 2\
**Last updated:** [October 25, 2023, 10:50am UTC](https://discourse.julialang.org/t/extravariablessystemexception-when-using-structural-simplify-in-modelingtoolkit/105351 "2023-10-25T10:50:42Z")

</div>

Hi there, I’m new to julia (and Modelingtoolkit), and am trying to replicate a simple 2 element Windkessel model (capacitor and resistor in parallel). my code is as follows: using ModelingToolkit using Plots using Diffe…

---

## [Error during Optimization using Neural ODEs](https://discourse.julialang.org/t/error-during-optimization-using-neural-odes/105082)

<div class="topic-metadata">

**Author:** [@Marco\_Nesta](https://discourse.julialang.org/u/Marco_Nesta)\
**Replies:** 38\
**Last updated:** [October 22, 2023, 5:08pm UTC](https://discourse.julialang.org/t/error-during-optimization-using-neural-odes/105082 "2023-10-22T17:08:08Z")

</div>

using DifferentialEquations, Plots, Flux,Optim, DiffEqFlux, DataInterpolations,Random, ComponentArrays, Lux using Optimization, OptimizationOptimisers, OptimizationOptimJL,OptimizationNLopt rng = Random.default\_rng() usi…

---

## [Variant of an "elseif" loop with binary values](https://discourse.julialang.org/t/variant-of-an-elseif-loop-with-binary-values/105348)

<div class="topic-metadata">

**Author:** [@Fabian1](https://discourse.julialang.org/u/Fabian1)\
**Replies:** 3\
**Last updated:** [October 25, 2023, 6:53am UTC](https://discourse.julialang.org/t/variant-of-an-elseif-loop-with-binary-values/105348 "2023-10-25T06:53:19Z")

</div>

Hi ! I’m looking for another possibility to implement my elseif loop for my linear program. The goal is to implement the following: if q\_out \>= 9 eff == 0.75 elseif 7 \<= q\_out \< 9 eff == 1 else eff == 0.5 …

---

## [Attach additional information to exception](https://discourse.julialang.org/t/attach-additional-information-to-exception/105337)

<div class="topic-metadata">

**Author:** [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Replies:** 4\
**Last updated:** [October 25, 2023, 6:34am UTC](https://discourse.julialang.org/t/attach-additional-information-to-exception/105337 "2023-10-25T06:34:39Z")

</div>

If I want to attach additional information to an exception, e.g. I have a vector of some structs and do something with each. For one, there is an exception, and it would be helpful if I know from which. Maybe like this: …

---

## [User defined function inside JuMP Objective resulting in MethodError](https://discourse.julialang.org/t/user-defined-function-inside-jump-objective-resulting-in-methoderror/105332)

<div class="topic-metadata">

**Author:** [@philds](https://discourse.julialang.org/u/philds)\
**Replies:** 6\
**Last updated:** [October 25, 2023, 1:32am UTC](https://discourse.julialang.org/t/user-defined-function-inside-jump-objective-resulting-in-methoderror/105332 "2023-10-25T01:32:25Z")

</div>

Hi there, I’m trying to formulate an optimization model that maximizes profit while dealing with the transportation of raw supplies and production of goods. The profit calculation is lengthy and depends upon both decisi…

---

## [Doubly linked objects preventing garbage collection](https://discourse.julialang.org/t/doubly-linked-objects-preventing-garbage-collection/105326)

<div class="topic-metadata">

**Author:** [@f.ij](https://discourse.julialang.org/u/f.ij)\
**Replies:** 5\
**Last updated:** [October 24, 2023, 10:52pm UTC](https://discourse.julialang.org/t/doubly-linked-objects-preventing-garbage-collection/105326 "2023-10-24T22:52:29Z")

</div>

I’m trying to manage some async tasks (usually timers) that correspond to structs I create. Sometimes I want to delete all my data and start over, which is when I want the timers to close. I thought it would be a good id…

---

## [Is it possible to specify an object as not thread safe?](https://discourse.julialang.org/t/is-it-possible-to-specify-an-object-as-not-thread-safe/105359)

<div class="topic-metadata">

**Author:** [@rdavis120](https://discourse.julialang.org/u/rdavis120)\
**Replies:** 1\
**Last updated:** [October 24, 2023, 10:48pm UTC](https://discourse.julialang.org/t/is-it-possible-to-specify-an-object-as-not-thread-safe/105359 "2023-10-24T22:48:43Z")

</div>

Is it possible to specify the type of an object as not being safe to pass between tasks, such as a database connection or an RCall instance which is inherently synchronous? If I make a mistake I usually just get a seg f…

---

## [JuMP whit PATHSolver](https://discourse.julialang.org/t/jump-whit-pathsolver/105347)

<div class="topic-metadata">

**Author:** [@sjhon](https://discourse.julialang.org/u/sjhon)\
**Replies:** 1\
**Last updated:** [October 24, 2023, 8:59pm UTC](https://discourse.julialang.org/t/jump-whit-pathsolver/105347 "2023-10-24T20:59:01Z")

</div>

I am trying to define this variable T: using JuMP import PATHSolver @variable(modelo, 0 \<= T\[ω = 1:5\] \<= (ω-1)\*0.25, start = 1) Defined with this restriction: @constraint(modelo, \[ω = 1:5\], (c\[ω\]\*(1-α)-s)Y\[ω\] -(BQ\[ω…

---

## [Accessing Fortran derived types from Julia](https://discourse.julialang.org/t/accessing-fortran-derived-types-from-julia/105327)

<div class="topic-metadata">

**Author:** [@danmohedano](https://discourse.julialang.org/u/danmohedano)\
**Replies:** 11\
**Last updated:** [October 24, 2023, 8:54pm UTC](https://discourse.julialang.org/t/accessing-fortran-derived-types-from-julia/105327 "2023-10-24T20:54:39Z")

</div>

Hello everyone. I’ve been performing some tests to try and port some functionality from a Fortran module to Julia. While testing out some of Julia’s interoperability features with Fortran I have run into some issues whe…

---

## [Why is the argument of vectorized in-place function is marked as not used?](https://discourse.julialang.org/t/why-is-the-argument-of-vectorized-in-place-function-is-marked-as-not-used/105356)

<div class="topic-metadata">

**Author:** [@homocomputeris](https://discourse.julialang.org/u/homocomputeris)\
**Replies:** 5\
**Last updated:** [October 24, 2023, 8:26pm UTC](https://discourse.julialang.org/t/why-is-the-argument-of-vectorized-in-place-function-is-marked-as-not-used/105356 "2023-10-24T20:26:40Z")

</div>

Following the tutorial, I want to use OrdinaryDiffEq to solve an equation: using OrdinaryDiffEq function A(t, p) ω, ε = p return \[\[0.0 1.0\]; \[-(ω + ε \* cos(t)) 0.0\]\] end function mathieu!(du, u, p, t) du =…

---

## [Generating a macro call from a macro with the macro name as a symbol](https://discourse.julialang.org/t/generating-a-macro-call-from-a-macro-with-the-macro-name-as-a-symbol/105335)

<div class="topic-metadata">

**Author:** [@awiersdorf](https://discourse.julialang.org/u/awiersdorf)\
**Replies:** 2\
**Last updated:** [October 24, 2023, 5:49pm UTC](https://discourse.julialang.org/t/generating-a-macro-call-from-a-macro-with-the-macro-name-as-a-symbol/105335 "2023-10-24T17:49:25Z")

</div>

I am trying to write a macro that expands into a call to another macro. Moreover, that other macro isn’t known statically—it’s determined at macro expansion time. I’m having difficulty constructing an AST with the macro …

---

## [QuadGK returns NaNs](https://discourse.julialang.org/t/quadgk-returns-nans/105308)

<div class="topic-metadata">

**Author:** [@aner-sanchez](https://discourse.julialang.org/u/aner-sanchez)\
**Replies:** 4\
**Last updated:** [October 24, 2023, 1:24pm UTC](https://discourse.julialang.org/t/quadgk-returns-nans/105308 "2023-10-24T13:24:46Z")

</div>

Hello everyone :slight\_smile: Would someone know why using QuadGK n = 538 \_, w, \_ = kronrod(n,1e-11,40); @show w returns a vector of NaN weights at n=538 and not before?

---

## [Unusual Error in Julia](https://discourse.julialang.org/t/unusual-error-in-julia/105062)

<div class="topic-metadata">

**Author:** [@tomberrrington](https://discourse.julialang.org/u/tomberrrington)\
**Replies:** 22\
**Last updated:** [October 24, 2023, 1:21pm UTC](https://discourse.julialang.org/t/unusual-error-in-julia/105062 "2023-10-24T13:21:37Z")

</div>

Whenever I download Julia I get the error “ArgumentError: “/private/tmp/PKInstallSandbox.21we0o/tmp” is not a directory” Does anyone know I can get around this so that I can download pluto

---

## [MethodError in loss function when using Flux with GPU support](https://discourse.julialang.org/t/methoderror-in-loss-function-when-using-flux-with-gpu-support/105343)

<div class="topic-metadata">

**Author:** [@hungpham3112](https://discourse.julialang.org/u/hungpham3112)\
**Replies:** 2\
**Last updated:** [October 24, 2023, 1:16pm UTC](https://discourse.julialang.org/t/methoderror-in-loss-function-when-using-flux-with-gpu-support/105343 "2023-10-24T13:16:55Z")

</div>

I’m building simple neural network in regression problem then I receive an error: MethodError: no method matching loss(::Chain{Tuple{Dense{typeof(relu), CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 1, C…

---

## [Change value of parameter and u0 after init ODEProblem DifferentialEquations.jl](https://discourse.julialang.org/t/change-value-of-parameter-and-u0-after-init-odeproblem-differentialequations-jl/105120)

<div class="topic-metadata">

**Author:** [@Sergey\_Novak](https://discourse.julialang.org/u/Sergey_Novak)\
**Replies:** 8\
**Last updated:** [October 24, 2023, 1:01pm UTC](https://discourse.julialang.org/t/change-value-of-parameter-and-u0-after-init-odeproblem-differentialequations-jl/105120 "2023-10-24T13:01:14Z")

</div>

Hello! How can I change the parameter value and initial conditions after initialization ODEProblem? I tried to change u0 using prob.u0 = newu0 But I got a warning Warning: Mutation of ODEProblem detected. SciMLBase v…

---

## [Resize plot with PlotlyJS](https://discourse.julialang.org/t/resize-plot-with-plotlyjs/105346)

<div class="topic-metadata">

**Author:** [@Alseidon](https://discourse.julialang.org/u/Alseidon)\
**Replies:** 0\
**Last updated:** [October 24, 2023, 12:35pm UTC](https://discourse.julialang.org/t/resize-plot-with-plotlyjs/105346 "2023-10-24T12:35:26Z")

</div>

I usually work with the default GR backend in Plots.jl, but I needed interactivity for some 3D plots. The issue is, the default window size is too small, but if I rescale the window the plot stays the same size. Is there…

---

## [About In-line-fft](https://discourse.julialang.org/t/about-in-line-fft/105340)

<div class="topic-metadata">

**Author:** [@Take1234](https://discourse.julialang.org/u/Take1234)\
**Replies:** 6\
**Last updated:** [October 24, 2023, 12:32pm UTC](https://discourse.julialang.org/t/about-in-line-fft/105340 "2023-10-24T12:32:07Z")

</div>

Hi Experts ,I’m just studing Julia But I’m in truble. Berrow 2D turblence simulation code is that I translated from Matlab is use too much memory. At my Simulation environment it use approx. 32 GB. I found some info abou…

---

## [Project.toml \[compat\] best practice: should I manually remove incompatible old dependency versions?](https://discourse.julialang.org/t/project-toml-compat-best-practice-should-i-manually-remove-incompatible-old-dependency-versions/103530)

<div class="topic-metadata">

**Author:** [@vtjeng](https://discourse.julialang.org/u/vtjeng)\
**Replies:** 10\
**Last updated:** [October 24, 2023, 9:48am UTC](https://discourse.julialang.org/t/project-toml-compat-best-practice-should-i-manually-remove-incompatible-old-dependency-versions/103530 "2023-10-24T09:48:41Z")

</div>

I maintain a package (MIPVerify.jl) and largely rely on unit tests in CI + CompatHelper (example PR) to keep my \[compat\] up to date. Since CompatHelper only adds to the list of versions for each dependency, the lower bou…

---

## [Makie: Put text at arbitrary position outside the frame](https://discourse.julialang.org/t/makie-put-text-at-arbitrary-position-outside-the-frame/105322)

<div class="topic-metadata">

**Author:** [@ryofurue](https://discourse.julialang.org/u/ryofurue)\
**Replies:** 4\
**Last updated:** [October 24, 2023, 9:44am UTC](https://discourse.julialang.org/t/makie-put-text-at-arbitrary-position-outside-the-frame/105322 "2023-10-24T09:44:54Z")

</div>

From a past thread (see below), I learned how to put arbitrary text outside the frame. But, am I right that it’s impossible or extremely tedious to put text at an arbitrary position? I’ve plotted the following figure, w…

---

## [AoG "range step cannot be zero"](https://discourse.julialang.org/t/aog-range-step-cannot-be-zero/87624)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 14\
**Last updated:** [October 24, 2023, 9:27am UTC](https://discourse.julialang.org/t/aog-range-step-cannot-be-zero/87624 "2023-10-24T09:27:13Z")

</div>

I don’t have an MWE but maybe someone has a guess what this means? ERROR: ArgumentError: range step cannot be zero Stacktrace: \[1\] (::Colon)(start::Float32, step::Float32, stop::Float32) @ Base ./twiceprecision.jl…

---

## [Expanding \`@repl\` blocks in REPL and Jupyter](https://discourse.julialang.org/t/expanding-repl-blocks-in-repl-and-jupyter/105288)

<div class="topic-metadata">

**Author:** [@gdmsl](https://discourse.julialang.org/u/gdmsl)\
**Replies:** 3\
**Last updated:** [October 24, 2023, 9:26am UTC](https://discourse.julialang.org/t/expanding-repl-blocks-in-repl-and-jupyter/105288 "2023-10-24T09:26:48Z")

</div>

While writing documentation, I am making large use of the @repl blocks with Documenter.jl. However, it seems that these blocks are not expanded automatically in the REPL or in Jupyter. Is there a way to expand the @repl …

---

## [Spoken-language programming (also for Julia?): Cursorless programming language](https://discourse.julialang.org/t/spoken-language-programming-also-for-julia-cursorless-programming-language/105312)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 1\
**Last updated:** [October 24, 2023, 1:26am UTC](https://discourse.julialang.org/t/spoken-language-programming-also-for-julia-cursorless-programming-language/105312 "2023-10-24T01:26:27Z")

</div>

I just found Cursorless fascinating. It’s not (seemingly) for blind programmers, rather other disabilities, or none, since it claims maybe even faster than typing. built on: “tree-sitter is a real-time, error tolerant …

---

## [How to update the documentation of a package hosted on Github?](https://discourse.julialang.org/t/how-to-update-the-documentation-of-a-package-hosted-on-github/105324)

<div class="topic-metadata">

**Author:** [@\_stla](https://discourse.julialang.org/u/_stla)\
**Replies:** 8\
**Last updated:** [October 24, 2023, 1:06am UTC](https://discourse.julialang.org/t/how-to-update-the-documentation-of-a-package-hosted-on-github/105324 "2023-10-24T01:06:22Z")

</div>

Hello, I am the maintainer of EllipticFunctions.jl (that I will soon register). I have a Github action for the documentation but it has not updated the documentation for one year. Would you know what should I do?

---

## [Running from different version of Julia](https://discourse.julialang.org/t/running-from-different-version-of-julia/105298)

<div class="topic-metadata">

**Author:** [@Allan\_Olave](https://discourse.julialang.org/u/Allan_Olave)\
**Replies:** 19\
**Last updated:** [October 24, 2023, 12:40am UTC](https://discourse.julialang.org/t/running-from-different-version-of-julia/105298 "2023-10-24T00:40:27Z")

</div>

With the following code function finding\_minimum\_sum(list\_of\_distance, list\_of\_projected\_load, show\_list = true) x = list\_of\_distance y = list\_of\_projected\_load l1 = length(x) l2 = length(y) xy = \[\] for i in 1:l2 …

---

## [Why is there nothing like Pluto.jl in Python?](https://discourse.julialang.org/t/why-is-there-nothing-like-pluto-jl-in-python/105146)

<div class="topic-metadata">

**Author:** [@inmzhang](https://discourse.julialang.org/u/inmzhang)\
**Replies:** 5\
**Last updated:** [October 23, 2023, 10:45pm UTC](https://discourse.julialang.org/t/why-is-there-nothing-like-pluto-jl-in-python/105146 "2023-10-23T22:45:52Z")

</div>

I’m new to Julia and found Pluto.jl just amazing. I don’t know much about the techs behind Pluto so I wonder why is there nothing like that in Python ecosystem. Is it related to the JIT?

---

## [\`MLJ.Stack\` performance issues](https://discourse.julialang.org/t/mlj-stack-performance-issues/105085)

<div class="topic-metadata">

**Author:** [@ParadaCarleton](https://discourse.julialang.org/u/ParadaCarleton)\
**Replies:** 4\
**Last updated:** [October 23, 2023, 9:48pm UTC](https://discourse.julialang.org/t/mlj-stack-performance-issues/105085 "2023-10-23T21:48:45Z")

</div>

I’m trying to use a stacked model to predict an outcome, but I’m having an unusual performance issue. I’m not sure whether the problems are related to my own code having a mistake somewhere, or if it’s just to be expecte…

---

## [Plot histogram with edge color in Plots.jl](https://discourse.julialang.org/t/plot-histogram-with-edge-color-in-plots-jl/83119)

<div class="topic-metadata">

**Author:** [@roi.holtzman](https://discourse.julialang.org/u/roi.holtzman)\
**Replies:** 3\
**Last updated:** [October 23, 2023, 9:53pm UTC](https://discourse.julialang.org/t/plot-histogram-with-edge-color-in-plots-jl/83119 "2023-10-23T21:53:45Z")

</div>

Can one plot a histogram in Plots.jl where only the outer line is plotted, like in this picture? In PyPlot this is set be edgecolor but I did not find a way to do this in Plots with gr.

---

## [How to sum the result of mapslices on the GPU while tracking gradients?](https://discourse.julialang.org/t/how-to-sum-the-result-of-mapslices-on-the-gpu-while-tracking-gradients/105310)

<div class="topic-metadata">

**Author:** [@taotree](https://discourse.julialang.org/u/taotree)\
**Replies:** 0\
**Last updated:** [October 23, 2023, 11:52am UTC](https://discourse.julialang.org/t/how-to-sum-the-result-of-mapslices-on-the-gpu-while-tracking-gradients/105310 "2023-10-23T11:52:49Z")

</div>

I need to do mapslices but need it to support gradient tracking for Zygote. So, I’m trying to use SliceMap.slicemap. I can’t use SliceMap.mapcols because I have parameters inside the function. SliceMap.slicemap returns a…

---

## [Symbols and variables](https://discourse.julialang.org/t/symbols-and-variables/105306)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 6\
**Last updated:** [October 23, 2023, 6:03pm UTC](https://discourse.julialang.org/t/symbols-and-variables/105306 "2023-10-23T18:03:35Z")

</div>

The following code fails: using ModelingToolkit @variables t @syms ω(t) Pgc(t) @variables R a b ρ U J A s struct Equilibrium a\_bar b\_bar pg\_bar # generator power ω\_bar # rotor speed end mutable…

---

## [Makie: align y axes at the origin (y=0) for different y ranges](https://discourse.julialang.org/t/makie-align-y-axes-at-the-origin-y-0-for-different-y-ranges/105282)

<div class="topic-metadata">

**Author:** [@ryofurue](https://discourse.julialang.org/u/ryofurue)\
**Replies:** 6\
**Last updated:** [October 23, 2023, 5:18pm UTC](https://discourse.julialang.org/t/makie-align-y-axes-at-the-origin-y-0-for-different-y-ranges/105282 "2023-10-23T17:18:30Z")

</div>

I’m trying to create a single line graph plotting totally different multiple quantities with more than two y axes. I’m almost successful. See the plot below. One thing that I don’t know how to achieve is to align the y…

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

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