# Latest

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

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

**Page:** 1180

---

## [Storing and retrieving multi-dimensional arrays from a file](https://discourse.julialang.org/t/storing-and-retrieving-multi-dimensional-arrays-from-a-file/73017)

<div class="topic-metadata">

**Author:** [@JaydevSR](https://discourse.julialang.org/u/JaydevSR)\
**Replies:** 5\
**Last updated:** [December 14, 2021, 10:48am UTC](https://discourse.julialang.org/t/storing-and-retrieving-multi-dimensional-arrays-from-a-file/73017 "2021-12-14T10:48:49Z")

</div>

Let’s say, for some parameter k I have a 3-d array (in my case is a (N, N, M) array). Here, k can take a bunch of values. I want to store the arrays in a file in such a way that I can retrieve them for each value of k l…

---

## [Project precompilation fails with \`ArgumentError: Invalid header in cache file ...\`](https://discourse.julialang.org/t/project-precompilation-fails-with-argumenterror-invalid-header-in-cache-file/67256)

<div class="topic-metadata">

**Author:** [@Samuel\_Ainsworth](https://discourse.julialang.org/u/Samuel_Ainsworth)\
**Replies:** 4\
**Last updated:** [December 14, 2021, 10:33am UTC](https://discourse.julialang.org/t/project-precompilation-fails-with-argumenterror-invalid-header-in-cache-file/67256 "2021-12-14T10:33:31Z")

</div>

I have a julia project that refuses to \] precompile. I get the following error: Precompiling project... ✗ odecontrol 296 dependencies successfully precompiled in 290 seconds (8 already precompiled) ERROR: The follo…

---

## [Teaching-Learning-based Optimization](https://discourse.julialang.org/t/teaching-learning-based-optimization/73014)

<div class="topic-metadata">

**Author:** [@Hans\_W\_Borchers](https://discourse.julialang.org/u/Hans_W_Borchers)\
**Replies:** 3\
**Last updated:** [December 14, 2021, 9:02am UTC](https://discourse.julialang.org/t/teaching-learning-based-optimization/73014 "2021-12-14T09:02:39Z")

</div>

Is there an implementation of the Teaching-Learning-Based Optimization (TLBO) algorithm in a Julia package or somewhere on Github? I found a MATLAB toolbox, but all searches for Julia were not successful. See Teaching …

---

## [\`Replace\` function defaulting to type Any when using broadcasting, but not with a for-loop](https://discourse.julialang.org/t/replace-function-defaulting-to-type-any-when-using-broadcasting-but-not-with-a-for-loop/73030)

<div class="topic-metadata">

**Author:** [@numberMX](https://discourse.julialang.org/u/numberMX)\
**Replies:** 3\
**Last updated:** [December 14, 2021, 4:34am UTC](https://discourse.julialang.org/t/replace-function-defaulting-to-type-any-when-using-broadcasting-but-not-with-a-for-loop/73030 "2021-12-14T04:34:15Z")

</div>

I had a situation the other day where I had a 2D vector of integers, and I wanted to use the replace function with a list of replacement pairs, on the integers in the inner vectors. If I use a for-loop list comprehensio…

---

## [Tracking down slowness of using](https://discourse.julialang.org/t/tracking-down-slowness-of-using/73048)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 1\
**Last updated:** [December 14, 2021, 8:28am UTC](https://discourse.julialang.org/t/tracking-down-slowness-of-using/73048 "2021-12-14T08:28:22Z")

</div>

This is the speed I get with a clean .julia profile: julia\> @time using HTTP 0.185504 seconds (50.50 k allocations: 4.633 MiB, 85.81% compilation time) With non-default options I can get down to: julia\> @time using …

---

## [Graph Neural Networks in Flux.](https://discourse.julialang.org/t/graph-neural-networks-in-flux/21932)

<div class="topic-metadata">

**Author:** [@FernandoHildebrand](https://discourse.julialang.org/u/FernandoHildebrand)\
**Replies:** 5\
**Last updated:** [December 14, 2021, 7:44am UTC](https://discourse.julialang.org/t/graph-neural-networks-in-flux/21932 "2021-12-14T07:44:12Z")

</div>

Hello, Im starting my master course (Brazil- UFPR) in Bioinformatics. My background is mostly in IT and I´ve been studing Neural Nets(CNN, RNN…) to my upmost abilities. It seems that Graphs Neural Networks and/or Graph…

---

## [\[ANN\] Reviving LMDB.jl](https://discourse.julialang.org/t/ann-reviving-lmdb-jl/73061)

<div class="topic-metadata">

**Author:** [@fabiangans](https://discourse.julialang.org/u/fabiangans)\
**Replies:** 0\
**Last updated:** [December 14, 2021, 7:36am UTC](https://discourse.julialang.org/t/ann-reviving-lmdb-jl/73061 "2021-12-14T07:36:41Z")

</div>

I want to announce that LMDB.jl, a wrapper for the LMDB C library, was added to the General registry again. The package existed before in pre-1.0 times, and was now brought up to date using new wrapper generators, the Ar…

---

## [Writing a multi-objective MPS file](https://discourse.julialang.org/t/writing-a-multi-objective-mps-file/73058)

<div class="topic-metadata">

**Author:** [@gleyland](https://discourse.julialang.org/u/gleyland)\
**Replies:** 2\
**Last updated:** [December 14, 2021, 5:59am UTC](https://discourse.julialang.org/t/writing-a-multi-objective-mps-file/73058 "2021-12-14T05:59:29Z")

</div>

Hi, We’re using JuMP with Gurobi, and specifically Gurobi’s multi-objective support (which is more sequential objectives than multi-objective, but that works because in this case that’s what we want). It would be handy…

---

## [Does Julia optimise when we reuse function?](https://discourse.julialang.org/t/does-julia-optimise-when-we-reuse-function/73057)

<div class="topic-metadata">

**Author:** [@Minimum-Pollution-96](https://discourse.julialang.org/u/Minimum-Pollution-96)\
**Replies:** 4\
**Last updated:** [December 14, 2021, 4:04am UTC](https://discourse.julialang.org/t/does-julia-optimise-when-we-reuse-function/73057 "2021-12-14T04:04:09Z")

</div>

I have the following two functions defined separately. C(u\_nodes, X, t) = F(u\_nodes, X, t)'F(u\_nodes, X, t) b(u\_nodes, X, t) = F(u\_nodes, X, t)\* F(u\_nodes, X, t)' Now, if I create another 2 functions (called in a seq…

---

## [Determining xlims](https://discourse.julialang.org/t/determining-xlims/72921)

<div class="topic-metadata">

**Author:** [@sransome](https://discourse.julialang.org/u/sransome)\
**Replies:** 7\
**Last updated:** [December 14, 2021, 2:55am UTC](https://discourse.julialang.org/t/determining-xlims/72921 "2021-12-14T02:55:12Z")

</div>

Hi, I really like the ability of Makie to set the x and y limits automatically but sometimes I want to use the limits to fine tune my plot. Is there a way of returning the x and y limits for an axis when they have been…

---

## [Converting Date Formats from dd/mm/yyyy to yyyy-mm-dd](https://discourse.julialang.org/t/converting-date-formats-from-dd-mm-yyyy-to-yyyy-mm-dd/73056)

<div class="topic-metadata">

**Author:** [@Peter-Jolly](https://discourse.julialang.org/u/Peter-Jolly)\
**Replies:** 2\
**Last updated:** [December 14, 2021, 2:34am UTC](https://discourse.julialang.org/t/converting-date-formats-from-dd-mm-yyyy-to-yyyy-mm-dd/73056 "2021-12-14T02:34:40Z")

</div>

Could someone help with the correct code to convert date formats as follows. The simple code throws an error at line Date\_2 = … : #Change Date formats using Dates Start\_Date = "2000-02-01" Date\_1 = Date(Start\_Date,"yyy…

---

## [ERROR: No applicable\_savers found for UNKNOWN](https://discourse.julialang.org/t/error-no-applicable-savers-found-for-unknown/60339)

<div class="topic-metadata">

**Author:** [@t-pollington](https://discourse.julialang.org/u/t-pollington)\
**Replies:** 1\
**Last updated:** [December 14, 2021, 12:58am UTC](https://discourse.julialang.org/t/error-no-applicable-savers-found-for-unknown/60339 "2021-12-14T00:58:28Z")

</div>

Got this error coming from FileIO.save which had no Google search results to help. I ran: save("filename","varname", var) Turns out I forgot to include the file extension! This fixed it save("filename.jld","varname", …

---

## [Custom structs in JuliaDiffEq: In-place broadcasting results in allocation and slowdown](https://discourse.julialang.org/t/custom-structs-in-juliadiffeq-in-place-broadcasting-results-in-allocation-and-slowdown/72686)

<div class="topic-metadata">

**Author:** [@taketwicedailey](https://discourse.julialang.org/u/taketwicedailey)\
**Replies:** 7\
**Last updated:** [December 14, 2021, 12:16am UTC](https://discourse.julialang.org/t/custom-structs-in-juliadiffeq-in-place-broadcasting-results-in-allocation-and-slowdown/72686 "2021-12-14T00:16:20Z")

</div>

I am trying to write a program that solves a set of partial differential equations. This includes one space dimension and one time dimension, so I would like to pass a spatial vector for each of my variables to the ODE s…

---

## [Cannot \`convert\` an object of type](https://discourse.julialang.org/t/cannot-convert-an-object-of-type/73052)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 3\
**Last updated:** [December 13, 2021, 9:47pm UTC](https://discourse.julialang.org/t/cannot-convert-an-object-of-type/73052 "2021-12-13T21:47:05Z")

</div>

What is wrong with this code? Can I fix it by implementing convert somehow? const Maybe{T} = Union{Some{T},Nothing} struct Wrapper{F} f::F end struct WrappedPerson{T} name::Wrapper{T} age::Wrapper{T} end …

---

## [Problems with Plots.jl figure](https://discourse.julialang.org/t/problems-with-plots-jl-figure/73006)

<div class="topic-metadata">

**Author:** [@Sarthak\_Choudhury](https://discourse.julialang.org/u/Sarthak_Choudhury)\
**Replies:** 1\
**Last updated:** [December 13, 2021, 9:42pm UTC](https://discourse.julialang.org/t/problems-with-plots-jl-figure/73006 "2021-12-13T21:42:57Z")

</div>

Hi, I am really having trouble getting a heatmap figure out. I would be grateful for any help regarding this. I am enclosing a mwe for it. x=collect(1:50) y=collect(1:50) z=rand(50,50) p1=Plots.heatmap(x,y,z,leg=false…

---

## [Wiping modules and persistent Base.show](https://discourse.julialang.org/t/wiping-modules-and-persistent-base-show/73049)

<div class="topic-metadata">

**Author:** [@tlienart](https://discourse.julialang.org/u/tlienart)\
**Replies:** 1\
**Last updated:** [December 13, 2021, 9:15pm UTC](https://discourse.julialang.org/t/wiping-modules-and-persistent-base-show/73049 "2021-12-13T21:15:16Z")

</div>

I’d like to be able to overwrite an existing module within a session and have everything it defines dropped. This works fine for functions, structs, variable assignments but not for functions it extends from other module…

---

## [Julia 1.7 saving and restoring RNG state](https://discourse.julialang.org/t/julia-1-7-saving-and-restoring-rng-state/73037)

<div class="topic-metadata">

**Author:** [@crinders](https://discourse.julialang.org/u/crinders)\
**Replies:** 3\
**Last updated:** [December 13, 2021, 9:09pm UTC](https://discourse.julialang.org/t/julia-1-7-saving-and-restoring-rng-state/73037 "2021-12-13T21:09:38Z")

</div>

Previously I checkpointed the RNG in a Julia session using multiple threads (40) with using JLD2 using Random jldopen(Filename,'w') do F F\["RNG"\] = Random.default\_rng()\` end and restored with using JLD2 using Rando…

---

## [Why is this dependency not precompiling?](https://discourse.julialang.org/t/why-is-this-dependency-not-precompiling/72990)

<div class="topic-metadata">

**Author:** [@Soldalma](https://discourse.julialang.org/u/Soldalma)\
**Replies:** 15\
**Last updated:** [December 13, 2021, 8:27pm UTC](https://discourse.julialang.org/t/why-is-this-dependency-not-precompiling/72990 "2021-12-13T20:27:14Z")

</div>

Frequently I get messages saying that a dependency did not precompile. This has been going on for months. I did not mind because my code runs. Still, it would be good to understand what is wrong and fix the problem. May…

---

## [Using ForwardDiff.jacobian to provide jac to ODE solvers](https://discourse.julialang.org/t/using-forwarddiff-jacobian-to-provide-jac-to-ode-solvers/73041)

<div class="topic-metadata">

**Author:** [@Yinmin\_Liu](https://discourse.julialang.org/u/Yinmin_Liu)\
**Replies:** 1\
**Last updated:** [December 13, 2021, 8:00pm UTC](https://discourse.julialang.org/t/using-forwarddiff-jacobian-to-provide-jac-to-ode-solvers/73041 "2021-12-13T20:00:09Z")

</div>

Hi, I would like to use ForwardDiff.jacobian to provide Jacobian matrix to ODE solvers. I wonder if it can be faster than using numerical Jacobian. I think the rhs of differential equations should in form of f(du, u,p,t…

---

## [Rotating plot around line in Makie](https://discourse.julialang.org/t/rotating-plot-around-line-in-makie/73036)

<div class="topic-metadata">

**Author:** [@theogf](https://discourse.julialang.org/u/theogf)\
**Replies:** 7\
**Last updated:** [December 13, 2021, 7:24pm UTC](https://discourse.julialang.org/t/rotating-plot-around-line-in-makie/73036 "2021-12-13T19:24:48Z")

</div>

Hey amazing Makie people! I would like to rotate a heatmap around a given line in a 3d scene. So far rotate!(plt, qrotation(Vec3(\[0, 1, 0\]), pi)) works great but I can only rotate against the x,y,z axis. How can I rota…

---

## [Looking for modeling ideas](https://discourse.julialang.org/t/looking-for-modeling-ideas/73013)

<div class="topic-metadata">

**Author:** [@Emmanuel-R8](https://discourse.julialang.org/u/Emmanuel-R8)\
**Replies:** 3\
**Last updated:** [December 13, 2021, 6:44pm UTC](https://discourse.julialang.org/t/looking-for-modeling-ideas/73013 "2021-12-13T18:44:42Z")

</div>

Hi - I have experience in MTK, Flux and Turing. I have used them in pairs. BUT, I have never used them all three at the same time. I have been looking for easy-ish ideas (think blogpost level) that I could use to educa…

---

## [How many threads can you run at once Julia?](https://discourse.julialang.org/t/how-many-threads-can-you-run-at-once-julia/73035)

<div class="topic-metadata">

**Author:** [@Cong\_Minh](https://discourse.julialang.org/u/Cong_Minh)\
**Replies:** 3\
**Last updated:** [December 13, 2021, 5:37pm UTC](https://discourse.julialang.org/t/how-many-threads-can-you-run-at-once-julia/73035 "2021-12-13T17:37:25Z")

</div>

hi guys i come from python world, i know that python can only execute 1 thread at 1 time, so can Julia execute multiple threads at 1 time?

---

## [Run code first time a package precompile](https://discourse.julialang.org/t/run-code-first-time-a-package-precompile/73029)

<div class="topic-metadata">

**Author:** [@gitboy16](https://discourse.julialang.org/u/gitboy16)\
**Replies:** 1\
**Last updated:** [December 13, 2021, 5:11pm UTC](https://discourse.julialang.org/t/run-code-first-time-a-package-precompile/73029 "2021-12-13T17:11:44Z")

</div>

Hi, Is it possible to run some code when a package precompile for the first time? I would like to run that code just once when precompilation happen. I don’t want to run it every time the package is loaded with using …

---

## [Is there a \`with\` operator or usage pattern?](https://discourse.julialang.org/t/is-there-a-with-operator-or-usage-pattern/52693)

<div class="topic-metadata">

**Author:** [@cce](https://discourse.julialang.org/u/cce)\
**Replies:** 31\
**Last updated:** [December 13, 2021, 5:08pm UTC](https://discourse.julialang.org/t/is-there-a-with-operator-or-usage-pattern/52693 "2021-12-13T17:08:21Z")

</div>

In Visual Basic, the With scope operator lets you work with the attributes of a given object without having to repeat the object’s name. Perhaps something like… julia\> subtotal = (price=12.99, shipping=3.99) (price = 1…

---

## [How to get stacktrace and line numbers after jl\_exception\_occurred?](https://discourse.julialang.org/t/how-to-get-stacktrace-and-line-numbers-after-jl-exception-occurred/73031)

<div class="topic-metadata">

**Author:** [@RobertN](https://discourse.julialang.org/u/RobertN)\
**Replies:** 0\
**Last updated:** [December 13, 2021, 4:57pm UTC](https://discourse.julialang.org/t/how-to-get-stacktrace-and-line-numbers-after-jl-exception-occurred/73031 "2021-12-13T16:57:57Z")

</div>

I’m loading a string from a file and passing it to jl\_eval\_string. When there is an error in the file I can tell because jl\_exception\_occured() returns non-null. But how do I get a stack trace with line numbers from that…

---

## [List of license for packages in a project](https://discourse.julialang.org/t/list-of-license-for-packages-in-a-project/73028)

<div class="topic-metadata">

**Author:** [@kaslusimoes](https://discourse.julialang.org/u/kaslusimoes)\
**Replies:** 1\
**Last updated:** [December 13, 2021, 4:23pm UTC](https://discourse.julialang.org/t/list-of-license-for-packages-in-a-project/73028 "2021-12-13T16:23:59Z")

</div>

Hi, Is there any easy way to collect in a list all the Licenses for packages I use in a Julia project? I was hoping to find similar information in Manifest.toml, but nothing there (I guess that’s not the purpose of tha…

---

## [Why are MAT files created by Julia significantly larger than those created by Matlab?](https://discourse.julialang.org/t/why-are-mat-files-created-by-julia-significantly-larger-than-those-created-by-matlab/69793)

<div class="topic-metadata">

**Author:** [@leon](https://discourse.julialang.org/u/leon)\
**Replies:** 15\
**Last updated:** [December 13, 2021, 3:03pm UTC](https://discourse.julialang.org/t/why-are-mat-files-created-by-julia-significantly-larger-than-those-created-by-matlab/69793 "2021-12-13T15:03:33Z")

</div>

This is how I created my MAT file using MAT F1 = matopen("test.mat", "w"); write(F1, "x", B\[:,1\]); write(F1, "y", B\[:,2\]); write(F1, "f", B\[:,3\]); close(F1) It is 898MB. If I open it within Matlab and then save('te…

---

## [Studio closes pane with each plot command](https://discourse.julialang.org/t/studio-closes-pane-with-each-plot-command/72969)

<div class="topic-metadata">

**Author:** [@Smack](https://discourse.julialang.org/u/Smack)\
**Replies:** 4\
**Last updated:** [December 13, 2021, 2:41pm UTC](https://discourse.julialang.org/t/studio-closes-pane-with-each-plot-command/72969 "2021-12-13T14:41:49Z")

</div>

After latest update VS code now closes the plotting pane and shifts focus to plot tab after each plot. My first question is how do I stop this. My second question is how do I disable these updates and pre-compilations …

---

## [Dataframes: Split combined result to different columns](https://discourse.julialang.org/t/dataframes-split-combined-result-to-different-columns/73023)

<div class="topic-metadata">

**Author:** [@TBuConst](https://discourse.julialang.org/u/TBuConst)\
**Replies:** 3\
**Last updated:** [December 13, 2021, 1:58pm UTC](https://discourse.julialang.org/t/dataframes-split-combined-result-to-different-columns/73023 "2021-12-13T13:58:40Z")

</div>

Hello everyone, I’m pretty new to Julia and struggle with a data wrangling problem. Say, I’ve got the following dataframe: using DataFrames df = DataFrame(ID = \[1,1,1,2,2,2,3,3\], OP = \[:X,:X,:Y,:X,:Y,:Y,…

---

## [AlgebraOfGraphics question](https://discourse.julialang.org/t/algebraofgraphics-question/72982)

<div class="topic-metadata">

**Author:** [@Bardo](https://discourse.julialang.org/u/Bardo)\
**Replies:** 4\
**Last updated:** [December 13, 2021, 12:26pm UTC](https://discourse.julialang.org/t/algebraofgraphics-question/72982 "2021-12-13T12:26:16Z")

</div>

In Philosophy · Algebra of Graphics (juliaplots.org) the authors explain that AlgebraOfGraphics doesn’t do mind reading and want to cut down the clutter/repetition when specifying a plot. I wonder what is the price to …

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

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