# Latest

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

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

**Page:** 751

---

## [\[ANN\]: GenericInstruments.jl](https://discourse.julialang.org/t/ann-genericinstruments-jl/39341)

<div class="topic-metadata">

**Author:** [@Iulian.Cioarca](https://discourse.julialang.org/u/Iulian.Cioarca)\
**Replies:** 7\
**Last updated:** [March 17, 2023, 4:15pm UTC](https://discourse.julialang.org/t/ann-genericinstruments-jl/39341 "2023-03-17T16:15:13Z")

</div>

After changing my mind many times I decided to convert GitHub - iuliancioarca/GenericInstruments.jl: Bundles similar functionalities of instruments under a single generic object: power supplies, arbitrary waveform genera…

---

## [Creating data bins with numeric labels with cut()](https://discourse.julialang.org/t/creating-data-bins-with-numeric-labels-with-cut/81281)

<div class="topic-metadata">

**Author:** [@DWSchulze](https://discourse.julialang.org/u/DWSchulze)\
**Replies:** 12\
**Last updated:** [March 17, 2023, 3:05pm UTC](https://discourse.julialang.org/t/creating-data-bins-with-numeric-labels-with-cut/81281 "2023-03-17T15:05:18Z")

</div>

This is Python code to bin data into bins with a numerical label: pd.cut(housing\["median\_income"\], bins=\[0., 1.5, 3.0, 4.5, 6., np.inf\], labels=\[1, 2, 3, 4, 5\]) I want to do this in Julia, but it seems that Julia’s cut…

---

## [How to find equation when i have points?](https://discourse.julialang.org/t/how-to-find-equation-when-i-have-points/96240)

<div class="topic-metadata">

**Author:** [@Sergey\_Novak](https://discourse.julialang.org/u/Sergey_Novak)\
**Replies:** 7\
**Last updated:** [March 17, 2023, 2:31pm UTC](https://discourse.julialang.org/t/how-to-find-equation-when-i-have-points/96240 "2023-03-17T14:31:51Z")

</div>

I have points and need to get equation of these points. I try to use wolfram and another online services and all result is bad.

---

## [Outlining paths with polygons](https://discourse.julialang.org/t/outlining-paths-with-polygons/96243)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 2\
**Last updated:** [March 17, 2023, 2:01pm UTC](https://discourse.julialang.org/t/outlining-paths-with-polygons/96243 "2023-03-17T14:01:21Z")

</div>

Hi all, I was wondering whether if Julia has packages with similar functionality to Shapely. Suppose I have a list of coordinates and want to define a path with a buffer, plot it and test whether specific points fall wi…

---

## [Strange memory allocations with structs containing functions](https://discourse.julialang.org/t/strange-memory-allocations-with-structs-containing-functions/96007)

<div class="topic-metadata">

**Author:** [@ocp](https://discourse.julialang.org/u/ocp)\
**Replies:** 6\
**Last updated:** [March 17, 2023, 12:23pm UTC](https://discourse.julialang.org/t/strange-memory-allocations-with-structs-containing-functions/96007 "2023-03-17T12:23:26Z")

</div>

I’m working on a piece of code that takes a struct containing a Function and then calls that function. However, I’m fighting allocation issues. Ideally, I would think that the ability to specify the function signature,…

---

## [Quarto Julia CLI: Kernel died before replying to kernel\_info](https://discourse.julialang.org/t/quarto-julia-cli-kernel-died-before-replying-to-kernel-info/91416)

<div class="topic-metadata">

**Author:** [@fortunewalla](https://discourse.julialang.org/u/fortunewalla)\
**Replies:** 7\
**Last updated:** [March 17, 2023, 9:38am UTC](https://discourse.julialang.org/t/quarto-julia-cli-kernel-died-before-replying-to-kernel-info/91416 "2023-03-17T09:38:24Z")

</div>

I wanted to try out quarto for Julia code. I created an new Julia environment q and installed IJulia.jl and Plots.jl The jupyter kernelspec & quarto check all seem fine. when trying to render Julia example Using…

---

## [Step Detection](https://discourse.julialang.org/t/step-detection/96217)

<div class="topic-metadata">

**Author:** [@ellocco](https://discourse.julialang.org/u/ellocco)\
**Replies:** 10\
**Last updated:** [March 17, 2023, 9:16am UTC](https://discourse.julialang.org/t/step-detection/96217 "2023-03-17T09:16:44Z")

</div>

I would like to detect steps in a signal. I wonder, if a Julia package exists that can do this job. I found the Python package ruptures that does the job, but it has two shortcomings: It is slow It can not handle larg…

---

## [How to skip output for \`nothing\` during ternary evaluation in one-liner list comprehension?](https://discourse.julialang.org/t/how-to-skip-output-for-nothing-during-ternary-evaluation-in-one-liner-list-comprehension/96211)

<div class="topic-metadata">

**Author:** [@mkarikom](https://discourse.julialang.org/u/mkarikom)\
**Replies:** 2\
**Last updated:** [March 16, 2023, 11:15pm UTC](https://discourse.julialang.org/t/how-to-skip-output-for-nothing-during-ternary-evaluation-in-one-liner-list-comprehension/96211 "2023-03-16T23:15:49Z")

</div>

Suppose I only want to know success but not failure in a statement like: julia\> \[i%2==1 && "even" for i in 1:10\] 10-element Vector{Any}: "even" false "even" false "even" false "even" false …

---

## [Error loading model parameters with BSON](https://discourse.julialang.org/t/error-loading-model-parameters-with-bson/96136)

<div class="topic-metadata">

**Author:** [@JuliaQ123](https://discourse.julialang.org/u/JuliaQ123)\
**Replies:** 1\
**Last updated:** [March 17, 2023, 8:17am UTC](https://discourse.julialang.org/t/error-loading-model-parameters-with-bson/96136 "2023-03-17T08:17:36Z")

</div>

I’m running into an error when trying to load saved model parameters using BSON. I am saving the model parameters with @save model\_path model\_params\_save and then trying to load them as per the examples with @load mod…

---

## [How to speed up the numerical integration with interpolation](https://discourse.julialang.org/t/how-to-speed-up-the-numerical-integration-with-interpolation/96223)

<div class="topic-metadata">

**Author:** [@J\_I](https://discourse.julialang.org/u/J_I)\
**Replies:** 7\
**Last updated:** [March 17, 2023, 7:40am UTC](https://discourse.julialang.org/t/how-to-speed-up-the-numerical-integration-with-interpolation/96223 "2023-03-17T07:40:41Z")

</div>

Hi, I have performance problem regarding numerical integration and interpolation. I want to perform numerical integration with interpolation like below. using Dierckx using QuadGK function test() x = 0:0.01:1000 …

---

## [In vscode, how to open julia's REPL on the current compute node and run code with ctrl+shift](https://discourse.julialang.org/t/in-vscode-how-to-open-julias-repl-on-the-current-compute-node-and-run-code-with-ctrl-shift/96113)

<div class="topic-metadata">

**Author:** [@Yanjj1](https://discourse.julialang.org/u/Yanjj1)\
**Replies:** 5\
**Last updated:** [March 17, 2023, 7:33am UTC](https://discourse.julialang.org/t/in-vscode-how-to-open-julias-repl-on-the-current-compute-node-and-run-code-with-ctrl-shift/96113 "2023-03-17T07:33:44Z")

</div>

In vscode, how to open julia’s REPL on the current compute node and run code with ctrl+shift

---

## [Replace Rmath RNGs](https://discourse.julialang.org/t/replace-rmath-rngs/96231)

<div class="topic-metadata">

**Author:** [@ArunSanganal](https://discourse.julialang.org/u/ArunSanganal)\
**Replies:** 1\
**Last updated:** [March 17, 2023, 7:25am UTC](https://discourse.julialang.org/t/replace-rmath-rngs/96231 "2023-03-17T07:25:04Z")

</div>

I have gone through issue#294\[1\], and the PR\[2\], matbesancon, who made the PR wrote the #TODO for every unchecked distribution in the issue. (Hypergeometric, NegativeBinomial, NoncentralChisq, poison, and skellam) but ap…

---

## [Is there a way to plot an equation in julia?](https://discourse.julialang.org/t/is-there-a-way-to-plot-an-equation-in-julia/96199)

<div class="topic-metadata">

**Author:** [@AwesomeQuest](https://discourse.julialang.org/u/AwesomeQuest)\
**Replies:** 3\
**Last updated:** [March 17, 2023, 7:16am UTC](https://discourse.julialang.org/t/is-there-a-way-to-plot-an-equation-in-julia/96199 "2023-03-17T07:16:11Z")

</div>

Is there a way to plot an equation like x^2 + y^2 =1 in julia? Like Geogebra and windows calculator can do? Or do I have to parameterize the equation first?

---

## [A warning that doesn't seem reasonable: \`Possible method call error\`](https://discourse.julialang.org/t/a-warning-that-doesnt-seem-reasonable-possible-method-call-error/96221)

<div class="topic-metadata">

**Author:** [@BeitianMa](https://discourse.julialang.org/u/BeitianMa)\
**Replies:** 2\
**Last updated:** [March 17, 2023, 7:05am UTC](https://discourse.julialang.org/t/a-warning-that-doesnt-seem-reasonable-possible-method-call-error/96221 "2023-03-17T07:05:09Z")

</div>

When I try to manipulate a DataFrame in Julia, blue wavy lines often appear, such as the following and The code works fine except for the odd warning from the editor. My version of Julia is 1.8.5, and package statu…

---

## [Mosek install broken on osx](https://discourse.julialang.org/t/mosek-install-broken-on-osx/96226)

<div class="topic-metadata">

**Author:** [@richardrl](https://discourse.julialang.org/u/richardrl)\
**Replies:** 2\
**Last updated:** [March 17, 2023, 7:03am UTC](https://discourse.julialang.org/t/mosek-install-broken-on-osx/96226 "2023-03-17T07:03:09Z")

</div>

\*\*(@v1.8) pkg\>\*\* add MosekTools, Mosek, Convex, Images, DelimitedFiles, Gadfly \*\*Updating\*\* registry at \`~/.julia/registries/General.toml\` \*\*Resolving\*\* package versions... \*\*Installed\*\* MosekTools ─ v0.13.2 \*\*Instal…

---

## [Is there a "gap" between acquire and try in the acquire-try-finally idiom?](https://discourse.julialang.org/t/is-there-a-gap-between-acquire-and-try-in-the-acquire-try-finally-idiom/96224)

<div class="topic-metadata">

**Author:** [@ettersi](https://discourse.julialang.org/u/ettersi)\
**Replies:** 0\
**Last updated:** [March 17, 2023, 5:58am UTC](https://discourse.julialang.org/t/is-there-a-gap-between-acquire-and-try-in-the-acquire-try-finally-idiom/96224 "2023-03-17T05:58:11Z")

</div>

The prime motivation for finally clauses is to guarantee clean-up of resources like open files, locks, etc. For example, the Julia docs on finally clauses present the following example. f = open("file") try # operat…

---

## [Create a vector accepting different datatypes at specific index positions](https://discourse.julialang.org/t/create-a-vector-accepting-different-datatypes-at-specific-index-positions/96222)

<div class="topic-metadata">

**Author:** [@Name1](https://discourse.julialang.org/u/Name1)\
**Replies:** 3\
**Last updated:** [March 17, 2023, 4:53am UTC](https://discourse.julialang.org/t/create-a-vector-accepting-different-datatypes-at-specific-index-positions/96222 "2023-03-17T04:53:34Z")

</div>

Hi all, I’m wondering how to initialize a vector that requires different datatypes at specific positions. I want the first element in the array to be of type Int64, and the second element in the array to be of type Floa…

---

## [MPI RMA with CUDA](https://discourse.julialang.org/t/mpi-rma-with-cuda/96219)

<div class="topic-metadata">

**Author:** [@smartalecH](https://discourse.julialang.org/u/smartalecH)\
**Replies:** 2\
**Last updated:** [March 17, 2023, 4:47am UTC](https://discourse.julialang.org/t/mpi-rma-with-cuda/96219 "2023-03-17T04:47:21Z")

</div>

I’m interested in using MPI RMA (i.e. one-sided operations) with native CuArrays. From the MPI.jl documentation, we read: \[CuArrays\] may also work with one-sided operations, but these are not often supported Could s…

---

## [\[ANN\] New tools for fixing performance problems in Julia](https://discourse.julialang.org/t/ann-new-tools-for-fixing-performance-problems-in-julia/95773)

<div class="topic-metadata">

**Author:** [@tim.holy](https://discourse.julialang.org/u/tim.holy)\
**Replies:** 3\
**Last updated:** [March 17, 2023, 2:51am UTC](https://discourse.julialang.org/t/ann-new-tools-for-fixing-performance-problems-in-julia/95773 "2023-03-17T02:51:46Z")

</div>

Many questions on discourse center around performance, and one common category of problems is “type instability” (aka, poor inferrability triggering runtime dispatch). While the @code\_typed and similar macros are powerfu…

---

## [Where is de QUIZ W1 L1](https://discourse.julialang.org/t/where-is-de-quiz-w1-l1/96215)

<div class="topic-metadata">

**Author:** [@diego\_rodriguez](https://discourse.julialang.org/u/diego_rodriguez)\
**Replies:** 1\
**Last updated:** [March 17, 2023, 1:38am UTC](https://discourse.julialang.org/t/where-is-de-quiz-w1-l1/96215 "2023-03-17T01:38:04Z")

</div>

Where is de quiz of week1 lesson 1?

---

## [Plots.jl clean scientific formatting](https://discourse.julialang.org/t/plots-jl-clean-scientific-formatting/38112)

<div class="topic-metadata">

**Author:** [@DR59](https://discourse.julialang.org/u/DR59)\
**Replies:** 9\
**Last updated:** [March 17, 2023, 1:07am UTC](https://discourse.julialang.org/t/plots-jl-clean-scientific-formatting/38112 "2023-03-17T01:07:02Z")

</div>

Suppose I have a plot p. If I want to change the y-axis to scientific formatting, I can do: plot!(p, yformatter = :scientific) Now a tick label that was previously: 30000, becomes 3x10^4. However I don’t want each sin…

---

## [How to debug a multithreaded code in VS code?](https://discourse.julialang.org/t/how-to-debug-a-multithreaded-code-in-vs-code/96078)

<div class="topic-metadata">

**Author:** [@Amro](https://discourse.julialang.org/u/Amro)\
**Replies:** 3\
**Last updated:** [March 16, 2023, 11:33pm UTC](https://discourse.julialang.org/t/how-to-debug-a-multithreaded-code-in-vs-code/96078 "2023-03-16T23:33:41Z")

</div>

I am using VS code with Julia extension. I debug the code normally by putting breakpoints at specific locations. However, putting these breakpoints inside @threads macro with a for loop (or inside a multithreaded code wi…

---

## [How many fillable elements in an AbstractMatrix?](https://discourse.julialang.org/t/how-many-fillable-elements-in-an-abstractmatrix/96174)

<div class="topic-metadata">

**Author:** [@pgoulart](https://discourse.julialang.org/u/pgoulart)\
**Replies:** 3\
**Last updated:** [March 16, 2023, 11:30pm UTC](https://discourse.julialang.org/t/how-many-fillable-elements-in-an-abstractmatrix/96174 "2023-03-16T23:30:51Z")

</div>

It seems like it should be possible to count the number of “fillable” entries in a matrix, but I can’t work out how to do so for any AbstractMatrix. What I want: Some function foo that returns: nnz(A) when A is Spar…

---

## [Reading JuMP model "lower bound already set"](https://discourse.julialang.org/t/reading-jump-model-lower-bound-already-set/96156)

<div class="topic-metadata">

**Author:** [@shakedregev](https://discourse.julialang.org/u/shakedregev)\
**Replies:** 7\
**Last updated:** [March 16, 2023, 9:49pm UTC](https://discourse.julialang.org/t/reading-jump-model-lower-bound-already-set/96156 "2023-03-16T21:49:20Z")

</div>

Writing the model like this works model = JuMP.Model(Clarabel.Optimizer) \*set variables and contraints\* write\_to\_file(model, "my\_model.lp") The model is also solved correctly by Clarabel. However, problems occur when I…

---

## [Preallocating Interpolation object](https://discourse.julialang.org/t/preallocating-interpolation-object/96207)

<div class="topic-metadata">

**Author:** [@tradler](https://discourse.julialang.org/u/tradler)\
**Replies:** 3\
**Last updated:** [March 16, 2023, 9:40pm UTC](https://discourse.julialang.org/t/preallocating-interpolation-object/96207 "2023-03-16T21:40:02Z")

</div>

I am solving a dynamic programing value function using backward induction, and would like to be able to update an Interpolations.jl object (or something similar) which holds an approximation of the value function in each…

---

## [Writing array to file with format](https://discourse.julialang.org/t/writing-array-to-file-with-format/96175)

<div class="topic-metadata">

**Author:** [@Andres\_Legarra](https://discourse.julialang.org/u/Andres_Legarra)\
**Replies:** 11\
**Last updated:** [March 16, 2023, 7:45pm UTC](https://discourse.julialang.org/t/writing-array-to-file-with-format/96175 "2023-03-16T19:45:29Z")

</div>

I’m trying to write an array with predefined format to a file. In Fortran this is : do i=size(A,1) write(10,'(1000f9.5)')A(i,:) enddo in Julia this is: for row in eachrow(A) write(io,row) end but (contrary to…

---

## [Julia Plots title escaping '\\'](https://discourse.julialang.org/t/julia-plots-title-escaping/96198)

<div class="topic-metadata">

**Author:** [@joeynelson](https://discourse.julialang.org/u/joeynelson)\
**Replies:** 6\
**Last updated:** [March 16, 2023, 7:44pm UTC](https://discourse.julialang.org/t/julia-plots-title-escaping/96198 "2023-03-16T19:44:22Z")

</div>

I’m putting a windows path into a plot title. But it looks like it is trying to treat the \\ as the start of some LaTeX keyword, and reporting an undefined symbol Is there a way to disable this behavior or a standard way…

---

## [How to create a variable that is Hermitian but not PSD?](https://discourse.julialang.org/t/how-to-create-a-variable-that-is-hermitian-but-not-psd/96170)

<div class="topic-metadata">

**Author:** [@araujoms](https://discourse.julialang.org/u/araujoms)\
**Replies:** 1\
**Last updated:** [March 16, 2023, 7:43pm UTC](https://discourse.julialang.org/t/how-to-create-a-variable-that-is-hermitian-but-not-psd/96170 "2023-03-16T19:43:00Z")

</div>

I need to create a Hermitian matrix that is not PSD for solving a specific problem. How do I do that? The obvious syntax @variable(model, x\[1:d,1:d\], Hermitian) gives an error, unlike @variable(model, x\[1:d,1:d\], Symmetr…

---

## [MethodError: Cannot \`convert\` an object of type Missing to an object of type Float64](https://discourse.julialang.org/t/methoderror-cannot-convert-an-object-of-type-missing-to-an-object-of-type-float64/96160)

<div class="topic-metadata">

**Author:** [@Saba\_ghasemi](https://discourse.julialang.org/u/Saba_ghasemi)\
**Replies:** 4\
**Last updated:** [March 16, 2023, 7:42pm UTC](https://discourse.julialang.org/t/methoderror-cannot-convert-an-object-of-type-missing-to-an-object-of-type-float64/96160 "2023-03-16T19:42:15Z")

</div>

I tried to solve a very big optimization problem (MIQCP), and the error MethodError: Cannot convert an object of type Missing to an object of type Float64 Closest candidates are: convert(::Type{T}, ::T) where T\<:Numbe…

---

## [MultiObjectiveAlgorithms.EpsilonConstraint runs infinitely](https://discourse.julialang.org/t/multiobjectivealgorithms-epsilonconstraint-runs-infinitely/96178)

<div class="topic-metadata">

**Author:** [@mdogan](https://discourse.julialang.org/u/mdogan)\
**Replies:** 3\
**Last updated:** [March 16, 2023, 7:41pm UTC](https://discourse.julialang.org/t/multiobjectivealgorithms-epsilonconstraint-runs-infinitely/96178 "2023-03-16T19:41:32Z")

</div>

I am trying to solve an optimization problem (obtain the efficient frontier of optimal portfolios by maximizing expected return per given level of sharpe ratio). However, the solution runs infinitely (though not always, …

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

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