# Latest

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

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

**Page:** 632

---

## [Remove zero from Matrix](https://discourse.julialang.org/t/remove-zero-from-matrix/102322)

<div class="topic-metadata">

**Author:** [@Sergey\_Novak](https://discourse.julialang.org/u/Sergey_Novak)\
**Replies:** 5\
**Last updated:** [July 31, 2023, 6:34pm UTC](https://discourse.julialang.org/t/remove-zero-from-matrix/102322 "2023-07-31T18:34:23Z")

</div>

Hello, I have a matrix of the following form 20×3 Matrix{Float64}: 0.0 0.0 0.0 0.0 0.0 0.0 9.94549e-6 1.0e-5 -6.21704e-6 0.0 0.0 0.0 0.0 0.0 …

---

## [Help me find flaws in this pattern: spawning task from constructor](https://discourse.julialang.org/t/help-me-find-flaws-in-this-pattern-spawning-task-from-constructor/102219)

<div class="topic-metadata">

**Author:** [@algunion](https://discourse.julialang.org/u/algunion)\
**Replies:** 3\
**Last updated:** [July 31, 2023, 5:06pm UTC](https://discourse.julialang.org/t/help-me-find-flaws-in-this-pattern-spawning-task-from-constructor/102219 "2023-07-31T17:06:04Z")

</div>

I hope the MWE is self-explanatory, but I’ll say a few words after the code block anyways: struct Agent id::Int in::Channel out::Channel Agent(id, in, out) = new(id, in, out) function Agent(id, in, o…

---

## [Open-ended range?](https://discourse.julialang.org/t/open-ended-range/102287)

<div class="topic-metadata">

**Author:** [@ryofurue](https://discourse.julialang.org/u/ryofurue)\
**Replies:** 13\
**Last updated:** [July 31, 2023, 4:52pm UTC](https://discourse.julialang.org/t/open-ended-range/102287 "2023-07-31T16:52:31Z")

</div>

I often need a range that doesn’t include the last point: function func(x1, x2, del) for x in x1:del:x2 # but I want the loop only for x != x2 Depending on the values of x1, x2, and del, the loop sometimes includes x =…

---

## [Optim does not optimize in several minutes and it takes 10 seconds for scipy](https://discourse.julialang.org/t/optim-does-not-optimize-in-several-minutes-and-it-takes-10-seconds-for-scipy/101756)

<div class="topic-metadata">

**Author:** [@kunzaatko](https://discourse.julialang.org/u/kunzaatko)\
**Replies:** 1\
**Last updated:** [July 31, 2023, 4:46pm UTC](https://discourse.julialang.org/t/optim-does-not-optimize-in-several-minutes-and-it-takes-10-seconds-for-scipy/101756 "2023-07-31T16:46:35Z")

</div>

I am optimizing cross correlation of two arrays taken over there transfer function intersection. My function looks like this: otf\_lr\_1 = otf(tf, fft\_lr\_1, Δxy) # does not change with Δϕ fxs = fftfreq(size(fft\_lr\_2, 1), …

---

## [Create a Vector with values of variables defined by list of Symbols](https://discourse.julialang.org/t/create-a-vector-with-values-of-variables-defined-by-list-of-symbols/102307)

<div class="topic-metadata">

**Author:** [@Neodym](https://discourse.julialang.org/u/Neodym)\
**Replies:** 6\
**Last updated:** [July 31, 2023, 4:42pm UTC](https://discourse.julialang.org/t/create-a-vector-with-values-of-variables-defined-by-list-of-symbols/102307 "2023-07-31T16:42:28Z")

</div>

Hey fellow Julians, I have a vector with symbols: sym\_list = \[:(p.a), :(p.b), :(p.c)\] Given this sym\_list, I’d like to automatically generate a function that plugs the values denoted by the symbols ( where p could be …

---

## [Replace diagonals in existing spdiagm array](https://discourse.julialang.org/t/replace-diagonals-in-existing-spdiagm-array/102202)

<div class="topic-metadata">

**Author:** [@dalarev](https://discourse.julialang.org/u/dalarev)\
**Replies:** 2\
**Last updated:** [July 31, 2023, 4:41pm UTC](https://discourse.julialang.org/t/replace-diagonals-in-existing-spdiagm-array/102202 "2023-07-31T16:41:50Z")

</div>

Hi, wondering if there is an equivalent to the MATLAB method spdiags(Bin, d, A), where the diagonals in A are replaced by those in d with the columns of Bin. As far as I can tell, spdiagsm does not support a method that…

---

## [How to get involved in BioJulia](https://discourse.julialang.org/t/how-to-get-involved-in-biojulia/102215)

<div class="topic-metadata">

**Author:** [@Emiller](https://discourse.julialang.org/u/Emiller)\
**Replies:** 7\
**Last updated:** [July 31, 2023, 2:54pm UTC](https://discourse.julialang.org/t/how-to-get-involved-in-biojulia/102215 "2023-07-31T14:54:07Z")

</div>

Hoping we could create a similar page for at least BioJulia. I’m happy to take on the leg work to make a PR to the site, but I don’t know what the process :grimacing: I’m hoping to mimic: Join nf-core

---

## [Boundary conditions for \`DifferentialEquations.BVProblem\`](https://discourse.julialang.org/t/boundary-conditions-for-differentialequations-bvproblem/101901)

<div class="topic-metadata">

**Author:** [@mikmoore](https://discourse.julialang.org/u/mikmoore)\
**Replies:** 1\
**Last updated:** [July 31, 2023, 2:42pm UTC](https://discourse.julialang.org/t/boundary-conditions-for-differentialequations-bvproblem/101901 "2023-07-31T14:42:14Z")

</div>

I’m trying to solve a boundary value problem but still have some gaps in my understanding after reading the tutorial. Specifically, I’m trying to understand how boundary constraints should be encoded. I believe I’ve “fig…

---

## [Writing and reading from, to Google sheet](https://discourse.julialang.org/t/writing-and-reading-from-to-google-sheet/102306)

<div class="topic-metadata">

**Author:** [@dgagnon](https://discourse.julialang.org/u/dgagnon)\
**Replies:** 2\
**Last updated:** [July 31, 2023, 2:33pm UTC](https://discourse.julialang.org/t/writing-and-reading-from-to-google-sheet/102306 "2023-07-31T14:33:52Z")

</div>

Hello Is there any package making it easy to read and write from/to a Google sheet? I can do this from R and I saw how to do it with Python. But I’d rather use Julia. Thanks for pointing me in the right direction.

---

## [NonlinearSolve Falsi algorithm: Unexpected ReturnCode](https://discourse.julialang.org/t/nonlinearsolve-falsi-algorithm-unexpected-returncode/102296)

<div class="topic-metadata">

**Author:** [@laikq](https://discourse.julialang.org/u/laikq)\
**Replies:** 2\
**Last updated:** [July 31, 2023, 1:35pm UTC](https://discourse.julialang.org/t/nonlinearsolve-falsi-algorithm-unexpected-returncode/102296 "2023-07-31T13:35:19Z")

</div>

I’m observing unexpected behavior in SimpleNonlinearSolve/NonlinearSolve’s algorithm Falsi (an algorithm for finding roots of nonlinear functions). I expect Falsi to return a successful return code if it converged, and a…

---

## [JuMPeR and Grisu](https://discourse.julialang.org/t/jumper-and-grisu/102258)

<div class="topic-metadata">

**Author:** [@edwinmeriaux](https://discourse.julialang.org/u/edwinmeriaux)\
**Replies:** 8\
**Last updated:** [July 31, 2023, 12:57pm UTC](https://discourse.julialang.org/t/jumper-and-grisu/102258 "2023-07-31T12:57:40Z")

</div>

Hello! I am very new to Julia and I just downloaded it today! I’m trying to use JuMPeR for robust optimization cases. But JuMPeR requires Grisu which i understand it no longer used. So I found the work around but it doe…

---

## [Makie and polar plots, how to plot quarter circle only (sector)](https://discourse.julialang.org/t/makie-and-polar-plots-how-to-plot-quarter-circle-only-sector/102262)

<div class="topic-metadata">

**Author:** [@Aran](https://discourse.julialang.org/u/Aran)\
**Replies:** 1\
**Last updated:** [July 31, 2023, 12:34pm UTC](https://discourse.julialang.org/t/makie-and-polar-plots-how-to-plot-quarter-circle-only-sector/102262 "2023-07-31T12:34:12Z")

</div>

Hi there I have a streamlines plot that I have produced using Makie. I have plotted the streamlines using the following commands fig\_polar = Figure(resolution = (1000, 900)) ax2 = PolarAxis( fig\_polar\[1, 1\], t…

---

## [StructTypes.Mutable() does not call the inner constructor](https://discourse.julialang.org/t/structtypes-mutable-does-not-call-the-inner-constructor/102118)

<div class="topic-metadata">

**Author:** [@BlondDon](https://discourse.julialang.org/u/BlondDon)\
**Replies:** 3\
**Last updated:** [July 31, 2023, 11:01am UTC](https://discourse.julialang.org/t/structtypes-mutable-does-not-call-the-inner-constructor/102118 "2023-07-31T11:01:59Z")

</div>

using JSON3 using StructTypes Base.@kwdef mutable struct MyType2 c::Float64 = 3.0 MyType2(c) = c \< 0.0 ? error("bar") : new(c) end Base.@kwdef mutable struct MyType a::Int = 1 b::MyType2 = MyType2(3.0)…

---

## [Unable to install package "TransformedLogDensities"](https://discourse.julialang.org/t/unable-to-install-package-transformedlogdensities/102300)

<div class="topic-metadata">

**Author:** [@Sahil\_Khan](https://discourse.julialang.org/u/Sahil_Khan)\
**Replies:** 3\
**Last updated:** [July 31, 2023, 10:59am UTC](https://discourse.julialang.org/t/unable-to-install-package-transformedlogdensities/102300 "2023-07-31T10:59:04Z")

</div>

I’m getting this requirement message when trying to install TransformedLogDensities. I tried updating packages but it doesn’t help. Unsatisfiable requirements detected for package TransformedLogDensities \[f9bc47f6\]: Tr…

---

## [Testing GC.@preserve when doing compiler passes](https://discourse.julialang.org/t/testing-gc-preserve-when-doing-compiler-passes/102241)

<div class="topic-metadata">

**Author:** [@willtebbutt](https://discourse.julialang.org/u/willtebbutt)\
**Replies:** 2\
**Last updated:** [July 31, 2023, 10:49am UTC](https://discourse.julialang.org/t/testing-gc-preserve-when-doing-compiler-passes/102241 "2023-07-31T10:49:25Z")

</div>

I’m looking to extend Umlaut.jl’s tracing to handle the :gc\_preserve\_begin and :gc\_preserve\_end statements that can be found in Julia’s IR. For example, you will find these if you use GC.@preserve: foo(x) = GC.@preserve…

---

## [How to flag Base functions that are being shadowed?](https://discourse.julialang.org/t/how-to-flag-base-functions-that-are-being-shadowed/102289)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 4\
**Last updated:** [July 31, 2023, 10:40am UTC](https://discourse.julialang.org/t/how-to-flag-base-functions-that-are-being-shadowed/102289 "2023-07-31T10:40:30Z")

</div>

Is there a way to highlight instances of function shadowing such as julia\> struct MyType end julia\> Matrix(::MyType) = ones(2,2) Matrix (generic function with 1 method) where a new Matrix function is created in a modu…

---

## [Optim.jl Implementing box minimization does not work for me](https://discourse.julialang.org/t/optim-jl-implementing-box-minimization-does-not-work-for-me/102293)

<div class="topic-metadata">

**Author:** [@ditfurth](https://discourse.julialang.org/u/ditfurth)\
**Replies:** 5\
**Last updated:** [July 31, 2023, 10:19am UTC](https://discourse.julialang.org/t/optim-jl-implementing-box-minimization-does-not-work-for-me/102293 "2023-07-31T10:19:49Z")

</div>

Hi all, I am trying to implement a box minimization, but am struggling to do so. I am at the moment trying to run the line: results = optimize(x -\> blp\_iteration(dt, z, x, W, random\_coeff, fixed\_coeff,agents), ini…

---

## [@testset expands all macros \*before\* executing the generated code](https://discourse.julialang.org/t/testset-expands-all-macros-before-executing-the-generated-code/102197)

<div class="topic-metadata">

**Author:** [@iago-lito](https://discourse.julialang.org/u/iago-lito)\
**Replies:** 3\
**Last updated:** [July 31, 2023, 8:52am UTC](https://discourse.julialang.org/t/testset-expands-all-macros-before-executing-the-generated-code/102197 "2023-07-31T08:52:15Z")

</div>

Hello community. I’ve just spent hours confusingly revolving around the following quirk. Given this code in my package: macro a() println("expand a") :(println("exec a")) end macro b() println("expand b") …

---

## [When calling PyTorch using PyCall or pythoncall, I run out of memory on GPU cards](https://discourse.julialang.org/t/when-calling-pytorch-using-pycall-or-pythoncall-i-run-out-of-memory-on-gpu-cards/102290)

<div class="topic-metadata">

**Author:** [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Replies:** 1\
**Last updated:** [July 31, 2023, 8:23am UTC](https://discourse.julialang.org/t/when-calling-pytorch-using-pycall-or-pythoncall-i-run-out-of-memory-on-gpu-cards/102290 "2023-07-31T08:23:48Z")

</div>

Hi All, I am inferfacing to PyTorch using PythonCall (or PyCall) with the data moved between Julia and Python by DLPack.jl. I use PyTorch to compute gradients and the rest (e.g. optimization) is handled by Julia, since …

---

## [PDF version used when saving a figure in CairoMakie](https://discourse.julialang.org/t/pdf-version-used-when-saving-a-figure-in-cairomakie/102282)

<div class="topic-metadata">

**Author:** [@garrek](https://discourse.julialang.org/u/garrek)\
**Replies:** 2\
**Last updated:** [July 31, 2023, 7:24am UTC](https://discourse.julialang.org/t/pdf-version-used-when-saving-a-figure-in-cairomakie/102282 "2023-07-31T07:24:32Z")

</div>

I have a technical question about the PDF version that is used when CairoMakie saves a figure. I notice CairoMakie saves using PDF version 1.5\[1\]. When I combine several assets together in, say, Affinity Publisher to cre…

---

## [Occursin with a vector](https://discourse.julialang.org/t/occursin-with-a-vector/71769)

<div class="topic-metadata">

**Author:** [@jnewbie](https://discourse.julialang.org/u/jnewbie)\
**Replies:** 7\
**Last updated:** [July 31, 2023, 6:53am UTC](https://discourse.julialang.org/t/occursin-with-a-vector/71769 "2023-07-31T06:53:05Z")

</div>

Hi everyone, a = \[“abc”, “def”,“ghi”\] I have an array a and a column of my dataframe df\[:Column1\]. Is it possible with the function “occursin” (or another one) to know if the elements of a are into df\[:Column1\] wi…

---

## [Error with @views and a function](https://discourse.julialang.org/t/error-with-views-and-a-function/102284)

<div class="topic-metadata">

**Author:** [@amrods](https://discourse.julialang.org/u/amrods)\
**Replies:** 3\
**Last updated:** [July 31, 2023, 6:08am UTC](https://discourse.julialang.org/t/error-with-views-and-a-function/102284 "2023-07-31T06:08:15Z")

</div>

I’m getting this strange error when trying to use views with a function. Here is a MWE: x = Array{Float64}(undef, 3, 3, 3) y = similar(x) @views function fun(x, y, t) y\[:, :, t\], x\[:, :, t\] = rand(3, 3) return …

---

## [Error in the precompiling of QuantumOptics package in Julia 1.9.2](https://discourse.julialang.org/t/error-in-the-precompiling-of-quantumoptics-package-in-julia-1-9-2/102181)

<div class="topic-metadata">

**Author:** [@Anil\_Kumar](https://discourse.julialang.org/u/Anil_Kumar)\
**Replies:** 2\
**Last updated:** [July 31, 2023, 3:26am UTC](https://discourse.julialang.org/t/error-in-the-precompiling-of-quantumoptics-package-in-julia-1-9-2/102181 "2023-07-31T03:26:19Z")

</div>

I recently install Julia and anaconda in an IMac, but using QuantumOpitics package for a programme gives me an error: “\[ Info: Precompiling QuantumOptics \[6e0679c1-51ea-5a7c-ac74-d61b76210b0c\] ERROR: LoadError: UndefVa…

---

## [Notebook-specific startup script in IJulia Notebooks in VS Code](https://discourse.julialang.org/t/notebook-specific-startup-script-in-ijulia-notebooks-in-vs-code/102283)

<div class="topic-metadata">

**Author:** [@elenev](https://discourse.julialang.org/u/elenev)\
**Replies:** 0\
**Last updated:** [July 31, 2023, 3:09am UTC](https://discourse.julialang.org/t/notebook-specific-startup-script-in-ijulia-notebooks-in-vs-code/102283 "2023-07-31T03:09:04Z")

</div>

When working with Jupyter notebooks, I prefer VS Code’s Jupyter extension over browser-based Notebook or JupyterLab. But it looks like VS Code’s implementation of Julia Jupyter notebooks is something different from IJuli…

---

## [Name of Julia fans?](https://discourse.julialang.org/t/name-of-julia-fans/101760)

<div class="topic-metadata">

**Author:** [@Kadii](https://discourse.julialang.org/u/Kadii)\
**Replies:** 31\
**Last updated:** [July 30, 2023, 11:49pm UTC](https://discourse.julialang.org/t/name-of-julia-fans/101760 "2023-07-30T23:49:58Z")

</div>

For Python, there are names, Pythonista and Pythoneer, for the hardcore users of Python. Does julia have the equivalent nicknames? What would be the greatest name for the hardcore fans of julia?

---

## [Creating system images much faster with Julia 1.10.0-beta1](https://discourse.julialang.org/t/creating-system-images-much-faster-with-julia-1-10-0-beta1/102251)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 8\
**Last updated:** [July 30, 2023, 8:49pm UTC](https://discourse.julialang.org/t/creating-system-images-much-faster-with-julia-1-10-0-beta1/102251 "2023-07-30T20:49:49Z")

</div>

Re-creating a system image is much (2.4 times) faster with 1.10-beta1 than with 1.9.2: Julia 1.10.0-beta1 ------------------ \[ Info: PackageCompiler: Done ✔ \[01m:47s\] PackageCompiler: compiling incremental system image…

---

## [Is it possible use a Vector of CartesianIndex to select data on a matrix?](https://discourse.julialang.org/t/is-it-possible-use-a-vector-of-cartesianindex-to-select-data-on-a-matrix/102261)

<div class="topic-metadata">

**Author:** [@jcbritobr](https://discourse.julialang.org/u/jcbritobr)\
**Replies:** 15\
**Last updated:** [July 30, 2023, 8:00pm UTC](https://discourse.julialang.org/t/is-it-possible-use-a-vector-of-cartesianindex-to-select-data-on-a-matrix/102261 "2023-07-30T20:00:13Z")

</div>

Hello, good afternoon. Is it possible use a Vector of CartesianIndex to select data on a matrix as below? The issue, its giving me an undefined result: Matrix{Float64}(undef, 0, 1) @show data\[groupidx .== 3, :\]

---

## [DiffEqFlux tutorial example not running out-of-the-box](https://discourse.julialang.org/t/diffeqflux-tutorial-example-not-running-out-of-the-box/102113)

<div class="topic-metadata">

**Author:** [@poplarShift](https://discourse.julialang.org/u/poplarShift)\
**Replies:** 5\
**Last updated:** [July 30, 2023, 7:59pm UTC](https://discourse.julialang.org/t/diffeqflux-tutorial-example-not-running-out-of-the-box/102113 "2023-07-30T19:59:17Z")

</div>

Hi, thanks for all the great work! I’ve been trying to run this example: Neural Ordinary Differential Equations · DiffEqFlux.jl (I attach it at the bottom for future reference) So I’ve installed the DiffEqFlux 1.53.0 v…

---

## [Is there variable viewer + editor?](https://discourse.julialang.org/t/is-there-variable-viewer-editor/102265)

<div class="topic-metadata">

**Author:** [@Tadas\_Surkys](https://discourse.julialang.org/u/Tadas_Surkys)\
**Replies:** 2\
**Last updated:** [July 30, 2023, 5:20pm UTC](https://discourse.julialang.org/t/is-there-variable-viewer-editor/102265 "2023-07-30T17:20:06Z")

</div>

I wonder if there is a variable viewer plus editor like MATLAB has. It would be convenient to view values and edit them (if they are mutable) in some variable manager. VScode allows to navigate among variables but it unc…

---

## [Makie doesn't show anything when run as a script](https://discourse.julialang.org/t/makie-doesnt-show-anything-when-run-as-a-script/97664)

<div class="topic-metadata">

**Author:** [@jianqixi](https://discourse.julialang.org/u/jianqixi)\
**Replies:** 8\
**Last updated:** [July 30, 2023, 4:11pm UTC](https://discourse.julialang.org/t/makie-doesnt-show-anything-when-run-as-a-script/97664 "2023-07-30T16:11:15Z")

</div>

I am trying to plot something using Makie in the test.jl file. But it doesn’t show figure when using julia test.jl. Here is my code: using GLMakie xs = cos.(1:0.5:20) ys = sin.(1:0.5:20) zs = LinRange(0, 3, length(x…

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

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