# General Usage

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

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

**Page:** 61

---

## [Optimized Python is as good as Julia](https://discourse.julialang.org/t/optimized-python-is-as-good-as-julia/104432)

<div class="topic-metadata">

**Author:** [@mrkorch](https://discourse.julialang.org/u/mrkorch)\
**Replies:** 28\
**Last updated:** [June 2, 2025, 11:55am UTC](https://discourse.julialang.org/t/optimized-python-is-as-good-as-julia/104432 "2025-06-02T11:55:55Z")

</div>

Comparison of Python / Julia benchmarks for a maths problem. I am considering switching to Julia, but would like to know if it is worth it for such tasks. Here is the Python code I used: import random import numpy as n…

---

## [UndefVarError: ODESystem not defined when running DynamicalSystems.jl example](https://discourse.julialang.org/t/undefvarerror-odesystem-not-defined-when-running-dynamicalsystems-jl-example/129514)

<div class="topic-metadata">

**Author:** [@cristian\_marin](https://discourse.julialang.org/u/cristian_marin)\
**Replies:** 3\
**Last updated:** [June 2, 2025, 11:43am UTC](https://discourse.julialang.org/t/undefvarerror-odesystem-not-defined-when-running-dynamicalsystems-jl-example/129514 "2025-06-02T11:43:21Z")

</div>

UndefVarError: ODESystem not defined in Main Stacktrace: \[1\] top-level scope @ C:\\Users\\marin.julia\\packages\\ModelingToolkit\\DSTHC\\src\\systems\\abstractsystem.jl:2191 I’m trying to run a example from DynamicalSystems.…

---

## [Problems with @manipulate](https://discourse.julialang.org/t/problems-with-manipulate/129524)

<div class="topic-metadata">

**Author:** [@angeloaliano1](https://discourse.julialang.org/u/angeloaliano1)\
**Replies:** 3\
**Last updated:** [June 2, 2025, 5:21am UTC](https://discourse.julialang.org/t/problems-with-manipulate/129524 "2025-06-02T05:21:19Z")

</div>

Hello, I would like to see some levels curves of my function, like this, using @manipulate macro inside Julia (version 1.11.0-beta2) installed on my machine (not in a notebook). The code is the following: using Plots,…

---

## [Astrophotography in Julia?](https://discourse.julialang.org/t/astrophotography-in-julia/89491)

<div class="topic-metadata">

**Author:** [@johnmyleswhite](https://discourse.julialang.org/u/johnmyleswhite)\
**Replies:** 1\
**Last updated:** [June 1, 2025, 10:43pm UTC](https://discourse.julialang.org/t/astrophotography-in-julia/89491 "2025-06-01T22:43:25Z")

</div>

I’ve recently gotten interested in astrophotography. I’ve seen and used some of the AstroJulia packages, which are great, but I’m wondering if there’s anyone else working on things that especially common for photographer…

---

## [Memory Comprehensions](https://discourse.julialang.org/t/memory-comprehensions/129033)

<div class="topic-metadata">

**Author:** [@PatrickHaecker](https://discourse.julialang.org/u/PatrickHaecker)\
**Replies:** 7\
**Last updated:** [May 25, 2025, 10:51am UTC](https://discourse.julialang.org/t/memory-comprehensions/129033 "2025-05-25T10:51:04Z")

</div>

Is there a Memory comprehension in Julia, which I missed so far? We have Array comprehensions, but when you don’t need the multiple dimensions and resizing properties of an Array and a Memory is enough, it would be nice…

---

## [Surprising Error message](https://discourse.julialang.org/t/surprising-error-message/129483)

<div class="topic-metadata">

**Author:** [@SergeantMike67](https://discourse.julialang.org/u/SergeantMike67)\
**Replies:** 2\
**Last updated:** [June 1, 2025, 4:06pm UTC](https://discourse.julialang.org/t/surprising-error-message/129483 "2025-06-01T16:06:59Z")

</div>

I have a script I wrote that calculates Temporal Reproductive Isolation which worked 6 months ago. It needs some tweaking but now when I run it I get: ERROR: ArgumentError: invalid GenericMemory size: too large for sys…

---

## [How can I find out why a the package ImageCore is in my project](https://discourse.julialang.org/t/how-can-i-find-out-why-a-the-package-imagecore-is-in-my-project/129521)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 4\
**Last updated:** [June 1, 2025, 1:00pm UTC](https://discourse.julialang.org/t/how-can-i-find-out-why-a-the-package-imagecore-is-in-my-project/129521 "2025-06-01T13:00:56Z")

</div>

How can I find out why I have a curtain package installed (indirect dependency)? I get these warnings: WARNING: using deprecated binding Rotations.UnitQuaternion in KiteModels. , use QuatRotation instead. WARNING: Kite…

---

## [REPL.TerminalMenus.MultiSelectMenu: aborted vs. nothing selected](https://discourse.julialang.org/t/repl-terminalmenus-multiselectmenu-aborted-vs-nothing-selected/129505)

<div class="topic-metadata">

**Author:** [@Eben60](https://discourse.julialang.org/u/Eben60)\
**Replies:** 1\
**Last updated:** [June 1, 2025, 12:09pm UTC](https://discourse.julialang.org/t/repl-terminalmenus-multiselectmenu-aborted-vs-nothing-selected/129505 "2025-06-01T12:09:52Z")

</div>

In both cases it returnes empty array, though it’s obviously not (always) the same? Is it possible to change the behavior? After reading the Julia docs on TerminalMenus I’m no wiser than before. :frowning: AbstractMenu…

---

## [How to target Intel performance cores only in multithreading](https://discourse.julialang.org/t/how-to-target-intel-performance-cores-only-in-multithreading/91415)

<div class="topic-metadata">

**Author:** [@babakfifoo](https://discourse.julialang.org/u/babakfifoo)\
**Replies:** 5\
**Last updated:** [June 1, 2025, 10:42am UTC](https://discourse.julialang.org/t/how-to-target-intel-performance-cores-only-in-multithreading/91415 "2025-06-01T10:42:07Z")

</div>

Hi all, I have a code that uses multithreading. My system has 12700K with 6/2 performance cores and 8 efficiency cores The issue I have is that I want to use only performance cores since efficiency cores are not strong…

---

## [Why is \`\[\["x", "y"\], \[1\]\]\` a \`Vector{Vector}\`?](https://discourse.julialang.org/t/why-is-x-y-1-a-vector-vector/129318)

<div class="topic-metadata">

**Author:** [@enweg](https://discourse.julialang.org/u/enweg)\
**Replies:** 10\
**Last updated:** [May 31, 2025, 6:43pm UTC](https://discourse.julialang.org/t/why-is-x-y-1-a-vector-vector/129318 "2025-05-31T18:43:21Z")

</div>

I am trying to write a function similar to the following, where I want y to be a Vector of Vectors where each inner vector is either Vector{String} or Vector{Int}. foo(x::SomeType, y) I am unsure about which type to us…

---

## [Very long time for addition of complex identity matrix to transposed sparse matrix](https://discourse.julialang.org/t/very-long-time-for-addition-of-complex-identity-matrix-to-transposed-sparse-matrix/129465)

<div class="topic-metadata">

**Author:** [@rveltz](https://discourse.julialang.org/u/rveltz)\
**Replies:** 10\
**Last updated:** [May 31, 2025, 5:20pm UTC](https://discourse.julialang.org/t/very-long-time-for-addition-of-complex-identity-matrix-to-transposed-sparse-matrix/129465 "2025-05-31T17:20:12Z")

</div>

Hi, I am surprised by these timings on 1.10. Can it be improved? using SparseArrays, LinearAlgebra A = sprandn(90000,90000, 1e-5) @time (A + complex(0,1.) \* I); # 0.001344 seconds (13 allocations: 7.342 MiB) @time (tr…

---

## [Using AI programming problem solvers to help develop Julia Linear Algebra ecosystem](https://discourse.julialang.org/t/using-ai-programming-problem-solvers-to-help-develop-julia-linear-algebra-ecosystem/129501)

<div class="topic-metadata">

**Author:** [@Tarny\_GG\_Channie](https://discourse.julialang.org/u/Tarny_GG_Channie)\
**Replies:** 2\
**Last updated:** [May 31, 2025, 12:53pm UTC](https://discourse.julialang.org/t/using-ai-programming-problem-solvers-to-help-develop-julia-linear-algebra-ecosystem/129501 "2025-05-31T12:53:43Z")

</div>

We’ve had yet another instance of slow matrix operation due to generic fallback. This is not the only one for example. Guess what? We have a set of self-contained problems with known ground truth (implemented by the…

---

## [Reliably make a clean copy of an XML node](https://discourse.julialang.org/t/reliably-make-a-clean-copy-of-an-xml-node/129495)

<div class="topic-metadata">

**Author:** [@TimG](https://discourse.julialang.org/u/TimG)\
**Replies:** 4\
**Last updated:** [May 31, 2025, 12:17pm UTC](https://discourse.julialang.org/t/reliably-make-a-clean-copy-of-an-xml-node/129495 "2025-05-31T12:17:51Z")

</div>

I am using XML.jl. I have a basic XML node that I use as a base from which I wish to construct many slightly different instances. On each occasion, I want to copy the basic node and build from there. The Readme page for…

---

## [How to build a wrapper around a C-style array using Julia C API?](https://discourse.julialang.org/t/how-to-build-a-wrapper-around-a-c-style-array-using-julia-c-api/129469)

<div class="topic-metadata">

**Author:** [@dmitry-kabanov](https://discourse.julialang.org/u/dmitry-kabanov)\
**Replies:** 4\
**Last updated:** [May 31, 2025, 12:55am UTC](https://discourse.julialang.org/t/how-to-build-a-wrapper-around-a-c-style-array-using-julia-c-api/129469 "2025-05-31T00:55:11Z")

</div>

Hi, I need to use the Julia C API to build a wrapper around a C-style array to use this array in Julia (the array is actually a Python NumPy array). The thing is that the array is a matrix (2D) and Julia uses Fortran-sty…

---

## [Is it possible to create a closed source library package?](https://discourse.julialang.org/t/is-it-possible-to-create-a-closed-source-library-package/129453)

<div class="topic-metadata">

**Author:** [@victor\_vhrn](https://discourse.julialang.org/u/victor_vhrn)\
**Replies:** 2\
**Last updated:** [May 31, 2025, 1:20am UTC](https://discourse.julialang.org/t/is-it-possible-to-create-a-closed-source-library-package/129453 "2025-05-31T01:20:32Z")

</div>

Is it possible to release a package without easily exposing the source code? In my use case, my package is a library where the user must provide callback functions as input. Most of the ideas I found seem to apply only t…

---

## [Batched matrix-multiplication optimization](https://discourse.julialang.org/t/batched-matrix-multiplication-optimization/129454)

<div class="topic-metadata">

**Author:** [@quantumdreamer](https://discourse.julialang.org/u/quantumdreamer)\
**Replies:** 15\
**Last updated:** [May 30, 2025, 10:52pm UTC](https://discourse.julialang.org/t/batched-matrix-multiplication-optimization/129454 "2025-05-30T22:52:55Z")

</div>

How can matrix multiplication in a for loop be optimized? Here is an example of mine: original case: Z = Array{ComplexF64,3}(undef,512,8,24192); X = Array{ComplexF64,3}(undef,512,16,24192); Y = Array{ComplexF64,3}(unde…

---

## [Documenter "undefined binding" error](https://discourse.julialang.org/t/documenter-undefined-binding-error/129475)

<div class="topic-metadata">

**Author:** [@Marco-Congedo](https://discourse.julialang.org/u/Marco-Congedo)\
**Replies:** 2\
**Last updated:** [May 30, 2025, 6:03pm UTC](https://discourse.julialang.org/t/documenter-undefined-binding-error/129475 "2025-05-30T18:03:04Z")

</div>

I implemented a new function sumOfSqrDiff in package PosDefManifold.jl. I have exported it and added the doc string, but when i build the documentation i have the error here below. I don’t see what’s wrong and the sol…

---

## [How can the Julia language write a structure to a file and read that structure from the file?](https://discourse.julialang.org/t/how-can-the-julia-language-write-a-structure-to-a-file-and-read-that-structure-from-the-file/129436)

<div class="topic-metadata">

**Author:** [@dk-zen](https://discourse.julialang.org/u/dk-zen)\
**Replies:** 5\
**Last updated:** [May 30, 2025, 4:57am UTC](https://discourse.julialang.org/t/how-can-the-julia-language-write-a-structure-to-a-file-and-read-that-structure-from-the-file/129436 "2025-05-30T04:57:50Z")

</div>

How can the Julia language write a structure to a file and read that structure from the file? I tried it myself. Although I could read it correctly, when there are dozens of keywords in the structure, the reading process…

---

## [Type instability with Type{T} selectors in keyword arguments](https://discourse.julialang.org/t/type-instability-with-type-t-selectors-in-keyword-arguments/129439)

<div class="topic-metadata">

**Author:** [@marcsgil](https://discourse.julialang.org/u/marcsgil)\
**Replies:** 13\
**Last updated:** [May 29, 2025, 7:47pm UTC](https://discourse.julialang.org/t/type-instability-with-type-t-selectors-in-keyword-arguments/129439 "2025-05-29T19:47:02Z")

</div>

I’m trying to write a function that outputs arrays that are filled according to a certain computation. I want the user to be able to select the type of the array according to an argument. Consider these two example func…

---

## [Incorrect manifest after adding package as dependency that has forked package as dependency](https://discourse.julialang.org/t/incorrect-manifest-after-adding-package-as-dependency-that-has-forked-package-as-dependency/129435)

<div class="topic-metadata">

**Author:** [@KSepetanc](https://discourse.julialang.org/u/KSepetanc)\
**Replies:** 6\
**Last updated:** [May 29, 2025, 5:41pm UTC](https://discourse.julialang.org/t/incorrect-manifest-after-adding-package-as-dependency-that-has-forked-package-as-dependency/129435 "2025-05-29T17:41:43Z")

</div>

What I am doing is creating a custom package. In that package I add forked package as dependency and resulting manifest is correct (so my package has both manifest.toml and project.toml). However, once I add my package t…

---

## [Multiply vector elementwise by \[1, v, v, ...\]](https://discourse.julialang.org/t/multiply-vector-elementwise-by-1-v-v/129442)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 2\
**Last updated:** [May 29, 2025, 3:28pm UTC](https://discourse.julialang.org/t/multiply-vector-elementwise-by-1-v-v/129442 "2025-05-29T15:28:22Z")

</div>

I have a calculation where I need to multiple various vectors elementwise by \[1, v, v, ...\]. The inputs may be any kind of vector and I want code to adapt accordingly, ie the input x is an SVector, the output should als…

---

## [Universal Differential Equations](https://discourse.julialang.org/t/universal-differential-equations/121363)

<div class="topic-metadata">

**Author:** [@Piyush](https://discourse.julialang.org/u/Piyush)\
**Replies:** 4\
**Last updated:** [May 29, 2025, 3:13pm UTC](https://discourse.julialang.org/t/universal-differential-equations/121363 "2025-05-29T15:13:43Z")

</div>

Hi, I have been working on developing hybrid models specifically Universal Differential Equations (UDE) using Julia recently. I wanted to know if I can make use of \`EnsembleProblem’ along with hybrid model (mechanistic …

---

## [Test a Julia Package as a Git Hook](https://discourse.julialang.org/t/test-a-julia-package-as-a-git-hook/39140)

<div class="topic-metadata">

**Author:** [@logankilpatrick](https://discourse.julialang.org/u/logankilpatrick)\
**Replies:** 6\
**Last updated:** [May 29, 2025, 9:30am UTC](https://discourse.julialang.org/t/test-a-julia-package-as-a-git-hook/39140 "2025-05-29T09:30:12Z")

</div>

Hey all, I want to try to set my git configuration such that when I commit and before I push, my git hooks fire and test my certain package. Is anyone doing this with Julia and can share how it’s done?

---

## [Launching external programs from Julia](https://discourse.julialang.org/t/launching-external-programs-from-julia/129419)

<div class="topic-metadata">

**Author:** [@mpeters2](https://discourse.julialang.org/u/mpeters2)\
**Replies:** 13\
**Last updated:** [May 29, 2025, 2:19am UTC](https://discourse.julialang.org/t/launching-external-programs-from-julia/129419 "2025-05-29T02:19:54Z")

</div>

I’ve been trying to figure out how to launch an external program from Julia, and I am stumped. In Python, I can do this: os.system("exec python -m PyQt5.uic.pyuic evaluate.ui -o ui\_Evaluate.py -x") I’ve tried most of …

---

## [Calling Python function JIT compiled with JAX from Julia without overhead](https://discourse.julialang.org/t/calling-python-function-jit-compiled-with-jax-from-julia-without-overhead/123552)

<div class="topic-metadata">

**Author:** [@sefffal](https://discourse.julialang.org/u/sefffal)\
**Replies:** 25\
**Last updated:** [May 28, 2025, 11:40pm UTC](https://discourse.julialang.org/t/calling-python-function-jit-compiled-with-jax-from-julia-without-overhead/123552 "2025-05-28T23:40:44Z")

</div>

It could be very useful to call JIT compiled JAX functions from Python libraries from Julia, and in turn, to be able for Julia libraries to call user-provided JAX functions. This is possible today via PythonCall, e.g.: …

---

## [Package like DaemonMode?](https://discourse.julialang.org/t/package-like-daemonmode/129413)

<div class="topic-metadata">

**Author:** [@Satvik](https://discourse.julialang.org/u/Satvik)\
**Replies:** 2\
**Last updated:** [May 28, 2025, 3:21pm UTC](https://discourse.julialang.org/t/package-like-daemonmode/129413 "2025-05-28T15:21:42Z")

</div>

I’m interested in using something like DaemonMode.jl to keep a Julia process running and send commands to it from another process. However, DaemonMode doesn’t seem to have been updated since 2021, and doesn’t install on …

---

## [AD of LoopVectorization with Zygote?](https://discourse.julialang.org/t/ad-of-loopvectorization-with-zygote/129378)

<div class="topic-metadata">

**Author:** [@MatPeron](https://discourse.julialang.org/u/MatPeron)\
**Replies:** 2\
**Last updated:** [May 28, 2025, 3:18pm UTC](https://discourse.julialang.org/t/ad-of-loopvectorization-with-zygote/129378 "2025-05-28T15:18:18Z")

</div>

I’m writing a package to perform some physics calculations on large 3D arrays. In order to perform these calculations I need to compute a few quantities, in particular differential operators of the fields like the gradie…

---

## [ERROR: syntax: unexpected semicolon in tuple around REPL](https://discourse.julialang.org/t/error-syntax-unexpected-semicolon-in-tuple-around-repl/129399)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 4\
**Last updated:** [May 28, 2025, 2:22pm UTC](https://discourse.julialang.org/t/error-syntax-unexpected-semicolon-in-tuple-around-repl/129399 "2025-05-28T14:22:48Z")

</div>

Why can’t I write this compound expression? (The context is a Givens rotation) julia\> A = rand(-9:9, 2, 2) 2×2 Matrix{Int64}: -9 -9 -1 1 julia\> t = pi/3 1.0471975511965976 julia\> c, s = cos(t), sin(t); \[c s; -s c…

---

## [Mesh (ndgrid) to points list](https://discourse.julialang.org/t/mesh-ndgrid-to-points-list/129404)

<div class="topic-metadata">

**Author:** [@Cyan](https://discourse.julialang.org/u/Cyan)\
**Replies:** 3\
**Last updated:** [May 28, 2025, 2:01pm UTC](https://discourse.julialang.org/t/mesh-ndgrid-to-points-list/129404 "2025-05-28T14:01:51Z")

</div>

Is there any quick method to generate position pairs (x,y) for each points from following mesh grid xg and yg? x = range(-2, 2, 50) y = range(-2, 2, 50) (xg, yg) = ndgrid(x, y) Finished with collect(zip(xg,yg))

---

## [Create a new DateTime dataframe column from Date and Time columns](https://discourse.julialang.org/t/create-a-new-datetime-dataframe-column-from-date-and-time-columns/129406)

<div class="topic-metadata">

**Author:** [@Ju\_ska](https://discourse.julialang.org/u/Ju_ska)\
**Replies:** 2\
**Last updated:** [May 28, 2025, 1:02pm UTC](https://discourse.julialang.org/t/create-a-new-datetime-dataframe-column-from-date-and-time-columns/129406 "2025-05-28T13:02:21Z")

</div>

Hi, (sorry for the pedantic syntax…) using DataFrames using Dates df = DataFrame(DATE=\[Date("2025-01-01","yyyy-mm-dd"), Date("2025-01-01","yyyy-mm-dd"), Date("2025-01-02","yyyy-mm-dd")\], TIME=\[Time("00:00:00"), Time("…

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

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