# Latest

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

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

**Page:** 943

---

## [How to customize broadcast for a function that accepts keyword arguments?](https://discourse.julialang.org/t/how-to-customize-broadcast-for-a-function-that-accepts-keyword-arguments/86351)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 0\
**Last updated:** [August 25, 2022, 5:28pm UTC](https://discourse.julialang.org/t/how-to-customize-broadcast-for-a-function-that-accepts-keyword-arguments/86351 "2022-08-25T17:28:47Z")

</div>

Suppose I have a function julia\> function f(n::Int) @assert n \> 0 n == 1 && return 1 f(n-1) + 1 end and another function to cache the values of f(n) for a range of n: julia\> cac…

---

## [Help with understanding Julia types](https://discourse.julialang.org/t/help-with-understanding-julia-types/86345)

<div class="topic-metadata">

**Author:** [@akshdfyehd](https://discourse.julialang.org/u/akshdfyehd)\
**Replies:** 2\
**Last updated:** [August 25, 2022, 5:20pm UTC](https://discourse.julialang.org/t/help-with-understanding-julia-types/86345 "2022-08-25T17:20:44Z")

</div>

Hi, I am relatively new to Julia, can you explain what difference between Union {Missing,T}, Vector{Bool}, \[Union{Missing, Bool} are, please? Thanks!

---

## [Some way to debug syntax errors?](https://discourse.julialang.org/t/some-way-to-debug-syntax-errors/86336)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 1\
**Last updated:** [August 25, 2022, 5:12pm UTC](https://discourse.julialang.org/t/some-way-to-debug-syntax-errors/86336 "2022-08-25T17:12:46Z")

</div>

I’ve got a syntax error in my code (in a function in a module) and I can’t seem to figure it out. The expression goes something like this: ntuple( let a = b i -\> expr(a, i) end, Val{c}()) According to the err…

---

## [A ﬂexible sparse matrix data format and parallel algorithms for the assembly of sparse matrices in general ﬁnite element applications using atomic synchronisation primitives](https://discourse.julialang.org/t/a-exible-sparse-matrix-data-format-and-parallel-algorithms-for-the-assembly-of-sparse-matrices-in-general-nite-element-applications-using-atomic-synchronisation-primitives/86339)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 2\
**Last updated:** [August 25, 2022, 5:08pm UTC](https://discourse.julialang.org/t/a-exible-sparse-matrix-data-format-and-parallel-algorithms-for-the-assembly-of-sparse-matrices-in-general-nite-element-applications-using-atomic-synchronisation-primitives/86339 "2022-08-25T17:08:09Z")

</div>

@elrod @PetrKryslUCSD Seems intriguing: https://www.researchgate.net/publication/346555859\_A\_flexible\_sparse\_matrix\_data\_format\_and\_parallel\_algorithms\_for\_the\_assembly\_of\_sparse\_matrices\_in\_general\_finite\_element\_applic…

---

## [MMatrix in struct](https://discourse.julialang.org/t/mmatrix-in-struct/86341)

<div class="topic-metadata">

**Author:** [@james3](https://discourse.julialang.org/u/james3)\
**Replies:** 1\
**Last updated:** [August 25, 2022, 4:46pm UTC](https://discourse.julialang.org/t/mmatrix-in-struct/86341 "2022-08-25T16:46:38Z")

</div>

I wish to define a struct, containing a square MMatrix. The number of rows / columns is N. I tried to do this as mutable struct my\_struct{N, T \<: AbstractFloat} a::MVector{N, T} b::MMatrix{N, N, T, N \* N} end b…

---

## [Byrow with user defined function](https://discourse.julialang.org/t/byrow-with-user-defined-function/79132)

<div class="topic-metadata">

**Author:** [@monopolynomial](https://discourse.julialang.org/u/monopolynomial)\
**Replies:** 4\
**Last updated:** [May 1, 2022, 10:32am UTC](https://discourse.julialang.org/t/byrow-with-user-defined-function/79132 "2022-05-01T10:32:55Z")

</div>

for data like ds=Dataset(x1=\[1,2,3\],x2=\[3,2,1\]) if I want to filter rows where x1 is less than x2 then this works filter(ds, :x1, type=isless, with = :x2) but when I define a function for byrow like f(x)=x\[1\]\< x\[2\] …

---

## [Tachyum processor with Julia](https://discourse.julialang.org/t/tachyum-processor-with-julia/11124)

<div class="topic-metadata">

**Author:** [@johnh](https://discourse.julialang.org/u/johnh)\
**Replies:** 16\
**Last updated:** [August 24, 2022, 2:14pm UTC](https://discourse.julialang.org/t/tachyum-processor-with-julia/11124 "2022-08-24T14:14:03Z")

</div>

I know that new processors come and go. There is a classic hype cycle every time a new idea is announced Gartner hype cycle - Wikipedia. Many do not even make it to the plateau of productivity because mainstream proce…

---

## [Display of \`Array{Union{Bool,Missing},N}\` vs Array{Bool,N}\`](https://discourse.julialang.org/t/display-of-array-union-bool-missing-n-vs-array-bool-n/86332)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 0\
**Last updated:** [August 25, 2022, 3:06pm UTC](https://discourse.julialang.org/t/display-of-array-union-bool-missing-n-vs-array-bool-n/86332 "2022-08-25T15:06:45Z")

</div>

Isn’t it a bit annoying that the display of an Array{Union{Bool,Missing},N} uses different conventions than than the display of an Array{Bool,N} ? julia\> x = \[false,true\] 2-element Vector{Bool}: 0 1 julia\> y = \[false…

---

## [Strange behaviour when substracting a scalar to a StepRangeLen](https://discourse.julialang.org/t/strange-behaviour-when-substracting-a-scalar-to-a-steprangelen/86320)

<div class="topic-metadata">

**Author:** [@Maucejo](https://discourse.julialang.org/u/Maucejo)\
**Replies:** 7\
**Last updated:** [August 25, 2022, 3:03pm UTC](https://discourse.julialang.org/t/strange-behaviour-when-substracting-a-scalar-to-a-steprangelen/86320 "2022-08-25T15:03:10Z")

</div>

Hi all, I have decided to switch from Matlab/Python to Julia. Before coding seriously, I have implemented some toy examples in order to familiarize myself with the Julian workflow. However, I am facing a strange proble…

---

## [Error using CPXcallbackgetrelaxationpoint at CPLEX.jl solver specifc callback](https://discourse.julialang.org/t/error-using-cpxcallbackgetrelaxationpoint-at-cplex-jl-solver-specifc-callback/86230)

<div class="topic-metadata">

**Author:** [@afazevedo](https://discourse.julialang.org/u/afazevedo)\
**Replies:** 2\
**Last updated:** [August 25, 2022, 2:55pm UTC](https://discourse.julialang.org/t/error-using-cpxcallbackgetrelaxationpoint-at-cplex-jl-solver-specifc-callback/86230 "2022-08-25T14:55:24Z")

</div>

Hey guys, you know how I get this right? I’m getting an error on “CPXcallbackgetrelaxationpoint” call on CPLEX solver-specific callback. Here’s a example: using JuMP, CPLEX, Test cb\_calls = Clong\[\] function my\_callba…

---

## [Troubleshooting terminated Pluto worker](https://discourse.julialang.org/t/troubleshooting-terminated-pluto-worker/86327)

<div class="topic-metadata">

**Author:** [@laggvar](https://discourse.julialang.org/u/laggvar)\
**Replies:** 0\
**Last updated:** [August 25, 2022, 2:31pm UTC](https://discourse.julialang.org/t/troubleshooting-terminated-pluto-worker/86327 "2022-08-25T14:31:47Z")

</div>

I have a notebook (cannot share, unfortunately) where the worker keeps terminating in the middle of an expensive computation. The REPL just tells me the worker terminated along with a Unhandled Task ERROR confirming the …

---

## [Best way to have GC manage freeing C-allocated storage](https://discourse.julialang.org/t/best-way-to-have-gc-manage-freeing-c-allocated-storage/86233)

<div class="topic-metadata">

**Author:** [@jlapeyre](https://discourse.julialang.org/u/jlapeyre)\
**Replies:** 8\
**Last updated:** [August 25, 2022, 3:35am UTC](https://discourse.julialang.org/t/best-way-to-have-gc-manage-freeing-c-allocated-storage/86233 "2022-08-25T03:35:33Z")

</div>

What is the best (or a good) way of solving the following very generic problem? I’d like to call obj\_alloc() and obj\_free() in some C library from Julia. On the Julia side, work with Ptr{obj}. It can be considered opaq…

---

## [Combining a col from each DF group into a single DF](https://discourse.julialang.org/t/combining-a-col-from-each-df-group-into-a-single-df/86311)

<div class="topic-metadata">

**Author:** [@Bob\_Jones](https://discourse.julialang.org/u/Bob_Jones)\
**Replies:** 5\
**Last updated:** [August 25, 2022, 2:08pm UTC](https://discourse.julialang.org/t/combining-a-col-from-each-df-group-into-a-single-df/86311 "2022-08-25T14:08:57Z")

</div>

Hi all, sorry if this obvious, fairly new to Julia. I think there must be a simple way to combine a single col from all DF groups into a single DF. I have this: gd = groupby(DataFrame(dtype=repeat(\["AA","BB","CC"\], inn…

---

## [Best way to parallelize](https://discourse.julialang.org/t/best-way-to-parallelize/85992)

<div class="topic-metadata">

**Author:** [@Dario-Rosa85](https://discourse.julialang.org/u/Dario-Rosa85)\
**Replies:** 12\
**Last updated:** [August 25, 2022, 2:01pm UTC](https://discourse.julialang.org/t/best-way-to-parallelize/85992 "2022-08-25T14:01:33Z")

</div>

Hi all, I have a large sparse matrix (dimension of order 10^5) which I have to multiply with a matrix of vectors many times. such a matrix of vectors is made out of, say, 500 vectors each of dimension equal to the dimen…

---

## [@btime of cis Function slower than writing it again](https://discourse.julialang.org/t/btime-of-cis-function-slower-than-writing-it-again/86318)

<div class="topic-metadata">

**Author:** [@RainerHeintzmann](https://discourse.julialang.org/u/RainerHeintzmann)\
**Replies:** 2\
**Last updated:** [August 25, 2022, 1:13pm UTC](https://discourse.julialang.org/t/btime-of-cis-function-slower-than-writing-it-again/86318 "2022-08-25T13:13:35Z")

</div>

I found a quite strange effect when evaluating the performance of cis via @btime: sz = (2000,2000) a = Float32.(2pi .\* rand(sz...)); function cis\_fast(phi::T) where {T\<:Real} complex(sincos(T(pi/2) .- phi)...) end …

---

## [Makie.jl: Axis3() reverse limits don't work](https://discourse.julialang.org/t/makie-jl-axis3-reverse-limits-dont-work/80438)

<div class="topic-metadata">

**Author:** [@ewillcox](https://discourse.julialang.org/u/ewillcox)\
**Replies:** 5\
**Last updated:** [August 25, 2022, 8:42am UTC](https://discourse.julialang.org/t/makie-jl-axis3-reverse-limits-dont-work/80438 "2022-08-25T08:42:37Z")

</div>

I am attempting to create a plot that has x = longitude, y=latitude, and z= depth. Since z = 0 is the surface, I need to reverse the limits (e.g. zlims!() ). Although this works perfectly for Axes(), it does not for Axi…

---

## [Optimization of checking on conditions in a 3d array](https://discourse.julialang.org/t/optimization-of-checking-on-conditions-in-a-3d-array/86282)

<div class="topic-metadata">

**Author:** [@Sergey\_Novak](https://discourse.julialang.org/u/Sergey_Novak)\
**Replies:** 13\
**Last updated:** [August 25, 2022, 12:17pm UTC](https://discourse.julialang.org/t/optimization-of-checking-on-conditions-in-a-3d-array/86282 "2022-08-25T12:17:44Z")

</div>

I have an example of a python code snippet. I need to check all the numbers from the map\_spectrum array for 5 conditions, then put the new value in another array according to them. How can this be done in a more optimize…

---

## [DataDrivenDiffEq.jl sparse regression](https://discourse.julialang.org/t/datadrivendiffeq-jl-sparse-regression/86312)

<div class="topic-metadata">

**Author:** [@yewalenikhil65](https://discourse.julialang.org/u/yewalenikhil65)\
**Replies:** 2\
**Last updated:** [August 25, 2022, 11:43am UTC](https://discourse.julialang.org/t/datadrivendiffeq-jl-sparse-regression/86312 "2022-08-25T11:43:19Z")

</div>

Regarding DataDrivenDiffEq.jl I have precalculated estimate of candidate\_matrix and also Derivative matrix… How do i use sparse regression to solve for sparse coefficient matrix ?? solve on SINDy assumes basis in symboli…

---

## [Feasibility of nested forward diff with sparse partials](https://discourse.julialang.org/t/feasibility-of-nested-forward-diff-with-sparse-partials/86304)

<div class="topic-metadata">

**Author:** [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)\
**Replies:** 6\
**Last updated:** [August 25, 2022, 11:24am UTC](https://discourse.julialang.org/t/feasibility-of-nested-forward-diff-with-sparse-partials/86304 "2022-08-25T11:24:15Z")

</div>

Hi, I will first describe a use-case I have, the issues I have with existing tools, propose a solution to the problem, and finally ask my questions - to people with a deep knowledge of Julia - whether my proposed soluti…

---

## [Comparison of integrators DifferentialEquations.jl](https://discourse.julialang.org/t/comparison-of-integrators-differentialequations-jl/86271)

<div class="topic-metadata">

**Author:** [@Sergey\_Novak](https://discourse.julialang.org/u/Sergey_Novak)\
**Replies:** 15\
**Last updated:** [August 25, 2022, 11:11am UTC](https://discourse.julialang.org/t/comparison-of-integrators-differentialequations-jl/86271 "2022-08-25T11:11:56Z")

</div>

I get two different trajectoriesf or identical parametres, time, and initial condition. for comparison i using integrator from Julia and python. I have used several integrators from Julia and python and get completely d…

---

## [Animations in books](https://discourse.julialang.org/t/animations-in-books/86137)

<div class="topic-metadata">

**Author:** [@mcmwright](https://discourse.julialang.org/u/mcmwright)\
**Replies:** 5\
**Last updated:** [August 25, 2022, 10:48am UTC](https://discourse.julialang.org/t/animations-in-books/86137 "2022-08-25T10:48:06Z")

</div>

I teach acoustics and vibration, and I use a lot of Python animations in Jupyter notebooks with my students. It’s useful for them to be able to step back and forth through the animation a frame at a time within the noteb…

---

## [How do I take a thread runner off the scheduler?](https://discourse.julialang.org/t/how-do-i-take-a-thread-runner-off-the-scheduler/8987)

<div class="topic-metadata">

**Author:** [@tk3369](https://discourse.julialang.org/u/tk3369)\
**Replies:** 5\
**Last updated:** [August 25, 2022, 10:10am UTC](https://discourse.julialang.org/t/how-do-i-take-a-thread-runner-off-the-scheduler/8987 "2022-08-25T10:10:43Z")

</div>

It’s easy to scheduler a runner… but how do I take them off schedule? julia\> c1 = Channel(32) Channel{Any}(sz\_max:32,sz\_curr:0) julia\> function foo() while true data = take!(c1) println(d…

---

## [Asyncfilter never ends](https://discourse.julialang.org/t/asyncfilter-never-ends/85691)

<div class="topic-metadata">

**Author:** [@lucasmsoares96](https://discourse.julialang.org/u/lucasmsoares96)\
**Replies:** 7\
**Last updated:** [August 25, 2022, 9:38am UTC](https://discourse.julialang.org/t/asyncfilter-never-ends/85691 "2022-08-25T09:38:42Z")

</div>

Hello guys! I’m working on an asynchronous implementation of filter, but it never finishes. The code below is for testing a list of 950 proxies to see which ones are still working and if the response time was less than 5…

---

## [No real multithreading possible?](https://discourse.julialang.org/t/no-real-multithreading-possible/77920)

<div class="topic-metadata">

**Author:** [@agcm](https://discourse.julialang.org/u/agcm)\
**Replies:** 8\
**Last updated:** [August 25, 2022, 9:20am UTC](https://discourse.julialang.org/t/no-real-multithreading-possible/77920 "2022-08-25T09:20:54Z")

</div>

Hey there, I am desperately trying to figure out how to do some “real” multi-threadding in Julia. What do I mean by that: My program consists of three tasks: the main task and two separate task I start. I need to commun…

---

## [Accessing edges in non-sorted fashion Graphs.jl?](https://discourse.julialang.org/t/accessing-edges-in-non-sorted-fashion-graphs-jl/70261)

<div class="topic-metadata">

**Author:** [@yewalenikhil65](https://discourse.julialang.org/u/yewalenikhil65)\
**Replies:** 4\
**Last updated:** [August 25, 2022, 9:12am UTC](https://discourse.julialang.org/t/accessing-edges-in-non-sorted-fashion-graphs-jl/70261 "2022-08-25T09:12:40Z")

</div>

g = DiGraph(3); add\_edge!(g, 2, 1) add\_edge!(g, 1, 2) add\_edge!(g, 3, 2) julia\> collect(edges(g)) 3-element Vector{LightGraphs.SimpleGraphs.SimpleEdge{Int64}}: Edge 1 =\> 2 Edge 2 =\> 1 Edge 3 =\> 2 edges collected he…

---

## [JupyterLab Plotting Problem](https://discourse.julialang.org/t/jupyterlab-plotting-problem/86302)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 2\
**Last updated:** [August 25, 2022, 8:24am UTC](https://discourse.julialang.org/t/jupyterlab-plotting-problem/86302 "2022-08-25T08:24:32Z")

</div>

Hi all, I have been trying to plot and compare the result in: JupyterLab / iJulia Julia REPL I try this code: using Plots, LaTeXStrings, Plots.PlotMeasures gr() f(x) = x^(2) g(x) = x^(4) h(x) = x^(6) plot(f,-10,1…

---

## [MethodError: no method matching ^(::VariableRef, ::Vector{VariableRef})](https://discourse.julialang.org/t/methoderror-no-method-matching-variableref-vector-variableref/86299)

<div class="topic-metadata">

**Author:** [@Eric.O](https://discourse.julialang.org/u/Eric.O)\
**Replies:** 6\
**Last updated:** [August 25, 2022, 4:25am UTC](https://discourse.julialang.org/t/methoderror-no-method-matching-variableref-vector-variableref/86299 "2022-08-25T04:25:18Z")

</div>

Please I need help to get this code running. I am using mosek to solve this optimization problem but I keep getting errors. I tried correcting it severally but I keep getting the error " no method matching ^ ". I will be…

---

## [What does lock keyword in open function?](https://discourse.julialang.org/t/what-does-lock-keyword-in-open-function/86170)

<div class="topic-metadata">

**Author:** [@Ritu\_Lahkar](https://discourse.julialang.org/u/Ritu_Lahkar)\
**Replies:** 6\
**Last updated:** [August 25, 2022, 4:00am UTC](https://discourse.julialang.org/t/what-does-lock-keyword-in-open-function/86170 "2022-08-25T04:00:44Z")

</div>

The open(filename::AbstractString; lock = true, keywords...) function has a keyword lock. According to official documentation “The lock keyword argument controls whether operations will be locked for safe multi-threaded …

---

## [Makie: axis limits with Inf](https://discourse.julialang.org/t/makie-axis-limits-with-inf/85784)

<div class="topic-metadata">

**Author:** [@tt1234567](https://discourse.julialang.org/u/tt1234567)\
**Replies:** 5\
**Last updated:** [August 25, 2022, 3:32am UTC](https://discourse.julialang.org/t/makie-axis-limits-with-inf/85784 "2022-08-25T03:32:02Z")

</div>

GLMakie doesn’t seem to adjust axis limits automatically if the data contains an Inf. E,g. using GLMakie lines(1:6,\[-1, -2, 3, -Inf, -10, -11\]) gives You have to use xlims!() and ylims() to see all the data. It see…

---

## [Optimizing a 2 parameter simple ODE](https://discourse.julialang.org/t/optimizing-a-2-parameter-simple-ode/86290)

<div class="topic-metadata">

**Author:** [@affans](https://discourse.julialang.org/u/affans)\
**Replies:** 1\
**Last updated:** [August 25, 2022, 3:22am UTC](https://discourse.julialang.org/t/optimizing-a-2-parameter-simple-ode/86290 "2022-08-25T03:22:13Z")

</div>

I am having trouble understanding the results of code that optimizes a two parameter ODE. using DifferentialEquations using DiffEqParamEstim using Optim data = \[3140, 3232, 3488, 3415, 3192, 3265, 2961, 3548, 4269, 468…

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

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