# Latest

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

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

**Page:** 434

---

## [How to get help on a Julia command on a Jupyter notebook?](https://discourse.julialang.org/t/how-to-get-help-on-a-julia-command-on-a-jupyter-notebook/112976)

<div class="topic-metadata">

**Author:** [@younes](https://discourse.julialang.org/u/younes)\
**Replies:** 7\
**Last updated:** [April 15, 2024, 9:56pm UTC](https://discourse.julialang.org/t/how-to-get-help-on-a-julia-command-on-a-jupyter-notebook/112976 "2024-04-15T21:56:47Z")

</div>

I already tried : ?replace ParseError: # Error @ /home/onto/dev/projects/intro\_julia.ipynb:1:1 ?replace ╙ ── not a unary operator Stacktrace: \[1\] top-level scope @ ~/dev/projects/intro\_julia.ipynb:1 but it does w…

---

## [JuMP.jl: Supplying gradient of objective and jacobian of constraints in Nonlinear Optimization](https://discourse.julialang.org/t/jump-jl-supplying-gradient-of-objective-and-jacobian-of-constraints-in-nonlinear-optimization/106940)

<div class="topic-metadata">

**Author:** [@Strange\_Xue](https://discourse.julialang.org/u/Strange_Xue)\
**Replies:** 12\
**Last updated:** [April 15, 2024, 9:14pm UTC](https://discourse.julialang.org/t/jump-jl-supplying-gradient-of-objective-and-jacobian-of-constraints-in-nonlinear-optimization/106940 "2024-04-15T21:14:31Z")

</div>

Hi, I am faced with a troublesome optimization problem. As shown below, the non-linear optimization problem is easy to model and solve via Ipopt with JuMP.jl as interface. However, the objective function and constraints…

---

## [ForwardDiff.jacobian Method error](https://discourse.julialang.org/t/forwarddiff-jacobian-method-error/112979)

<div class="topic-metadata">

**Author:** [@Domenico\_Lahaye](https://discourse.julialang.org/u/Domenico_Lahaye)\
**Replies:** 2\
**Last updated:** [April 15, 2024, 8:59pm UTC](https://discourse.julialang.org/t/forwarddiff-jacobian-method-error/112979 "2024-04-15T20:59:41Z")

</div>

I get a method error with ForwardDiff.jacobian that I fails to understand. Below a MWE. function fooworks(cvec,xmesh) residual = cvec return residual end function foofails(cvec,xmesh) residual = zeros(len…

---

## [Displaying docstrings in Notebook in VSCode (errors)](https://discourse.julialang.org/t/displaying-docstrings-in-notebook-in-vscode-errors/107627)

<div class="topic-metadata">

**Author:** [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Replies:** 5\
**Last updated:** [April 15, 2024, 8:53pm UTC](https://discourse.julialang.org/t/displaying-docstrings-in-notebook-in-vscode-errors/107627 "2024-04-15T20:53:42Z")

</div>

I found this SO post that makes think it should work on VSC but when I try it (in notebook cell) @doc sin ParseError: KaTeX parse error: No such environment: verbatim at position 7: \\begin{̲v̲e̲r̲b̲a̲t̲i̲m̲}̲ sin(x) \\e…

---

## [Mesh is displayed properly on CairoMakie, but not in GLMakie](https://discourse.julialang.org/t/mesh-is-displayed-properly-on-cairomakie-but-not-in-glmakie/112977)

<div class="topic-metadata">

**Author:** [@marcsgil](https://discourse.julialang.org/u/marcsgil)\
**Replies:** 0\
**Last updated:** [April 15, 2024, 7:58pm UTC](https://discourse.julialang.org/t/mesh-is-displayed-properly-on-cairomakie-but-not-in-glmakie/112977 "2024-04-15T19:58:24Z")

</div>

Hello! I’m running the following code snippet to produce a sphere: using GLMakie fig = Figure() ax = Axis3(fig\[1, 1\], aspect=:equal) mesh!(ax, Sphere(Point3f(0), 1), alpha=0.1) scatter!(ax,0,0,0, color=:red) fig wi…

---

## [Julia random segmentation failure](https://discourse.julialang.org/t/julia-random-segmentation-failure/112934)

<div class="topic-metadata">

**Author:** [@ttx002000](https://discourse.julialang.org/u/ttx002000)\
**Replies:** 11\
**Last updated:** [April 15, 2024, 6:49pm UTC](https://discourse.julialang.org/t/julia-random-segmentation-failure/112934 "2024-04-15T18:49:03Z")

</div>

I am running my codes on my university server. Typically I run a few random initial conditions on the same set of parameters. However, some of these scripts run through, while some of them run for a while and failed su…

---

## [How to extract the upper/lower triangular matrix values except the diagonal?](https://discourse.julialang.org/t/how-to-extract-the-upper-lower-triangular-matrix-values-except-the-diagonal/112974)

<div class="topic-metadata">

**Author:** [@Shayan](https://discourse.julialang.org/u/Shayan)\
**Replies:** 4\
**Last updated:** [April 15, 2024, 6:07pm UTC](https://discourse.julialang.org/t/how-to-extract-the-upper-lower-triangular-matrix-values-except-the-diagonal/112974 "2024-04-15T18:07:52Z")

</div>

Consider the following matrix: julia\> c = rand(2, 2) 2×2 Matrix{Float64}: 0.0443768 0.515352 0.531426 0.967584 Expected output: 1-element Vector{Float64}: 0.531426 I can do: julia\> using LinearAlgebra: LowerTri…

---

## [Outputting string columns using Avro.jl](https://discourse.julialang.org/t/outputting-string-columns-using-avro-jl/80112)

<div class="topic-metadata">

**Author:** [@kobusherbst](https://discourse.julialang.org/u/kobusherbst)\
**Replies:** 5\
**Last updated:** [April 15, 2024, 5:13pm UTC](https://discourse.julialang.org/t/outputting-string-columns-using-avro-jl/80112 "2024-04-15T17:13:51Z")

</div>

When I try to convert an Arrow file to Avro using this code: function t\_arrowtoavro(path, file) a = Arrow.Table(joinpath(path, "$(file).arrow")) |\> DataFrame println(Tables.schema(a)) Avro.writetable(joinpat…

---

## [StackOverflowError for large set of Jumps in JumpProcesses.jl with high-dimensional set of ODEs](https://discourse.julialang.org/t/stackoverflowerror-for-large-set-of-jumps-in-jumpprocesses-jl-with-high-dimensional-set-of-odes/112969)

<div class="topic-metadata">

**Author:** [@flmuk](https://discourse.julialang.org/u/flmuk)\
**Replies:** 1\
**Last updated:** [April 15, 2024, 4:16pm UTC](https://discourse.julialang.org/t/stackoverflowerror-for-large-set-of-jumps-in-jumpprocesses-jl-with-high-dimensional-set-of-odes/112969 "2024-04-15T16:16:41Z")

</div>

Hello, I have to simulate a large (n=1000) set of simple ODEs, and each ODE gets an independent realisation of Poisson input. When trying to set up the JumpProblem as in the documentation. However, when the number of …

---

## [ODEProblem(....) vs NeuralODE(....) for neural ODEs](https://discourse.julialang.org/t/odeproblem-vs-neuralode-for-neural-odes/112670)

<div class="topic-metadata">

**Author:** [@KianH](https://discourse.julialang.org/u/KianH)\
**Replies:** 14\
**Last updated:** [April 15, 2024, 2:16pm UTC](https://discourse.julialang.org/t/odeproblem-vs-neuralode-for-neural-odes/112670 "2024-04-15T14:16:22Z")

</div>

Hello! I am wondering about the difference when using ODEProblem(....) from DifferentialEquations.jl and NeuralODE(....) from DiffEqFlux.jl in terms of time performance. Consider the code below, thus, definining the …

---

## [Boxplot with NaN / missing / Inf in data?](https://discourse.julialang.org/t/boxplot-with-nan-missing-inf-in-data/112966)

<div class="topic-metadata">

**Author:** [@Sahil\_Khan](https://discourse.julialang.org/u/Sahil_Khan)\
**Replies:** 1\
**Last updated:** [April 15, 2024, 1:53pm UTC](https://discourse.julialang.org/t/boxplot-with-nan-missing-inf-in-data/112966 "2024-04-15T13:53:45Z")

</div>

Hello everyone, I’m struggling at the moment with boxplots. My data has several data points and many of them is NaN or Inf or missing. I was wondering if there is a way to just ignore these values without trying to edit…

---

## [Is Mocking discouraged? I would like to isolate testing](https://discourse.julialang.org/t/is-mocking-discouraged-i-would-like-to-isolate-testing/59549)

<div class="topic-metadata">

**Author:** [@s-kap](https://discourse.julialang.org/u/s-kap)\
**Replies:** 10\
**Last updated:** [April 15, 2024, 1:52pm UTC](https://discourse.julialang.org/t/is-mocking-discouraged-i-would-like-to-isolate-testing/59549 "2024-04-15T13:52:52Z")

</div>

EDIT: SimpleMock.jl allows mocking without needing macros in the live code, unlike Mocking.jl Let’s say I have 2 modules (e.g. below) and I want to test out ModuleB in an isolated way; i.e. without running the code in M…

---

## [Sundials KLU Linear solver](https://discourse.julialang.org/t/sundials-klu-linear-solver/112954)

<div class="topic-metadata">

**Author:** [@jespfra](https://discourse.julialang.org/u/jespfra)\
**Replies:** 1\
**Last updated:** [April 15, 2024, 10:55am UTC](https://discourse.julialang.org/t/sundials-klu-linear-solver/112954 "2024-04-15T10:55:33Z")

</div>

Hi everyone, I am trying to use the KLU method as linear solver for solving an ODE problem using Sundials. I have tried to apply it to the CVODE\_BDF solver for a simple problem, the rober equation. However, when I prov…

---

## [Oracle.jl with oracle wallet](https://discourse.julialang.org/t/oracle-jl-with-oracle-wallet/112956)

<div class="topic-metadata">

**Author:** [@usoh](https://discourse.julialang.org/u/usoh)\
**Replies:** 0\
**Last updated:** [April 15, 2024, 10:03am UTC](https://discourse.julialang.org/t/oracle-jl-with-oracle-wallet/112956 "2024-04-15T10:03:07Z")

</div>

How to connect to an oracle database without password using an oracle wallet ? here my lines with user and password: import Oracle username=“test” password=“test” svc = “MYDATABASE” conn = Oracle.Connection(usernam…

---

## [Does the normalize\_string() function still exist?](https://discourse.julialang.org/t/does-the-normalize-string-function-still-exist/112952)

<div class="topic-metadata">

**Author:** [@TimG](https://discourse.julialang.org/u/TimG)\
**Replies:** 2\
**Last updated:** [April 15, 2024, 9:14am UTC](https://discourse.julialang.org/t/does-the-normalize-string-function-still-exist/112952 "2024-04-15T09:14:33Z")

</div>

This function is referred to, for example, here. But julia\> normalize\_string("Hello World!", decompose=true, compat=true, casefold=true, stripmark=true, stripignore=true) ERROR: UndefVarError: \`normalize\_string\` not de…

---

## [How to \`add\` and \`using\` use the latest commit of a package that hasn't been released yet?](https://discourse.julialang.org/t/how-to-add-and-using-use-the-latest-commit-of-a-package-that-hasnt-been-released-yet/112947)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 7\
**Last updated:** [April 15, 2024, 9:02am UTC](https://discourse.julialang.org/t/how-to-add-and-using-use-the-latest-commit-of-a-package-that-hasnt-been-released-yet/112947 "2024-04-15T09:02:02Z")

</div>

For example, I am developing a new package named PkgB that has a registered package PkgA as one of its dependencies. PkgA has a new commit but it hasn’t been released yet. Now I want to add and using the latest committed…

---

## [How to save a lambdifyed (by SymEngine) expression to a file and load it in a new Session?](https://discourse.julialang.org/t/how-to-save-a-lambdifyed-by-symengine-expression-to-a-file-and-load-it-in-a-new-session/111165)

<div class="topic-metadata">

**Author:** [@Zaph](https://discourse.julialang.org/u/Zaph)\
**Replies:** 2\
**Last updated:** [April 15, 2024, 7:50am UTC](https://discourse.julialang.org/t/how-to-save-a-lambdifyed-by-symengine-expression-to-a-file-and-load-it-in-a-new-session/111165 "2024-04-15T07:50:26Z")

</div>

Hello, I posted this on Stackoverflow (https://stackoverflow.com/q/78087392/23508386) a few days ago but got ignored :c. So I decided to try my luck by copying it (inlcuding the Updates to the post I made on stack overfl…

---

## [Plot two legends (e.g. one for color and one for shape) with \`Plots.jl\`](https://discourse.julialang.org/t/plot-two-legends-e-g-one-for-color-and-one-for-shape-with-plots-jl/40746)

<div class="topic-metadata">

**Author:** [@Krastanov](https://discourse.julialang.org/u/Krastanov)\
**Replies:** 5\
**Last updated:** [April 15, 2024, 7:04am UTC](https://discourse.julialang.org/t/plot-two-legends-e-g-one-for-color-and-one-for-shape-with-plots-jl/40746 "2024-04-15T07:04:01Z")

</div>

How can I make a plot like this in Plots.jl (this was made with matplotlib): Basically four lines: plot( data1, color=c1, linestyle=s1) plot!(data2, color=c2, linestyle=s1) plot!(data3, color=c1, linestyle=s2) plot!(…

---

## [Using multiple in-place krylov solver from Krylov.jl](https://discourse.julialang.org/t/using-multiple-in-place-krylov-solver-from-krylov-jl/111028)

<div class="topic-metadata">

**Author:** [@erny123](https://discourse.julialang.org/u/erny123)\
**Replies:** 5\
**Last updated:** [April 15, 2024, 6:56am UTC](https://discourse.julialang.org/t/using-multiple-in-place-krylov-solver-from-krylov-jl/111028 "2024-04-15T06:56:22Z")

</div>

I’m trying to solve several linear equations that each change with each step of time. For example, I have a 100x300 grid that I need to solve for every time step. I’m trying to use the in-place solvers from Krylov.jl. …

---

## [Solving shifted linear system](https://discourse.julialang.org/t/solving-shifted-linear-system/111265)

<div class="topic-metadata">

**Author:** [@rvaradhan](https://discourse.julialang.org/u/rvaradhan)\
**Replies:** 19\
**Last updated:** [April 15, 2024, 5:52am UTC](https://discourse.julialang.org/t/solving-shifted-linear-system/111265 "2024-04-15T05:52:22Z")

</div>

I would like to solve a large shifted linear system: I have to solve (A + k^2 I)x = y, where A is symmetric PD, y is a vector, k is a scalar, and I is identity matrix. Matrix A is large O(10000 x 10000) but it is banded…

---

## [Batched LU solves (or Factorizations) with Sparse Matrices](https://discourse.julialang.org/t/batched-lu-solves-or-factorizations-with-sparse-matrices/106019)

<div class="topic-metadata">

**Author:** [@schev](https://discourse.julialang.org/u/schev)\
**Replies:** 6\
**Last updated:** [April 15, 2024, 5:37am UTC](https://discourse.julialang.org/t/batched-lu-solves-or-factorizations-with-sparse-matrices/106019 "2024-04-15T05:37:51Z")

</div>

Let’s say I have a sparse set of matrices A1, A2, ... An, each of type CuSparseMatrixCSC{Float32, Int32} along with associated RHS vectors b1, b2, ... bn. Is there some watch to do a batch LU solve on the GPU with CUDA.j…

---

## [To confirm: All dependencies of a Julia package should be \`add\`-ed before \`using\`, right?](https://discourse.julialang.org/t/to-confirm-all-dependencies-of-a-julia-package-should-be-add-ed-before-using-right/112945)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 2\
**Last updated:** [April 15, 2024, 4:53am UTC](https://discourse.julialang.org/t/to-confirm-all-dependencies-of-a-julia-package-should-be-add-ed-before-using-right/112945 "2024-04-15T04:53:37Z")

</div>

During the development of a Julia package, all its dependencies need to be add-ed before using it in the package module, even if it is part of the Julia standard library, right? Thanks in advance!

---

## [Async Task Not Killed When Using Base.throwto to Interrupt Blocking I/O](https://discourse.julialang.org/t/async-task-not-killed-when-using-base-throwto-to-interrupt-blocking-i-o/112531)

<div class="topic-metadata">

**Author:** [@dmgcodevil](https://discourse.julialang.org/u/dmgcodevil)\
**Replies:** 2\
**Last updated:** [April 15, 2024, 1:43am UTC](https://discourse.julialang.org/t/async-task-not-killed-when-using-base-throwto-to-interrupt-blocking-i-o/112531 "2024-04-15T01:43:53Z")

</div>

I have a helper function heartbeat in Julia that is responsible for pinging a remote process. Originally, it used @fetchfrom id myid() to perform this action. However, I encountered an issue where if a worker disconnects…

---

## [How to reduce a (reshaped) sparse matrix to a max or sum with acceptable speed?](https://discourse.julialang.org/t/how-to-reduce-a-reshaped-sparse-matrix-to-a-max-or-sum-with-acceptable-speed/112888)

<div class="topic-metadata">

**Author:** [@oscarvdvelde](https://discourse.julialang.org/u/oscarvdvelde)\
**Replies:** 14\
**Last updated:** [April 15, 2024, 1:21am UTC](https://discourse.julialang.org/t/how-to-reduce-a-reshaped-sparse-matrix-to-a-max-or-sum-with-acceptable-speed/112888 "2024-04-15T01:21:40Z")

</div>

I generated a 3240000×1460 SparseMatrixCSC{UInt8, Int64} with 518339 stored entries, hereafter called activitygrid. It holds a spatial 3D grid (dims: 300,300,36) every 30 seconds of a 12 hour period. It was very fast to …

---

## [Updating CUDA seems to have completely broken the package](https://discourse.julialang.org/t/updating-cuda-seems-to-have-completely-broken-the-package/110101)

<div class="topic-metadata">

**Author:** [@Hareruya](https://discourse.julialang.org/u/Hareruya)\
**Replies:** 3\
**Last updated:** [April 14, 2024, 11:36pm UTC](https://discourse.julialang.org/t/updating-cuda-seems-to-have-completely-broken-the-package/110101 "2024-04-14T23:36:36Z")

</div>

Salutations, I am currently a PhD student and defended my thesis last month. Most of my Master’s research and all of my PhD research were developed using julia. I decided to update julia and run my old code at which poi…

---

## [Looking for work](https://discourse.julialang.org/t/looking-for-work/112939)

<div class="topic-metadata">

**Author:** [@cpfiffer](https://discourse.julialang.org/u/cpfiffer)\
**Replies:** 1\
**Last updated:** [April 14, 2024, 11:36pm UTC](https://discourse.julialang.org/t/looking-for-work/112939 "2024-04-14T23:36:33Z")

</div>

Hey y’all, my postdoc at Stanford is coming to a close in the next few months, and I’m looking to find a place where I can keep using Julia, especially a place looking for a Cameron. I’m mostly on the data/ML engineerin…

---

## [How to efficiently create a struct to store parametric structs in tuples](https://discourse.julialang.org/t/how-to-efficiently-create-a-struct-to-store-parametric-structs-in-tuples/112931)

<div class="topic-metadata">

**Author:** [@walexaindre](https://discourse.julialang.org/u/walexaindre)\
**Replies:** 2\
**Last updated:** [April 14, 2024, 10:18pm UTC](https://discourse.julialang.org/t/how-to-efficiently-create-a-struct-to-store-parametric-structs-in-tuples/112931 "2024-04-14T22:18:28Z")

</div>

Hi!, I’m working with a PDE and I want suggestions on how properly store components inside a struct with no type instabilities considering that components are parametric structs too. For a MWE imagine something minimal …

---

## [Grouping by values in either of two columns](https://discourse.julialang.org/t/grouping-by-values-in-either-of-two-columns/112499)

<div class="topic-metadata">

**Author:** [@KeepLearning](https://discourse.julialang.org/u/KeepLearning)\
**Replies:** 13\
**Last updated:** [April 14, 2024, 8:47am UTC](https://discourse.julialang.org/t/grouping-by-values-in-either-of-two-columns/112499 "2024-04-14T08:47:12Z")

</div>

Hi, I wonder if there is an efficient way of doing the following in Julia DataFrames. Given a DataFrame df = DataFrame(col1 = \["a", "a", "b", "b", "c", "d"\], col2 = \["p", "q", "q", "r", "s", "t"\]) I wa…

---

## [Why Julia compilation times are so long in case of functions created using Symbolics?](https://discourse.julialang.org/t/why-julia-compilation-times-are-so-long-in-case-of-functions-created-using-symbolics/112860)

<div class="topic-metadata">

**Author:** [@CaG21](https://discourse.julialang.org/u/CaG21)\
**Replies:** 16\
**Last updated:** [April 14, 2024, 8:17pm UTC](https://discourse.julialang.org/t/why-julia-compilation-times-are-so-long-in-case-of-functions-created-using-symbolics/112860 "2024-04-14T20:17:05Z")

</div>

I am relatively new in Julia, so maybe I am missing something trivial. I created a file containing a function, using the Symbolics package \_, f = build\_function(F, x) write("function.jl", string(f)) myf = include("func…

---

## [Optimization with LBFGS gives DimensionMismatch("dimensions must match")](https://discourse.julialang.org/t/optimization-with-lbfgs-gives-dimensionmismatch-dimensions-must-match/22167)

<div class="topic-metadata">

**Author:** [@mzhenirovskyy](https://discourse.julialang.org/u/mzhenirovskyy)\
**Replies:** 9\
**Last updated:** [April 14, 2024, 7:39pm UTC](https://discourse.julialang.org/t/optimization-with-lbfgs-gives-dimensionmismatch-dimensions-must-match/22167 "2024-04-14T19:39:36Z")

</div>

My objective function has to solve an ODE. When I use the gradient-free algorithm (e.g NelderMead) to do optimization, everything is OK. But with gradient-based (e.g. LBFGS) I get the error: DimensionMismatch(“dimension…

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

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