# Latest

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

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

**Page:** 934

---

## [Model identification for Cauer or Foster model](https://discourse.julialang.org/t/model-identification-for-cauer-or-foster-model/86767)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 7\
**Last updated:** [September 5, 2022, 6:29pm UTC](https://discourse.julialang.org/t/model-identification-for-cauer-or-foster-model/86767 "2022-09-05T18:29:13Z")

</div>

How can I identify the parameters of the Cauer or Foster model based on a measured temperature over time curve? Source: Infineon application note The application note says: “as the coefficients can easily be extract…

---

## [Same code different result in let block and begin block](https://discourse.julialang.org/t/same-code-different-result-in-let-block-and-begin-block/86810)

<div class="topic-metadata">

**Author:** [@tiZ](https://discourse.julialang.org/u/tiZ)\
**Replies:** 3\
**Last updated:** [September 5, 2022, 5:05pm UTC](https://discourse.julialang.org/t/same-code-different-result-in-let-block-and-begin-block/86810 "2022-09-05T17:05:56Z")

</div>

Hi, I have same code in both let block and begin block, but get totally different results, any suggestion for understand this? begin x = randn(100,10) function f() x = randn(2,2) return 1 e…

---

## [Difficulty defining promotion rules](https://discourse.julialang.org/t/difficulty-defining-promotion-rules/86787)

<div class="topic-metadata">

**Author:** [@chriswaudby](https://discourse.julialang.org/u/chriswaudby)\
**Replies:** 8\
**Last updated:** [September 5, 2022, 4:11pm UTC](https://discourse.julialang.org/t/difficulty-defining-promotion-rules/86787 "2022-09-05T16:11:02Z")

</div>

Hi, I’m trying to define promotion rules for a type representing multicomplex numbers (Multicomplex number - Wikipedia). These have a series of complex numbers, im1, im2, etc. Internally, these are represented as static…

---

## [How to vectorize only one argument in function call](https://discourse.julialang.org/t/how-to-vectorize-only-one-argument-in-function-call/86771)

<div class="topic-metadata">

**Author:** [@AwesomeQuest](https://discourse.julialang.org/u/AwesomeQuest)\
**Replies:** 8\
**Last updated:** [September 5, 2022, 4:07pm UTC](https://discourse.julialang.org/t/how-to-vectorize-only-one-argument-in-function-call/86771 "2022-09-05T16:07:39Z")

</div>

Say I have a function that accepts several vectors f(a,b,c), but I have a vector of inputs for one of the arguments a. Can I call f like f(.a,b,c) such that f will vectorize only over a. Since if I call f.(a,b,c) f vect…

---

## [Customising the legend display order in Plots.jl](https://discourse.julialang.org/t/customising-the-legend-display-order-in-plots-jl/86779)

<div class="topic-metadata">

**Author:** [@jmair](https://discourse.julialang.org/u/jmair)\
**Replies:** 1\
**Last updated:** [September 5, 2022, 1:59pm UTC](https://discourse.julialang.org/t/customising-the-legend-display-order-in-plots-jl/86779 "2022-09-05T13:59:56Z")

</div>

I am using Plots.jl with the pgfplotsx() backend and I want to have a somewhat custom legend, which has two columns and shows the marker for the expected curve next to actual samples on that curve. A MWE is given below: …

---

## [Fast optimized non dominated sorting algorithms](https://discourse.julialang.org/t/fast-optimized-non-dominated-sorting-algorithms/86793)

<div class="topic-metadata">

**Author:** [@Michal\_Kvasnicka](https://discourse.julialang.org/u/Michal_Kvasnicka)\
**Replies:** 7\
**Last updated:** [September 5, 2022, 1:56pm UTC](https://discourse.julialang.org/t/fast-optimized-non-dominated-sorting-algorithms/86793 "2022-09-05T13:56:32Z")

</div>

I am looking for any Julia fast non dominated sorting (NDS) code. I just found the following thread, but algorithms here are very naive with quadratic complexity and no parallelization. Are there any more sophisticated …

---

## [Simpsons Rule](https://discourse.julialang.org/t/simpsons-rule/84114)

<div class="topic-metadata">

**Author:** [@simonluzara](https://discourse.julialang.org/u/simonluzara)\
**Replies:** 23\
**Last updated:** [September 5, 2022, 1:25pm UTC](https://discourse.julialang.org/t/simpsons-rule/84114 "2022-09-05T13:25:34Z")

</div>

Hello everyone, am a new enthusiastic member of julia community. I have spent quite a fair share of time watching tutorials from Chris and all the others. I have a matlab simpsons rule code which was very generic for nu…

---

## [How can kwargs be used in multiple dispatch](https://discourse.julialang.org/t/how-can-kwargs-be-used-in-multiple-dispatch/86790)

<div class="topic-metadata">

**Author:** [@this\_josh](https://discourse.julialang.org/u/this_josh)\
**Replies:** 11\
**Last updated:** [September 5, 2022, 1:17pm UTC](https://discourse.julialang.org/t/how-can-kwargs-be-used-in-multiple-dispatch/86790 "2022-09-05T13:17:19Z")

</div>

Multiple dispatch usually works on variable types, I presumed it could also work using kwargs, but it doesn’t seem to. How can I make this work? julia\> function shout(word::String; exclaim::Int) println(word …

---

## [Compare numbers at the stated precision](https://discourse.julialang.org/t/compare-numbers-at-the-stated-precision/86719)

<div class="topic-metadata">

**Author:** [@tp2750](https://discourse.julialang.org/u/tp2750)\
**Replies:** 9\
**Last updated:** [September 5, 2022, 9:29am UTC](https://discourse.julialang.org/t/compare-numbers-at-the-stated-precision/86719 "2022-09-05T09:29:10Z")

</div>

In tests I’ll like to be able to write the following and the test to pass: @test aresame(pi, 3.14) The following works: @test isapprox(pi, 3.14, atol = 0.005) But then I need to adjust the absolute tolerance manual…

---

## [Is there a way to have a nested expression loop](https://discourse.julialang.org/t/is-there-a-way-to-have-a-nested-expression-loop/86796)

<div class="topic-metadata">

**Author:** [@AwesomeQuest](https://discourse.julialang.org/u/AwesomeQuest)\
**Replies:** 4\
**Last updated:** [September 5, 2022, 11:15am UTC](https://discourse.julialang.org/t/is-there-a-way-to-have-a-nested-expression-loop/86796 "2022-09-05T11:15:48Z")

</div>

I’m trying to unwrap a vector of vectors of vectors into one vector and my first thought is to \[k for i in vecs, j in i, k in j\] or \[k for k in j, j in i, i in vecs\] ERROR: UndefVarError: i/j not defined Do I need to…

---

## [BenchmarkTools for benchmarking thread scalability of functions](https://discourse.julialang.org/t/benchmarktools-for-benchmarking-thread-scalability-of-functions/86711)

<div class="topic-metadata">

**Author:** [@gerhardu](https://discourse.julialang.org/u/gerhardu)\
**Replies:** 6\
**Last updated:** [September 5, 2022, 11:12am UTC](https://discourse.julialang.org/t/benchmarktools-for-benchmarking-thread-scalability-of-functions/86711 "2022-09-05T11:12:39Z")

</div>

I use BenchmarkTools.jl to benchmark functions in my code. That works great! But what I am missing is a good interface to analyze thread scalability. Is there an option in BenchmarkTools.jl or another package? As far a…

---

## [If blocks with code generation](https://discourse.julialang.org/t/if-blocks-with-code-generation/86506)

<div class="topic-metadata">

**Author:** [@gaspardb](https://discourse.julialang.org/u/gaspardb)\
**Replies:** 6\
**Last updated:** [September 5, 2022, 10:03am UTC](https://discourse.julialang.org/t/if-blocks-with-code-generation/86506 "2022-09-05T10:03:05Z")

</div>

Hi everyone, I’ve started Julia recently and stumbled upon a case which seemed well suited to metaprogramming. Use case With words: I have a train function which does roughly the same thing no matter the type of the mo…

---

## [\[Makie\] "MetaData array needs to have same length as data" error with observables and contourf](https://discourse.julialang.org/t/makie-metadata-array-needs-to-have-same-length-as-data-error-with-observables-and-contourf/86789)

<div class="topic-metadata">

**Author:** [@ManuelFossa](https://discourse.julialang.org/u/ManuelFossa)\
**Replies:** 2\
**Last updated:** [September 5, 2022, 9:44am UTC](https://discourse.julialang.org/t/makie-metadata-array-needs-to-have-same-length-as-data-error-with-observables-and-contourf/86789 "2022-09-05T09:44:04Z")

</div>

I try to plot an animation of contours with GLMakie and GeoMakie, using observables. This used to work , but I updated my Julia from 1.7.2 to 1.8 then it broke, with the error in the title occurring. I reverted to 1.7.2…

---

## [Fast non dominated sorting](https://discourse.julialang.org/t/fast-non-dominated-sorting/24164)

<div class="topic-metadata">

**Author:** [@Igor\_Douven](https://discourse.julialang.org/u/Igor_Douven)\
**Replies:** 21\
**Last updated:** [September 5, 2022, 8:38am UTC](https://discourse.julialang.org/t/fast-non-dominated-sorting/24164 "2022-09-05T08:38:42Z")

</div>

I need a fast implementation of the so-called non dominated sorting algorithm. The best I could come up with so far is the following (the sorting is to be done on the basis of three criteria): dominates(x, y) = all(x .\<=…

---

## [Weird output with REPL escape codes](https://discourse.julialang.org/t/weird-output-with-repl-escape-codes/86772)

<div class="topic-metadata">

**Author:** [@jules](https://discourse.julialang.org/u/jules)\
**Replies:** 4\
**Last updated:** [September 5, 2022, 8:30am UTC](https://discourse.julialang.org/t/weird-output-with-repl-escape-codes/86772 "2022-09-05T08:30:16Z")

</div>

I’m trying to work with the raw output from a Julia process but I don’t understand even a simple version of it. I tried julia --banner=no | tee julia.txt, then typed 1+2 and enter. The file julia.txt then looks like thi…

---

## [Way to clear console in julia](https://discourse.julialang.org/t/way-to-clear-console-in-julia/86766)

<div class="topic-metadata">

**Author:** [@rmsmsgood](https://discourse.julialang.org/u/rmsmsgood)\
**Replies:** 10\
**Last updated:** [September 5, 2022, 7:10am UTC](https://discourse.julialang.org/t/way-to-clear-console-in-julia/86766 "2022-09-05T07:10:29Z")

</div>

; clear ↑ It works, equivalent to Ctrl + L, but can’t be used in automated code. Base.run(\`clear\`) ↑ It doesn’t work, at least window 10, powershell.(I never checked in linux terminal) Do you know any other way…

---

## [Zygote and StaticArrays](https://discourse.julialang.org/t/zygote-and-staticarrays/86176)

<div class="topic-metadata">

**Author:** [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)\
**Replies:** 12\
**Last updated:** [September 5, 2022, 5:09am UTC](https://discourse.julialang.org/t/zygote-and-staticarrays/86176 "2022-09-05T05:09:08Z")

</div>

I am currently evaluating Zygote. My “usecase” is maybe a bit different from what has driven Zygote’s development: I want to take the gradient of scalar-valued functions of 10 to 100 inputes, but I will compute millions…

---

## [Triggerring GC unexpectedly](https://discourse.julialang.org/t/triggerring-gc-unexpectedly/86754)

<div class="topic-metadata">

**Author:** [@Brian1](https://discourse.julialang.org/u/Brian1)\
**Replies:** 9\
**Last updated:** [September 5, 2022, 4:45am UTC](https://discourse.julialang.org/t/triggerring-gc-unexpectedly/86754 "2022-09-05T04:45:05Z")

</div>

I run these codes: @time for i = 1 : 50 \_empty!.(dit) \_update(dit,dil) @time distral(calc\_ptm) end distral(calc\_ptm) is running on multiple threads. Here is the resulte: 16.408509 seconds (15.03 M allocat…

---

## [Can't compile large expression on CUDA.jl](https://discourse.julialang.org/t/cant-compile-large-expression-on-cuda-jl/86594)

<div class="topic-metadata">

**Author:** [@Yang-yang](https://discourse.julialang.org/u/Yang-yang)\
**Replies:** 8\
**Last updated:** [September 5, 2022, 3:00am UTC](https://discourse.julialang.org/t/cant-compile-large-expression-on-cuda-jl/86594 "2022-09-05T03:00:23Z")

</div>

I’m trying to broadcast a large function on a GPU Array, but it fails. using CUDA v1 = CUDA.rand(10) function fun1(x) cos(x) \* sin(x) + cos(2 \* x) \* sin(x) + cos(3 \* x) \* sin(x) + cos(4 \* x) \* sin(x) + …

---

## [Interminnent errors throwing when adding procs](https://discourse.julialang.org/t/interminnent-errors-throwing-when-adding-procs/86778)

<div class="topic-metadata">

**Author:** [@affans](https://discourse.julialang.org/u/affans)\
**Replies:** 1\
**Last updated:** [September 5, 2022, 2:07am UTC](https://discourse.julialang.org/t/interminnent-errors-throwing-when-adding-procs/86778 "2022-09-05T02:07:57Z")

</div>

I am on a cluster using Slurm as a workload scheduler. When I try to add processors: addprocs(SlurmManager(60), N=2, verbose="", topology=:master\_worker, exeflags="--project=.") it works about 2, 3 out of 10 tries. Mo…

---

## [Float is an Inf and I can't use && to assign it a new value](https://discourse.julialang.org/t/float-is-an-inf-and-i-cant-use-to-assign-it-a-new-value/86773)

<div class="topic-metadata">

**Author:** [@anon69491625](https://discourse.julialang.org/u/anon69491625)\
**Replies:** 10\
**Last updated:** [September 5, 2022, 12:47am UTC](https://discourse.julialang.org/t/float-is-an-inf-and-i-cant-use-to-assign-it-a-new-value/86773 "2022-09-05T00:47:46Z")

</div>

I’m trying to use the short circuit conditional from the julia docs and I have a sneaking feeling that this will correct a misapprehension of what is going on. My “thought” is that this should spot that sdmove is an Inf …

---

## [Why Julia symbolic generate random result for symbolic integration?](https://discourse.julialang.org/t/why-julia-symbolic-generate-random-result-for-symbolic-integration/86717)

<div class="topic-metadata">

**Author:** [@Nasser](https://discourse.julialang.org/u/Nasser)\
**Replies:** 7\
**Last updated:** [September 4, 2022, 11:55pm UTC](https://discourse.julialang.org/t/why-julia-symbolic-generate-random-result-for-symbolic-integration/86717 "2022-09-04T23:55:44Z")

</div>

edit: added this as issue. Link is original question: I am not able to understand this. I have a script that tests one integration problem using the symbolic Julia and symbolic integrator. I noticed I get different …

---

## [Indexing variables by vectors not working in JuMPv1.2.x](https://discourse.julialang.org/t/indexing-variables-by-vectors-not-working-in-jumpv1-2-x/86652)

<div class="topic-metadata">

**Author:** [@BatyLeo](https://discourse.julialang.org/u/BatyLeo)\
**Replies:** 4\
**Last updated:** [September 4, 2022, 11:47pm UTC](https://discourse.julialang.org/t/indexing-variables-by-vectors-not-working-in-jumpv1-2-x/86652 "2022-09-04T23:47:34Z")

</div>

Hello, a bug appeared in my package when I updated JuMP to v1.2.1 from v1.1.1. Here is a minimum (non) working example: using GLPK using JuMP paths = \[ \[1, 2, 15, 3, 20\], \[1, 9, 16, 20\], \[1, 2, 20\] \] mode…

---

## [Is the any package or for solving a MIP with branch and bound that gives the user the developed constraints during the solution procedure?](https://discourse.julialang.org/t/is-the-any-package-or-for-solving-a-mip-with-branch-and-bound-that-gives-the-user-the-developed-constraints-during-the-solution-procedure/86714)

<div class="topic-metadata">

**Author:** [@Alex\_ricci](https://discourse.julialang.org/u/Alex_ricci)\
**Replies:** 2\
**Last updated:** [September 4, 2022, 9:50pm UTC](https://discourse.julialang.org/t/is-the-any-package-or-for-solving-a-mip-with-branch-and-bound-that-gives-the-user-the-developed-constraints-during-the-solution-procedure/86714 "2022-09-04T21:50:18Z")

</div>

I have a two-stage stochastic optimization model with binary and continuous variables in the first and the second stages. To solve this I employ a benders decomposition technique. In this technique I need to get the dua…

---

## [Inset axis with non-transparent background](https://discourse.julialang.org/t/inset-axis-with-non-transparent-background/86763)

<div class="topic-metadata">

**Author:** [@yhchang96](https://discourse.julialang.org/u/yhchang96)\
**Replies:** 4\
**Last updated:** [September 4, 2022, 9:20pm UTC](https://discourse.julialang.org/t/inset-axis-with-non-transparent-background/86763 "2022-09-04T21:20:06Z")

</div>

My question is essentially the same as this and this: I want to add an inset axis to an existing (main) axis, but the inset axis looks transparent and I can see the grid lines of the main axis through the inset. The ans…

---

## [Learning Surrogates or Flux](https://discourse.julialang.org/t/learning-surrogates-or-flux/86457)

<div class="topic-metadata">

**Author:** [@davide445](https://discourse.julialang.org/u/davide445)\
**Replies:** 7\
**Last updated:** [September 4, 2022, 6:55pm UTC](https://discourse.julialang.org/t/learning-surrogates-or-flux/86457 "2022-09-04T18:55:06Z")

</div>

Proceeding trough my Julia learning I have a specific goal, produce a realtime surrogate of the complex soft body dynamics produced from packages such as deal.ii or similar specialized FEM. This is just an example of de…

---

## [Best practices for dealing with functions taking multiple vector variables](https://discourse.julialang.org/t/best-practices-for-dealing-with-functions-taking-multiple-vector-variables/86759)

<div class="topic-metadata">

**Author:** [@samerb](https://discourse.julialang.org/u/samerb)\
**Replies:** 5\
**Last updated:** [September 4, 2022, 3:50pm UTC](https://discourse.julialang.org/t/best-practices-for-dealing-with-functions-taking-multiple-vector-variables/86759 "2022-09-04T15:50:31Z")

</div>

Sometimes I want to use a function like f(x,y,z,w), where x,y,z,w are themselves vectors of potentially different lengths. But sometimes when I call solvers (e.g. NLSolve, Optim, Implicit Differentiation, JuMP) or other …

---

## [Zero gradient when using argmax](https://discourse.julialang.org/t/zero-gradient-when-using-argmax/86745)

<div class="topic-metadata">

**Author:** [@taotree](https://discourse.julialang.org/u/taotree)\
**Replies:** 5\
**Last updated:** [September 4, 2022, 2:50pm UTC](https://discourse.julialang.org/t/zero-gradient-when-using-argmax/86745 "2022-09-04T14:50:35Z")

</div>

The following example shows a zero gradient (update! appears to do nothing), but if I change the argmax calls to sum calls, then the gradient is non-zero. Is argmax not supported, or is there some other thing wrong with …

---

## [How to read the description of a Specific Domain subsection?](https://discourse.julialang.org/t/how-to-read-the-description-of-a-specific-domain-subsection/86709)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 1\
**Last updated:** [September 4, 2022, 1:42pm UTC](https://discourse.julialang.org/t/how-to-read-the-description-of-a-specific-domain-subsection/86709 "2022-09-04T13:42:24Z")

</div>

Some descriptions are cut off, even after zooming out:

---

## ["build ThinkJulia" fails on Windows 10 because "unable to open libLLVM!"](https://discourse.julialang.org/t/build-thinkjulia-fails-on-windows-10-because-unable-to-open-libllvm/86736)

<div class="topic-metadata">

**Author:** [@Castilhos](https://discourse.julialang.org/u/Castilhos)\
**Replies:** 2\
**Last updated:** [September 4, 2022, 1:27pm UTC](https://discourse.julialang.org/t/build-thinkjulia-fails-on-windows-10-because-unable-to-open-libllvm/86736 "2022-09-04T13:27:45Z")

</div>

Hello, I am running into an Error message: “LoadError: Unable to open libLLVM!”. I was trying to install the ThinkJulia package on a Windows 10 for my child. I ran into a problem which and I am not sure how to solve it…

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

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