# Latest

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

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

**Page:** 766

---

## [Pluto or notebooks in VSCode using Quarto for interactive lecture notes?](https://discourse.julialang.org/t/pluto-or-notebooks-in-vscode-using-quarto-for-interactive-lecture-notes/90203)

<div class="topic-metadata">

**Author:** [@Hugo](https://discourse.julialang.org/u/Hugo)\
**Replies:** 9\
**Last updated:** [March 3, 2023, 1:39am UTC](https://discourse.julialang.org/t/pluto-or-notebooks-in-vscode-using-quarto-for-interactive-lecture-notes/90203 "2023-03-03T01:39:27Z")

</div>

TL;DR: Pluto or notebooks in VSCode using Quarto? Hello, all Next year, I’ll be in a position where I’ll be able to use Julia in a classroom. I’m trying to come with a set of interactive class notes that students can u…

---

## [div(::UnitRange{Int64}... error](https://discourse.julialang.org/t/div-unitrange-int64-error/95475)

<div class="topic-metadata">

**Author:** [@erlebach](https://discourse.julialang.org/u/erlebach)\
**Replies:** 4\
**Last updated:** [March 3, 2023, 1:31am UTC](https://discourse.julialang.org/t/div-unitrange-int64-error/95475 "2023-03-03T01:31:48Z")

</div>

@ChrisRackauckas I get the error: ERROR: LoadError: MethodError: no method matching div(::UnitRange{Int64}, ::Int64, ::RoundingMode{:ToZero}) that I cannot figure out. This occurred while I was producing a MWE related…

---

## [Profiler: how to understand time spent in functions](https://discourse.julialang.org/t/profiler-how-to-understand-time-spent-in-functions/95467)

<div class="topic-metadata">

**Author:** [@Chong\_Wang](https://discourse.julialang.org/u/Chong_Wang)\
**Replies:** 6\
**Last updated:** [March 3, 2023, 12:22am UTC](https://discourse.julialang.org/t/profiler-how-to-understand-time-spent-in-functions/95467 "2023-03-03T00:22:46Z")

</div>

I am optimizing a bubble sort function which also returns -1^(number of permutations). using BenchmarkTools, Profile, StatProfilerHTML function sort\_signature!(state::Vector{T}) where T \<: Integer signature = 1 …

---

## [Function forwarding for clashing function names](https://discourse.julialang.org/t/function-forwarding-for-clashing-function-names/95318)

<div class="topic-metadata">

**Author:** [@PaterPen](https://discourse.julialang.org/u/PaterPen)\
**Replies:** 3\
**Last updated:** [March 2, 2023, 9:39pm UTC](https://discourse.julialang.org/t/function-forwarding-for-clashing-function-names/95318 "2023-03-02T21:39:52Z")

</div>

I have general question regarding composition and function forwarding. Let’s assume we have a struct car which is composed of a motor and a horn: struct car m::Motor h::Horn end Both of it’s components implemen…

---

## [Memory overwrite](https://discourse.julialang.org/t/memory-overwrite/95446)

<div class="topic-metadata">

**Author:** [@erlebach](https://discourse.julialang.org/u/erlebach)\
**Replies:** 5\
**Last updated:** [March 2, 2023, 8:24pm UTC](https://discourse.julialang.org/t/memory-overwrite/95446 "2023-03-02T20:24:32Z")

</div>

I am working towards creating an MWE of a UODE problem based on systems of equations. In the course of whittling down my problem, I came across the following: println("++\> trajectories: ", trajectories) # Train …

---

## [Solve and plot Lorenz equations for two different initial conditions and two values of rho in julia](https://discourse.julialang.org/t/solve-and-plot-lorenz-equations-for-two-different-initial-conditions-and-two-values-of-rho-in-julia/95366)

<div class="topic-metadata">

**Author:** [@Hana](https://discourse.julialang.org/u/Hana)\
**Replies:** 7\
**Last updated:** [March 2, 2023, 6:33pm UTC](https://discourse.julialang.org/t/solve-and-plot-lorenz-equations-for-two-different-initial-conditions-and-two-values-of-rho-in-julia/95366 "2023-03-02T18:33:47Z")

</div>

My goal is to solve lorenz equations and plot them as it shows in the figure. I have two different initial conditions \[x0, 1, 0\] and x0= 0 then x0 =1\* 10^-5 the two values of rho are ρ= 14 and ρ=28. I wrote this code in …

---

## [How to parallelize animations](https://discourse.julialang.org/t/how-to-parallelize-animations/95461)

<div class="topic-metadata">

**Author:** [@iamsuddhasattwa](https://discourse.julialang.org/u/iamsuddhasattwa)\
**Replies:** 0\
**Last updated:** [March 2, 2023, 6:23pm UTC](https://discourse.julialang.org/t/how-to-parallelize-animations/95461 "2023-03-02T18:23:40Z")

</div>

I have been using the @animate macro in the Plots.jl package. I have noticed that the animation is always built using one thread. So for example, in the following toy example : N=1000; anim = @animate for t in 1:N …

---

## [Accessing docstring of a field](https://discourse.julialang.org/t/accessing-docstring-of-a-field/4830)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 7\
**Last updated:** [March 2, 2023, 5:35pm UTC](https://discourse.julialang.org/t/accessing-docstring-of-a-field/4830 "2023-03-02T17:35:36Z")

</div>

Fields of a struct can be documented, but how does one retrieve the docstrings? Is it possible via ? in the REPL? MWE: struct Foo "I want this docstring" x end

---

## [How to plot a graph of an adjacency matrix](https://discourse.julialang.org/t/how-to-plot-a-graph-of-an-adjacency-matrix/95450)

<div class="topic-metadata">

**Author:** [@sbacelar](https://discourse.julialang.org/u/sbacelar)\
**Replies:** 1\
**Last updated:** [March 2, 2023, 4:26pm UTC](https://discourse.julialang.org/t/how-to-plot-a-graph-of-an-adjacency-matrix/95450 "2023-03-02T16:26:36Z")

</div>

I am trying, without success, to plot a graph based on an adjacency matrix and using the Graphs.jl and GraphPlot.jl packages. What am I doing wrong? graph = \[ \[0, 2, 4, 0, 0, 0\], \[0, 0, 1, 7, 0, 0\],…

---

## [How to create a series of interactive plots using GLMakie?](https://discourse.julialang.org/t/how-to-create-a-series-of-interactive-plots-using-glmakie/95412)

<div class="topic-metadata">

**Author:** [@albrightand](https://discourse.julialang.org/u/albrightand)\
**Replies:** 1\
**Last updated:** [March 2, 2023, 4:49pm UTC](https://discourse.julialang.org/t/how-to-create-a-series-of-interactive-plots-using-glmakie/95412 "2023-03-02T16:49:10Z")

</div>

I need to make an interactive plot that takes mouse clicks on an image plot as input. There will be a series of plots with an image on top and a ‘Done’ button at the bottom. The program should plot each image in its own …

---

## [Passing variables to raw strings?](https://discourse.julialang.org/t/passing-variables-to-raw-strings/46951)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 10\
**Last updated:** [September 20, 2020, 2:07pm UTC](https://discourse.julialang.org/t/passing-variables-to-raw-strings/46951 "2020-09-20T14:07:15Z")

</div>

Hello! What I really like about Julia is that it is possible to write something as this: a = 2 t = "The number of apples is $a" println(t) The number of apples is 2 Sometimes though I need to work with raw strin…

---

## [Any way to populate a grid from input vectors?](https://discourse.julialang.org/t/any-way-to-populate-a-grid-from-input-vectors/95410)

<div class="topic-metadata">

**Author:** [@albrightand](https://discourse.julialang.org/u/albrightand)\
**Replies:** 3\
**Last updated:** [March 2, 2023, 3:42pm UTC](https://discourse.julialang.org/t/any-way-to-populate-a-grid-from-input-vectors/95410 "2023-03-02T15:42:31Z")

</div>

Is there any existing package to take two input vectors and create a grid (similar to meshgrid) and then output a raster based on a third dimension? Something that recreates roundgridfun.m in Matlab.

---

## [Looking for ways to debug mathematical algorithms](https://discourse.julialang.org/t/looking-for-ways-to-debug-mathematical-algorithms/95435)

<div class="topic-metadata">

**Author:** [@stepanzh](https://discourse.julialang.org/u/stepanzh)\
**Replies:** 5\
**Last updated:** [March 2, 2023, 2:55pm UTC](https://discourse.julialang.org/t/looking-for-ways-to-debug-mathematical-algorithms/95435 "2023-03-02T14:55:28Z")

</div>

My research involves developing of thermodynamical solvers. They need equation solvers, minimization, automatic differentiation, etc. When I develop a new solver for a physical problem or face a bug in an existing one, I…

---

## [PackageCompiler does not compile included Julia-files!](https://discourse.julialang.org/t/packagecompiler-does-not-compile-included-julia-files/95443)

<div class="topic-metadata">

**Author:** [@Miroslav-Stimac](https://discourse.julialang.org/u/Miroslav-Stimac)\
**Replies:** 0\
**Last updated:** [March 2, 2023, 12:58pm UTC](https://discourse.julialang.org/t/packagecompiler-does-not-compile-included-julia-files/95443 "2023-03-02T12:58:30Z")

</div>

Hello, I developed a program with Julia that consists of a main file called MyProgram.jl and an additional file called MyAdditionalCode.jl. In MyProgram.jl I have this content: … # Some libraries imported via import or…

---

## [How to switch between dev and normal version of the same package](https://discourse.julialang.org/t/how-to-switch-between-dev-and-normal-version-of-the-same-package/95396)

<div class="topic-metadata">

**Author:** [@JianghuiDu](https://discourse.julialang.org/u/JianghuiDu)\
**Replies:** 11\
**Last updated:** [March 2, 2023, 12:28pm UTC](https://discourse.julialang.org/t/how-to-switch-between-dev-and-normal-version-of-the-same-package/95396 "2023-03-02T12:28:03Z")

</div>

I’m developing a package which is stored in my Github rep but not registered with Julia. I have the dev version in the .julia/dev directory, and I also install the normal version from Github in the .julia/packages direct…

---

## [Mixture of Float32 and Float64](https://discourse.julialang.org/t/mixture-of-float32-and-float64/95439)

<div class="topic-metadata">

**Author:** [@erlebach](https://discourse.julialang.org/u/erlebach)\
**Replies:** 1\
**Last updated:** [March 2, 2023, 12:26pm UTC](https://discourse.julialang.org/t/mixture-of-float32-and-float64/95439 "2023-03-02T12:26:19Z")

</div>

If a computational graph is a mixture of Float32 and Float64, will Zygote have issues? Or must one be careful about types? Are there any stated rules, best practices, etc? Clearly adding a Float32 and a Float64 should n…

---

## [Julia seems to be running multithreaded when I don't want it to](https://discourse.julialang.org/t/julia-seems-to-be-running-multithreaded-when-i-dont-want-it-to/95391)

<div class="topic-metadata">

**Author:** [@nvenkov1](https://discourse.julialang.org/u/nvenkov1)\
**Replies:** 67\
**Last updated:** [March 2, 2023, 12:20pm UTC](https://discourse.julialang.org/t/julia-seems-to-be-running-multithreaded-when-i-dont-want-it-to/95391 "2023-03-02T12:20:08Z")

</div>

I coded an algorithm called CGS2, i.e., re-orthogonalized classical Gram-Schmidt, which I need to benchmark. I absolutely need my test to run on a single thread. To make sure it is the case, I write the following at the …

---

## [What is the package that keeps the threads open in the pool for future call?](https://discourse.julialang.org/t/what-is-the-package-that-keeps-the-threads-open-in-the-pool-for-future-call/95406)

<div class="topic-metadata">

**Author:** [@Amro](https://discourse.julialang.org/u/Amro)\
**Replies:** 4\
**Last updated:** [March 2, 2023, 12:09pm UTC](https://discourse.julialang.org/t/what-is-the-package-that-keeps-the-threads-open-in-the-pool-for-future-call/95406 "2023-03-02T12:09:15Z")

</div>

I know that $OMP in OpenMP open the specified threads and assign tasks for them as demanded. However, after finishing the threads stay open in the pool. So, any future call to the threads will call them from the pool (as…

---

## [Bug in RootsAndPoles.jl Package?](https://discourse.julialang.org/t/bug-in-rootsandpoles-jl-package/95437)

<div class="topic-metadata">

**Author:** [@bjs](https://discourse.julialang.org/u/bjs)\
**Replies:** 0\
**Last updated:** [March 2, 2023, 12:04pm UTC](https://discourse.julialang.org/t/bug-in-rootsandpoles-jl-package/95437 "2023-03-02T12:04:03Z")

</div>

Recently, I tried the package RootsAndPoles.jl (v2.0.0) with standard parameters as described on github’s readme and tested it with the simple complex f(z)=Log(z) function with the attached result. The root at z=1 is cl…

---

## [Julia 1.8.5 not working on Rock Pi 4](https://discourse.julialang.org/t/julia-1-8-5-not-working-on-rock-pi-4/95425)

<div class="topic-metadata">

**Author:** [@minetest2048](https://discourse.julialang.org/u/minetest2048)\
**Replies:** 5\
**Last updated:** [March 2, 2023, 10:35am UTC](https://discourse.julialang.org/t/julia-1-8-5-not-working-on-rock-pi-4/95425 "2023-03-02T10:35:22Z")

</div>

I’ve downloaded Julia 1.8.5 aarch64 to my Rock Pi 4 running Ubuntu 18.04.1 LTS (GNU/Linux 4.4.154-95-rockchip-gd2ab1f26e1b3 aarch64) When I tried to run the REPL it just get stuck trying to write the exception rock@har…

---

## [Strange behavior of union of types](https://discourse.julialang.org/t/strange-behavior-of-union-of-types/95298)

<div class="topic-metadata">

**Author:** [@jinfreedom](https://discourse.julialang.org/u/jinfreedom)\
**Replies:** 23\
**Last updated:** [March 2, 2023, 9:25am UTC](https://discourse.julialang.org/t/strange-behavior-of-union-of-types/95298 "2023-03-02T09:25:18Z")

</div>

Hi, I defined some type UNTuple as union of NTuple and NamedTuple{Name,NTuple{N,...}} and got the following unexpected behavior. What I hope for the UNTuple is an N-tuple of numbers of same type. The behavior seems stran…

---

## [Why are unions of concrete types not concrete?](https://discourse.julialang.org/t/why-are-unions-of-concrete-types-not-concrete/95423)

<div class="topic-metadata">

**Author:** [@amansawhney](https://discourse.julialang.org/u/amansawhney)\
**Replies:** 6\
**Last updated:** [March 2, 2023, 8:21am UTC](https://discourse.julialang.org/t/why-are-unions-of-concrete-types-not-concrete/95423 "2023-03-02T08:21:20Z")

</div>

I am looking to use Julia for a high performance application where I need to iterate through many items. The items can be of various types, but those types are all concrete. I can make a union of those types. It appears …

---

## [\[Turing.jl\] How to generate samples ("observations") from a model](https://discourse.julialang.org/t/turing-jl-how-to-generate-samples-observations-from-a-model/95258)

<div class="topic-metadata">

**Author:** [@dmetivie](https://discourse.julialang.org/u/dmetivie)\
**Replies:** 6\
**Last updated:** [March 2, 2023, 8:05am UTC](https://discourse.julialang.org/t/turing-jl-how-to-generate-samples-observations-from-a-model/95258 "2023-03-02T08:05:20Z")

</div>

Hello, Let say I define a Turing model and would like to use it to generate not only from prior but also some associated y observations. Here is an example: @model function mymodel(y::AbstractVector{F}) where {F\<:Real}…

---

## [Rodas4 (crashes) versus Tsit5 (works)](https://discourse.julialang.org/t/rodas4-crashes-versus-tsit5-works/95415)

<div class="topic-metadata">

**Author:** [@erlebach](https://discourse.julialang.org/u/erlebach)\
**Replies:** 10\
**Last updated:** [March 2, 2023, 7:56am UTC](https://discourse.julialang.org/t/rodas4-crashes-versus-tsit5-works/95415 "2023-03-02T07:56:23Z")

</div>

@ChrisRackauckas, Here is a minimum working example of solving a 3x3 system using the StaticArrays.jl module. The solver runs fine with Tsit5 but crashes with Rodas. Not clear how that is possible since Rodas4 is a stif…

---

## [Like a list comprehension but with several lines](https://discourse.julialang.org/t/like-a-list-comprehension-but-with-several-lines/95365)

<div class="topic-metadata">

**Author:** [@Gus\_Hart](https://discourse.julialang.org/u/Gus_Hart)\
**Replies:** 8\
**Last updated:** [March 2, 2023, 3:35am UTC](https://discourse.julialang.org/t/like-a-list-comprehension-but-with-several-lines/95365 "2023-03-02T03:35:21Z")

</div>

It frequently happens that I have a loop with ~10 lines. I’d like to return some value at the end of each iteration, collect that in an array, and then plot it. I can pre-allocate some array, or append to an array as th…

---

## [Startup.jl file - Windows 10 JuliaPro](https://discourse.julialang.org/t/startup-jl-file-windows-10-juliapro/19612)

<div class="topic-metadata">

**Author:** [@RobLW](https://discourse.julialang.org/u/RobLW)\
**Replies:** 6\
**Last updated:** [March 2, 2023, 2:44am UTC](https://discourse.julialang.org/t/startup-jl-file-windows-10-juliapro/19612 "2023-03-02T02:44:57Z")

</div>

Hello, Apologies, I appreciate this is a really basic question. Not a great start as I’m new to Julia. I’m struggling to find where my startup.jl file should be. I’ve installed Julia pro for a complete IDE and am on Wi…

---

## [Multi language help/documentation](https://discourse.julialang.org/t/multi-language-help-documentation/95395)

<div class="topic-metadata">

**Author:** [@dgagnon](https://discourse.julialang.org/u/dgagnon)\
**Replies:** 2\
**Last updated:** [March 2, 2023, 1:43am UTC](https://discourse.julialang.org/t/multi-language-help-documentation/95395 "2023-03-02T01:43:13Z")

</div>

Hello We are working on a not yet published package and producing the documentation as we go. All this is done in English given that is the most understood language in the IT world. However, there is a requirement for a…

---

## [Example for solving a QP (or LP) in Gurobi directly (without JuMP)](https://discourse.julialang.org/t/example-for-solving-a-qp-or-lp-in-gurobi-directly-without-jump/94108)

<div class="topic-metadata">

**Author:** [@jacob-roth](https://discourse.julialang.org/u/jacob-roth)\
**Replies:** 12\
**Last updated:** [March 2, 2023, 1:21am UTC](https://discourse.julialang.org/t/example-for-solving-a-qp-or-lp-in-gurobi-directly-without-jump/94108 "2023-03-02T01:21:55Z")

</div>

Similar to this question, I am wondering if anyone has example Julia code that they would be willing to share for how to pass vectors and matrices directly into Gurobi.jl to construct/solve a model. The Gurobi C interfac…

---

## [How to modify plot on click?](https://discourse.julialang.org/t/how-to-modify-plot-on-click/95419)

<div class="topic-metadata">

**Author:** [@Alseidon](https://discourse.julialang.org/u/Alseidon)\
**Replies:** 0\
**Last updated:** [March 2, 2023, 12:34am UTC](https://discourse.julialang.org/t/how-to-modify-plot-on-click/95419 "2023-03-02T00:34:16Z")

</div>

The other day, I saw a research presenting a graph where he added points where he clicked and did arbitrary logic on them upon adding them (to be precise, it was a Poincaré section, and adding a point computed and showed…

---

## [Where I can find the "C" source codes of the solver in my computer after adding the KLU package,?](https://discourse.julialang.org/t/where-i-can-find-the-c-source-codes-of-the-solver-in-my-computer-after-adding-the-klu-package/95409)

<div class="topic-metadata">

**Author:** [@Amro](https://discourse.julialang.org/u/Amro)\
**Replies:** 8\
**Last updated:** [March 1, 2023, 11:07pm UTC](https://discourse.julialang.org/t/where-i-can-find-the-c-source-codes-of-the-solver-in-my-computer-after-adding-the-klu-package/95409 "2023-03-01T23:07:47Z")

</div>

I have added KLU.jl package and it is installed in C:\\Users\\path\\.julia\\packages\\KLU. However, I could not find in the folder the original C source codes of the solver, for instance klu\_analyze.c as in KLU

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

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