# General Usage

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

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

**Page:** 40

---

## [Makie Axis doesn't work in Pluto.jl but Axis3 does](https://discourse.julialang.org/t/makie-axis-doesnt-work-in-pluto-jl-but-axis3-does/124221)

<div class="topic-metadata">

**Author:** [@AwesomeQuest](https://discourse.julialang.org/u/AwesomeQuest)\
**Replies:** 3\
**Last updated:** [September 23, 2025, 11:32am UTC](https://discourse.julialang.org/t/makie-axis-doesnt-work-in-pluto-jl-but-axis3-does/124221 "2025-09-23T11:32:13Z")

</div>

When I start a Pluto notebook with the following setup Cell 1 using WGLMakie, Bonito Cell 2 Page() Cell 3 scatter(1:10) Cell 4 scatter(1:10,1:10,1:10) Cell 3 displays a 2D Axis that does not react to the mouse, …

---

## [Function like expand.grid in R](https://discourse.julialang.org/t/function-like-expand-grid-in-r/4350)

<div class="topic-metadata">

**Author:** [@dmbates](https://discourse.julialang.org/u/dmbates)\
**Replies:** 27\
**Last updated:** [September 23, 2025, 7:56am UTC](https://discourse.julialang.org/t/function-like-expand-grid-in-r/4350 "2025-09-23T07:56:57Z")

</div>

I need a function similar to expand.grid in R, which takes a set of vectors and returns their Cartesian product. Is there existing art? My first cut is function expandgrid(vecs) expd = \[\] # vector of expanded ve…

---

## [\`map\` should be more consistent](https://discourse.julialang.org/t/map-should-be-more-consistent/132559)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 7\
**Last updated:** [September 23, 2025, 1:31am UTC](https://discourse.julialang.org/t/map-should-be-more-consistent/132559 "2025-09-23T01:31:32Z")

</div>

Dear all, I wonder if it is proper to amend this behavior? julia\> map(\_ -\> 0, 0) 0 julia\> struct Nvmber end julia\> Base.ndims(::Nvmber) = 0 julia\> Base.length(::Nvmber) = 1 julia\> Base.iterate(f::Nvmber) = (f, miss…

---

## [How to optimize for processing over array of heterogeneous information?](https://discourse.julialang.org/t/how-to-optimize-for-processing-over-array-of-heterogeneous-information/132541)

<div class="topic-metadata">

**Author:** [@mj2984](https://discourse.julialang.org/u/mj2984)\
**Replies:** 7\
**Last updated:** [September 22, 2025, 9:35pm UTC](https://discourse.julialang.org/t/how-to-optimize-for-processing-over-array-of-heterogeneous-information/132541 "2025-09-22T21:35:02Z")

</div>

Consider a simple example where I perform something inside an array A based on some co-ordinate information (abstract type CoOrdinateInfo). I have two possible cases. Regular view of an array, with all elements that h…

---

## [Enable debug logging for one file or one function in a module](https://discourse.julialang.org/t/enable-debug-logging-for-one-file-or-one-function-in-a-module/132423)

<div class="topic-metadata">

**Author:** [@Ken\_Williams](https://discourse.julialang.org/u/Ken_Williams)\
**Replies:** 6\
**Last updated:** [September 22, 2025, 3:33pm UTC](https://discourse.julialang.org/t/enable-debug-logging-for-one-file-or-one-function-in-a-module/132423 "2025-09-22T15:33:09Z")

</div>

Is it possible to enable @debug messages selectively, for a specific file or function within a module? I see in the docs that Message filtering can be influenced through the JULIA\_DEBUG environment variable, and serve…

---

## [How to generate zero dependency CLI using Comonicon.jl](https://discourse.julialang.org/t/how-to-generate-zero-dependency-cli-using-comonicon-jl/132571)

<div class="topic-metadata">

**Author:** [@favba](https://discourse.julialang.org/u/favba)\
**Replies:** 0\
**Last updated:** [September 22, 2025, 2:53pm UTC](https://discourse.julialang.org/t/how-to-generate-zero-dependency-cli-using-comonicon-jl/132571 "2025-09-22T14:53:25Z")

</div>

In Comonicon.jl 's README it is said it is possible to generate CLI without adding Comonicon as dependency: Zero Dependency You can get rid of Comonicon entirely after you generate the command line parsing script via w…

---

## [Type stability of taylor() from Symbolics.jl](https://discourse.julialang.org/t/type-stability-of-taylor-from-symbolics-jl/132561)

<div class="topic-metadata">

**Author:** [@Lulu\_ser](https://discourse.julialang.org/u/Lulu_ser)\
**Replies:** 0\
**Last updated:** [September 22, 2025, 11:45am UTC](https://discourse.julialang.org/t/type-stability-of-taylor-from-symbolics-jl/132561 "2025-09-22T11:45:07Z")

</div>

How do you make sure the function taylor() from Symbolics.jl is type stable ? I want to use bigint for large order asymptotic expansion not to overflow the classic int64 (order=17 of the following function already over…

---

## [Task local storage and scoped values: What they are used for](https://discourse.julialang.org/t/task-local-storage-and-scoped-values-what-they-are-used-for/132045)

<div class="topic-metadata">

**Author:** [@jakobnissen](https://discourse.julialang.org/u/jakobnissen)\
**Replies:** 12\
**Last updated:** [September 22, 2025, 7:46am UTC](https://discourse.julialang.org/t/task-local-storage-and-scoped-values-what-they-are-used-for/132045 "2025-09-22T07:46:55Z")

</div>

A recent Slack thread discussed what the purpose of task local storage (TLS) and scoped values was. Since these features of Julia are a little obscure, @Krastanov suggested I post them to Discourse for posterity. @vchur…

---

## [Having a julia package inside a monorepo called from python](https://discourse.julialang.org/t/having-a-julia-package-inside-a-monorepo-called-from-python/132549)

<div class="topic-metadata">

**Author:** [@oxinabox](https://discourse.julialang.org/u/oxinabox)\
**Replies:** 1\
**Last updated:** [September 22, 2025, 3:26am UTC](https://discourse.julialang.org/t/having-a-julia-package-inside-a-monorepo-called-from-python/132549 "2025-09-22T03:26:55Z")

</div>

so I have a largish python code base in a nice mono-repo. (Its also got some typescript in there). I want to move some of our core logic to julia for performanced. So I thought I would make a (local, unregistered) jul…

---

## [Apple M4 Max AMX Linear Algebra performance versus CPU and GPU](https://discourse.julialang.org/t/apple-m4-max-amx-linear-algebra-performance-versus-cpu-and-gpu/132537)

<div class="topic-metadata">

**Author:** [@PetarM](https://discourse.julialang.org/u/PetarM)\
**Replies:** 2\
**Last updated:** [September 22, 2025, 12:17am UTC](https://discourse.julialang.org/t/apple-m4-max-amx-linear-algebra-performance-versus-cpu-and-gpu/132537 "2025-09-22T00:17:46Z")

</div>

Hello everybody! I made a video investigation of Apple’s AMX accelerator Linear Algebra performance in Julia: https://www.youtube.com/watch?v=TjfA9LVgHXk According to my findings, the 2 AMX cores achieve almost 3 times…

---

## [Capturing warnings inside generated functions](https://discourse.julialang.org/t/capturing-warnings-inside-generated-functions/132535)

<div class="topic-metadata">

**Author:** [@giordano](https://discourse.julialang.org/u/giordano)\
**Replies:** 3\
**Last updated:** [September 21, 2025, 12:50pm UTC](https://discourse.julialang.org/t/capturing-warnings-inside-generated-functions/132535 "2025-09-21T12:50:53Z")

</div>

Is there a way to capture logging messages (e.g. warnings) issued during compilation, for example from inside a generated function? For example julia\> using Logging julia\> @generated foo() = @warn "this warning is emi…

---

## [Julia current recommendations for daemon/cron](https://discourse.julialang.org/t/julia-current-recommendations-for-daemon-cron/132522)

<div class="topic-metadata">

**Author:** [@hadrien.theveneau](https://discourse.julialang.org/u/hadrien.theveneau)\
**Replies:** 5\
**Last updated:** [September 21, 2025, 10:40am UTC](https://discourse.julialang.org/t/julia-current-recommendations-for-daemon-cron/132522 "2025-09-21T10:40:15Z")

</div>

Hi everyone, I would like to use Julia to write some system script which will be run by cron/systemd or something similar. Which is the best way to install Julia for this usage ? The usual “user way” is convenient for u…

---

## [Multi-threaded Array building](https://discourse.julialang.org/t/multi-threaded-array-building/132463)

<div class="topic-metadata">

**Author:** [@FerreolS](https://discourse.julialang.org/u/FerreolS)\
**Replies:** 22\
**Last updated:** [September 20, 2025, 6:03pm UTC](https://discourse.julialang.org/t/multi-threaded-array-building/132463 "2025-09-20T18:03:52Z")

</div>

Dear all, I have a code of this kind to build an array: N= 2000 A = zeros(Float64,N,N) B # some long (\>\>10\_000) vector of custom struct for idx in arrayofindex #\> lots (\>\>10\_000) of elements i,j,v = processing(B\[…

---

## [How to change the default RNG for a given script?](https://discourse.julialang.org/t/how-to-change-the-default-rng-for-a-given-script/132481)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 7\
**Last updated:** [September 19, 2025, 2:28pm UTC](https://discourse.julialang.org/t/how-to-change-the-default-rng-for-a-given-script/132481 "2025-09-19T14:28:35Z")

</div>

I know I can pass RNG to many (all?) stochastic functions, and that StableRNG is slow, but is there a way I can set at the beginning of my model something like: random\_seed = 123 # from a config file Random.GLO…

---

## [Non-const globals in a macro and performances on the function calling the macro](https://discourse.julialang.org/t/non-const-globals-in-a-macro-and-performances-on-the-function-calling-the-macro/132490)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 8\
**Last updated:** [September 19, 2025, 12:43pm UTC](https://discourse.julialang.org/t/non-const-globals-in-a-macro-and-performances-on-the-function-calling-the-macro/132490 "2025-09-19T12:43:36Z")

</div>

I am trying to implement some “fixed stochasticity” in individual functions of my model (called once), where I have a global seed and then this is re-seed on each needed function based on the name of the function and the…

---

## [Import order: from the most general packages to the most specific ones, or the opposite (or it doesn't matter ?)](https://discourse.julialang.org/t/import-order-from-the-most-general-packages-to-the-most-specific-ones-or-the-opposite-or-it-doesnt-matter/132506)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 3\
**Last updated:** [September 19, 2025, 8:41am UTC](https://discourse.julialang.org/t/import-order-from-the-most-general-packages-to-the-most-specific-ones-or-the-opposite-or-it-doesnt-matter/132506 "2025-09-19T08:41:31Z")

</div>

When you need to import several packages, and you believe that there is some inner dependency between them, do you start importing the general ones first or the specific ones first, or it doesn’t matter ? eg: import Do…

---

## [Inconsistency with SavingCallback](https://discourse.julialang.org/t/inconsistency-with-savingcallback/132321)

<div class="topic-metadata">

**Author:** [@dnldlg](https://discourse.julialang.org/u/dnldlg)\
**Replies:** 1\
**Last updated:** [September 19, 2025, 12:09am UTC](https://discourse.julialang.org/t/inconsistency-with-savingcallback/132321 "2025-09-19T00:09:46Z")

</div>

I try to track the behavior of the parameters throughout an integration with DifferentialEquations.jl while using Callbacks. To do this I used SavingCallback, but noticed the following inconsistency with the argument sa…

---

## [Pluto for literate programming](https://discourse.julialang.org/t/pluto-for-literate-programming/132499)

<div class="topic-metadata">

**Author:** [@bertschi](https://discourse.julialang.org/u/bertschi)\
**Replies:** 0\
**Last updated:** [September 18, 2025, 9:18pm UTC](https://discourse.julialang.org/t/pluto-for-literate-programming/132499 "2025-09-18T21:18:05Z")

</div>

Just realized that Pluto can be turned into a web style literate programming tool with the help of a simple macro. Pluto’s dependency tracking already allows cells to be ordered as the programmer likes instead of what th…

---

## [Something is broken, perhaps NonlinearSolve?](https://discourse.julialang.org/t/something-is-broken-perhaps-nonlinearsolve/132483)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 4\
**Last updated:** [September 18, 2025, 4:13pm UTC](https://discourse.julialang.org/t/something-is-broken-perhaps-nonlinearsolve/132483 "2025-09-18T16:13:36Z")

</div>

Since two days something is broken: Info Packages marked with ⌃ and ⌅ have new versions available. Those with ⌃ may be upgradable, but those with ⌅ are restricted by compatibility constraints from upgrading. To …

---

## [Pluto "custom cell"](https://discourse.julialang.org/t/pluto-custom-cell/132224)

<div class="topic-metadata">

**Author:** [@Mikhail\_Kagalenko](https://discourse.julialang.org/u/Mikhail_Kagalenko)\
**Replies:** 9\
**Last updated:** [September 18, 2025, 3:01pm UTC](https://discourse.julialang.org/t/pluto-custom-cell/132224 "2025-09-18T15:01:21Z")

</div>

I would like to create in my notebook a custom cell, that looks and acts just like normal one, but the code within is parsed to an Expr tree that I can examine before Julia runs it. Can that be achieved using Pluto/Pluto…

---

## [Unpack types in Union](https://discourse.julialang.org/t/unpack-types-in-union/75803)

<div class="topic-metadata">

**Author:** [@gcalderone](https://discourse.julialang.org/u/gcalderone)\
**Replies:** 22\
**Last updated:** [September 18, 2025, 1:09pm UTC](https://discourse.julialang.org/t/unpack-types-in-union/75803 "2025-09-18T13:09:20Z")

</div>

I would like to extract a Vector{DataType} from a Union. I found the solution shown below, but it looks weird to me, and non-idiomatic. Is there a better way to unpack types in a Union? My solution: unpack\_union(tt::…

---

## [Tool for cleaning up imports?](https://discourse.julialang.org/t/tool-for-cleaning-up-imports/132482)

<div class="topic-metadata">

**Author:** [@jw3126](https://discourse.julialang.org/u/jw3126)\
**Replies:** 1\
**Last updated:** [September 18, 2025, 12:35pm UTC](https://discourse.julialang.org/t/tool-for-cleaning-up-imports/132482 "2025-09-18T12:35:44Z")

</div>

Is there a tool for cleaning up import statements? When a package grows, I often end up with a long and messy list of imports that usually contains many duplicate imports. Instead, I would like to have each import once …

---

## [Can Julia Play a Role in Blockchain and Crypto Exchange Development?](https://discourse.julialang.org/t/can-julia-play-a-role-in-blockchain-and-crypto-exchange-development/132476)

<div class="topic-metadata">

**Author:** [@evangelineclaire07](https://discourse.julialang.org/u/evangelineclaire07)\
**Replies:** 0\
**Last updated:** [September 18, 2025, 5:01am UTC](https://discourse.julialang.org/t/can-julia-play-a-role-in-blockchain-and-crypto-exchange-development/132476 "2025-09-18T05:01:16Z")

</div>

Julia has already proven its strength in areas like scientific computing, AI, and financial modeling — but can it also play a role in the next generation of blockchain applications? For example: Smart contract auditin…

---

## [Check availability of AVX-512, AVX2 etc?](https://discourse.julialang.org/t/check-availability-of-avx-512-avx2-etc/132467)

<div class="topic-metadata">

**Author:** [@Norman](https://discourse.julialang.org/u/Norman)\
**Replies:** 1\
**Last updated:** [September 17, 2025, 7:46pm UTC](https://discourse.julialang.org/t/check-availability-of-avx-512-avx2-etc/132467 "2025-09-17T19:46:26Z")

</div>

Is there a standard/simple way in Julia to tell whether the CPU running Julia supports features like AVX-512, AVX2 etc? I want to have a helper function that returns the approapriate length for a SIMD Vector (Vec) to be…

---

## [Pool of locks?](https://discourse.julialang.org/t/pool-of-locks/132457)

<div class="topic-metadata">

**Author:** [@user664303](https://discourse.julialang.org/u/user664303)\
**Replies:** 4\
**Last updated:** [September 17, 2025, 3:01pm UTC](https://discourse.julialang.org/t/pool-of-locks/132457 "2025-09-17T15:01:39Z")

</div>

I want to parallelize a for loop across multiple threads. Each thread will update some shared memory, so I need to avoid concurrent access of that memory. One way is to simply give each thread a copy of the shared memor…

---

## [OhMyThreads, ChunkSplitters, and Cost Estimates](https://discourse.julialang.org/t/ohmythreads-chunksplitters-and-cost-estimates/132449)

<div class="topic-metadata">

**Author:** [@afleming](https://discourse.julialang.org/u/afleming)\
**Replies:** 2\
**Last updated:** [September 16, 2025, 9:27pm UTC](https://discourse.julialang.org/t/ohmythreads-chunksplitters-and-cost-estimates/132449 "2025-09-16T21:27:04Z")

</div>

I’ve run into a situation that I believe ought to be a “solved problem”, or at least have a canonical solution somewhere in the collective knowledge about OhMyThreads.jl and ChunkSplitters.jl. I have a large finite-volu…

---

## [Sparse 3D arrays](https://discourse.julialang.org/t/sparse-3d-arrays/16488)

<div class="topic-metadata">

**Author:** [@jw3126](https://discourse.julialang.org/u/jw3126)\
**Replies:** 10\
**Last updated:** [September 17, 2025, 7:17am UTC](https://discourse.julialang.org/t/sparse-3d-arrays/16488 "2025-09-17T07:17:41Z")

</div>

It seems that SparseArrays only offers sparse vectors and matrices. Are there packages for higher dimensional sparse arrays? I am mainly interested in 3d.

---

## [Updating to 1.11.7 causes PyCall to fail to build](https://discourse.julialang.org/t/updating-to-1-11-7-causes-pycall-to-fail-to-build/132427)

<div class="topic-metadata">

**Author:** [@Xing\_Shi\_Cai](https://discourse.julialang.org/u/Xing_Shi_Cai)\
**Replies:** 4\
**Last updated:** [September 17, 2025, 7:07am UTC](https://discourse.julialang.org/t/updating-to-1-11-7-causes-pycall-to-fail-to-build/132427 "2025-09-17T07:07:47Z")

</div>

I just updated Julia from 1.11.6 to 1.11.7. Then some of my packages such as PyCall cannot be built any more. Here’s the error — Building Conda ─→ \`~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/b19db39…

---

## [Which direction: DifferentiatonInterface, Enzyme, Zygote with CUDA and FFTs?](https://discourse.julialang.org/t/which-direction-differentiatoninterface-enzyme-zygote-with-cuda-and-ffts/132225)

<div class="topic-metadata">

**Author:** [@roflmaostc](https://discourse.julialang.org/u/roflmaostc)\
**Replies:** 20\
**Last updated:** [September 17, 2025, 6:51am UTC](https://discourse.julialang.org/t/which-direction-differentiatoninterface-enzyme-zygote-with-cuda-and-ffts/132225 "2025-09-17T06:51:26Z")

</div>

Hi! For the third time, I am trying to implement some wave optics algorithms in Julia but each time I start, I suffer a bit from the current automatic differentiation status. In principle, my functions look like: func…

---

## [Sparse arrays of higher order](https://discourse.julialang.org/t/sparse-arrays-of-higher-order/42875)

<div class="topic-metadata">

**Author:** [@chakravala](https://discourse.julialang.org/u/chakravala)\
**Replies:** 4\
**Last updated:** [September 17, 2025, 2:12am UTC](https://discourse.julialang.org/t/sparse-arrays-of-higher-order/42875 "2025-09-17T02:12:46Z")

</div>

Are there any good packages which have a similar feature as SparseArrays.SparseMatrixCSC but with higher order arrays? For example, a sparse array with 3 indices or 4 indices, stored in a similar way to a sparse matrix, …

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

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