# Latest

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

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

**Page:** 185

---

## [Fix parameter when passing to optimizer](https://discourse.julialang.org/t/fix-parameter-when-passing-to-optimizer/61102)

<div class="topic-metadata">

**Author:** [@misha\_mikhasenko](https://discourse.julialang.org/u/misha_mikhasenko)\
**Replies:** 26\
**Last updated:** [April 12, 2025, 3:16pm UTC](https://discourse.julialang.org/t/fix-parameter-when-passing-to-optimizer/61102 "2025-04-12T15:16:23Z")

</div>

When doing the optimization step, I often want to fix some parameters of the model. With parameters being a NamedTuple, or ComponentArray, my current solution is to split to organized two sets of parameters (free and fi…

---

## [Ref vs zero-dimensional arrays?](https://discourse.julialang.org/t/ref-vs-zero-dimensional-arrays/24434)

<div class="topic-metadata">

**Author:** [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Replies:** 12\
**Last updated:** [April 12, 2025, 11:42am UTC](https://discourse.julialang.org/t/ref-vs-zero-dimensional-arrays/24434 "2025-04-12T11:42:46Z")

</div>

What is the difference between a zero-dimensional array holding the value x, which you construct using fill(x), and a Ref(x)? In both cases you would access the underlying data via \[\], which can be set or read. And it …

---

## [Is there a julia package that uses Newton-Krylov method for systems of nonlinear equations?](https://discourse.julialang.org/t/is-there-a-julia-package-that-uses-newton-krylov-method-for-systems-of-nonlinear-equations/36520)

<div class="topic-metadata">

**Author:** [@JianghuiDu](https://discourse.julialang.org/u/JianghuiDu)\
**Replies:** 28\
**Last updated:** [April 12, 2025, 11:40am UTC](https://discourse.julialang.org/t/is-there-a-julia-package-that-uses-newton-krylov-method-for-systems-of-nonlinear-equations/36520 "2025-04-12T11:40:28Z")

</div>

IterativeSolvers.jl doesn’t deal with nonlinear equations and NLsolve.jl doesn’t have Krylov methods? What about large sparse nonlinear iterative solvers?

---

## [PlotlyKaleido cannot save PlotlyLight drawings created from templates](https://discourse.julialang.org/t/plotlykaleido-cannot-save-plotlylight-drawings-created-from-templates/127779)

<div class="topic-metadata">

**Author:** [@karei](https://discourse.julialang.org/u/karei)\
**Replies:** 1\
**Last updated:** [April 12, 2025, 10:32am UTC](https://discourse.julialang.org/t/plotlykaleido-cannot-save-plotlylight-drawings-created-from-templates/127779 "2025-04-12T10:32:01Z")

</div>

I first created a template for my drawing and then applied the template using PlotlyLight.settings.layout.template = a\_template. But the saved image is still the unapplied template version. Is there any solution for this…

---

## [Dynamic immutable type](https://discourse.julialang.org/t/dynamic-immutable-type/127168)

<div class="topic-metadata">

**Author:** [@Soel](https://discourse.julialang.org/u/Soel)\
**Replies:** 11\
**Last updated:** [April 12, 2025, 10:19am UTC](https://discourse.julialang.org/t/dynamic-immutable-type/127168 "2025-04-12T10:19:33Z")

</div>

Hello Julians, I’m trying to design a type MyType having a certain number of fields amongst which matrix::AbstractMatrix. In production MyType is intended to have its field matrix modified (hundreds times a day)… I’ve e…

---

## [Ref is not a concrete type - poorly documented?](https://discourse.julialang.org/t/ref-is-not-a-concrete-type-poorly-documented/120375)

<div class="topic-metadata">

**Author:** [@johnomotani](https://discourse.julialang.org/u/johnomotani)\
**Replies:** 17\
**Last updated:** [April 12, 2025, 10:18am UTC](https://discourse.julialang.org/t/ref-is-not-a-concrete-type-poorly-documented/120375 "2025-04-12T10:18:08Z")

</div>

I just learned from Why are ref's in structs type unstable? that Ref is not a concrete type, and so structs containing a Ref are not type-stable, e.g. struct Foo a::Ref end Instead you have to use, for example, RefVa…

---

## [OpenCascade](https://discourse.julialang.org/t/opencascade/127956)

<div class="topic-metadata">

**Author:** [@RaulDurand](https://discourse.julialang.org/u/RaulDurand)\
**Replies:** 1\
**Last updated:** [April 12, 2025, 5:53am UTC](https://discourse.julialang.org/t/opencascade/127956 "2025-04-12T05:53:38Z")

</div>

Hi, Is anyone working on an OpenCascade wrapper for Julia? I just found this automatically generated package GitHub - JuliaBinaryWrappers/OCCT\_jll.jl but I believe that the bindings are still required. Thanks

---

## [Arb\_jll fails to load/precompile dylib after MacOS update](https://discourse.julialang.org/t/arb-jll-fails-to-load-precompile-dylib-after-macos-update/127989)

<div class="topic-metadata">

**Author:** [@hsgg](https://discourse.julialang.org/u/hsgg)\
**Replies:** 4\
**Last updated:** [April 12, 2025, 12:18am UTC](https://discourse.julialang.org/t/arb-jll-fails-to-load-precompile-dylib-after-macos-update/127989 "2025-04-12T00:18:19Z")

</div>

I upgraded MacOS from Sequoia 15.3 to 15.4 this week. I also updated homebrew at the same time. Julia is installed via juliaup and is at 1.11.4. Since the upgrade, julia fails to load Arb\_jll needed by ArbNumerics.jl, w…

---

## [Does \`@distributed\` return an array of futures?](https://discourse.julialang.org/t/does-distributed-return-an-array-of-futures/127992)

<div class="topic-metadata">

**Author:** [@leespen1](https://discourse.julialang.org/u/leespen1)\
**Replies:** 2\
**Last updated:** [April 11, 2025, 9:54pm UTC](https://discourse.julialang.org/t/does-distributed-return-an-array-of-futures/127992 "2025-04-11T21:54:08Z")

</div>

The Julia manual (Multi-processing and Distributed Computing · The Julia Language) claims that @distributed without a reduction operator returns a an array of Futures: Using “outside” variables in parallel loops is per…

---

## [Calling Julia from within Java: JuliaCaller](https://discourse.julialang.org/t/calling-julia-from-within-java-juliacaller/48357)

<div class="topic-metadata">

**Author:** [@jbytecode](https://discourse.julialang.org/u/jbytecode)\
**Replies:** 18\
**Last updated:** [April 11, 2025, 8:46pm UTC](https://discourse.julialang.org/t/calling-julia-from-within-java-juliacaller/48357 "2025-04-11T20:46:48Z")

</div>

Hi folks, Due to the discussion in Running Julia from Java - What is crazier?, I am introducing a new project for calling Julia from within Java. Despite it is in its early stages, the package implements basic external …

---

## [Package registration failure](https://discourse.julialang.org/t/package-registration-failure/127986)

<div class="topic-metadata">

**Author:** [@Eben60](https://discourse.julialang.org/u/Eben60)\
**Replies:** 2\
**Last updated:** [April 11, 2025, 5:37pm UTC](https://discourse.julialang.org/t/package-registration-failure/127986 "2025-04-11T17:37:56Z")

</div>

I’m trying to register an patch version update, but get an error I was not able to load the package (i.e. import PackageMaker failed). See the AutoMerge logs for details. I’ve no idea where are these AutoMerge logs ,…

---

## [Pkg \`target\` based test specific dependencies just doesn't work?](https://discourse.julialang.org/t/pkg-target-based-test-specific-dependencies-just-doesnt-work/127965)

<div class="topic-metadata">

**Author:** [@Peter\_Hill](https://discourse.julialang.org/u/Peter_Hill)\
**Replies:** 5\
**Last updated:** [April 11, 2025, 6:20pm UTC](https://discourse.julialang.org/t/pkg-target-based-test-specific-dependencies-just-doesnt-work/127965 "2025-04-11T18:20:47Z")

</div>

I’m very new to Julia, and I’ve been trying to get some unit tests up with TestItemRunner.jl. Following the recommended way to specify test dependencies (my account is too new to link, but this is following the Pkg.jl do…

---

## [Congratulations to Dr. Alan Edelman - a 2024 Fellow of the American Association for the Advancement of Science (AAAS)](https://discourse.julialang.org/t/congratulations-to-dr-alan-edelman-a-2024-fellow-of-the-american-association-for-the-advancement-of-science-aaas/127988)

<div class="topic-metadata">

**Author:** [@digital\_carver](https://discourse.julialang.org/u/digital_carver)\
**Replies:** 0\
**Last updated:** [April 11, 2025, 6:16pm UTC](https://discourse.julialang.org/t/congratulations-to-dr-alan-edelman-a-2024-fellow-of-the-american-association-for-the-advancement-of-science-aaas/127988 "2025-04-11T18:16:55Z")

</div>

I just got around to the JuliaHub newletter for the last week, and learnt that: Alan Edelman, JuliaHub Co-Founder, Julia Co-Creator and Principal Investigator of the JuliaLab at the Massachusetts Institute of Technolog…

---

## [\`methods\` and \`@which\` give different results](https://discourse.julialang.org/t/methods-and-which-give-different-results/127954)

<div class="topic-metadata">

**Author:** [@sadish-d](https://discourse.julialang.org/u/sadish-d)\
**Replies:** 7\
**Last updated:** [April 11, 2025, 5:46pm UTC](https://discourse.julialang.org/t/methods-and-which-give-different-results/127954 "2025-04-11T17:46:29Z")

</div>

I have: f(; x) = 0 and I do: f(x = 1) creating one specialized method (MethodInstance?) of f. I can see the specialized method with a @which: julia\> (@which f(x = 1)) |\> Base.specializations Base.MethodSpecializati…

---

## [Function calling @SVector with locally defined range returns UndefVarError](https://discourse.julialang.org/t/function-calling-svector-with-locally-defined-range-returns-undefvarerror/127946)

<div class="topic-metadata">

**Author:** [@Giorgos\_Vretinaris](https://discourse.julialang.org/u/Giorgos_Vretinaris)\
**Replies:** 6\
**Last updated:** [April 11, 2025, 4:58pm UTC](https://discourse.julialang.org/t/function-calling-svector-with-locally-defined-range-returns-undefvarerror/127946 "2025-04-11T16:58:12Z")

</div>

Hello, I am trying to define this small function f(n) = @SVector \[i for i in 1:n\] and I get the following error: ERROR: LoadError: UndefVarError: \`n\` not defined in \`Main\` Suggestion: check for spelling errors or miss…

---

## [Divide collection into two groups](https://discourse.julialang.org/t/divide-collection-into-two-groups/127983)

<div class="topic-metadata">

**Author:** [@HugoTrentesaux](https://discourse.julialang.org/u/HugoTrentesaux)\
**Replies:** 1\
**Last updated:** [April 11, 2025, 4:48pm UTC](https://discourse.julialang.org/t/divide-collection-into-two-groups/127983 "2025-04-11T16:48:04Z")

</div>

I can filter a group based on a condition: using DataPipes a = \[1,2,5,5,3,9,8\] large = @p filter(\_\>4, a) # 5,5,9,8 small = @p filter(\_\<=4, a) # 1,2,3 But is there a way to achieve the same in a single action? # I woul…

---

## [Having trouble with StatsModels.jl \`modelmatrix\` to replicate R results](https://discourse.julialang.org/t/having-trouble-with-statsmodels-jl-modelmatrix-to-replicate-r-results/127981)

<div class="topic-metadata">

**Author:** [@slwu89](https://discourse.julialang.org/u/slwu89)\
**Replies:** 1\
**Last updated:** [April 11, 2025, 4:07pm UTC](https://discourse.julialang.org/t/having-trouble-with-statsmodels-jl-modelmatrix-to-replicate-r-results/127981 "2025-04-11T16:07:49Z")

</div>

Hi all, I’m trying to generate a model matrix to replicate R results, I’d appreciate some guidance. The input data is the Rail data from the nlme package in R, it has the format below: \> library(nlme) \> data(Rail) \> Rai…

---

## [How to kill julia test process?](https://discourse.julialang.org/t/how-to-kill-julia-test-process/127976)

<div class="topic-metadata">

**Author:** [@floswald](https://discourse.julialang.org/u/floswald)\
**Replies:** 1\
**Last updated:** [April 11, 2025, 2:06pm UTC](https://discourse.julialang.org/t/how-to-kill-julia-test-process/127976 "2025-04-11T14:06:40Z")

</div>

hi there, I’m seeing here Test Item Framework · Julia in VS Code To enable this, all test processes show up in the Julia Workspace, alongside any REPL or Notebook processes that might also be running. And you can term…

---

## [Sort values on the y-axis from smallest to largest](https://discourse.julialang.org/t/sort-values-on-the-y-axis-from-smallest-to-largest/127802)

<div class="topic-metadata">

**Author:** [@Merkut](https://discourse.julialang.org/u/Merkut)\
**Replies:** 5\
**Last updated:** [April 11, 2025, 1:37pm UTC](https://discourse.julialang.org/t/sort-values-on-the-y-axis-from-smallest-to-largest/127802 "2025-04-11T13:37:56Z")

</div>

Hello Everyone, as you see from my grap, my y axis is not sorted. How can I sort the y axix from minumum to maximum. using Plots using DataFrames using CSV df = CSV.read("D:/ölçüm.csv", DataFrame) Zaman2\_1 = df\[:, 1…

---

## [How to automatically produce this kind of matrix in Julia?](https://discourse.julialang.org/t/how-to-automatically-produce-this-kind-of-matrix-in-julia/127948)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 2\
**Last updated:** [April 11, 2025, 1:15pm UTC](https://discourse.julialang.org/t/how-to-automatically-produce-this-kind-of-matrix-in-julia/127948 "2025-04-11T13:15:00Z")

</div>

Hello! I am unsure of how to make a proper MWE, so I will explain what I would like to achieve, which is the automatic construction of this matrix: \[Source: https://dual.sphysics.org/7thworkshop/workshop/program/7DSW…

---

## [Mul! modifying input arrays when using FFTW.jl to compute 2D inverse RFFT](https://discourse.julialang.org/t/mul-modifying-input-arrays-when-using-fftw-jl-to-compute-2d-inverse-rfft/127970)

<div class="topic-metadata">

**Author:** [@jibe](https://discourse.julialang.org/u/jibe)\
**Replies:** 2\
**Last updated:** [April 11, 2025, 12:58pm UTC](https://discourse.julialang.org/t/mul-modifying-input-arrays-when-using-fftw-jl-to-compute-2d-inverse-rfft/127970 "2025-04-11T12:58:16Z")

</div>

I have just encountered what I believe is a bug when using FFTW.jl to compute inverse 2D FFT. As reproduced in the MWE below, the use of mul!(A,P,B) modifies the input array B. using FFTW, LinearAlgebra; N = 1; B = rand…

---

## [Generic generation of functions](https://discourse.julialang.org/t/generic-generation-of-functions/127968)

<div class="topic-metadata">

**Author:** [@Daniel\_Lincke](https://discourse.julialang.org/u/Daniel_Lincke)\
**Replies:** 2\
**Last updated:** [April 11, 2025, 12:45pm UTC](https://discourse.julialang.org/t/generic-generation-of-functions/127968 "2025-04-11T12:45:44Z")

</div>

Hi, imagine the following situation: I have a lot of function that operate on some struct and get a symbol as input (maybe function that do something with a dataframe): function doA(... , s::Symbol) function doB(... , …

---

## [A script that makes my pkg development workflow smooth](https://discourse.julialang.org/t/a-script-that-makes-my-pkg-development-workflow-smooth/127938)

<div class="topic-metadata">

**Author:** [@guimarqu](https://discourse.julialang.org/u/guimarqu)\
**Replies:** 1\
**Last updated:** [April 11, 2025, 10:57am UTC](https://discourse.julialang.org/t/a-script-that-makes-my-pkg-development-workflow-smooth/127938 "2025-04-11T10:57:21Z")

</div>

Hey all, No question here, I just want to share the central tool of my development workflow I have used for years now. Three years ago, I was working on an Angular project and I was amazed by the tooling. Especially, t…

---

## [\[ANN\] RxInferServer + Python SDK: Fast Inference from Python (and more)](https://discourse.julialang.org/t/ann-rxinferserver-python-sdk-fast-inference-from-python-and-more/127969)

<div class="topic-metadata">

**Author:** [@bvdmitri](https://discourse.julialang.org/u/bvdmitri)\
**Replies:** 0\
**Last updated:** [April 11, 2025, 10:21am UTC](https://discourse.julialang.org/t/ann-rxinferserver-python-sdk-fast-inference-from-python-and-more/127969 "2025-04-11T10:21:29Z")

</div>

Hi everyone, We’re excited to share that Lazy Dynamics has released a Python SDK for RxInferServer, making it easy to call high-performance RxInfer models from Python. But there’s more: RxInferServer itself is designe…

---

## [How to execute a bit of Julia code/function from a specific directory](https://discourse.julialang.org/t/how-to-execute-a-bit-of-julia-code-function-from-a-specific-directory/127916)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 2\
**Last updated:** [April 11, 2025, 9:07am UTC](https://discourse.julialang.org/t/how-to-execute-a-bit-of-julia-code-function-from-a-specific-directory/127916 "2025-04-11T09:07:44Z")

</div>

I have a folder (“MyFolder”) that looks something like: MyFolder: data.ext read\_data.jl next, “read\_data.jl” looks ike this: using DataImporter data = DataImporter.import("data.ext") Somewhere else I then run data…

---

## [Overloading 'getproperty' for arrays with custom element types](https://discourse.julialang.org/t/overloading-getproperty-for-arrays-with-custom-element-types/127962)

<div class="topic-metadata">

**Author:** [@MatthijsCox](https://discourse.julialang.org/u/MatthijsCox)\
**Replies:** 4\
**Last updated:** [April 11, 2025, 8:56am UTC](https://discourse.julialang.org/t/overloading-getproperty-for-arrays-with-custom-element-types/127962 "2025-04-11T08:56:50Z")

</div>

Okay so I wanted to make some quick ways to get data from an array of custom types, but I need some advice to avoid ambiguous method errors. So I have code that does something like this (note that you need to define at …

---

## [Efficient definition of function which uses fixed allocated constants](https://discourse.julialang.org/t/efficient-definition-of-function-which-uses-fixed-allocated-constants/127955)

<div class="topic-metadata">

**Author:** [@UselessAnsatz](https://discourse.julialang.org/u/UselessAnsatz)\
**Replies:** 2\
**Last updated:** [April 11, 2025, 8:21am UTC](https://discourse.julialang.org/t/efficient-definition-of-function-which-uses-fixed-allocated-constants/127955 "2025-04-11T08:21:50Z")

</div>

I need to define a whole group of functions, each of which depends on large heap allocated arrays which do not change run to run. While I could declare these arrays const, this clutters the namespace as the array names u…

---

## [Convergence of SDDP with nonlinear objective and mixed-integer variables](https://discourse.julialang.org/t/convergence-of-sddp-with-nonlinear-objective-and-mixed-integer-variables/127947)

<div class="topic-metadata">

**Author:** [@Engr\_Moiz\_Ahmad](https://discourse.julialang.org/u/Engr_Moiz_Ahmad)\
**Replies:** 9\
**Last updated:** [April 11, 2025, 7:55am UTC](https://discourse.julialang.org/t/convergence-of-sddp-with-nonlinear-objective-and-mixed-integer-variables/127947 "2025-04-11T07:55:30Z")

</div>

@odow what reference should I cite if I want to claim that due to the simultaneous occurrence of exponential terms in the objective and mixed integer decision space, SDDP can not be used?

---

## [When the Julia Language server is running, all my VSCode terminals are 'laggy'](https://discourse.julialang.org/t/when-the-julia-language-server-is-running-all-my-vscode-terminals-are-laggy/127889)

<div class="topic-metadata">

**Author:** [@Larbino1](https://discourse.julialang.org/u/Larbino1)\
**Replies:** 3\
**Last updated:** [April 11, 2025, 7:34am UTC](https://discourse.julialang.org/t/when-the-julia-language-server-is-running-all-my-vscode-terminals-are-laggy/127889 "2025-04-11T07:34:14Z")

</div>

Typing in them feels awful. Is this a problem anyone else has experienced? When I run “\> Restart julia language server” from the VSCode menu, everything is snappy and responsive for about 20 seconds, until the language …

---

## [Projection onto intersection of L\_0 ball and L\_infty ball via ShiftedProximalOperators](https://discourse.julialang.org/t/projection-onto-intersection-of-l-0-ball-and-l-infty-ball-via-shiftedproximaloperators/127949)

<div class="topic-metadata">

**Author:** [@jacob-roth](https://discourse.julialang.org/u/jacob-roth)\
**Replies:** 2\
**Last updated:** [April 11, 2025, 2:00am UTC](https://discourse.julialang.org/t/projection-onto-intersection-of-l-0-ball-and-l-infty-ball-via-shiftedproximaloperators/127949 "2025-04-11T02:00:17Z")

</div>

I am trying to follow the paper describing a method to project a point x^0 onto the set C:=\\{x : x\\in kB\_0 \\cap x\\in \\Delta B\_\\infty\\} where kB\_0=\\{x : ||x||\_0\\leq k\\} and \\Delta B\_\\infty=\\{x:||x||\_\\infty\\leq\\Delta\\}. I…

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

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