# Latest

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

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

**Page:** 911

---

## [Efficient serialization of JuMP results](https://discourse.julialang.org/t/efficient-serialization-of-jump-results/87896)

<div class="topic-metadata">

**Author:** [@jd-foster](https://discourse.julialang.org/u/jd-foster)\
**Replies:** 5\
**Last updated:** [September 28, 2022, 11:06pm UTC](https://discourse.julialang.org/t/efficient-serialization-of-jump-results/87896 "2022-09-28T23:06:00Z")

</div>

What is a recommended workflow for efficiently serialising results data after solving a JuMP model? The information in the numbers are the important thing, not preserving the Julia object structure. For example, does an…

---

## [Matrix-vector product faster than matrix addition?](https://discourse.julialang.org/t/matrix-vector-product-faster-than-matrix-addition/87954)

<div class="topic-metadata">

**Author:** [@goerz](https://discourse.julialang.org/u/goerz)\
**Replies:** 5\
**Last updated:** [September 28, 2022, 11:04pm UTC](https://discourse.julialang.org/t/matrix-vector-product-faster-than-matrix-addition/87954 "2022-09-28T23:04:51Z")

</div>

I’m running some benchmarks, and to my surprize I’m finding adding two matrices much slower than a matrix-vector multiplication. The relevant benchmark code is this (see link for context): function benchmark\_mv\_vs\_mpm()…

---

## [Git-tree-sha1 for Artifacts.toml](https://discourse.julialang.org/t/git-tree-sha1-for-artifacts-toml/43879)

<div class="topic-metadata">

**Author:** [@NicholasWMRitchie](https://discourse.julialang.org/u/NicholasWMRitchie)\
**Replies:** 6\
**Last updated:** [September 28, 2022, 10:53pm UTC](https://discourse.julialang.org/t/git-tree-sha1-for-artifacts-toml/43879 "2022-09-28T22:53:54Z")

</div>

How is the git-tree-sha1 supposed to be calculated for artifacts? The instructions in UsingArtifacts don’t seem to produce the correct hash when the file I’m downloading is a “tar.gz” (either when I download the individ…

---

## [Why no Float type alias?](https://discourse.julialang.org/t/why-no-float-type-alias/87947)

<div class="topic-metadata">

**Author:** [@Nathan\_Boyer](https://discourse.julialang.org/u/Nathan_Boyer)\
**Replies:** 10\
**Last updated:** [September 28, 2022, 9:56pm UTC](https://discourse.julialang.org/t/why-no-float-type-alias/87947 "2022-09-28T21:56:31Z")

</div>

Why doesn’t Float alias to the machine bit size like Int? julia\> Int Int64 julia\> Float ERROR: UndefVarError: Float not defined

---

## [Error \`julia.environmentPath\` on Linux](https://discourse.julialang.org/t/error-julia-environmentpath-on-linux/87878)

<div class="topic-metadata">

**Author:** [@Tbl](https://discourse.julialang.org/u/Tbl)\
**Replies:** 4\
**Last updated:** [September 28, 2022, 9:55pm UTC](https://discourse.julialang.org/t/error-julia-environmentpath-on-linux/87878 "2022-09-28T21:55:35Z")

</div>

Hi, After a break I’ve installed new Julia 1.8.1 version on Ubuntu 20.04.5 LTS machine, set path variable, in terminal Julia works just fine, but in VS Code I’m getting untypical error Could not start the Julia langua…

---

## [Replacing Nan values with the average column values](https://discourse.julialang.org/t/replacing-nan-values-with-the-average-column-values/87788)

<div class="topic-metadata">

**Author:** [@nbagg](https://discourse.julialang.org/u/nbagg)\
**Replies:** 4\
**Last updated:** [September 28, 2022, 9:06pm UTC](https://discourse.julialang.org/t/replacing-nan-values-with-the-average-column-values/87788 "2022-09-28T21:06:37Z")

</div>

Hi, I am trying to convert some code from Python to Julia and wondering what is the best way to replace Nan values with the column averages. I’m trying to accomplish exactly what is in the post but in Julia. My first …

---

## [About static compilation and static analysis](https://discourse.julialang.org/t/about-static-compilation-and-static-analysis/87492)

<div class="topic-metadata">

**Author:** [@martin.d.maas](https://discourse.julialang.org/u/martin.d.maas)\
**Replies:** 22\
**Last updated:** [September 28, 2022, 8:14pm UTC](https://discourse.julialang.org/t/about-static-compilation-and-static-analysis/87492 "2022-09-28T20:14:53Z")

</div>

Hi everyone, I just wanted to share some thoughts about the state of Julia 1.X, and what I see as the most important missing features of the language. I intend to make this a “no-rush feature request” for Julia 2.0, rat…

---

## [ANN: Sparspak.jl 0.3.0 works with ForwardDiff.Dual and other number types](https://discourse.julialang.org/t/ann-sparspak-jl-0-3-0-works-with-forwarddiff-dual-and-other-number-types/87948)

<div class="topic-metadata">

**Author:** [@j-fu](https://discourse.julialang.org/u/j-fu)\
**Replies:** 0\
**Last updated:** [September 28, 2022, 8:11pm UTC](https://discourse.julialang.org/t/ann-sparspak-jl-0-3-0-works-with-forwarddiff-dual-and-other-number-types/87948 "2022-09-28T20:11:36Z")

</div>

This is a follow-up to the Announcement of Sparspak.jl, a sparse direct solver package resulting from the translation of the Sparspak Fortran90 library to Julia performed by @PetrKryslUCSD. With consent of the Fortran …

---

## [Align ticks in subplots](https://discourse.julialang.org/t/align-ticks-in-subplots/87919)

<div class="topic-metadata">

**Author:** [@pascal](https://discourse.julialang.org/u/pascal)\
**Replies:** 14\
**Last updated:** [September 28, 2022, 6:45pm UTC](https://discourse.julialang.org/t/align-ticks-in-subplots/87919 "2022-09-28T18:45:57Z")

</div>

I have the following code: using CairoMakie d1 = rand(1:10, 50) d2 = rand(1:4, 20) d3 = rand(1:10, 10) fig=Figure() ax\_1=Axis(fig\[1, 1:2\]) ax\_2=Axis(fig\[2, 1\]) ax\_3=Axis(fig\[2, 2\]) scatter!(ax\_1, 1:50, d1) scatter!(…

---

## [Constraints that do not work together](https://discourse.julialang.org/t/constraints-that-do-not-work-together/87482)

<div class="topic-metadata">

**Author:** [@Zizilabg](https://discourse.julialang.org/u/Zizilabg)\
**Replies:** 5\
**Last updated:** [September 28, 2022, 5:26pm UTC](https://discourse.julialang.org/t/constraints-that-do-not-work-together/87482 "2022-09-28T17:26:27Z")

</div>

Hello, I wrote a model about Julia which contains 3 constraints. If I test one constraint at a time, each one works. But if I run the whole program, I get the following error message: Has anyone had this problem bef…

---

## [Why after copying a JuMP model it does not own the initial model variables?](https://discourse.julialang.org/t/why-after-copying-a-jump-model-it-does-not-own-the-initial-model-variables/87922)

<div class="topic-metadata">

**Author:** [@Alex\_ricci](https://discourse.julialang.org/u/Alex_ricci)\
**Replies:** 3\
**Last updated:** [September 28, 2022, 6:16pm UTC](https://discourse.julialang.org/t/why-after-copying-a-jump-model-it-does-not-own-the-initial-model-variables/87922 "2022-09-28T18:16:20Z")

</div>

I am working on a MIP problem including two variables y\[1\] and y\[2\]. y\[1\] is a binary y\[2\] is a positive real number First I relax the binary restriction by 0 \<=y\[1\] and -y\[1\] \>= -1 and solve the relaxation. c1…

---

## [Is combinedims optimized for StaticArrays?](https://discourse.julialang.org/t/is-combinedims-optimized-for-staticarrays/87929)

<div class="topic-metadata">

**Author:** [@prittjam](https://discourse.julialang.org/u/prittjam)\
**Replies:** 1\
**Last updated:** [September 28, 2022, 6:04pm UTC](https://discourse.julialang.org/t/is-combinedims-optimized-for-staticarrays/87929 "2022-09-28T18:04:33Z")

</div>

In other words, does it reallocate or does it use reinterpret?

---

## [Need Help to Create Animation for Tangent Line with Luxor](https://discourse.julialang.org/t/need-help-to-create-animation-for-tangent-line-with-luxor/87809)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 8\
**Last updated:** [September 28, 2022, 5:50pm UTC](https://discourse.julialang.org/t/need-help-to-create-animation-for-tangent-line-with-luxor/87809 "2022-09-28T17:50:35Z")

</div>

Hi all, I want to understand more of tangent line / gradient line then read the wikipedia and saw the animation here for the tangent line: I create the plot (static image): using Plots, LaTeXStrings gr() f(x) = -…

---

## [Updating Julia version](https://discourse.julialang.org/t/updating-julia-version/87477)

<div class="topic-metadata">

**Author:** [@Jorgedltn](https://discourse.julialang.org/u/Jorgedltn)\
**Replies:** 10\
**Last updated:** [September 28, 2022, 4:52pm UTC](https://discourse.julialang.org/t/updating-julia-version/87477 "2022-09-28T16:52:17Z")

</div>

I have a c++ visual studio project which works with some extern libraries wrappers, these are developed with Julia code in order to follow the preliminary design. I am now triying to improve the whole project and the fi…

---

## [Creating decent julia's environment variable paths on UNIX-like system using XDG specs to avoid ~/.julia](https://discourse.julialang.org/t/creating-decent-julias-environment-variable-paths-on-unix-like-system-using-xdg-specs-to-avoid-julia/83276)

<div class="topic-metadata">

**Author:** [@tapyu](https://discourse.julialang.org/u/tapyu)\
**Replies:** 2\
**Last updated:** [September 28, 2022, 4:39pm UTC](https://discourse.julialang.org/t/creating-decent-julias-environment-variable-paths-on-unix-like-system-using-xdg-specs-to-avoid-julia/83276 "2022-09-28T16:39:54Z")

</div>

As a brand-new julia programmer, I am striving to tidy up my $HOME dir in order to avoid bloating it up with a tons of dotfiles, and at same time, define sane paths to julia using XDG Base Directory Specification. The st…

---

## [Now that Julia w/o LLVM is a thing, how long before I can run Julia on RPi Pico?](https://discourse.julialang.org/t/now-that-julia-w-o-llvm-is-a-thing-how-long-before-i-can-run-julia-on-rpi-pico/87676)

<div class="topic-metadata">

**Author:** [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Replies:** 11\
**Last updated:** [September 28, 2022, 4:16pm UTC](https://discourse.julialang.org/t/now-that-julia-w-o-llvm-is-a-thing-how-long-before-i-can-run-julia-on-rpi-pico/87676 "2022-09-28T16:16:51Z")

</div>

So with Julia 1.8 as I understand it you can now separate out the Julia runtime and the LLVM runtime. Stuff like the RPi Pico which is based on a low powered ARM core is really ripe for a scientific programming language…

---

## [Should upgrading \`\[compat\]\` bounds be considered a breaking change? LoopVectorization and ArrayInterface](https://discourse.julialang.org/t/should-upgrading-compat-bounds-be-considered-a-breaking-change-loopvectorization-and-arrayinterface/87817)

<div class="topic-metadata">

**Author:** [@BioTurboNick](https://discourse.julialang.org/u/BioTurboNick)\
**Replies:** 15\
**Last updated:** [September 28, 2022, 3:11pm UTC](https://discourse.julialang.org/t/should-upgrading-compat-bounds-be-considered-a-breaking-change-loopvectorization-and-arrayinterface/87817 "2022-09-28T15:11:50Z")

</div>

LoopVectorization in v0.12.110 had ArrayInterface compat entries for 3.1.32, 3.2.1, and 5.0.1. Then v0.12.111 dropped those in favor of v6.0.1. Even though it’s a dependency and thus doesn’t break the API of LoopVectori…

---

## [Axis() in combination with images()](https://discourse.julialang.org/t/axis-in-combination-with-images/87937)

<div class="topic-metadata">

**Author:** [@pascal](https://discourse.julialang.org/u/pascal)\
**Replies:** 2\
**Last updated:** [September 28, 2022, 3:05pm UTC](https://discourse.julialang.org/t/axis-in-combination-with-images/87937 "2022-09-28T15:05:06Z")

</div>

The following code from the docs works nicely: using CairoMakie using FileIO img = load(assetpath("cow.png")) f = Figure() image(f\[1, 1\], img) However, when I want to define an Axis and put that into image() it fails: …

---

## [Best strategies to solve an ODE with piecewise functions using OrdinaryDiffEq](https://discourse.julialang.org/t/best-strategies-to-solve-an-ode-with-piecewise-functions-using-ordinarydiffeq/87750)

<div class="topic-metadata">

**Author:** [@RayleighLord](https://discourse.julialang.org/u/RayleighLord)\
**Replies:** 4\
**Last updated:** [September 28, 2022, 2:59pm UTC](https://discourse.julialang.org/t/best-strategies-to-solve-an-ode-with-piecewise-functions-using-ordinarydiffeq/87750 "2022-09-28T14:59:26Z")

</div>

I want to solve an ODE problem involving some piecewise functions and I would like to ask for advice on what could be the best strategy to solve them. Physically, the ODEs I want to solve represent a contact element sti…

---

## [Macro accessing fields of struct at another module](https://discourse.julialang.org/t/macro-accessing-fields-of-struct-at-another-module/87893)

<div class="topic-metadata">

**Author:** [@Ronneesley](https://discourse.julialang.org/u/Ronneesley)\
**Replies:** 1\
**Last updated:** [September 28, 2022, 2:48pm UTC](https://discourse.julialang.org/t/macro-accessing-fields-of-struct-at-another-module/87893 "2022-09-28T14:48:15Z")

</div>

Hello, I’ve a module with a macro: julia\> module MyModule export @mymacro macro mymacro(T) return fieldnames( eval(T) ) end end When I’m at another module or at Julia’s shell I can’t use my macro: j…

---

## [Cannot build PyPlot](https://discourse.julialang.org/t/cannot-build-pyplot/87616)

<div class="topic-metadata">

**Author:** [@TimeValley](https://discourse.julialang.org/u/TimeValley)\
**Replies:** 2\
**Last updated:** [September 28, 2022, 2:32pm UTC](https://discourse.julialang.org/t/cannot-build-pyplot/87616 "2022-09-28T14:32:13Z")

</div>

Hello everyone, i just started programming julia and encountered a problem. When I added the PyPlot package and tried to build it: build PyPlot It gave those error messages: Error building \`PyCall\`, showing the last …

---

## [PlutoPlotly and PlotlyJS: subplots](https://discourse.julialang.org/t/plutoplotly-and-plotlyjs-subplots/87886)

<div class="topic-metadata">

**Author:** [@VivMendes](https://discourse.julialang.org/u/VivMendes)\
**Replies:** 2\
**Last updated:** [September 28, 2022, 2:06pm UTC](https://discourse.julialang.org/t/plutoplotly-and-plotlyjs-subplots/87886 "2022-09-28T14:06:56Z")

</div>

Hi, I am trying to produce a figure with two subplots in Pluto, using PlotlyJS and PlutoPlotly. If I create each plot individually, there is no problem: all the layout attributes of the individual plots will come out co…

---

## [PlotlyJS: modify parts of the plot](https://discourse.julialang.org/t/plotlyjs-modify-parts-of-the-plot/86212)

<div class="topic-metadata">

**Author:** [@ellocco](https://discourse.julialang.org/u/ellocco)\
**Replies:** 9\
**Last updated:** [September 28, 2022, 1:46pm UTC](https://discourse.julialang.org/t/plotlyjs-modify-parts-of-the-plot/86212 "2022-09-28T13:46:02Z")

</div>

Today I wanted to figure out, how to modify the axis type of one specific subplot. My question is, how do I figure out stuff like this, if I am not successful to find anything by internet search? What is the best appro…

---

## [Multi-threading monotonic dynamic](https://discourse.julialang.org/t/multi-threading-monotonic-dynamic/87642)

<div class="topic-metadata">

**Author:** [@gitboy16](https://discourse.julialang.org/u/gitboy16)\
**Replies:** 6\
**Last updated:** [September 28, 2022, 12:38pm UTC](https://discourse.julialang.org/t/multi-threading-monotonic-dynamic/87642 "2022-09-28T12:38:57Z")

</div>

Hi, I am trying to use multi-threading in a monotonic dynamic way (in the sense of openmp). By monotonic , I mean that if a thread exected iteration i then the thread must execute iterations larger than i subsequently. …

---

## [Analyzing startup cost of julia itself (to possibly make better before the feature freeze)](https://discourse.julialang.org/t/analyzing-startup-cost-of-julia-itself-to-possibly-make-better-before-the-feature-freeze/87925)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 0\
**Last updated:** [September 28, 2022, 12:34pm UTC](https://discourse.julialang.org/t/analyzing-startup-cost-of-julia-itself-to-possibly-make-better-before-the-feature-freeze/87925 "2022-09-28T12:34:54Z")

</div>

What’s the best way to analyze startup? I suppose I want to profile (with gdb?). Strace gets me some even higher level view. I suppose what needs to happen, at a minimum, is open the sysimage, and mmap involved in that?…

---

## [Multithreading a for loop](https://discourse.julialang.org/t/multithreading-a-for-loop/87920)

<div class="topic-metadata">

**Author:** [@Sagar\_123](https://discourse.julialang.org/u/Sagar_123)\
**Replies:** 6\
**Last updated:** [September 28, 2022, 12:27pm UTC](https://discourse.julialang.org/t/multithreading-a-for-loop/87920 "2022-09-28T12:27:59Z")

</div>

function collect\_nodes\_frac\_serial(nodes, weights, pos, grid\_spacing) @turbo for i = 1:length(pos) nodes\[i\] = div(pos\[i\],grid\_spacing) weights\[i\] = (pos\[i\] - nodes\[i\]\*grid\_spacing)/grid\_spacing en…

---

## [Heterogenous running time Ipopt](https://discourse.julialang.org/t/heterogenous-running-time-ipopt/87813)

<div class="topic-metadata">

**Author:** [@mb96](https://discourse.julialang.org/u/mb96)\
**Replies:** 5\
**Last updated:** [September 28, 2022, 12:24pm UTC](https://discourse.julialang.org/t/heterogenous-running-time-ipopt/87813 "2022-09-28T12:24:33Z")

</div>

I know that the first time running JuMP takes more time due to compilation issues but I was expecting roughly the same running time after that, however as it can be seen below the “variance” is quite high. Does someo…

---

## [Jupyter notebooks all use latest version of Julia, even if marked as previous version](https://discourse.julialang.org/t/jupyter-notebooks-all-use-latest-version-of-julia-even-if-marked-as-previous-version/87913)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 4\
**Last updated:** [September 28, 2022, 12:04pm UTC](https://discourse.julialang.org/t/jupyter-notebooks-all-use-latest-version-of-julia-even-if-marked-as-previous-version/87913 "2022-09-28T12:04:59Z")

</div>

I just installed the latest version of Julia (1.8.1). I set it so that is the version that is run when I write “julia” in my terminal (I am on Ubuntu). However, now when I open my previous (1.7.3) Julia notebooks, they …

---

## [Distributed eigensolvers for computing eigenpairs of large sparse matrices](https://discourse.julialang.org/t/distributed-eigensolvers-for-computing-eigenpairs-of-large-sparse-matrices/78648)

<div class="topic-metadata">

**Author:** [@Neo](https://discourse.julialang.org/u/Neo)\
**Replies:** 6\
**Last updated:** [September 28, 2022, 11:36am UTC](https://discourse.julialang.org/t/distributed-eigensolvers-for-computing-eigenpairs-of-large-sparse-matrices/78648 "2022-09-28T11:36:55Z")

</div>

Hi folks, I implemented a distributed method in Julia for computing smallest eigenvalues and the corresponding eigenvectors of large sparse (symmetric) matrices. I wanted to compare my implementation with a baseline eig…

---

## [Create Tangent Line / Derivative Line Animation with Plots got Errors](https://discourse.julialang.org/t/create-tangent-line-derivative-line-animation-with-plots-got-errors/87814)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 2\
**Last updated:** [September 28, 2022, 10:17am UTC](https://discourse.julialang.org/t/create-tangent-line-derivative-line-animation-with-plots-got-errors/87814 "2022-09-28T10:17:58Z")

</div>

Hi all, Is it possible to create the animation of sliding tangent line with Plots? I got error with my code: using Plots f(x) = -x^2 + 2x + 2 gradient\_line(f, x₀) = (x -\> f(x₀) + f'(x₀)\*(x-x₀)) plot(f, -3:0.1:5, la…

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

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