# General Usage

**URL:** https://discourse.julialang.org/c/usage/6.md?page=82

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

**Page:** 83

---

## [Build documentation with graphics locally or on github](https://discourse.julialang.org/t/build-documentation-with-graphics-locally-or-on-github/126509)

<div class="topic-metadata">

**Author:** [@brianguenter](https://discourse.julialang.org/u/brianguenter)\
**Replies:** 1\
**Last updated:** [March 3, 2025, 8:58pm UTC](https://discourse.julialang.org/t/build-documentation-with-graphics-locally-or-on-github/126509 "2025-03-03T20:58:34Z")

</div>

One of my packages renders graphics into the documentation using @example. This works flawlessly on my local machine but causes errors during CI on github. Because the github servers are headless I need to load software…

---

## [\`mergewith\` but for \`NamedTuple\`?](https://discourse.julialang.org/t/mergewith-but-for-namedtuple/126507)

<div class="topic-metadata">

**Author:** [@jling](https://discourse.julialang.org/u/jling)\
**Replies:** 1\
**Last updated:** [March 3, 2025, 5:59pm UTC](https://discourse.julialang.org/t/mergewith-but-for-namedtuple/126507 "2025-03-03T17:59:32Z")

</div>

julia\> a = (;x=3); b = (; x=4); julia\> a .+ b ERROR: ArgumentError: broadcasting over dictionaries and \`NamedTuple\`s is reserved Stacktrace: \[1\] broadcastable(::@NamedTuple{x::Int64}) @ Base.Broadcast ./broadcast.jl…

---

## [Can't find the method for conv(x, w, dims) in NNLib.jl src](https://discourse.julialang.org/t/cant-find-the-method-for-conv-x-w-dims-in-nnlib-jl-src/126480)

<div class="topic-metadata">

**Author:** [@lewis](https://discourse.julialang.org/u/lewis)\
**Replies:** 7\
**Last updated:** [March 3, 2025, 5:49pm UTC](https://discourse.julialang.org/t/cant-find-the-method-for-conv-x-w-dims-in-nnlib-jl-src/126480 "2025-03-03T17:49:40Z")

</div>

I have done searches on the repo and looked through all of conv.jl within NNLib.jl. I can only find a method that takes 2 positional arguments and the rest named arguments. If you except the defaults for all of the nam…

---

## [PlotlyJS backend via Plots.jl very slow with images](https://discourse.julialang.org/t/plotlyjs-backend-via-plots-jl-very-slow-with-images/126506)

<div class="topic-metadata">

**Author:** [@alex180500](https://discourse.julialang.org/u/alex180500)\
**Replies:** 0\
**Last updated:** [March 3, 2025, 5:26pm UTC](https://discourse.julialang.org/t/plotlyjs-backend-via-plots-jl-very-slow-with-images/126506 "2025-03-03T17:26:39Z")

</div>

I was trying to do a plot with a basic image raster as a background when I stumbled into an issue, plotlyJS is painfully slow when using raster images, making it very hard to work with. Minimal example: using FileIO: l…

---

## [How to define \`:(==)\` on user-defined types for \`Set\` operations](https://discourse.julialang.org/t/how-to-define-on-user-defined-types-for-set-operations/126391)

<div class="topic-metadata">

**Author:** [@drbergman](https://discourse.julialang.org/u/drbergman)\
**Replies:** 2\
**Last updated:** [March 3, 2025, 3:51pm UTC](https://discourse.julialang.org/t/how-to-define-on-user-defined-types-for-set-operations/126391 "2025-03-03T15:51:34Z")

</div>

I want to create a Set{MyType} object, but use a custom Base.:(==) to compare instances of MyType. It seems that the dispatch of in is not making use of Base.:(==) (or Base.isequal for that matter) despite what the docum…

---

## [Sorting in-place several Vector's simultaneously](https://discourse.julialang.org/t/sorting-in-place-several-vectors-simultaneously/125665)

<div class="topic-metadata">

**Author:** [@Leo\_I](https://discourse.julialang.org/u/Leo_I)\
**Replies:** 21\
**Last updated:** [March 3, 2025, 1:26pm UTC](https://discourse.julialang.org/t/sorting-in-place-several-vectors-simultaneously/125665 "2025-03-03T13:26:53Z")

</div>

I have several vectors (with different types of elements and lengths) whose entries I wish to sort in-place according to some function, like first or identity (lexicographical sort). For example: n=10^7; x=rand(1:n,n);…

---

## [Using parametric types for Complex{T}](https://discourse.julialang.org/t/using-parametric-types-for-complex-t/126489)

<div class="topic-metadata">

**Author:** [@Miroboru](https://discourse.julialang.org/u/Miroboru)\
**Replies:** 5\
**Last updated:** [March 3, 2025, 12:10pm UTC](https://discourse.julialang.org/t/using-parametric-types-for-complex-t/126489 "2025-03-03T12:10:20Z")

</div>

I am writing some signal processing code, and I want to be able to call it for both real and complex signals, based on either Float32 or Float64. I make no use of the real and imaginary parts of the signals (the function…

---

## [DifferentialEquations.jl: Exception thrown in callback of solve command that is handled by a try-catch block inside another solve command causes the outer solve command to fail](https://discourse.julialang.org/t/differentialequations-jl-exception-thrown-in-callback-of-solve-command-that-is-handled-by-a-try-catch-block-inside-another-solve-command-causes-the-outer-solve-command-to-fail/126466)

<div class="topic-metadata">

**Author:** [@novalex98](https://discourse.julialang.org/u/novalex98)\
**Replies:** 8\
**Last updated:** [March 3, 2025, 6:26am UTC](https://discourse.julialang.org/t/differentialequations-jl-exception-thrown-in-callback-of-solve-command-that-is-handled-by-a-try-catch-block-inside-another-solve-command-causes-the-outer-solve-command-to-fail/126466 "2025-03-03T06:26:39Z")

</div>

I observed this with the latest version of julia, Running on a Windows 11 PC. tl dr: I have an exception being thrown in a callback for a solve command that’s inside another solve command. I have a try-catch block to ha…

---

## [Profiling code reveals that most time is used calling 3 functions in task.jl](https://discourse.julialang.org/t/profiling-code-reveals-that-most-time-is-used-calling-3-functions-in-task-jl/30751)

<div class="topic-metadata">

**Author:** [@gobs](https://discourse.julialang.org/u/gobs)\
**Replies:** 24\
**Last updated:** [March 3, 2025, 1:50am UTC](https://discourse.julialang.org/t/profiling-code-reveals-that-most-time-is-used-calling-3-functions-in-task-jl/30751 "2025-03-03T01:50:37Z")

</div>

I profiled my call to a function and got the following plot: Those first 3 long horizontal lines are calls to task\_done\_hook, then wait, then poptaskref (in ascending order). This happens even for the 2nd or 3rd call…

---

## [Use break or continue statement with pmap](https://discourse.julialang.org/t/use-break-or-continue-statement-with-pmap/126425)

<div class="topic-metadata">

**Author:** [@Thomas\_Van\_Giel](https://discourse.julialang.org/u/Thomas_Van_Giel)\
**Replies:** 5\
**Last updated:** [March 2, 2025, 11:20pm UTC](https://discourse.julialang.org/t/use-break-or-continue-statement-with-pmap/126425 "2025-03-02T23:20:29Z")

</div>

Is there any alternative to continue or break when using a pmap from the distributed package? If I try the following minimal example: using Distributed as = \[i for i in 0:0.1:10\] status = pmap(as) do a if a \< 1 …

---

## [Intermittent JLD2 Save Error on HPC](https://discourse.julialang.org/t/intermittent-jld2-save-error-on-hpc/126401)

<div class="topic-metadata">

**Author:** [@Gattu\_Mytraya](https://discourse.julialang.org/u/Gattu_Mytraya)\
**Replies:** 5\
**Last updated:** [March 2, 2025, 3:30pm UTC](https://discourse.julialang.org/t/intermittent-jld2-save-error-on-hpc/126401 "2025-03-02T15:30:01Z")

</div>

Hi, I routinely use JLD2 to save the results of simulations to the disk on my university’s HPC. However, about 1 in 100 times, I get the following error: ERROR: LoadError: IOError: stat("/storage/home/mvg6042/scratch/q…

---

## [Updating to latest release using \`juliaup\`](https://discourse.julialang.org/t/updating-to-latest-release-using-juliaup/113718)

<div class="topic-metadata">

**Author:** [@Devansh1106](https://discourse.julialang.org/u/Devansh1106)\
**Replies:** 3\
**Last updated:** [March 2, 2025, 5:52am UTC](https://discourse.julialang.org/t/updating-to-latest-release-using-juliaup/113718 "2025-03-02T05:52:21Z")

</div>

I am updating julia to latest release in WSL but it seems to have some error while updating. I am using juliaup update command. Following is the error message: devansh@MSI:~$ juliaup update Installing Julia 1.10.3+0.x64…

---

## [In-place mapslices?](https://discourse.julialang.org/t/in-place-mapslices/126415)

<div class="topic-metadata">

**Author:** [@ryofurue](https://discourse.julialang.org/u/ryofurue)\
**Replies:** 5\
**Last updated:** [March 1, 2025, 4:46pm UTC](https://discourse.julialang.org/t/in-place-mapslices/126415 "2025-03-01T16:46:43Z")

</div>

I want to apply a function that operates on a vector, to each column of a matrix. So, I use mapslices(). But, how to modify the matrix in-place? The following is a failed attempt: function f!(xs) a = xs\[1\] @. xs = …

---

## [Recommended way to introspect a Union type?](https://discourse.julialang.org/t/recommended-way-to-introspect-a-union-type/126380)

<div class="topic-metadata">

**Author:** [@jw3126](https://discourse.julialang.org/u/jw3126)\
**Replies:** 2\
**Last updated:** [March 1, 2025, 4:23pm UTC](https://discourse.julialang.org/t/recommended-way-to-introspect-a-union-type/126380 "2025-03-01T16:23:20Z")

</div>

I want to introspect a union type. More concretely I want a function that takes a type T of the form T = Union{X,Y} and returns Set((X,Y)). I can do this like X = T.a and Y = T.b. But that feels like internals. Is the…

---

## [How to document a struct with two constructors?](https://discourse.julialang.org/t/how-to-document-a-struct-with-two-constructors/126453)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 1\
**Last updated:** [March 1, 2025, 3:04pm UTC](https://discourse.julialang.org/t/how-to-document-a-struct-with-two-constructors/126453 "2025-03-01T15:04:05Z")

</div>

using Parameters, StaticArrays const MVec3 = MVector{3, Float64} """ Section Represents a wing section with leading edge, trailing edge, and aerodynamic properties. # Fields - \`LE\_point::MVec3\` = zeros(MVec3):…

---

## [No method error (reshape) when solving ODE with ComponentArrays.jl](https://discourse.julialang.org/t/no-method-error-reshape-when-solving-ode-with-componentarrays-jl/126342)

<div class="topic-metadata">

**Author:** [@Wen-Wei\_Tseng](https://discourse.julialang.org/u/Wen-Wei_Tseng)\
**Replies:** 1\
**Last updated:** [March 1, 2025, 2:44pm UTC](https://discourse.julialang.org/t/no-method-error-reshape-when-solving-ode-with-componentarrays-jl/126342 "2025-03-01T14:44:56Z")

</div>

Hi, I was using ComponentArrays.jl to solve the ODE problem in the README and got an error. using ComponentArrays using OrdinaryDiffEq using SimpleUnPack: @unpack tspan = (0.0, 20.0) function lorenz!(D, u, p, t; f=0.0…

---

## [Linear system solution not working in CUDA](https://discourse.julialang.org/t/linear-system-solution-not-working-in-cuda/126398)

<div class="topic-metadata">

**Author:** [@eveningsilverfox](https://discourse.julialang.org/u/eveningsilverfox)\
**Replies:** 4\
**Last updated:** [March 1, 2025, 11:51am UTC](https://discourse.julialang.org/t/linear-system-solution-not-working-in-cuda/126398 "2025-03-01T11:51:39Z")

</div>

I am trying to do a linear solve using LU decomposition and ldiv! on my GPU. However, the results from the GPU do not match those from the CPU. Any ideas where I am going wrong? EDIT: I tried using the simple backslash …

---

## [Problems creating App with PackageCompiler.jl](https://discourse.julialang.org/t/problems-creating-app-with-packagecompiler-jl/126181)

<div class="topic-metadata">

**Author:** [@Alex\_73](https://discourse.julialang.org/u/Alex_73)\
**Replies:** 5\
**Last updated:** [March 1, 2025, 10:27am UTC](https://discourse.julialang.org/t/problems-creating-app-with-packagecompiler-jl/126181 "2025-03-01T10:27:57Z")

</div>

\*\* environment: linux with Version 1.11.3 (2025-01-21) of julia and the latest version of PackageCompiler.jl I started studying the PackageCompiler.jl documentation and tried to reproduce the example sample. More preci…

---

## [Vscode + Julia :: Error while communicating with the LS. check](https://discourse.julialang.org/t/vscode-julia-error-while-communicating-with-the-ls-check/121441)

<div class="topic-metadata">

**Author:** [@lionisxn](https://discourse.julialang.org/u/lionisxn)\
**Replies:** 4\
**Last updated:** [March 1, 2025, 5:02am UTC](https://discourse.julialang.org/t/vscode-julia-error-while-communicating-with-the-ls-check/121441 "2025-03-01T05:02:11Z")

</div>

The shortcut of "shift + enter " doesn’t work in my vscode (1.94.2) with the julia extension (v1.124.2 ), an error prompts like this Any idea on how to solve it?

---

## [Manually Trigger Mark Phase of GC](https://discourse.julialang.org/t/manually-trigger-mark-phase-of-gc/126429)

<div class="topic-metadata">

**Author:** [@ejmeitz](https://discourse.julialang.org/u/ejmeitz)\
**Replies:** 7\
**Last updated:** [March 1, 2025, 2:47am UTC](https://discourse.julialang.org/t/manually-trigger-mark-phase-of-gc/126429 "2025-03-01T02:47:35Z")

</div>

Hello, I was wondering if there is a way to manually trigger the mark phase of the garbage collector to manually call finalizers on objects which are marked as unreachable? I have lots of foreign objects owned by C++ a…

---

## [Practical Grassmann.jl examples?](https://discourse.julialang.org/t/practical-grassmann-jl-examples/126439)

<div class="topic-metadata">

**Author:** [@jada](https://discourse.julialang.org/u/jada)\
**Replies:** 1\
**Last updated:** [March 1, 2025, 12:54am UTC](https://discourse.julialang.org/t/practical-grassmann-jl-examples/126439 "2025-03-01T00:54:33Z")

</div>

I am looking for examples how to work with forms, e.g. how to evaluate a form on a vector field, pull back a form, do external derivatives and so on. I already failed at replicating the tutorial linked below, which give…

---

## [Bitwarden Password Manager and Secrets Manager](https://discourse.julialang.org/t/bitwarden-password-manager-and-secrets-manager/126205)

<div class="topic-metadata">

**Author:** [@scelles](https://discourse.julialang.org/u/scelles)\
**Replies:** 8\
**Last updated:** [February 28, 2025, 4:34pm UTC](https://discourse.julialang.org/t/bitwarden-password-manager-and-secrets-manager/126205 "2025-02-28T16:34:48Z")

</div>

Hello, I’m using Bitwarden Password Manager as password manager. I’m looking for a Julia client to retrieve API keys stored in Bitwarden Secret Manager. (Instead of string into flat .env file or any other solution lik…

---

## [Help needed with Documentation](https://discourse.julialang.org/t/help-needed-with-documentation/126417)

<div class="topic-metadata">

**Author:** [@TimG](https://discourse.julialang.org/u/TimG)\
**Replies:** 2\
**Last updated:** [February 28, 2025, 1:55pm UTC](https://discourse.julialang.org/t/help-needed-with-documentation/126417 "2025-02-28T13:55:40Z")

</div>

I’ve made a significant PR to XLSX.jl. It passes all tests except for the test for documentation. I’ve never done formal documentation before, and I don’t really understand what is going on. I’ve tried reading the help…

---

## [Question about singular matrix inversion](https://discourse.julialang.org/t/question-about-singular-matrix-inversion/126403)

<div class="topic-metadata">

**Author:** [@fdekerme](https://discourse.julialang.org/u/fdekerme)\
**Replies:** 2\
**Last updated:** [February 28, 2025, 12:59pm UTC](https://discourse.julialang.org/t/question-about-singular-matrix-inversion/126403 "2025-02-28T12:59:10Z")

</div>

Hello :grinning:, I was wondering why inversion works (when it shouldn’t) with floats, but returns an error with integers? Is it a rounding issue? julia\> inv(\[0.23 0.23; 0.3 0.3\]) 2×2 Matrix{Float64}: -3.3777e17 2.5…

---

## [MCMCTempering public consumption? (2024)](https://discourse.julialang.org/t/mcmctempering-public-consumption-2024/122600)

<div class="topic-metadata">

**Author:** [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Replies:** 1\
**Last updated:** [February 28, 2025, 1:40am UTC](https://discourse.julialang.org/t/mcmctempering-public-consumption-2024/122600 "2025-02-28T01:40:39Z")

</div>

What’s the situation with MCMCTempering.jl? I see 10 months back or so there was some discussion of reviving it, Hamiltonian Monte Carlo gets stuck at tiny local maxima - #14 by torfjelde I’ve tried the following simpl…

---

## [Registering functions with several arguments in Symbolics](https://discourse.julialang.org/t/registering-functions-with-several-arguments-in-symbolics/96359)

<div class="topic-metadata">

**Author:** [@PABLO\_ESTEBAN\_MONTES](https://discourse.julialang.org/u/PABLO_ESTEBAN_MONTES)\
**Replies:** 4\
**Last updated:** [February 27, 2025, 10:34pm UTC](https://discourse.julialang.org/t/registering-functions-with-several-arguments-in-symbolics/96359 "2025-02-27T22:34:13Z")

</div>

Hello I have an issue of scalability with registering functions in Julia. I need to register a function of several variables in order to be able to define derivatives of that function, so that Symbolics can stop tracing…

---

## [Understanding AbstractFloat Arrays](https://discourse.julialang.org/t/understanding-abstractfloat-arrays/126374)

<div class="topic-metadata">

**Author:** [@Luis\_Alberto\_R](https://discourse.julialang.org/u/Luis_Alberto_R)\
**Replies:** 6\
**Last updated:** [February 27, 2025, 9:48pm UTC](https://discourse.julialang.org/t/understanding-abstractfloat-arrays/126374 "2025-02-27T21:48:24Z")

</div>

I’m having a hard time understanding the size (in bytes) of Arrays with AbstractFloat types because of the following: julia\> ar1 = Array{AbstractFloat,3}(rand(50,50,50)); julia\> ar2 = Array{Float64,3}(rand(50,50,50)); …

---

## [Anonymous module usage break precompilation](https://discourse.julialang.org/t/anonymous-module-usage-break-precompilation/126368)

<div class="topic-metadata">

**Author:** [@orebas](https://discourse.julialang.org/u/orebas)\
**Replies:** 3\
**Last updated:** [February 27, 2025, 7:55am UTC](https://discourse.julialang.org/t/anonymous-module-usage-break-precompilation/126368 "2025-02-27T07:55:41Z")

</div>

So, it’s a bit complicated to explain the set up here, but it’s rare (and refreshing!) to get an error that pulls no punches and says “don’t do this”: ERROR: LoadError: Evaluation into the closed module \`anonymous\` brea…

---

## [Working with private packages via SSH in vscode on Windows 11](https://discourse.julialang.org/t/working-with-private-packages-via-ssh-in-vscode-on-windows-11/126382)

<div class="topic-metadata">

**Author:** [@sairus7](https://discourse.julialang.org/u/sairus7)\
**Replies:** 3\
**Last updated:** [February 27, 2025, 5:02pm UTC](https://discourse.julialang.org/t/working-with-private-packages-via-ssh-in-vscode-on-windows-11/126382 "2025-02-27T17:02:07Z")

</div>

On a fresh Windows 11 machine I’m trying to add private package (or private registry) via SSH and found that vscode terminal works differently from external Julia terminal. I followed instructions from LocalRegistry.jl…

---

## [Minimal Julia: What do you want in Julia, or not?](https://discourse.julialang.org/t/minimal-julia-what-do-you-want-in-julia-or-not/113569)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 37\
**Last updated:** [February 27, 2025, 4:52pm UTC](https://discourse.julialang.org/t/minimal-julia-what-do-you-want-in-julia-or-not/113569 "2025-02-27T16:52:34Z")

</div>

We could have radically smaller Julia; at least 177 MB smaller (even more so with UPX compression), e.g. compiled Julia binary executables, if we want to, by a) dropping stuff and b) compressing the rest more. A lot of w…

[Previous page](https://discourse.julialang.org/c/usage/6.md?page=81)

[Next page](https://discourse.julialang.org/c/usage/6.md?page=83)
