# Latest

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

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

**Page:** 409

---

## [Docstring for \`Method\`](https://discourse.julialang.org/t/docstring-for-method/92675)

<div class="topic-metadata">

**Author:** [@FedeClaudi](https://discourse.julialang.org/u/FedeClaudi)\
**Replies:** 5\
**Last updated:** [May 17, 2024, 6:48am UTC](https://discourse.julialang.org/t/docstring-for-method/92675 "2024-05-17T06:48:28Z")

</div>

Hey everyone, I’m trying to do something that I thought would be easy but is actually rather tricky. I simply want to get the docstring of a Method. For example: """ my f """ f(x::Int) = 2x """ with strings """ f(x…

---

## [How to conveniently pass arguments from a function to another?](https://discourse.julialang.org/t/how-to-conveniently-pass-arguments-from-a-function-to-another/114385)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 4\
**Last updated:** [May 17, 2024, 5:31am UTC](https://discourse.julialang.org/t/how-to-conveniently-pass-arguments-from-a-function-to-another/114385 "2024-05-17T05:31:04Z")

</div>

function f(x=1, y=2, z=3; a=1, b=2, c=3) # How do I know if a/b/c is assigned a value? 2 \* g(x, y, z; a=a, b=b, c=c) # Do I have to pass the arguments one by one to g? end function g(x=1, y=2, z=3; a=1, b=2, c=3…

---

## [ROS2 client library for Julialang](https://discourse.julialang.org/t/ros2-client-library-for-julialang/32095)

<div class="topic-metadata">

**Author:** [@andreasziegler](https://discourse.julialang.org/u/andreasziegler)\
**Replies:** 10\
**Last updated:** [May 17, 2024, 4:55am UTC](https://discourse.julialang.org/t/ros2-client-library-for-julialang/32095 "2024-05-17T04:55:26Z")

</div>

Hi As a robotics engineer, I’m working with ROS2. From an (software) engineering and research perspective, I’m quite interested in Julia however with the lack of a ROS2 client library for Julia, it’s for me currently a …

---

## [What are the best practices for using incompatible downstream packages in package development?](https://discourse.julialang.org/t/what-are-the-best-practices-for-using-incompatible-downstream-packages-in-package-development/114275)

<div class="topic-metadata">

**Author:** [@kimikage](https://discourse.julialang.org/u/kimikage)\
**Replies:** 3\
**Last updated:** [May 17, 2024, 1:12am UTC](https://discourse.julialang.org/t/what-are-the-best-practices-for-using-incompatible-downstream-packages-in-package-development/114275 "2024-05-17T01:12:04Z")

</div>

When developing a package, you may want to use its downstream packages for testing and documentation. However, its downstream packages may not officially support the development version because the development version h…

---

## [Error trying to ForwardDiff through an ODE solver](https://discourse.julialang.org/t/error-trying-to-forwarddiff-through-an-ode-solver/114339)

<div class="topic-metadata">

**Author:** [@orebas](https://discourse.julialang.org/u/orebas)\
**Replies:** 9\
**Last updated:** [May 16, 2024, 10:53pm UTC](https://discourse.julialang.org/t/error-trying-to-forwarddiff-through-an-ode-solver/114339 "2024-05-16T22:53:35Z")

</div>

I am trying to use AD to differentiate the solution of an ODE. Various docs seem to indicate this is very well supported, so I was surprised to get an error. For some additional color, I got a different error before ad…

---

## [Solving DAEs with known sparsity pattern and IDA](https://discourse.julialang.org/t/solving-daes-with-known-sparsity-pattern-and-ida/114318)

<div class="topic-metadata">

**Author:** [@ataideneto](https://discourse.julialang.org/u/ataideneto)\
**Replies:** 4\
**Last updated:** [May 16, 2024, 10:51pm UTC](https://discourse.julialang.org/t/solving-daes-with-known-sparsity-pattern-and-ida/114318 "2024-05-16T22:51:55Z")

</div>

Hi everyone! Can someone provide a minimal example of how to use sparsity patterns (jac\_prototype) when solving DAEs with IDA solver? I manage to use sparsity patterns with ODEs and the julia solvers… Here are some exa…

---

## [How to Use Operator Overloading with Optional Arguments in Julia](https://discourse.julialang.org/t/how-to-use-operator-overloading-with-optional-arguments-in-julia/114375)

<div class="topic-metadata">

**Author:** [@Akhil\_Akkapelli](https://discourse.julialang.org/u/Akhil_Akkapelli)\
**Replies:** 2\
**Last updated:** [May 16, 2024, 8:56pm UTC](https://discourse.julialang.org/t/how-to-use-operator-overloading-with-optional-arguments-in-julia/114375 "2024-05-16T20:56:44Z")

</div>

I’m working on a Julia project and I’ve defined a custom function with operator overloading. My function, which I’ve defined using the | operator, initializes a matrix of Box objects with properties derived from a parent…

---

## [Plots do not display, unless I call gui(), when using custom sysimage](https://discourse.julialang.org/t/plots-do-not-display-unless-i-call-gui-when-using-custom-sysimage/92207)

<div class="topic-metadata">

**Author:** [@rdiaz02](https://discourse.julialang.org/u/rdiaz02)\
**Replies:** 3\
**Last updated:** [May 16, 2024, 8:02pm UTC](https://discourse.julialang.org/t/plots-do-not-display-unless-i-call-gui-when-using-custom-sysimage/92207 "2024-05-16T20:02:30Z")

</div>

I have created a custom sysimage that contains Plots, as explained here https://julialang.github.io/PackageCompiler.jl/dev/examples/plots.html (see \[1\] below for complete details). If I start Julia from the REPL using…

---

## [Unable to precompile any packages](https://discourse.julialang.org/t/unable-to-precompile-any-packages/114311)

<div class="topic-metadata">

**Author:** [@gplayer](https://discourse.julialang.org/u/gplayer)\
**Replies:** 18\
**Last updated:** [May 16, 2024, 7:52pm UTC](https://discourse.julialang.org/t/unable-to-precompile-any-packages/114311 "2024-05-16T19:52:53Z")

</div>

I’ve run into the following error which I’ve been unable to fix. Whenever I try to run “using \*” for any packages (I’ve tried Plots, CSV, JSON, QuadGK, and a few others), it fails to precompile. The top line of the erro…

---

## [LWPR in Julia](https://discourse.julialang.org/t/lwpr-in-julia/7578)

<div class="topic-metadata">

**Author:** [@rdeits](https://discourse.julialang.org/u/rdeits)\
**Replies:** 2\
**Last updated:** [May 16, 2024, 7:24pm UTC](https://discourse.julialang.org/t/lwpr-in-julia/7578 "2024-05-16T19:24:36Z")

</div>

I’m considering playing around with Locally Weighted Projection Regression (LWPR), and I was curious if anyone was aware of any Julia implementations of the algorithm (Google, alas, is not). I’m aware of SLMC | InfWeb (…

---

## [Union type confusion](https://discourse.julialang.org/t/union-type-confusion/114366)

<div class="topic-metadata">

**Author:** [@wsshin](https://discourse.julialang.org/u/wsshin)\
**Replies:** 6\
**Last updated:** [May 16, 2024, 7:11pm UTC](https://discourse.julialang.org/t/union-type-confusion/114366 "2024-05-16T19:11:22Z")

</div>

Consider an abstract type with a parameter T and its two concrete types: abstract type AbstractMyType{T} end struct MyType1{T} \<: AbstractMyType{T} end struct MyType2{T} \<: AbstractMyType{T} end Construct a vector of i…

---

## [How to extend structs for equality, in order to make use of operator like \`in\`?](https://discourse.julialang.org/t/how-to-extend-structs-for-equality-in-order-to-make-use-of-operator-like-in/114322)

<div class="topic-metadata">

**Author:** [@BuddhiLW](https://discourse.julialang.org/u/BuddhiLW)\
**Replies:** 7\
**Last updated:** [May 16, 2024, 6:32pm UTC](https://discourse.julialang.org/t/how-to-extend-structs-for-equality-in-order-to-make-use-of-operator-like-in/114322 "2024-05-16T18:32:15Z")

</div>

I’m creating a package to run Black Jack simulations. I would like to write structs A, C2 (2-card), … etc for each card type in a deck. And, to have a general Card struct, so I can overload methods like +, ==, with Car…

---

## [Slow package load after initially starting Julia on Windows](https://discourse.julialang.org/t/slow-package-load-after-initially-starting-julia-on-windows/114369)

<div class="topic-metadata">

**Author:** [@TomRottier](https://discourse.julialang.org/u/TomRottier)\
**Replies:** 2\
**Last updated:** [May 16, 2024, 6:05pm UTC](https://discourse.julialang.org/t/slow-package-load-after-initially-starting-julia-on-windows/114369 "2024-05-16T18:05:07Z")

</div>

When I open a fresh terminal session on Windows: julia\> @time using GLMakie 56.724200 seconds (4.40 M allocations: 459.433 MiB, 0.63% gc time, 0.09% compilation time: 57% of which was recompilation) If I then close th…

---

## [Should the JuliaCon category be higher up?](https://discourse.julialang.org/t/should-the-juliacon-category-be-higher-up/113841)

<div class="topic-metadata">

**Author:** [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Replies:** 1\
**Last updated:** [May 16, 2024, 3:25pm UTC](https://discourse.julialang.org/t/should-the-juliacon-category-be-higher-up/113841 "2024-05-16T15:25:51Z")

</div>

Should the JuliaCon category on Discourse be higher up? It is currently ordered below “Meta Discussion” and above “Off Topic”. poll

---

## [Running Old Project on Latest Julia Version?](https://discourse.julialang.org/t/running-old-project-on-latest-julia-version/114356)

<div class="topic-metadata">

**Author:** [@r0b0ty](https://discourse.julialang.org/u/r0b0ty)\
**Replies:** 8\
**Last updated:** [May 16, 2024, 5:23pm UTC](https://discourse.julialang.org/t/running-old-project-on-latest-julia-version/114356 "2024-05-16T17:23:52Z")

</div>

Is there a proper way (best practice) to convert a project originally compiled in an older Julia version, to the latest released version? The message I’m greeted with in this scenario is: Warning: The active manifest …

---

## [Assigning value to time dependent symbolic function inside a function](https://discourse.julialang.org/t/assigning-value-to-time-dependent-symbolic-function-inside-a-function/114361)

<div class="topic-metadata">

**Author:** [@PrimulaBunce](https://discourse.julialang.org/u/PrimulaBunce)\
**Replies:** 4\
**Last updated:** [May 16, 2024, 3:41pm UTC](https://discourse.julialang.org/t/assigning-value-to-time-dependent-symbolic-function-inside-a-function/114361 "2024-05-16T15:41:46Z")

</div>

Hi, In the following code: using ModelingToolkit @variables t @register\_symbolic u(t) u(t) = 60 is there a way I can assign a value to u(t) from inside a function? The following doesn’t work. function assignValue…

---

## [How to define a \`struct\` that has keyword arguments?](https://discourse.julialang.org/t/how-to-define-a-struct-that-has-keyword-arguments/114353)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 10\
**Last updated:** [May 16, 2024, 3:26pm UTC](https://discourse.julialang.org/t/how-to-define-a-struct-that-has-keyword-arguments/114353 "2024-05-16T15:26:59Z")

</div>

I want to define a struct whose instances are created with explicit keyword arguments just like a function. How? struct MyStruct kwarg1::Real kwarg2::String end MyStruct(kwarg1=1, kwarg2="hello")

---

## [Marking user points / events along a cxdimension-one curve of fold bifurcation](https://discourse.julialang.org/t/marking-user-points-events-along-a-cxdimension-one-curve-of-fold-bifurcation/114325)

<div class="topic-metadata">

**Author:** [@BigEpsilon.jl](https://discourse.julialang.org/u/BigEpsilon.jl)\
**Replies:** 3\
**Last updated:** [May 16, 2024, 2:48pm UTC](https://discourse.julialang.org/t/marking-user-points-events-along-a-cxdimension-one-curve-of-fold-bifurcation/114325 "2024-05-16T14:48:33Z")

</div>

This post is concerning BifurcationKit.jl I doing a bifurcation analysis in two parameters, and want to be able to mark a point along a fold-curve, similar to how it is on in AUTO-07p. I have gotten this working for a …

---

## [JuliaCall setup script not working (Ubuntu)](https://discourse.julialang.org/t/juliacall-setup-script-not-working-ubuntu/114328)

<div class="topic-metadata">

**Author:** [@Rohit](https://discourse.julialang.org/u/Rohit)\
**Replies:** 0\
**Last updated:** [May 15, 2024, 10:30pm UTC](https://discourse.julialang.org/t/juliacall-setup-script-not-working-ubuntu/114328 "2024-05-15T22:30:54Z")

</div>

Hi, I installed the latest version of Julia 1.10.3 in my AWS Ubuntu and I’m now trying to set it up in R. I tried using JuliaCall’s setup function but it shows me the following error: \> library(JuliaCall) \> julia \<- ju…

---

## [Update on Base.@kwdef versus Parameters.jl](https://discourse.julialang.org/t/update-on-base-kwdef-versus-parameters-jl/95042)

<div class="topic-metadata">

**Author:** [@mocalvao](https://discourse.julialang.org/u/mocalvao)\
**Replies:** 10\
**Last updated:** [May 16, 2024, 2:41pm UTC](https://discourse.julialang.org/t/update-on-base-kwdef-versus-parameters-jl/95042 "2024-05-16T14:41:23Z")

</div>

Hi, I have checked the Stackoverflow topic Difference between @with\_kw and Base.@kwdef in Julia?, whose last update is from Oct, 18, 2021, and would like to know whether there should be any drawbacks due to my current p…

---

## [What can I do to calculate the L2 norm between the exact solution and my numerical solution?](https://discourse.julialang.org/t/what-can-i-do-to-calculate-the-l2-norm-between-the-exact-solution-and-my-numerical-solution/114359)

<div class="topic-metadata">

**Author:** [@mcr.92](https://discourse.julialang.org/u/mcr.92)\
**Replies:** 3\
**Last updated:** [May 16, 2024, 2:23pm UTC](https://discourse.julialang.org/t/what-can-i-do-to-calculate-the-l2-norm-between-the-exact-solution-and-my-numerical-solution/114359 "2024-05-16T14:23:52Z")

</div>

I am solving a differential equation by the MOL method, it has an exact solution so I want to calculate the error in the L2 norm. I made this code F1(x) = A\*(cosh(B\*x)) F2(y) = A\*(cosh(B\*y)) FC = -(2\*(B^2)\*K - W)/(ρ\*C\_s…

---

## [Training Flux LSTM on GPU is slower than on CPU](https://discourse.julialang.org/t/training-flux-lstm-on-gpu-is-slower-than-on-cpu/114250)

<div class="topic-metadata">

**Author:** [@dtramtn](https://discourse.julialang.org/u/dtramtn)\
**Replies:** 1\
**Last updated:** [May 16, 2024, 11:51am UTC](https://discourse.julialang.org/t/training-flux-lstm-on-gpu-is-slower-than-on-cpu/114250 "2024-05-16T11:51:26Z")

</div>

Hi, I’m trying to train an LSTM with timeseries data using Flux and attempting to speed it up by training on the GPU, but it takes longer than on the CPU. The data is an n\_features x n\_observation matrix as generated i…

---

## [Discrepancy between complex gradients calculate with Zygote.jl and Python's Jax](https://discourse.julialang.org/t/discrepancy-between-complex-gradients-calculate-with-zygote-jl-and-pythons-jax/114301)

<div class="topic-metadata">

**Author:** [@F-YF](https://discourse.julialang.org/u/F-YF)\
**Replies:** 10\
**Last updated:** [May 16, 2024, 11:24am UTC](https://discourse.julialang.org/t/discrepancy-between-complex-gradients-calculate-with-zygote-jl-and-pythons-jax/114301 "2024-05-16T11:24:31Z")

</div>

When I translated another python project code into julia code, there was a problem. After unremitting efforts, I finally got the following two sample codes Julia codeusing Zygote using FiniteDifferences function test(x…

---

## [Why use EnsembleProblems?](https://discourse.julialang.org/t/why-use-ensembleproblems/114315)

<div class="topic-metadata">

**Author:** [@jonathanfischer97](https://discourse.julialang.org/u/jonathanfischer97)\
**Replies:** 1\
**Last updated:** [May 16, 2024, 8:07am UTC](https://discourse.julialang.org/t/why-use-ensembleproblems/114315 "2024-05-16T08:07:05Z")

</div>

What’s the main intended use case for using an EnsembleProblem in DifferentialEquations.jl? Does it offer better performance through batching compared to just writing an equivalent parallelized loop with remake and sol…

---

## [Why falling back to linear interpolation once I use saveat?](https://discourse.julialang.org/t/why-falling-back-to-linear-interpolation-once-i-use-saveat/114343)

<div class="topic-metadata">

**Author:** [@photor](https://discourse.julialang.org/u/photor)\
**Replies:** 1\
**Last updated:** [May 16, 2024, 7:57am UTC](https://discourse.julialang.org/t/why-falling-back-to-linear-interpolation-once-i-use-saveat/114343 "2024-05-16T07:57:18Z")

</div>

julia\> solve(prob,Tsit5(),calck=false) retcode: Success Interpolation: specialized 4th order "free" interpolation t: 7-element Vector{Float64}: -1.0 -0.9999 -0.9989 -0.9889 -0.8889 0.11109999999999953 1.0 u: 7-e…

---

## [Guidance on POS Tagging and lemmatization approach](https://discourse.julialang.org/t/guidance-on-pos-tagging-and-lemmatization-approach/114344)

<div class="topic-metadata">

**Author:** [@Amval](https://discourse.julialang.org/u/Amval)\
**Replies:** 0\
**Last updated:** [May 16, 2024, 7:33am UTC](https://discourse.julialang.org/t/guidance-on-pos-tagging-and-lemmatization-approach/114344 "2024-05-16T07:33:54Z")

</div>

Hello, I’d like to do some basic NLP tasks (POS Tagging, lemmatization) in languages other than English. . Or, more specifically, German. Currently, I am using SpaCy through PyCall with the german model. This is fine, h…

---

## [How to implement R-like marginaleffects?](https://discourse.julialang.org/t/how-to-implement-r-like-marginaleffects/114260)

<div class="topic-metadata">

**Author:** [@edvin](https://discourse.julialang.org/u/edvin)\
**Replies:** 4\
**Last updated:** [May 16, 2024, 5:23am UTC](https://discourse.julialang.org/t/how-to-implement-r-like-marginaleffects/114260 "2024-05-16T05:23:17Z")

</div>

Hi, I’m interested in how to implement calculation of partial derivatives/marginal effects similar to the package marginaleffects in r. I translated some code from the excellent documentation, to simply calculate the m…

---

## [Precompilation gridlock on HPC cluster](https://discourse.julialang.org/t/precompilation-gridlock-on-hpc-cluster/114213)

<div class="topic-metadata">

**Author:** [@MilesCranmer](https://discourse.julialang.org/u/MilesCranmer)\
**Replies:** 9\
**Last updated:** [May 16, 2024, 4:12am UTC](https://discourse.julialang.org/t/precompilation-gridlock-on-hpc-cluster/114213 "2024-05-16T04:12:26Z")

</div>

I’m running a batch script on an HPC cluster where each Julia execution is expected to be \<1 min, within a bash loop. I ran into this weird “precompilation gridlock”, shown below. Has anybody experienced something like t…

---

## [I have a problem with error : cuda driver not found](https://discourse.julialang.org/t/i-have-a-problem-with-error-cuda-driver-not-found/114337)

<div class="topic-metadata">

**Author:** [@rbfks1003](https://discourse.julialang.org/u/rbfks1003)\
**Replies:** 0\
**Last updated:** [May 16, 2024, 4:00am UTC](https://discourse.julialang.org/t/i-have-a-problem-with-error-cuda-driver-not-found/114337 "2024-05-16T04:00:45Z")

</div>

Hello, I’m trying it because I want to use it while reading about scLENS among the papers presented in nature. It’s being done based on julia. In the paper, code availability is provided, so I practiced demo data based …

---

## [Colorbar for contour plot with uneven spacing of contour lines](https://discourse.julialang.org/t/colorbar-for-contour-plot-with-uneven-spacing-of-contour-lines/114329)

<div class="topic-metadata">

**Author:** [@rkube](https://discourse.julialang.org/u/rkube)\
**Replies:** 3\
**Last updated:** [May 16, 2024, 2:21am UTC](https://discourse.julialang.org/t/colorbar-for-contour-plot-with-uneven-spacing-of-contour-lines/114329 "2024-05-16T02:21:18Z")

</div>

Hi, I’m trying to add a colorbar for a contour plot with uneven spacing between the contour lines. The contour plot using CairoMakie fig = let fig = Figure() ax = Axis(fig\[1, 1\]) xrg = 0.0:0.01:1.0 y…

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

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