# Latest

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

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

**Page:** 267

---

## [Gradient using ForwardDiff.jl not working](https://discourse.julialang.org/t/gradient-using-forwarddiff-jl-not-working/123193)

<div class="topic-metadata">

**Author:** [@miguelborrero](https://discourse.julialang.org/u/miguelborrero)\
**Replies:** 2\
**Last updated:** [November 28, 2024, 4:57pm UTC](https://discourse.julialang.org/t/gradient-using-forwarddiff-jl-not-working/123193 "2024-11-28T16:57:32Z")

</div>

Hi there, I wrote the following log-likelihood function for which I want to try out ForwardDiff.jl to compute the Jacobian. I have it also by hand but just wanted to try it out and check the differences. However I run i…

---

## [Choosing a package for univariate (convex) optimization in Julia](https://discourse.julialang.org/t/choosing-a-package-for-univariate-convex-optimization-in-julia/109089)

<div class="topic-metadata">

**Author:** [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Replies:** 8\
**Last updated:** [November 28, 2024, 4:34pm UTC](https://discourse.julialang.org/t/choosing-a-package-for-univariate-convex-optimization-in-julia/109089 "2024-11-28T16:34:55Z")

</div>

I need to solve 1d convex optimization programs, where I have access to all derivatives. Ideally I’d use Optim.jl but the interface only supports vectors. The backend NLSolvers.jl works but the documentation is not as de…

---

## [How to improve the performance of CUDA kernel function which loop on a large struct array](https://discourse.julialang.org/t/how-to-improve-the-performance-of-cuda-kernel-function-which-loop-on-a-large-struct-array/123139)

<div class="topic-metadata">

**Author:** [@liutao](https://discourse.julialang.org/u/liutao)\
**Replies:** 4\
**Last updated:** [November 28, 2024, 3:47pm UTC](https://discourse.julialang.org/t/how-to-improve-the-performance-of-cuda-kernel-function-which-loop-on-a-large-struct-array/123139 "2024-11-28T15:47:08Z")

</div>

Dear all, I have a problem about the performance of CUDA kernel function which loop on a large struct array. Loop on the struct array is neccesaary for me. The MWE is as follows: using CUDA using Adapt using BenchmarkT…

---

## [ERROR: IOError: rm("C:\\\\Users\\\\35879\\\\.julia\\\\artifacts\\\\jl\_weK1vY\\\\bin"): directory not empty (ENOTEMPTY)](https://discourse.julialang.org/t/error-ioerror-rm-c-users-35879-julia-artifacts-jl-wek1vy-bin-directory-not-empty-enotempty/123142)

<div class="topic-metadata">

**Author:** [@Y1123929](https://discourse.julialang.org/u/Y1123929)\
**Replies:** 6\
**Last updated:** [November 28, 2024, 3:39pm UTC](https://discourse.julialang.org/t/error-ioerror-rm-c-users-35879-julia-artifacts-jl-wek1vy-bin-directory-not-empty-enotempty/123142 "2024-11-28T15:39:19Z")

</div>

When I encountered this error while downloading the environment package, but the directory is empty.How should I handle it? I would be very grateful. (ANN) pkg\> add Flux, Images, Plots Resolving package versions... …

---

## [How to access field values in ParallelStencil.jl custom struct](https://discourse.julialang.org/t/how-to-access-field-values-in-parallelstencil-jl-custom-struct/123172)

<div class="topic-metadata">

**Author:** [@pchaubal](https://discourse.julialang.org/u/pchaubal)\
**Replies:** 2\
**Last updated:** [November 28, 2024, 2:04pm UTC](https://discourse.julialang.org/t/how-to-access-field-values-in-parallelstencil-jl-custom-struct/123172 "2024-11-28T14:04:25Z")

</div>

I am trying to use a custom struct with ParallelStencil.jl. I define the custom struct as @CellType Field2D fieldnames=(xx, yy, zz) Then I initialize it for 2 variables as F1 = @zeros( nx, ny, celltype=Field2D) F2 = …

---

## [Autodifferentiation of model with fixed and mutable parameters](https://discourse.julialang.org/t/autodifferentiation-of-model-with-fixed-and-mutable-parameters/123208)

<div class="topic-metadata">

**Author:** [@EminentCoder](https://discourse.julialang.org/u/EminentCoder)\
**Replies:** 3\
**Last updated:** [November 28, 2024, 1:06pm UTC](https://discourse.julialang.org/t/autodifferentiation-of-model-with-fixed-and-mutable-parameters/123208 "2024-11-28T13:06:00Z")

</div>

Hello all, I am currently trying to build a model where some of the model-parameters need to be optimized while others have to remain fixed. The current approach works rather well, but I have some trouble with auto-diff…

---

## [Packages installed in VSCode disappeared in Windows Powershell?](https://discourse.julialang.org/t/packages-installed-in-vscode-disappeared-in-windows-powershell/123166)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 15\
**Last updated:** [November 28, 2024, 12:32pm UTC](https://discourse.julialang.org/t/packages-installed-in-vscode-disappeared-in-windows-powershell/123166 "2024-11-28T12:32:08Z")

</div>

In VSCode I have installed two packages in the default @v1.11 environment: But when I opened Windows Powershell to start julia and typed \] st I found there is nothing: Why?

---

## [Evalpoly without coefficients: ugly errors, zero polynomial?](https://discourse.julialang.org/t/evalpoly-without-coefficients-ugly-errors-zero-polynomial/97666)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 1\
**Last updated:** [November 28, 2024, 11:56am UTC](https://discourse.julialang.org/t/evalpoly-without-coefficients-ugly-errors-zero-polynomial/97666 "2024-11-28T11:56:30Z")

</div>

Consider calls such as these: julia\> evalpoly(3, ()) ERROR: BoundsError: attempt to access Tuple{} at index \[0\] Stacktrace: \[1\] getindex(t::Tuple, i::Int64) @ Base ./tuple.jl:31 \[2\] macro expansion @ ./math.jl:1…

---

## [Storing output in matrix or vector format](https://discourse.julialang.org/t/storing-output-in-matrix-or-vector-format/123207)

<div class="topic-metadata">

**Author:** [@danieleavitabile](https://discourse.julialang.org/u/danieleavitabile)\
**Replies:** 4\
**Last updated:** [November 28, 2024, 11:20am UTC](https://discourse.julialang.org/t/storing-output-in-matrix-or-vector-format/123207 "2024-11-28T11:20:55Z")

</div>

I’m new to Julia, coming from Matlab. Consider the following sketched function function time\_stepper(f,u0,nsteps, ...) # Allocate arrays t = zeros(nsteps) p = length(u0) u = zeros(p,nsteps +1) # Initialise t\[1\] = 0.0…

---

## [Is Julia even the right choice for this contrarian game idea long-term?](https://discourse.julialang.org/t/is-julia-even-the-right-choice-for-this-contrarian-game-idea-long-term/123036)

<div class="topic-metadata">

**Author:** [@Tarny\_GG\_Channie](https://discourse.julialang.org/u/Tarny_GG_Channie)\
**Replies:** 11\
**Last updated:** [November 28, 2024, 10:25am UTC](https://discourse.julialang.org/t/is-julia-even-the-right-choice-for-this-contrarian-game-idea-long-term/123036 "2024-11-28T10:25:39Z")

</div>

Julia is not currently a suitable language for game development. There is no major game engine in it. I have accepted this fully. However, the reason I look into Julia for game development is not its current state, but i…

---

## [ERROR: UndefVarError: \`ADAM\` not defined in \`Main\` in flux](https://discourse.julialang.org/t/error-undefvarerror-adam-not-defined-in-main-in-flux/121784)

<div class="topic-metadata">

**Author:** [@Liuxiu1512](https://discourse.julialang.org/u/Liuxiu1512)\
**Replies:** 4\
**Last updated:** [November 28, 2024, 10:01am UTC](https://discourse.julialang.org/t/error-undefvarerror-adam-not-defined-in-main-in-flux/121784 "2024-11-28T10:01:16Z")

</div>

Hi, i get this error when try to using flux julia\> using Pkg julia\> Pkg.add(“Flux”) Resolving package versions… No Changes to C:\\Users\\lbtvi\\.julia\\environments\\v1.11\\Project.toml No Changes to C:\\Users\\lbtvi\\.julia…

---

## [Difference between solutions obtained from ODE model and ModelingToolkit model](https://discourse.julialang.org/t/difference-between-solutions-obtained-from-ode-model-and-modelingtoolkit-model/123157)

<div class="topic-metadata">

**Author:** [@Maucejo](https://discourse.julialang.org/u/Maucejo)\
**Replies:** 3\
**Last updated:** [November 28, 2024, 9:41am UTC](https://discourse.julialang.org/t/difference-between-solutions-obtained-from-ode-model-and-modelingtoolkit-model/123157 "2024-11-28T09:41:21Z")

</div>

Hi all, I am starting using OrdinaryDiffEq and ModelingToolkit and try to learn how to use these packages properly. To this end, I took the double pendulum as an example. For the OrdinaryDiffEq model, I have implemented…

---

## [Error when subtracting sparse matrices](https://discourse.julialang.org/t/error-when-subtracting-sparse-matrices/123198)

<div class="topic-metadata">

**Author:** [@EZ\_Money](https://discourse.julialang.org/u/EZ_Money)\
**Replies:** 5\
**Last updated:** [November 28, 2024, 9:20am UTC](https://discourse.julialang.org/t/error-when-subtracting-sparse-matrices/123198 "2024-11-28T09:20:22Z")

</div>

I’m getting an error when running A-B for sparse matrices A and B which have the same type and dimensions. Actually, B was obtained from A by setting B = A; B\[1,1\] = 1; julia\> Ha 16900×16900 SparseMatrixCSC{Complex{BigF…

---

## [OptimizationSystem from a set of multiple equations](https://discourse.julialang.org/t/optimizationsystem-from-a-set-of-multiple-equations/122809)

<div class="topic-metadata">

**Author:** [@Bart\_van\_de\_Lint](https://discourse.julialang.org/u/Bart_van_de_Lint)\
**Replies:** 16\
**Last updated:** [November 28, 2024, 8:53am UTC](https://discourse.julialang.org/t/optimizationsystem-from-a-set-of-multiple-equations/122809 "2024-11-28T08:53:30Z")

</div>

I have a set of equations where there are some input variables and one output variable. I want to minimize the output variable, and thought to do this with an OptimizationProblem. In this example, distance is the only in…

---

## [Parameter Estimation with partial data](https://discourse.julialang.org/t/parameter-estimation-with-partial-data/123192)

<div class="topic-metadata">

**Author:** [@Fourier](https://discourse.julialang.org/u/Fourier)\
**Replies:** 2\
**Last updated:** [November 28, 2024, 8:35am UTC](https://discourse.julialang.org/t/parameter-estimation-with-partial-data/123192 "2024-11-28T08:35:35Z")

</div>

Hi, I have a differential equation, for example the differential equation for a pendulum, like in this example from DiffEqBayes. I would like to estimate the parameters. However I only know a part of the solution, for …

---

## [Understanding the output of @code\_warntype](https://discourse.julialang.org/t/understanding-the-output-of-code-warntype/123191)

<div class="topic-metadata">

**Author:** [@miguelborrero](https://discourse.julialang.org/u/miguelborrero)\
**Replies:** 8\
**Last updated:** [November 28, 2024, 8:35am UTC](https://discourse.julialang.org/t/understanding-the-output-of-code-warntype/123191 "2024-11-28T08:35:12Z")

</div>

Hi there, I simulated some data which I stored as an Array{Observation} where Observation is a composite type that stores the elements of each observation. I then I wrote a function to compute the log-likelihood of the …

---

## [How to pre-compile an extension?](https://discourse.julialang.org/t/how-to-pre-compile-an-extension/123160)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 5\
**Last updated:** [November 28, 2024, 2:35am UTC](https://discourse.julialang.org/t/how-to-pre-compile-an-extension/123160 "2024-11-28T02:35:50Z")

</div>

How can I precompile “RatiosFixedPointNumbersExt”? I have a script that creates a system image, and if I run Julia with this system image I do not want that it starts precompiling again, it should be instant, but if I r…

---

## [Sin(x), cos(x) w/ Gurobi?](https://discourse.julialang.org/t/sin-x-cos-x-w-gurobi/123179)

<div class="topic-metadata">

**Author:** [@SingingKim](https://discourse.julialang.org/u/SingingKim)\
**Replies:** 2\
**Last updated:** [November 28, 2024, 2:19am UTC](https://discourse.julialang.org/t/sin-x-cos-x-w-gurobi/123179 "2024-11-28T02:19:08Z")

</div>

Can I use sinusoidal functions with JuMP/Gurobi? something like: using JuMP, Gurobi m=Model(Gurobi.Optimizer) @variable(m, -2π \<= x \<= 2π) @objective(m, Min, cos(x)) optimize!(m) It seems like there’s a section on sine…

---

## [Teaching and grading with Julia and Pluto (... and ChatGPT)](https://discourse.julialang.org/t/teaching-and-grading-with-julia-and-pluto-and-chatgpt/120795)

<div class="topic-metadata">

**Author:** [@VivMendes](https://discourse.julialang.org/u/VivMendes)\
**Replies:** 4\
**Last updated:** [November 27, 2024, 9:04pm UTC](https://discourse.julialang.org/t/teaching-and-grading-with-julia-and-pluto-and-chatgpt/120795 "2024-11-27T21:04:37Z")

</div>

Hi everybody. We have used Julia and Pluto in an economics course over the last four years. Students use Pluto notebooks to solve numerical (and symbolic) problems, and the assessment moments (tests/exams) are also under…

---

## [\`IdDict{UInt64, Float64}\` is much slower than \`Dict{UInt64, Float64}\` for retrieving values](https://discourse.julialang.org/t/iddict-uint64-float64-is-much-slower-than-dict-uint64-float64-for-retrieving-values/123144)

<div class="topic-metadata">

**Author:** [@frankwswang](https://discourse.julialang.org/u/frankwswang)\
**Replies:** 2\
**Last updated:** [November 27, 2024, 8:36pm UTC](https://discourse.julialang.org/t/iddict-uint64-float64-is-much-slower-than-dict-uint64-float64-for-retrieving-values/123144 "2024-11-27T20:36:16Z")

</div>

MWE: julia\> k = rand(UInt, 5000); julia\> v = rand(Float64, 5000); julia\> using Random julia\> ks = shuffle(k); julia\> d1 = Dict(k .=\> v); julia\> d2 = IdDict(k .=\> v); julia\> using BenchmarkTools julia\> @benchmark …

---

## [What is the purpose of JuliaWorkspaces.jl?](https://discourse.julialang.org/t/what-is-the-purpose-of-juliaworkspaces-jl/123181)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 0\
**Last updated:** [November 27, 2024, 5:37pm UTC](https://discourse.julialang.org/t/what-is-the-purpose-of-juliaworkspaces-jl/123181 "2024-11-27T17:37:24Z")

</div>

What is the purpose the the package JuliaWorkspaces? It seams to be an important component of the VSCode Julia plugin. But which requirements does this package implement that justify that it is a separate package? wha…

---

## [Animate Makie.volume! doesn't work](https://discourse.julialang.org/t/animate-makie-volume-doesnt-work/123162)

<div class="topic-metadata">

**Author:** [@YoffeG](https://discourse.julialang.org/u/YoffeG)\
**Replies:** 4\
**Last updated:** [November 27, 2024, 6:31pm UTC](https://discourse.julialang.org/t/animate-makie-volume-doesnt-work/123162 "2024-11-27T18:31:16Z")

</div>

Hey all, assume I have a time-varying 3d volume that I wish to animate and save as an mp4 file, where the volume is simply a color-coded cube, where the color coding is the value of each pixel varying in time. I found no…

---

## [Lambdify function to matrix](https://discourse.julialang.org/t/lambdify-function-to-matrix/123163)

<div class="topic-metadata">

**Author:** [@ccmejia](https://discourse.julialang.org/u/ccmejia)\
**Replies:** 2\
**Last updated:** [November 27, 2024, 5:57pm UTC](https://discourse.julialang.org/t/lambdify-function-to-matrix/123163 "2024-11-27T17:57:18Z")

</div>

Hi there! Im trying to obtain a 20x20 matrix from the next code fn = lambdify(t, \[V, g, k\]) ges = range(1, 2, 20); kes = range(1, 2, 20) fn.(1, ges, kes) But I obtain a vector… 20-element Vector{ComplexF64}: Functi…

---

## [DataFrames: Which formats (if any) support saving of metadata](https://discourse.julialang.org/t/dataframes-which-formats-if-any-support-saving-of-metadata/123134)

<div class="topic-metadata">

**Author:** [@alex-s-gardner](https://discourse.julialang.org/u/alex-s-gardner)\
**Replies:** 6\
**Last updated:** [November 27, 2024, 5:23pm UTC](https://discourse.julialang.org/t/dataframes-which-formats-if-any-support-saving-of-metadata/123134 "2024-11-27T17:23:37Z")

</div>

Are there file formats that support saving of metadata (global and columnar)?

---

## [Julia online compiler](https://discourse.julialang.org/t/julia-online-compiler/122782)

<div class="topic-metadata">

**Author:** [@hack3rcon](https://discourse.julialang.org/u/hack3rcon)\
**Replies:** 56\
**Last updated:** [November 27, 2024, 5:56pm UTC](https://discourse.julialang.org/t/julia-online-compiler/122782 "2024-11-27T17:56:28Z")

</div>

Hello, I thank the Julia development team for building the Julia language. One thing that can help the Julia community grow is to build a simple and fast website to run Julia code. I think Julia needs something like htt…

---

## [Periodic solution to a forced oscillator ODE](https://discourse.julialang.org/t/periodic-solution-to-a-forced-oscillator-ode/123080)

<div class="topic-metadata">

**Author:** [@xor0110](https://discourse.julialang.org/u/xor0110)\
**Replies:** 10\
**Last updated:** [November 27, 2024, 5:32pm UTC](https://discourse.julialang.org/t/periodic-solution-to-a-forced-oscillator-ode/123080 "2024-11-27T17:32:22Z")

</div>

I’m working with an ODE model. I’m looking for the periodic solution to a forced, non-conservative, non-linear and time-invariant oscillator. For example, something like x''(t) = - k (x(t) + 0.1 x^3(t)) - a x'(t) + A si…

---

## [Pkg: REPL \<-\> API equivalence](https://discourse.julialang.org/t/pkg-repl-api-equivalence/123177)

<div class="topic-metadata">

**Author:** [@ffevotte](https://discourse.julialang.org/u/ffevotte)\
**Replies:** 4\
**Last updated:** [November 27, 2024, 4:42pm UTC](https://discourse.julialang.org/t/pkg-repl-api-equivalence/123177 "2024-11-27T16:42:15Z")

</div>

In order to automate the instantiation of projects in non-standard/complex cases, I sometimes write small setup.jl scripts relying on Pkg’s programmatic API. This is very nice, but I occasionally struggle finding the AP…

---

## [Comparison of tensor packages?](https://discourse.julialang.org/t/comparison-of-tensor-packages/11425)

<div class="topic-metadata">

**Author:** [@tparker](https://discourse.julialang.org/u/tparker)\
**Replies:** 29\
**Last updated:** [November 27, 2024, 4:07pm UTC](https://discourse.julialang.org/t/comparison-of-tensor-packages/11425 "2024-11-27T16:07:12Z")

</div>

Julia seems to have many different packages for tensor operations, like TensorFlow, TensorOperations, Tensors, TensorToolbox, and TensorWorkbench. Is there a general consensus as to which one(s) are the most useful? Coul…

---

## [Plotting with colorbar and NaN](https://discourse.julialang.org/t/plotting-with-colorbar-and-nan/123165)

<div class="topic-metadata">

**Author:** [@gasparalfaro](https://discourse.julialang.org/u/gasparalfaro)\
**Replies:** 2\
**Last updated:** [November 27, 2024, 3:46pm UTC](https://discourse.julialang.org/t/plotting-with-colorbar-and-nan/123165 "2024-11-27T15:46:41Z")

</div>

I found a code that I could execute a year ago (last time I executed was November 14th 2023, I think) but with packages updated as today it gives error. I could simplify the code to this MWE: y1 = \[1 2 3 ; 4 5 6; 7 8 9\]…

---

## [Expression Updating](https://discourse.julialang.org/t/expression-updating/123135)

<div class="topic-metadata">

**Author:** [@co1emi11er](https://discourse.julialang.org/u/co1emi11er)\
**Replies:** 2\
**Last updated:** [November 27, 2024, 3:35pm UTC](https://discourse.julialang.org/t/expression-updating/123135 "2024-11-27T15:35:39Z")

</div>

Say I have an expression block like the following: quote x = foo(args...) y = otherpackage.bar(args...) end I would like to turn that into the following: quote x = Module.foo(args...) y = Module.otherp…

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

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