# Latest

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

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

**Page:** 410

---

## [Canvas too small when plotting multiple plots](https://discourse.julialang.org/t/canvas-too-small-when-plotting-multiple-plots/114326)

<div class="topic-metadata">

**Author:** [@jabru](https://discourse.julialang.org/u/jabru)\
**Replies:** 1\
**Last updated:** [May 16, 2024, 1:34am UTC](https://discourse.julialang.org/t/canvas-too-small-when-plotting-multiple-plots/114326 "2024-05-16T01:34:38Z")

</div>

Hi there, I am currently using the Plots.jl package for making the plots for my paper. And for some reason, when I create multiple plots next to each other, the canvas seems tp be to small to fit the entire image. For …

---

## [Map Function to Slice with Index Names](https://discourse.julialang.org/t/map-function-to-slice-with-index-names/114280)

<div class="topic-metadata">

**Author:** [@Lincoln\_Hannah](https://discourse.julialang.org/u/Lincoln_Hannah)\
**Replies:** 0\
**Last updated:** [May 15, 2024, 5:36am UTC](https://discourse.julialang.org/t/map-function-to-slice-with-index-names/114280 "2024-05-15T05:36:52Z")

</div>

I’d like to apply a function to slices of a named array such that the function has access to the array index names as well as the slice contents. The syntax below uses a KeyedArray and passes a NamedTuple ( slice, index…

---

## [Integration over implicit region](https://discourse.julialang.org/t/integration-over-implicit-region/112729)

<div class="topic-metadata">

**Author:** [@jabru](https://discourse.julialang.org/u/jabru)\
**Replies:** 5\
**Last updated:** [May 16, 2024, 1:20am UTC](https://discourse.julialang.org/t/integration-over-implicit-region/112729 "2024-05-16T01:20:33Z")

</div>

Hi there, this is more of a package existence than anything else. There is one functionality in Wolfram Mathematica, which I have never seen implemented in any open source software package. Neither for Julia nor for any…

---

## [Inquiry about Symbolics.jl](https://discourse.julialang.org/t/inquiry-about-symbolics-jl/114331)

<div class="topic-metadata">

**Author:** [@cnf](https://discourse.julialang.org/u/cnf)\
**Replies:** 0\
**Last updated:** [May 16, 2024, 12:13am UTC](https://discourse.julialang.org/t/inquiry-about-symbolics-jl/114331 "2024-05-16T00:13:52Z")

</div>

I am running Julia 1.6.7 on a Linux machine and trying to use the Symbolics.jl package. Any assistance with the following would be appreciated. (1) The function simplify() does not simplify the following trigonometri…

---

## [Shuffle lines in a big file, and trim it](https://discourse.julialang.org/t/shuffle-lines-in-a-big-file-and-trim-it/114247)

<div class="topic-metadata">

**Author:** [@Ju\_ska](https://discourse.julialang.org/u/Ju_ska)\
**Replies:** 5\
**Last updated:** [May 15, 2024, 9:46pm UTC](https://discourse.julialang.org/t/shuffle-lines-in-a-big-file-and-trim-it/114247 "2024-05-15T21:46:44Z")

</div>

Hi, In shell, whatever the size of the file, I do: cat file.txt | shuf | head -n 5000 \> shuffled\_trimmed\_file.txt With Julia, I tried to load the file with readdlm(), but it is too big and the process stops. I looked…

---

## [Operation on transpose sparse array is slow](https://discourse.julialang.org/t/operation-on-transpose-sparse-array-is-slow/114330)

<div class="topic-metadata">

**Author:** [@tiZ](https://discourse.julialang.org/u/tiZ)\
**Replies:** 1\
**Last updated:** [May 15, 2024, 11:50pm UTC](https://discourse.julialang.org/t/operation-on-transpose-sparse-array-is-slow/114330 "2024-05-15T23:50:13Z")

</div>

Hi Friends, I am searching for a better solution for speed up my script, my script accept a sparse matrix as input, (some time the sparse matrix is sample X features, and sometimes it is features X sample), I have to tr…

---

## [How can I make a result of expand\_derivative() callable](https://discourse.julialang.org/t/how-can-i-make-a-result-of-expand-derivative-callable/114323)

<div class="topic-metadata">

**Author:** [@jcbritobr](https://discourse.julialang.org/u/jcbritobr)\
**Replies:** 2\
**Last updated:** [May 15, 2024, 9:51pm UTC](https://discourse.julialang.org/t/how-can-i-make-a-result-of-expand-derivative-callable/114323 "2024-05-15T21:51:24Z")

</div>

Hello, good evening. Im solving some differentiation and I dont know how to make a result from expand\_derivative function from Symbolics callable. This will enhance my workflow. Is there a way to do? @variables t i =…

---

## [\[ANN\] BetaML.jl.. yet an other (simple) Machine Learning Package](https://discourse.julialang.org/t/ann-betaml-jl-yet-an-other-simple-machine-learning-package/41057)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 16\
**Last updated:** [May 15, 2024, 8:47pm UTC](https://discourse.julialang.org/t/ann-betaml-jl-yet-an-other-simple-machine-learning-package/41057 "2024-05-15T20:47:37Z")

</div>

Dear all, I would like to announce the availability of “BetaML” , the Beta Machine Learning toolkit, a package for Machine Learning algorithms and related utilities. The toolkit is currently made of 4 modules. Per…

---

## [\[ANN\] FeatureRanking: learn which variables contribute the most to the estimation of black box models](https://discourse.julialang.org/t/ann-featureranking-learn-which-variables-contribute-the-most-to-the-estimation-of-black-box-models/114321)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 0\
**Last updated:** [May 15, 2024, 8:43pm UTC](https://discourse.julialang.org/t/ann-featureranking-learn-which-variables-contribute-the-most-to-the-estimation-of-black-box-models/114321 "2024-05-15T20:43:00Z")

</div>

I am pleased to announce the availability of FeatureRanker, a simple yet flexible feature ranking estimator where different metrics can be used to estimate the importance of individual variables. Key features: Choose …

---

## [How to smooth the if function](https://discourse.julialang.org/t/how-to-smooth-the-if-function/113978)

<div class="topic-metadata">

**Author:** [@chooron](https://discourse.julialang.org/u/chooron)\
**Replies:** 11\
**Last updated:** [May 15, 2024, 7:28pm UTC](https://discourse.julialang.org/t/how-to-smooth-the-if-function/113978 "2024-05-15T19:28:35Z")

</div>

Is there currently a library that provides a smoothing function to ensure the differentiability of the judgment function? For example, I have a simple formula here: f(x) = x \> 1 ? x : x^2 Is there a smooth function he…

---

## [Error in precompiling HarfBuzz\_jll and gmsh\_jll](https://discourse.julialang.org/t/error-in-precompiling-harfbuzz-jll-and-gmsh-jll/114288)

<div class="topic-metadata">

**Author:** [@VinceRob](https://discourse.julialang.org/u/VinceRob)\
**Replies:** 7\
**Last updated:** [May 15, 2024, 6:46pm UTC](https://discourse.julialang.org/t/error-in-precompiling-harfbuzz-jll-and-gmsh-jll/114288 "2024-05-15T18:46:31Z")

</div>

Hi first post here, I’m having trouble trying to precompile the following packages : HarfBuzz\_jll gmsh\_jll My system is Mac OS 10.15.7 (unfortunately I can’t upgrade). I found this related topic, but my version of …

---

## [Luxor 'placeimage' with scaling](https://discourse.julialang.org/t/luxor-placeimage-with-scaling/114299)

<div class="topic-metadata">

**Author:** [@beryl](https://discourse.julialang.org/u/beryl)\
**Replies:** 2\
**Last updated:** [May 15, 2024, 6:17pm UTC](https://discourse.julialang.org/t/luxor-placeimage-with-scaling/114299 "2024-05-15T18:17:51Z")

</div>

Hi, I think this is a rather simple question but somehow I am unable to figure this out… :sweat\_smile: So, I have some svg images where all of them have the same scales. I want to place them on some absolute coordinates…

---

## [Clustering\_quality not defined](https://discourse.julialang.org/t/clustering-quality-not-defined/114309)

<div class="topic-metadata">

**Author:** [@GiuliaM](https://discourse.julialang.org/u/GiuliaM)\
**Replies:** 1\
**Last updated:** [May 15, 2024, 5:47pm UTC](https://discourse.julialang.org/t/clustering-quality-not-defined/114309 "2024-05-15T17:47:11Z")

</div>

Hello everyone! I’m trying to use the package Clustering.jl. The documentation reports this code to calculate different performance indices. using Plots, Clustering X = hcat(\[4., 5.\] .+ 0.4 \* randn(2, 10), \[9.,…

---

## [Failed optimization with function](https://discourse.julialang.org/t/failed-optimization-with-function/114290)

<div class="topic-metadata">

**Author:** [@nouha941](https://discourse.julialang.org/u/nouha941)\
**Replies:** 4\
**Last updated:** [May 15, 2024, 4:49pm UTC](https://discourse.julialang.org/t/failed-optimization-with-function/114290 "2024-05-15T16:49:53Z")

</div>

Hello everyone, I have a problem with optimizing my function. I keep getting an error. Could you please help me? function optimize\_Cs(Q\_e, PT501, PT401, P\_HP, R\_m, R\_p, Qp, Pe) #calcul initial de Cs Pe = (( ((Q\_…

---

## [Matrix handling in memory](https://discourse.julialang.org/t/matrix-handling-in-memory/114258)

<div class="topic-metadata">

**Author:** [@MatheusJanczkowski](https://discourse.julialang.org/u/MatheusJanczkowski)\
**Replies:** 15\
**Last updated:** [May 15, 2024, 3:57pm UTC](https://discourse.julialang.org/t/matrix-handling-in-memory/114258 "2024-05-15T15:57:15Z")

</div>

I have a code that is divided in three parts: pre-processing, iterative scheme, and post-processing. In the pre-processing, it calculates a matrix (that can be very large); but it won’t be used in the iterative scheme, w…

---

## [Why is there a lack of advanced metaprogramming documentation?](https://discourse.julialang.org/t/why-is-there-a-lack-of-advanced-metaprogramming-documentation/114297)

<div class="topic-metadata">

**Author:** [@Tarny\_GG\_Channie](https://discourse.julialang.org/u/Tarny_GG_Channie)\
**Replies:** 4\
**Last updated:** [May 15, 2024, 3:52pm UTC](https://discourse.julialang.org/t/why-is-there-a-lack-of-advanced-metaprogramming-documentation/114297 "2024-05-15T15:52:00Z")

</div>

While Julia has a good metaprogramming starter guide that covers AST manipulation, too much metaprogramming remains undocumented or poorly documented. For example, how could gradient(f,x) work? You would need to inspect …

---

## [Is it possible to access point coordinates from Plots using the box and lasso select from Plotly(JS)](https://discourse.julialang.org/t/is-it-possible-to-access-point-coordinates-from-plots-using-the-box-and-lasso-select-from-plotly-js/68776)

<div class="topic-metadata">

**Author:** [@Diego\_Javier\_Zea](https://discourse.julialang.org/u/Diego_Javier_Zea)\
**Replies:** 10\
**Last updated:** [May 15, 2024, 1:48pm UTC](https://discourse.julialang.org/t/is-it-possible-to-access-point-coordinates-from-plots-using-the-box-and-lasso-select-from-plotly-js/68776 "2024-05-15T13:48:00Z")

</div>

Hi! When performing a scatter plot using the Plotly or PlotlyJS backends of Plots, it is possible to use the box and lasso select tools. How can I access the coordinates of the selected points from Julia? Best,

---

## [Implement Matlab/Simbiology concepts (e.g. compartments, repeated assignments) in Julia/Catalyst](https://discourse.julialang.org/t/implement-matlab-simbiology-concepts-e-g-compartments-repeated-assignments-in-julia-catalyst/114266)

<div class="topic-metadata">

**Author:** [@valerdam](https://discourse.julialang.org/u/valerdam)\
**Replies:** 9\
**Last updated:** [May 15, 2024, 2:13pm UTC](https://discourse.julialang.org/t/implement-matlab-simbiology-concepts-e-g-compartments-repeated-assignments-in-julia-catalyst/114266 "2024-05-15T14:13:21Z")

</div>

I am testing ways to code Matlab/Simbiology concepts (e.g. compartments, repeated assignments) in Julia/Catalyst and I would appreciate both general pointers on where to find more information as well as figuring out one…

---

## [@take macro?](https://discourse.julialang.org/t/take-macro/114282)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 2\
**Last updated:** [May 15, 2024, 1:51pm UTC](https://discourse.julialang.org/t/take-macro/114282 "2024-05-15T13:51:19Z")

</div>

I’m using a Channel to keep a few instances of a struct that I need to use inside a thread (following the instructions in Thread-Safe Storage · OhMyThreads.jl): using OhMyThreads nthings = 4 const things = Channel{…

---

## [Optim: MethodError: no method matching zero](https://discourse.julialang.org/t/optim-methoderror-no-method-matching-zero/45139)

<div class="topic-metadata">

**Author:** [@F-YF](https://discourse.julialang.org/u/F-YF)\
**Replies:** 4\
**Last updated:** [May 8, 2024, 9:24am UTC](https://discourse.julialang.org/t/optim-methoderror-no-method-matching-zero/45139 "2024-05-08T09:24:59Z")

</div>

When I do optimization calculations with the Optim package, an error occurred. The type of A1,A2,A3,A4 is ::Array{Complex{Float64},2}. I don’t know how to solve it. Is there a way to make optimize() support this type?Or…

---

## [Using Modeling Toolkit to solve simple equation](https://discourse.julialang.org/t/using-modeling-toolkit-to-solve-simple-equation/114289)

<div class="topic-metadata">

**Author:** [@HSnowden](https://discourse.julialang.org/u/HSnowden)\
**Replies:** 2\
**Last updated:** [May 15, 2024, 1:23pm UTC](https://discourse.julialang.org/t/using-modeling-toolkit-to-solve-simple-equation/114289 "2024-05-15T13:23:58Z")

</div>

Hello, I shall pretense this with that I am very new to ModelingToolkit As part of a bigger system I have a laser source term which chnages based on the type of a struct defining the equation. This means that I want to…

---

## [Best solution to Julia's soft scope problem?](https://discourse.julialang.org/t/best-solution-to-julias-soft-scope-problem/70199)

<div class="topic-metadata">

**Author:** [@leon](https://discourse.julialang.org/u/leon)\
**Replies:** 15\
**Last updated:** [May 15, 2024, 1:01pm UTC](https://discourse.julialang.org/t/best-solution-to-julias-soft-scope-problem/70199 "2024-05-15T13:01:06Z")

</div>

For example, a loop like the below will consistently cause an error. A = 5 for i in 1:10 A = A+i; end Error message: Assignment to \`A\` in soft scope is ambiguous because a global variable by the same name exists: …

---

## [How to combine @. with broadcasting for 3d array?](https://discourse.julialang.org/t/how-to-combine-with-broadcasting-for-3d-array/114291)

<div class="topic-metadata">

**Author:** [@Kohei\_Hattori](https://discourse.julialang.org/u/Kohei_Hattori)\
**Replies:** 2\
**Last updated:** [May 15, 2024, 12:50pm UTC](https://discourse.julialang.org/t/how-to-combine-with-broadcasting-for-3d-array/114291 "2024-05-15T12:50:24Z")

</div>

I’m new to Julia. I want to develop code that combines broadcasting with the @macro for a 3D array like the one below. How can I solve this? function func(a,b,c) return sin(a+b+c) end func.(\[0.1, 0.2, 0.3, 0.4\], \[0…

---

## [Julia Genie API - handling multiple requests](https://discourse.julialang.org/t/julia-genie-api-handling-multiple-requests/88715)

<div class="topic-metadata">

**Author:** [@cjproud](https://discourse.julialang.org/u/cjproud)\
**Replies:** 1\
**Last updated:** [May 15, 2024, 4:52am UTC](https://discourse.julialang.org/t/julia-genie-api-handling-multiple-requests/88715 "2024-05-15T04:52:30Z")

</div>

Hi, I’m using Genie.jl as a web server which basically contains some API endpoints that do some calculations using the provided JSON request data. One of these calculations can take up to a minute or two and I’ve notice…

---

## [The VS Code debugger always gets stuck at the quadratic constraint definition of a JuMP model](https://discourse.julialang.org/t/the-vs-code-debugger-always-gets-stuck-at-the-quadratic-constraint-definition-of-a-jump-model/114285)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 2\
**Last updated:** [May 15, 2024, 9:29am UTC](https://discourse.julialang.org/t/the-vs-code-debugger-always-gets-stuck-at-the-quadratic-constraint-definition-of-a-jump-model/114285 "2024-05-15T09:29:51Z")

</div>

The VS Code debugger always gets stuck at the quadratic constraint definition of a JuMP model. Please launch the debugger to run the following code in the VS Code in an environment where JuMP.jl is installed: using Pkg …

---

## [RC -Example model equations](https://discourse.julialang.org/t/rc-example-model-equations/114083)

<div class="topic-metadata">

**Author:** [@Jan\_Svanda](https://discourse.julialang.org/u/Jan_Svanda)\
**Replies:** 5\
**Last updated:** [May 15, 2024, 8:30am UTC](https://discourse.julialang.org/t/rc-example-model-equations/114083 "2024-05-15T08:30:44Z")

</div>

I tried the example ‘Acausal Component – RC-Circuit’ in ModelingToolkit.jl. I have a question regarding accessing equations that describe the system. I see that I can access the differential equations with equations(expa…

---

## [ParameterSchedulers causing error with Flux.update!](https://discourse.julialang.org/t/parameterschedulers-causing-error-with-flux-update/114287)

<div class="topic-metadata">

**Author:** [@cjs](https://discourse.julialang.org/u/cjs)\
**Replies:** 0\
**Last updated:** [May 15, 2024, 7:56am UTC](https://discourse.julialang.org/t/parameterschedulers-causing-error-with-flux-update/114287 "2024-05-15T07:56:32Z")

</div>

I am running a DRL algorithm with Adam where I want the learning rate to decay with time. As an example, consider using Flux, ParameterSchedulers model = Chain(Dense(5,10,gelu), Dense(10,10,gelu), Dense(10,1,softplus)) …

---

## [What's your favorite syntactical sugar in Julia](https://discourse.julialang.org/t/whats-your-favorite-syntactical-sugar-in-julia/49781)

<div class="topic-metadata">

**Author:** [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Replies:** 86\
**Last updated:** [May 15, 2024, 6:41am UTC](https://discourse.julialang.org/t/whats-your-favorite-syntactical-sugar-in-julia/49781 "2024-05-15T06:41:20Z")

</div>

Hi best community! I’m planning of doing a Julia Lang tutorial series around syntactical sugar in Julia (feel free to steal the idea). Before that I want to ask you the community what your favorite syntactical sugar in …

---

## [Zygote much slower than JAX for automatic differentiation of energy](https://discourse.julialang.org/t/zygote-much-slower-than-jax-for-automatic-differentiation-of-energy/114239)

<div class="topic-metadata">

**Author:** [@albertomercurio](https://discourse.julialang.org/u/albertomercurio)\
**Replies:** 22\
**Last updated:** [May 15, 2024, 6:31am UTC](https://discourse.julialang.org/t/zygote-much-slower-than-jax-for-automatic-differentiation-of-energy/114239 "2024-05-15T06:31:51Z")

</div>

Hello, I’m new in the neural network field, and I’m starting to study Neural Network Quantum States (for example ground state searching using neural networks). Usually, they are implemented in Python using Jax, but then…

---

## [Function vs macro](https://discourse.julialang.org/t/function-vs-macro/110397)

<div class="topic-metadata">

**Author:** [@jiang\_ming\_zhang](https://discourse.julialang.org/u/jiang_ming_zhang)\
**Replies:** 6\
**Last updated:** [May 15, 2024, 4:23am UTC](https://discourse.julialang.org/t/function-vs-macro/110397 "2024-05-15T04:23:12Z")

</div>

I saw codes like @warn("the number of particles must be positive") and @show a, b, c Becaue of the @, both are macros, right? The first contains the (), which makes it closer to a function; the second contains …

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

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