# Latest

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

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

**Page:** 874

---

## [How to use Dagger in remote machines?](https://discourse.julialang.org/t/how-to-use-dagger-in-remote-machines/89793)

<div class="topic-metadata">

**Author:** [@Noel\_Araujo](https://discourse.julialang.org/u/Noel_Araujo)\
**Replies:** 3\
**Last updated:** [November 5, 2022, 4:07pm UTC](https://discourse.julialang.org/t/how-to-use-dagger-in-remote-machines/89793 "2022-11-05T16:07:34Z")

</div>

I began using Dagger.jl and I want to run some tests it with my local host machines, but those tests only runs in multithreading in my notebook. I know that my local machines work, because I can run them with Distribute…

---

## [Initialize a Dict by broadcasting](https://discourse.julialang.org/t/initialize-a-dict-by-broadcasting/89810)

<div class="topic-metadata">

**Author:** [@healyp](https://discourse.julialang.org/u/healyp)\
**Replies:** 10\
**Last updated:** [November 5, 2022, 3:58pm UTC](https://discourse.julialang.org/t/initialize-a-dict-by-broadcasting/89810 "2022-11-05T15:58:15Z")

</div>

I’d like to initialise a dictionary of type Dict{Date, Vector{Float64}} . Clearly, I can do Dict(d =\> Vector{Float64}() for d in mydates) but can I do it by broadcasting? I have tried Dict(mydates .=\> Vector{Float64…

---

## [Misbehaving model / bad neural net architecture for the job?](https://discourse.julialang.org/t/misbehaving-model-bad-neural-net-architecture-for-the-job/89729)

<div class="topic-metadata">

**Author:** [@chrisoei](https://discourse.julialang.org/u/chrisoei)\
**Replies:** 2\
**Last updated:** [November 5, 2022, 3:12pm UTC](https://discourse.julialang.org/t/misbehaving-model-bad-neural-net-architecture-for-the-job/89729 "2022-11-05T15:12:29Z")

</div>

So I thought I’d take the Universal Approximation Theorem for a spin by training a neural net to reproduce the U.S. Consumer Price Index as a function of time: A simple model with 1 hidden layer with 3 neurons does ju…

---

## [Problems with the Sentinel.jl package of Julia](https://discourse.julialang.org/t/problems-with-the-sentinel-jl-package-of-julia/89815)

<div class="topic-metadata">

**Author:** [@humbleclaw](https://discourse.julialang.org/u/humbleclaw)\
**Replies:** 0\
**Last updated:** [November 5, 2022, 2:15pm UTC](https://discourse.julialang.org/t/problems-with-the-sentinel-jl-package-of-julia/89815 "2022-11-05T14:15:26Z")

</div>

Following the example given in the README of the github repository of this package (https://github.com/mhudecheck/Sentinel.jl), the saveList() function creates the /.img\_cache folder but then it prints a “false” value, b…

---

## [Why is type inference failing here?](https://discourse.julialang.org/t/why-is-type-inference-failing-here/89803)

<div class="topic-metadata">

**Author:** [@robsmith11](https://discourse.julialang.org/u/robsmith11)\
**Replies:** 3\
**Last updated:** [November 5, 2022, 2:09pm UTC](https://discourse.julialang.org/t/why-is-type-inference-failing-here/89803 "2022-11-05T14:09:42Z")

</div>

In the following example, it seems like it should be simple for Julia to infer that the type of prev\_x is Float64. Why is it instead getting assigned a boxed type? julia\> function tf(xs) prev\_x = xs\[1\] …

---

## [Global or not?](https://discourse.julialang.org/t/global-or-not/89807)

<div class="topic-metadata">

**Author:** [@hoseini](https://discourse.julialang.org/u/hoseini)\
**Replies:** 4\
**Last updated:** [November 5, 2022, 1:59pm UTC](https://discourse.julialang.org/t/global-or-not/89807 "2022-11-05T13:59:13Z")

</div>

Hi I am new in Julia. I intend to produce two vectors u and v via a for loop as below. Unfortunately, the vectors are not recognizable outside of the loop, why? λ = −0.45 # The bifurcation Parameter function ST(u, …

---

## [Tutorial recommendation for handling various mathematical equations?](https://discourse.julialang.org/t/tutorial-recommendation-for-handling-various-mathematical-equations/89801)

<div class="topic-metadata">

**Author:** [@entries](https://discourse.julialang.org/u/entries)\
**Replies:** 1\
**Last updated:** [November 5, 2022, 10:44am UTC](https://discourse.julialang.org/t/tutorial-recommendation-for-handling-various-mathematical-equations/89801 "2022-11-05T10:44:18Z")

</div>

This question came from my recent reading on Robert Martin’s “Clean Code: A Handbook of Agile Software Craftsmanship”. The author suggested, based on my understanding, a good code should name variables clearly, specific,…

---

## [Plot Raster depth vs value](https://discourse.julialang.org/t/plot-raster-depth-vs-value/89150)

<div class="topic-metadata">

**Author:** [@ryofurue](https://discourse.julialang.org/u/ryofurue)\
**Replies:** 8\
**Last updated:** [November 5, 2022, 10:44am UTC](https://discourse.julialang.org/t/plot-raster-depth-vs-value/89150 "2022-11-05T10:44:27Z")

</div>

I’m trying to plot a vertical profile, a 1D plot, of a variable, a multidimensional Raster on a depth-time grid: using Rasters using Plots infile = "sample.nc" varname = "myvar" myvar = Raster(infile; name=myvar) # 2D…

---

## [What is replacement for jl\_typeof in the library?](https://discourse.julialang.org/t/what-is-replacement-for-jl-typeof-in-the-library/89792)

<div class="topic-metadata">

**Author:** [@dmitry-kazakov](https://discourse.julialang.org/u/dmitry-kazakov)\
**Replies:** 1\
**Last updated:** [November 5, 2022, 8:26am UTC](https://discourse.julialang.org/t/what-is-replacement-for-jl-typeof-in-the-library/89792 "2022-11-05T08:26:36Z")

</div>

The libjulia relocatable library has no jl\_typeof anymore. From the sources I see that it was replaced by a preprocessor macro. Is there a substitute usable from language bindings?

---

## [Customizing legends of rootlocusplot by ControlSystem.jl?](https://discourse.julialang.org/t/customizing-legends-of-rootlocusplot-by-controlsystem-jl/89756)

<div class="topic-metadata">

**Author:** [@emone](https://discourse.julialang.org/u/emone)\
**Replies:** 3\
**Last updated:** [November 5, 2022, 8:19am UTC](https://discourse.julialang.org/t/customizing-legends-of-rootlocusplot-by-controlsystem-jl/89756 "2022-11-05T08:19:56Z")

</div>

Hello mates, I would like to manipulate the rootlocusplot syntax by modifying the legends to be able to differentiate the system that I am graphing. Has anyone tried this? My algorithm is this using ControlSystems usi…

---

## [Using only a part of a colormap in Makie](https://discourse.julialang.org/t/using-only-a-part-of-a-colormap-in-makie/89784)

<div class="topic-metadata">

**Author:** [@trashspam7](https://discourse.julialang.org/u/trashspam7)\
**Replies:** 4\
**Last updated:** [November 5, 2022, 6:17am UTC](https://discourse.julialang.org/t/using-only-a-part-of-a-colormap-in-makie/89784 "2022-11-05T06:17:52Z")

</div>

I have a figure where I am plotting a line and want that line to be colored according to some other array. How do I use only part of a colormap? Or even reverse a sub-section of a colormap? I don’t have a MWE, but the r…

---

## [Using SSL with MySQL.jl?](https://discourse.julialang.org/t/using-ssl-with-mysql-jl/26181)

<div class="topic-metadata">

**Author:** [@julien\_goo](https://discourse.julialang.org/u/julien_goo)\
**Replies:** 3\
**Last updated:** [November 4, 2022, 11:24pm UTC](https://discourse.julialang.org/t/using-ssl-with-mysql-jl/26181 "2022-11-04T23:24:41Z")

</div>

Hi all ! I’m trying to connect to a MySQL db using MySQL.jl I have hard time using the SSL protocol. The connection : conn = MySQL.connect( db\_ip, user, password, db=db\_name, o…

---

## [Trouble getting Weave to output plotly() based plots on HTML document](https://discourse.julialang.org/t/trouble-getting-weave-to-output-plotly-based-plots-on-html-document/34244)

<div class="topic-metadata">

**Author:** [@ElectronicTeaCup](https://discourse.julialang.org/u/ElectronicTeaCup)\
**Replies:** 4\
**Last updated:** [November 4, 2022, 11:15pm UTC](https://discourse.julialang.org/t/trouble-getting-weave-to-output-plotly-based-plots-on-html-document/34244 "2022-11-04T23:15:00Z")

</div>

Hello everyone. When I put in the following: using Plots plotly() plot(rand(10)) And then output via weave using: weave((“doctest.jmd”), out\_path=:pwd,doctype=“md2html”) I get this: Error: \[ Info: Weaving chunk …

---

## [(why) is there no Abstract Collection type](https://discourse.julialang.org/t/why-is-there-no-abstract-collection-type/89233)

<div class="topic-metadata">

**Author:** [@Salmon](https://discourse.julialang.org/u/Salmon)\
**Replies:** 11\
**Last updated:** [November 4, 2022, 5:13pm UTC](https://discourse.julialang.org/t/why-is-there-no-abstract-collection-type/89233 "2022-11-04T17:13:22Z")

</div>

Hi everyone, A common code pattern seems to be: function thingthatiterates(x, collection::AbstractArray) for i in collection ... end end Now in some cases, it might be better to use something non-allocating …

---

## [Julia on a cluster using SLURM, dependencies](https://discourse.julialang.org/t/julia-on-a-cluster-using-slurm-dependencies/89737)

<div class="topic-metadata">

**Author:** [@Max\_Beez](https://discourse.julialang.org/u/Max_Beez)\
**Replies:** 11\
**Last updated:** [November 4, 2022, 8:46pm UTC](https://discourse.julialang.org/t/julia-on-a-cluster-using-slurm-dependencies/89737 "2022-11-04T20:46:07Z")

</div>

I am learning to use Julia on a cluster. The scheduler is of type SLURM. My question is: In my file, I have ~10 packages, how do I insure these dependencies are installed so that the job executes successfully? In my .…

---

## [Is there a dedicated function computing m::Int = log(b, b^m)?](https://discourse.julialang.org/t/is-there-a-dedicated-function-computing-m-int-log-b-b-m/89776)

<div class="topic-metadata">

**Author:** [@dmetivie](https://discourse.julialang.org/u/dmetivie)\
**Replies:** 12\
**Last updated:** [November 4, 2022, 8:19pm UTC](https://discourse.julialang.org/t/is-there-a-dedicated-function-computing-m-int-log-b-b-m/89776 "2022-11-04T20:19:20Z")

</div>

I want to compute the integer m in m = log(b, y) for b integer, y=b^m. It would return an error if y is not a power of b. Right now, using the log is not ideal since julia\> log(7,7^5) 5.000000000000001 which is not a…

---

## [Differentiable optimization / BigFloat - does DiffOpt.jl work with SDPAFamily.jl?](https://discourse.julialang.org/t/differentiable-optimization-bigfloat-does-diffopt-jl-work-with-sdpafamily-jl/89771)

<div class="topic-metadata">

**Author:** [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Replies:** 1\
**Last updated:** [November 4, 2022, 7:29pm UTC](https://discourse.julialang.org/t/differentiable-optimization-bigfloat-does-diffopt-jl-work-with-sdpafamily-jl/89771 "2022-11-04T19:29:22Z")

</div>

I’m interested in solving semidefinite optimization problems and compute the derivatives of the solutions w.r.t. input parameters. BigFloat may be needed for some of the more demanding problems. Does the differentiable o…

---

## [Create a layer in Flux](https://discourse.julialang.org/t/create-a-layer-in-flux/89468)

<div class="topic-metadata">

**Author:** [@qwerty](https://discourse.julialang.org/u/qwerty)\
**Replies:** 4\
**Last updated:** [November 4, 2022, 7:00pm UTC](https://discourse.julialang.org/t/create-a-layer-in-flux/89468 "2022-11-04T19:00:07Z")

</div>

What are the best practices for creating a custom layer in Flux? I noticed that, for example, creating a layer with internal state is not trivial. What should I do in general if I want to create a layer?

---

## [Get all solution found by CPLEX.jl](https://discourse.julialang.org/t/get-all-solution-found-by-cplex-jl/89780)

<div class="topic-metadata">

**Author:** [@Luca](https://discourse.julialang.org/u/Luca)\
**Replies:** 1\
**Last updated:** [November 4, 2022, 6:16pm UTC](https://discourse.julialang.org/t/get-all-solution-found-by-cplex-jl/89780 "2022-11-04T18:16:45Z")

</div>

Dear all, I’m using CPLEX.jl to solve a MILP. I would like to retrieve all the solutions found by the solver. Do you have any advise or suggestion? Thanks very much. Bests.

---

## [Pretty mesh plot in GLMakie](https://discourse.julialang.org/t/pretty-mesh-plot-in-glmakie/89679)

<div class="topic-metadata">

**Author:** [@trashspam7](https://discourse.julialang.org/u/trashspam7)\
**Replies:** 6\
**Last updated:** [November 4, 2022, 3:47pm UTC](https://discourse.julialang.org/t/pretty-mesh-plot-in-glmakie/89679 "2022-11-04T15:47:20Z")

</div>

Perhaps this is more of an artistic question, but I wanted to know if there are any recommendations for settings to play around with to make my plot prettier. I am using GLMakie.mesh! to plot some 3D surfaces within anot…

---

## [Modeling a crowbar circuit with ModelingToolkit.jl](https://discourse.julialang.org/t/modeling-a-crowbar-circuit-with-modelingtoolkit-jl/81968)

<div class="topic-metadata">

**Author:** [@Irene\_Ndindabahizi](https://discourse.julialang.org/u/Irene_Ndindabahizi)\
**Replies:** 5\
**Last updated:** [November 4, 2022, 3:35pm UTC](https://discourse.julialang.org/t/modeling-a-crowbar-circuit-with-modelingtoolkit-jl/81968 "2022-11-04T15:35:10Z")

</div>

Hi All, I am trying to model an electromagnetic launcher using ModelingToolkit.jl. The electric circuit is basically an RLC with a crowbar circuit that cut off the capacitor when the voltage is 0V. I managed to do the s…

---

## [Unexpected garbage collection when using append!](https://discourse.julialang.org/t/unexpected-garbage-collection-when-using-append/89732)

<div class="topic-metadata">

**Author:** [@jewh](https://discourse.julialang.org/u/jewh)\
**Replies:** 20\
**Last updated:** [November 4, 2022, 3:22pm UTC](https://discourse.julialang.org/t/unexpected-garbage-collection-when-using-append/89732 "2022-11-04T15:22:59Z")

</div>

Working with lots of vectors of variable length and contents so I’m using the push! and append! methods frequently in my code. Using @benchmark from BenchmarkTools I’ve identified garbage collection associated with these…

---

## [\`@test\_throws ArgumentError throw(ArgumentError)\` fails](https://discourse.julialang.org/t/test-throws-argumenterror-throw-argumenterror-fails/89779)

<div class="topic-metadata">

**Author:** [@maxkapur](https://discourse.julialang.org/u/maxkapur)\
**Replies:** 1\
**Last updated:** [November 4, 2022, 2:57pm UTC](https://discourse.julialang.org/t/test-throws-argumenterror-throw-argumenterror-fails/89779 "2022-11-04T14:57:20Z")

</div>

I seem to be missing something obvious here—why does the following test fail in v1.8.2? julia\> using Test julia\> @test\_throws ArgumentError throw(ArgumentError) Test Failed at REPL\[3\]:1 Expression: throw(ArgumentErro…

---

## [What exactly is "allocation" in Julia?](https://discourse.julialang.org/t/what-exactly-is-allocation-in-julia/89579)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 45\
**Last updated:** [November 4, 2022, 2:19pm UTC](https://discourse.julialang.org/t/what-exactly-is-allocation-in-julia/89579 "2022-11-04T14:19:50Z")

</div>

When dealing with performances, after type instability, the second “culprit” that arises is often memory allocation. But what exactly is memory allocation for Julia? Why it influences performances so strongly ? What are…

---

## [ANOVA and TukeyHSD](https://discourse.julialang.org/t/anova-and-tukeyhsd/89750)

<div class="topic-metadata">

**Author:** [@Rudiney](https://discourse.julialang.org/u/Rudiney)\
**Replies:** 4\
**Last updated:** [November 4, 2022, 1:53pm UTC](https://discourse.julialang.org/t/anova-and-tukeyhsd/89750 "2022-11-04T13:53:07Z")

</div>

I am interested in analysis of variance (ANOVA) and Hierarchical Multiple Comparison Test (TukeyHSD). Where can I find examples and theoretical reference with the Julia language?

---

## [Converting Longitude & Latitude to X Y on a map using Julia](https://discourse.julialang.org/t/converting-longitude-latitude-to-x-y-on-a-map-using-julia/20611)

<div class="topic-metadata">

**Author:** [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Replies:** 22\
**Last updated:** [November 4, 2022, 12:37pm UTC](https://discourse.julialang.org/t/converting-longitude-latitude-to-x-y-on-a-map-using-julia/20611 "2022-11-04T12:37:39Z")

</div>

Hey. I searched for this question and I found this link: gps - Converting Longitude & Latitude to X Y on a map with Calibration points - Stack Overflow My question is not exactly the same as the above link, because I do…

---

## [Plotlyjs x values display](https://discourse.julialang.org/t/plotlyjs-x-values-display/89688)

<div class="topic-metadata">

**Author:** [@Stephen](https://discourse.julialang.org/u/Stephen)\
**Replies:** 5\
**Last updated:** [November 4, 2022, 12:02pm UTC](https://discourse.julialang.org/t/plotlyjs-x-values-display/89688 "2022-11-04T12:02:45Z")

</div>

here is the code: DateTick = x\[1\]:Dates.Month(6):x\[end\] DateTick2 = Dates.format.(DateTick,"Y-m") p1 = scatter(x, y1, xticks = (DateTick, DateTick2), title = "Money supply", xrotation=-45, legend = :topleft) …

---

## [Resize legend box in subplots for Plots.jl?](https://discourse.julialang.org/t/resize-legend-box-in-subplots-for-plots-jl/36141)

<div class="topic-metadata">

**Author:** [@floswald](https://discourse.julialang.org/u/floswald)\
**Replies:** 11\
**Last updated:** [November 4, 2022, 11:47am UTC](https://discourse.julialang.org/t/resize-legend-box-in-subplots-for-plots-jl/36141 "2022-11-04T11:47:49Z")

</div>

I have a series of subplots each with their own legend. however, the boxes around the legends are too big. how could I make them smaller? like, why is the red line in avg N so long? asked differently: what determines…

---

## [\[ANN\] UnzipLoops -- broadcasting and unzip the output without overhead](https://discourse.julialang.org/t/ann-unziploops-broadcasting-and-unzip-the-output-without-overhead/89190)

<div class="topic-metadata">

**Author:** [@JohnnyChen94](https://discourse.julialang.org/u/JohnnyChen94)\
**Replies:** 16\
**Last updated:** [November 4, 2022, 11:42am UTC](https://discourse.julialang.org/t/ann-unziploops-broadcasting-and-unzip-the-output-without-overhead/89190 "2022-11-04T11:42:35Z")

</div>

TL;DR GitHub - Suzhou-Tongyuan/UnzipLoops.jl: broadcast and unzip it! provides one single function broadcast\_unzip – it works similar to broadcasting but unzip the output in the same loop for better performance. Still n…

---

## [Namedtuple as a single value](https://discourse.julialang.org/t/namedtuple-as-a-single-value/89764)

<div class="topic-metadata">

**Author:** [@rocco\_sprmnt21](https://discourse.julialang.org/u/rocco_sprmnt21)\
**Replies:** 6\
**Last updated:** [November 4, 2022, 10:39am UTC](https://discourse.julialang.org/t/namedtuple-as-a-single-value/89764 "2022-11-04T10:39:18Z")

</div>

I wanted to report the following results and have comments on how to consider them. The problem is not fictitious. It derives from the usecase treated here, where, among other things, the error description is slightly …

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

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