# Latest

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

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

**Page:** 950

---

## [Correctness? Factorial implementation returning unexpected result](https://discourse.julialang.org/t/correctness-factorial-implementation-returning-unexpected-result/85944)

<div class="topic-metadata">

**Author:** [@hierophantos](https://discourse.julialang.org/u/hierophantos)\
**Replies:** 4\
**Last updated:** [August 18, 2022, 8:44pm UTC](https://discourse.julialang.org/t/correctness-factorial-implementation-returning-unexpected-result/85944 "2022-08-18T20:44:18Z")

</div>

Hi there! First day trying out Julia… so far, love it… Implemented two versions of a simple factorial function, and ran into an unexpected result: function fact(n) if n == 0 return 1 else n \* fa…

---

## [Nonlinear state-space models in ControlSystems.jl?](https://discourse.julialang.org/t/nonlinear-state-space-models-in-controlsystems-jl/85892)

<div class="topic-metadata">

**Author:** [@knttnk](https://discourse.julialang.org/u/knttnk)\
**Replies:** 2\
**Last updated:** [August 18, 2022, 8:18pm UTC](https://discourse.julialang.org/t/nonlinear-state-space-models-in-controlsystems-jl/85892 "2022-08-18T20:18:14Z")

</div>

Will nonlinear state-space models be implemented in ControlSystems.jl? Nonlinear state-space model here is a system with equations like \\begin{cases} \\begin{aligned} \\dot{\\boldsymbol{x}} &= f(t, \\boldsymbol{x}, \\boldsy…

---

## [Splitting and Summing Sparse Arrays](https://discourse.julialang.org/t/splitting-and-summing-sparse-arrays/85903)

<div class="topic-metadata">

**Author:** [@bmit](https://discourse.julialang.org/u/bmit)\
**Replies:** 5\
**Last updated:** [August 18, 2022, 7:29pm UTC](https://discourse.julialang.org/t/splitting-and-summing-sparse-arrays/85903 "2022-08-18T19:29:16Z")

</div>

In my application I need to split a sparse array into columns then pass each column to a separate function and sum them independently. x = sprand(1000, 1000, 0.01) cols = eachcol(x) function foo(x) s = sum(x) #…

---

## [Time it takes to multiply two floats](https://discourse.julialang.org/t/time-it-takes-to-multiply-two-floats/85933)

<div class="topic-metadata">

**Author:** [@JUAN\_CARLOS\_GALVIS\_A](https://discourse.julialang.org/u/JUAN_CARLOS_GALVIS_A)\
**Replies:** 2\
**Last updated:** [August 18, 2022, 6:09pm UTC](https://discourse.julialang.org/t/time-it-takes-to-multiply-two-floats/85933 "2022-08-18T18:09:31Z")

</div>

When i benchmark the multiplication of two Float16, compared to the multiplication of two Float64, it seems it takes the same time. Is this right?

---

## [ANN: New Julia programming blog](https://discourse.julialang.org/t/ann-new-julia-programming-blog/85667)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 10\
**Last updated:** [August 18, 2022, 5:43pm UTC](https://discourse.julialang.org/t/ann-new-julia-programming-blog/85667 "2022-08-18T17:43:58Z")

</div>

I started a new blog on my experiences with Julia programming. Have a look: https://ufechner7.github.io/

---

## [Processus stop for large array of images](https://discourse.julialang.org/t/processus-stop-for-large-array-of-images/85921)

<div class="topic-metadata">

**Author:** [@musard0](https://discourse.julialang.org/u/musard0)\
**Replies:** 2\
**Last updated:** [August 18, 2022, 5:29pm UTC](https://discourse.julialang.org/t/processus-stop-for-large-array-of-images/85921 "2022-08-18T17:29:14Z")

</div>

Hello, here is my code : using Images function listOfImg(img::Array{Gray{Normed{UInt8,8}},2}) lengthImgSplit = 1000 nbImgToSave = 3000 imgSplit = similar(img, size(img, 1), lengthImgSplit) listOfImg = Array{typeof(i…

---

## [libnetcdf not defined on M1](https://discourse.julialang.org/t/libnetcdf-not-defined-on-m1/75366)

<div class="topic-metadata">

**Author:** [@razoumov515](https://discourse.julialang.org/u/razoumov515)\
**Replies:** 18\
**Last updated:** [August 18, 2022, 2:40pm UTC](https://discourse.julialang.org/t/libnetcdf-not-defined-on-m1/75366 "2022-08-18T14:40:06Z")

</div>

On a M1 Macbook I get errors trying to use NetCDF from Julia. Any idea which libnetcdf it is looking for? Isn’t NetCDF in Julia self-sufficient? https://github.com/JuliaGeo/NetCDF.jl does not mention any external system …

---

## [AMDGPU.jl has made such amazing progress over the last year!](https://discourse.julialang.org/t/amdgpu-jl-has-made-such-amazing-progress-over-the-last-year/75333)

<div class="topic-metadata">

**Author:** [@Krastanov](https://discourse.julialang.org/u/Krastanov)\
**Replies:** 16\
**Last updated:** [August 18, 2022, 2:43pm UTC](https://discourse.julialang.org/t/amdgpu-jl-has-made-such-amazing-progress-over-the-last-year/75333 "2022-08-18T14:43:07Z")

</div>

I tried AMDGPU.jl last year for my 580 Radeon GPU and it was a chore to set everything up, even for a competent sysadmin. I tried it today, and I am amazed how great it is! I have a moderately recent Linux kernel (update…

---

## [How to install the extension without Microsoft's Marketplace?](https://discourse.julialang.org/t/how-to-install-the-extension-without-microsofts-marketplace/85927)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 5\
**Last updated:** [August 18, 2022, 2:37pm UTC](https://discourse.julialang.org/t/how-to-install-the-extension-without-microsofts-marketplace/85927 "2022-08-18T14:37:53Z")

</div>

Sadly, all the instructions assume willingness to use the Microsoft-built VS Code release and the Marketplace. How to use Julia in my Code editor without the Marketplace?

---

## [Is the linux armv7l binary deprecated?](https://discourse.julialang.org/t/is-the-linux-armv7l-binary-deprecated/85924)

<div class="topic-metadata">

**Author:** [@aptalca](https://discourse.julialang.org/u/aptalca)\
**Replies:** 2\
**Last updated:** [August 18, 2022, 2:07pm UTC](https://discourse.julialang.org/t/is-the-linux-armv7l-binary-deprecated/85924 "2022-08-18T14:07:43Z")

</div>

Hi, I maintain a julia mod for linuxserver.io’s code-server and openvscode-server docker images. I am pulling the x86\_64, armv7l and aarch64 binaries from the website’s downloads section: Download Julia I noticed that …

---

## [Conversion in typed globals (Julia 1.8)](https://discourse.julialang.org/t/conversion-in-typed-globals-julia-1-8/85926)

<div class="topic-metadata">

**Author:** [@aerdely](https://discourse.julialang.org/u/aerdely)\
**Replies:** 4\
**Last updated:** [August 18, 2022, 2:01pm UTC](https://discourse.julialang.org/t/conversion-in-typed-globals-julia-1-8/85926 "2022-08-18T14:01:28Z")

</div>

I just want to understand this new feature in Julia 1.8 f(x::Int64) = x^2 + 1 f(3.0 + 0.0im) # ERROR: no method matching f(::ComplexF64), as expected # But: x::Int64 = 3.0 + 0.0im # no problem, conversion applied! If I…

---

## [Is it Possible to Draw object in 4-Dimension with Julia?](https://discourse.julialang.org/t/is-it-possible-to-draw-object-in-4-dimension-with-julia/85911)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 2\
**Last updated:** [August 18, 2022, 1:16pm UTC](https://discourse.julialang.org/t/is-it-possible-to-draw-object-in-4-dimension-with-julia/85911 "2022-08-18T13:16:49Z")

</div>

What backend or plotting package in Julia is able to create a 4-dimensional space and objects? I saw this yesterday, there is w after x,y,z axis. I think if we have maximum of 3 dimension, we can just add another axis w…

---

## [Create Parameters object from a dictionary](https://discourse.julialang.org/t/create-parameters-object-from-a-dictionary/85912)

<div class="topic-metadata">

**Author:** [@this\_josh](https://discourse.julialang.org/u/this_josh)\
**Replies:** 5\
**Last updated:** [August 18, 2022, 12:55pm UTC](https://discourse.julialang.org/t/create-parameters-object-from-a-dictionary/85912 "2022-08-18T12:55:22Z")

</div>

I have two dictionaries: d1 = Dict(:name =\> "Fido") d2 = Dict(:name =\> "Spot", :breed =\> :poodle) Which I’d like to use to create two using Parameters @with\_kw mutable struct Dog name::String breed::Symbol = :…

---

## [Memory Pre-allocation in the global scope](https://discourse.julialang.org/t/memory-pre-allocation-in-the-global-scope/85861)

<div class="topic-metadata">

**Author:** [@NaMod](https://discourse.julialang.org/u/NaMod)\
**Replies:** 20\
**Last updated:** [August 18, 2022, 12:08pm UTC](https://discourse.julialang.org/t/memory-pre-allocation-in-the-global-scope/85861 "2022-08-18T12:08:57Z")

</div>

I have written a code with no memory allocation. To do so, I have defined all required pieces of the memory (in the global scope) beforehand and passed them into mutating functions wherever needed. I was wondering wheth…

---

## [Julia v1.8.0 has been released](https://discourse.julialang.org/t/julia-v1-8-0-has-been-released/85919)

<div class="topic-metadata">

**Author:** [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Replies:** 0\
**Last updated:** [August 18, 2022, 11:32am UTC](https://discourse.julialang.org/t/julia-v1-8-0-has-been-released/85919 "2022-08-18T11:32:16Z")

</div>

The Julia developers are pleased to announce the release of Julia v1.8.0, the eighth minor release in the 1.x series. Some folks put together a blog post highlighting some of the most exciting new features in 1.8 and we…

---

## [Automatically generated API and Frontend for a JuMP model](https://discourse.julialang.org/t/automatically-generated-api-and-frontend-for-a-jump-model/85333)

<div class="topic-metadata">

**Author:** [@merrickj](https://discourse.julialang.org/u/merrickj)\
**Replies:** 4\
**Last updated:** [August 18, 2022, 10:28am UTC](https://discourse.julialang.org/t/automatically-generated-api-and-frontend-for-a-jump-model/85333 "2022-08-18T10:28:37Z")

</div>

Dear JuMP community, We would like to share with you MOS, software that automatically generates an API and Frontend for an annotated optimization model: MOS Software Documentation — MOS documentation There are instruct…

---

## [Reinterpret Int64 as 2xInt32 struct](https://discourse.julialang.org/t/reinterpret-int64-as-2xint32-struct/85910)

<div class="topic-metadata">

**Author:** [@CodeGodz](https://discourse.julialang.org/u/CodeGodz)\
**Replies:** 9\
**Last updated:** [August 18, 2022, 10:08am UTC](https://discourse.julialang.org/t/reinterpret-int64-as-2xint32-struct/85910 "2022-08-18T10:08:13Z")

</div>

Hey all :slight\_smile: It seems easier to work with native types when writing to a file (that is later MMapped) compared to writing structs. Since my struct has two Int32 I thought of merging them to an Int64 (by bitshi…

---

## [Seemingly nondeterministic behavior despite setting Random.seed!()?](https://discourse.julialang.org/t/seemingly-nondeterministic-behavior-despite-setting-random-seed/85880)

<div class="topic-metadata">

**Author:** [@johnabs](https://discourse.julialang.org/u/johnabs)\
**Replies:** 7\
**Last updated:** [August 18, 2022, 5:33am UTC](https://discourse.julialang.org/t/seemingly-nondeterministic-behavior-despite-setting-random-seed/85880 "2022-08-18T05:33:11Z")

</div>

Hi all, I’m working on an optimization problem on graphs using some code I ported from R to Julia. What’s strange, is that when I run the code which uses stochastic processes to sample a solution space in a search for …

---

## [What is the optimised way to find connected components in a graph with edge weights greater than zero?](https://discourse.julialang.org/t/what-is-the-optimised-way-to-find-connected-components-in-a-graph-with-edge-weights-greater-than-zero/85902)

<div class="topic-metadata">

**Author:** [@Manu\_Francis](https://discourse.julialang.org/u/Manu_Francis)\
**Replies:** 4\
**Last updated:** [August 18, 2022, 5:37am UTC](https://discourse.julialang.org/t/what-is-the-optimised-way-to-find-connected-components-in-a-graph-with-edge-weights-greater-than-zero/85902 "2022-08-18T05:37:16Z")

</div>

Hi I am trying to find the connected components of a simple weighted graph with edge weights having a value greater than zero as below. using Graphs using SimpleWeightedGraphs len = 105\_000 g = SimpleWeighted…

---

## [Intercepting error messages - HOW?](https://discourse.julialang.org/t/intercepting-error-messages-how/77189)

<div class="topic-metadata">

**Author:** [@FedeClaudi](https://discourse.julialang.org/u/FedeClaudi)\
**Replies:** 11\
**Last updated:** [August 18, 2022, 5:03am UTC](https://discourse.julialang.org/t/intercepting-error-messages-how/77189 "2022-08-18T05:03:29Z")

</div>

In my Term.jl project I aim to provide functionality to print nicely formatted, pretty, error messages. A preview: This is inspired by Rich in python that prints error stacks like: In python you can define an exce…

---

## [Parallelization of several independent loops](https://discourse.julialang.org/t/parallelization-of-several-independent-loops/85803)

<div class="topic-metadata">

**Author:** [@iangilan](https://discourse.julialang.org/u/iangilan)\
**Replies:** 10\
**Last updated:** [August 18, 2022, 3:16am UTC](https://discourse.julialang.org/t/parallelization-of-several-independent-loops/85803 "2022-08-18T03:16:43Z")

</div>

Hello all, How could I parallelize the following independent loops? for i=1:N x1=A1\\b1 end for i=N+1:2\*N x2=A2\\b2 end for i=2\*N+1:3\*N x3=A3\\b3 end for i=3\*N+1:4\*N x4=A4\\b4 end

---

## [Generate Variables JuMP](https://discourse.julialang.org/t/generate-variables-jump/85900)

<div class="topic-metadata">

**Author:** [@Yuri\_Mizusawa](https://discourse.julialang.org/u/Yuri_Mizusawa)\
**Replies:** 3\
**Last updated:** [August 18, 2022, 1:58am UTC](https://discourse.julialang.org/t/generate-variables-jump/85900 "2022-08-18T01:58:07Z")

</div>

Hi, I’m not sure if I had to make a new post or continue the old one, but as I have a new question I created a new topic. I am solving an optimization problem with jump using the following table: Row │ time room\_1 …

---

## [JuMP @Variable](https://discourse.julialang.org/t/jump-variable/85853)

<div class="topic-metadata">

**Author:** [@Yuri\_Mizusawa](https://discourse.julialang.org/u/Yuri_Mizusawa)\
**Replies:** 2\
**Last updated:** [August 17, 2022, 11:05pm UTC](https://discourse.julialang.org/t/jump-variable/85853 "2022-08-17T23:05:15Z")

</div>

Hi, I am solving an optimization problem with jump using the following table: Row │ time room\_1 room\_2 room\_3 w\_day │ Float64 Float64 Float64 Float64 String ─────┼────────────────────────────────…

---

## [Julia M2 support](https://discourse.julialang.org/t/julia-m2-support/85895)

<div class="topic-metadata">

**Author:** [@jj-404](https://discourse.julialang.org/u/jj-404)\
**Replies:** 4\
**Last updated:** [August 17, 2022, 9:57pm UTC](https://discourse.julialang.org/t/julia-m2-support/85895 "2022-08-17T21:57:40Z")

</div>

Hi, Just wanted to know what’s the current status of support for the M2 processor?

---

## [How is Optim.jl's IPNewton so good compared to (exponentiated) gradient descent?](https://discourse.julialang.org/t/how-is-optim-jls-ipnewton-so-good-compared-to-exponentiated-gradient-descent/85685)

<div class="topic-metadata">

**Author:** [@ForceBru](https://discourse.julialang.org/u/ForceBru)\
**Replies:** 4\
**Last updated:** [August 17, 2022, 9:27pm UTC](https://discourse.julialang.org/t/how-is-optim-jls-ipnewton-so-good-compared-to-exponentiated-gradient-descent/85685 "2022-08-17T21:27:45Z")

</div>

This question is about implementing an optimization algorithm in Julia and comparing it with IPNewton from Optim.jl. It’s kind of broad, so not sure if it fits here. Let me know if it doesn’t. I wrote some code to minim…

---

## [Plots.jl with PGFPlotsX adds series in the wrong order](https://discourse.julialang.org/t/plots-jl-with-pgfplotsx-adds-series-in-the-wrong-order/85896)

<div class="topic-metadata">

**Author:** [@Joseph\_Bradley](https://discourse.julialang.org/u/Joseph_Bradley)\
**Replies:** 2\
**Last updated:** [August 17, 2022, 9:23pm UTC](https://discourse.julialang.org/t/plots-jl-with-pgfplotsx-adds-series-in-the-wrong-order/85896 "2022-08-17T21:23:17Z")

</div>

In Plots.jl, the PGFPlotsX backend won’t let me add another series with proper control over the z-order. Here is the MWE: using Plots pgfplotsx() input = range(0, 4π, 100) output = cos.(input) plt = scatter(input, out…

---

## [Weekly Dagger Users Meeting](https://discourse.julialang.org/t/weekly-dagger-users-meeting/85888)

<div class="topic-metadata">

**Author:** [@jpsamaroo](https://discourse.julialang.org/u/jpsamaroo)\
**Replies:** 0\
**Last updated:** [August 17, 2022, 7:46pm UTC](https://discourse.julialang.org/t/weekly-dagger-users-meeting/85888 "2022-08-17T19:46:49Z")

</div>

Hi all! As the maintainer of Dagger.jl, I’m interested in hearing about your experiences with Dagger.jl, whether things are working out well or not, and what you want to see for the future of Dagger. To this end, I’m sta…

---

## [Geometric Median](https://discourse.julialang.org/t/geometric-median/85886)

<div class="topic-metadata">

**Author:** [@Lilith](https://discourse.julialang.org/u/Lilith)\
**Replies:** 1\
**Last updated:** [August 17, 2022, 7:40pm UTC](https://discourse.julialang.org/t/geometric-median/85886 "2022-08-17T19:40:37Z")

</div>

Is there a package to compute the geometric median of a multivariate dataset?

---

## [Using C struct in Julia without creating same struct in Julia again](https://discourse.julialang.org/t/using-c-struct-in-julia-without-creating-same-struct-in-julia-again/66639)

<div class="topic-metadata">

**Author:** [@m\_yasinhan](https://discourse.julialang.org/u/m_yasinhan)\
**Replies:** 11\
**Last updated:** [August 17, 2022, 7:00pm UTC](https://discourse.julialang.org/t/using-c-struct-in-julia-without-creating-same-struct-in-julia-again/66639 "2022-08-17T19:00:39Z")

</div>

Hi, we have ccall to call any c function. But, if the function we want to call has a parameter which is non-primitive type such as a struct, do we always have to create same struct in Julia? For example, I have this c co…

---

## [Overloading a function specifically for symbolics](https://discourse.julialang.org/t/overloading-a-function-specifically-for-symbolics/85726)

<div class="topic-metadata">

**Author:** [@user664303](https://discourse.julialang.org/u/user664303)\
**Replies:** 5\
**Last updated:** [August 15, 2022, 9:07am UTC](https://discourse.julialang.org/t/overloading-a-function-specifically-for-symbolics/85726 "2022-08-15T09:07:05Z")

</div>

The type of a symbolic is Num: julia\> using Symbolics julia\> @variables x julia\> typeof(x) Num How can I write a function specifically for symbolics? Let’s say there is already a genericfun(x::Num, y::Num) defined in B…

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

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