# General Usage

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

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

**Page:** 81

---

## [AD through DataInterpolations, ODE : Gradient calculation, parameter -\> time series -\> DataInterpolation](https://discourse.julialang.org/t/ad-through-datainterpolations-ode-gradient-calculation-parameter-time-series-datainterpolation/126758)

<div class="topic-metadata">

**Author:** [@Rohan\_Rajagopal](https://discourse.julialang.org/u/Rohan_Rajagopal)\
**Replies:** 2\
**Last updated:** [March 12, 2025, 5:46am UTC](https://discourse.julialang.org/t/ad-through-datainterpolations-ode-gradient-calculation-parameter-time-series-datainterpolation/126758 "2025-03-12T05:46:38Z")

</div>

Greetings! The question is regarding AD through DataInterpolations, ODE. The function is described as follows, using DataInterpolations, OrdinaryDiffEq, SciMLSensitivity, Zygote time = 0.:0.1:20 function temp(ps) …

---

## [Match.jl: Getting hold of regex captures? (\`\\1\` doesn't seem to work.)](https://discourse.julialang.org/t/match-jl-getting-hold-of-regex-captures-1-doesnt-seem-to-work/126455)

<div class="topic-metadata">

**Author:** [@ryofurue](https://discourse.julialang.org/u/ryofurue)\
**Replies:** 4\
**Last updated:** [March 12, 2025, 3:26am UTC](https://discourse.julialang.org/t/match-jl-getting-hold-of-regex-captures-1-doesnt-seem-to-work/126455 "2025-03-12T03:26:19Z")

</div>

In general, is it possible to get hold of regex captures outside the RegexMatch object? In particular, can we get them in a pattern match of Match.jl This is what I have found so far: using Match function matchreg(s) …

---

## [Plotting solution on unstructured mesh along a cartesian line in VoronoiFVM.jl](https://discourse.julialang.org/t/plotting-solution-on-unstructured-mesh-along-a-cartesian-line-in-voronoifvm-jl/126258)

<div class="topic-metadata">

**Author:** [@chloisu](https://discourse.julialang.org/u/chloisu)\
**Replies:** 4\
**Last updated:** [March 12, 2025, 1:54am UTC](https://discourse.julialang.org/t/plotting-solution-on-unstructured-mesh-along-a-cartesian-line-in-voronoifvm-jl/126258 "2025-03-12T01:54:50Z")

</div>

Dear all, I am very happy that I came across VoronoiFVM.jl because it makes the development of a fully-implicit numerical simulation based on the finite volume method so much easier. Because I would like to resolve ele…

---

## [Inplace implementation for neural networks in Lux.jl](https://discourse.julialang.org/t/inplace-implementation-for-neural-networks-in-lux-jl/126749)

<div class="topic-metadata">

**Author:** [@Yang-yang](https://discourse.julialang.org/u/Yang-yang)\
**Replies:** 1\
**Last updated:** [March 12, 2025, 1:26am UTC](https://discourse.julialang.org/t/inplace-implementation-for-neural-networks-in-lux-jl/126749 "2025-03-12T01:26:26Z")

</div>

Hi everyone, I want to know if using an in-place version of the Lux layers is better. I noticed a related pull request https://github.com/LuxDL/Lux.jl/pull/463, but I don’t know why this pull request was canceled. Sinc…

---

## [Symbolics build function failed for Matrix](https://discourse.julialang.org/t/symbolics-build-function-failed-for-matrix/126828)

<div class="topic-metadata">

**Author:** [@Veenty](https://discourse.julialang.org/u/Veenty)\
**Replies:** 1\
**Last updated:** [March 11, 2025, 9:13pm UTC](https://discourse.julialang.org/t/symbolics-build-function-failed-for-matrix/126828 "2025-03-11T21:13:50Z")

</div>

The following code is not being evaluated at all @variables ξ u\_h = \[1, ξ\] γ\_matrix = rand(ComplexF64, (2,2)) foo = eval.(build\_function.(γ\_matrix\*u\_h, ξ)) foo\[1\](0.) # 0.718261200283448 + 0.7541320221601713ξ + im\*(0.11…

---

## [DifferentialEquations not compiling](https://discourse.julialang.org/t/differentialequations-not-compiling/77764)

<div class="topic-metadata">

**Author:** [@Veenty](https://discourse.julialang.org/u/Veenty)\
**Replies:** 5\
**Last updated:** [March 11, 2025, 8:41pm UTC](https://discourse.julialang.org/t/differentialequations-not-compiling/77764 "2025-03-11T20:41:13Z")

</div>

I’m using Juno and DifferentialEquations is failing to compile. LoadError: LoadError: LoadError: LoadError: UndefVarError: StatisticalModel not defined in expression starting at /Users/Veenty/.julia/packages/StatsBase/p…

---

## [Symbolics.jl symplify (-1 - x)^2](https://discourse.julialang.org/t/symbolics-jl-symplify-1-x-2/126825)

<div class="topic-metadata">

**Author:** [@Nichola](https://discourse.julialang.org/u/Nichola)\
**Replies:** 0\
**Last updated:** [March 11, 2025, 5:52pm UTC](https://discourse.julialang.org/t/symbolics-jl-symplify-1-x-2/126825 "2025-03-11T17:52:26Z")

</div>

I would like to simplify r = sqrt(16((1 + x)^2 + (-1 - x)^2)) with x\>0 with Symbolics.jl How can I approach this ? I first tried to introduce the rule rule = @rule (-1 - ~x)^2 =\> (1 + ~x)^2 But the following example d…

---

## [The last update of Symbolics from 6.29.2 to 6.30](https://discourse.julialang.org/t/the-last-update-of-symbolics-from-6-29-2-to-6-30/126807)

<div class="topic-metadata">

**Author:** [@Naceur\_Bouziani](https://discourse.julialang.org/u/Naceur_Bouziani)\
**Replies:** 5\
**Last updated:** [March 11, 2025, 4:28pm UTC](https://discourse.julialang.org/t/the-last-update-of-symbolics-from-6-29-2-to-6-30/126807 "2025-03-11T16:28:41Z")

</div>

Hello :slight\_smile: The last update of Symbolics is causing errors that have something to do with occursin(var\_str, string(k)). I had to use this to retrieve the keys order of the solution variables … As soon as my co…

---

## [Best way to concatenate Symbols?](https://discourse.julialang.org/t/best-way-to-concatenate-symbols/126806)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 3\
**Last updated:** [March 11, 2025, 10:16am UTC](https://discourse.julialang.org/t/best-way-to-concatenate-symbols/126806 "2025-03-11T10:16:11Z")

</div>

If I have two symbols: sym1 = :Hello sym2 = :World what is the best way to combine these: combine(sym1,sym2) to generate the symbol :HelloWorld? (In practice I have a macro with some input symbols, and I want to gen…

---

## [Reading and writing BigInt to file](https://discourse.julialang.org/t/reading-and-writing-bigint-to-file/126726)

<div class="topic-metadata">

**Author:** [@phma](https://discourse.julialang.org/u/phma)\
**Replies:** 17\
**Last updated:** [March 11, 2025, 1:54am UTC](https://discourse.julialang.org/t/reading-and-writing-bigint-to-file/126726 "2025-03-11T01:54:58Z")

</div>

I’m writing a package that creates a cryptographic key consisting of big prime numbers, and I need to write them to a file and read them back. Is there a preexisting library that does this, or do I have to write the code…

---

## [Unable to install MultilayerGraphs package with Julia 1.11.3 (win 11 x64) after clearing .julia/registries folder](https://discourse.julialang.org/t/unable-to-install-multilayergraphs-package-with-julia-1-11-3-win-11-x64-after-clearing-julia-registries-folder/126770)

<div class="topic-metadata">

**Author:** [@rogms222](https://discourse.julialang.org/u/rogms222)\
**Replies:** 1\
**Last updated:** [March 11, 2025, 1:24am UTC](https://discourse.julialang.org/t/unable-to-install-multilayergraphs-package-with-julia-1-11-3-win-11-x64-after-clearing-julia-registries-folder/126770 "2025-03-11T01:24:47Z")

</div>

(@v1.11) pkg\> add MultilayerGraphs Installing known registries into C:\\Users\\roger\\.julia Added General registry to C:\\Users\\roger.julia\\registries Resolving package versions… ERROR: Unsatisfiable requirements detect…

---

## [Globally Available Environments and State of Package Compilation](https://discourse.julialang.org/t/globally-available-environments-and-state-of-package-compilation/126732)

<div class="topic-metadata">

**Author:** [@Maddy](https://discourse.julialang.org/u/Maddy)\
**Replies:** 8\
**Last updated:** [March 11, 2025, 12:47am UTC](https://discourse.julialang.org/t/globally-available-environments-and-state-of-package-compilation/126732 "2025-03-11T00:47:13Z")

</div>

1. Environments in Julia I recently started using Conda environments for Python in my Class and realized how simple and efficient it is to use them. Unlike how I do things in Julia - for each new project, I just create …

---

## [Issue with AlgebraOfGraphics.jl: MethodError when using data(df)](https://discourse.julialang.org/t/issue-with-algebraofgraphics-jl-methoderror-when-using-data-df/126795)

<div class="topic-metadata">

**Author:** [@Margot\_Geisbauer](https://discourse.julialang.org/u/Margot_Geisbauer)\
**Replies:** 1\
**Last updated:** [March 10, 2025, 11:45pm UTC](https://discourse.julialang.org/t/issue-with-algebraofgraphics-jl-methoderror-when-using-data-df/126795 "2025-03-10T23:45:55Z")

</div>

I’m trying to plot timing data using AlgebraOfGraphics.jl and CairoMakie.jl. My data consists of timestamps (in seconds) and hit types (early, perfect, late). The hit types are mapped to numeric values: "early" → -1.0 "…

---

## [Improve removing members of one array from another](https://discourse.julialang.org/t/improve-removing-members-of-one-array-from-another/125922)

<div class="topic-metadata">

**Author:** [@jzakiya](https://discourse.julialang.org/u/jzakiya)\
**Replies:** 10\
**Last updated:** [March 10, 2025, 9:35pm UTC](https://discourse.julialang.org/t/improve-removing-members-of-one-array-from-another/125922 "2025-03-10T21:35:51Z")

</div>

The following Julua code is much slower than Ruby and Python because of the slow way it removes the members of one array from another. function prime\_pairs\_lohi(n) if (n&1 == 1 || n \< 4) return println("Input not even…

---

## [PyCall numpy vdot Vector{Float32} returns Float64](https://discourse.julialang.org/t/pycall-numpy-vdot-vector-float32-returns-float64/126768)

<div class="topic-metadata">

**Author:** [@osimonn](https://discourse.julialang.org/u/osimonn)\
**Replies:** 3\
**Last updated:** [March 10, 2025, 7:58pm UTC](https://discourse.julialang.org/t/pycall-numpy-vdot-vector-float32-returns-float64/126768 "2025-03-10T19:58:31Z")

</div>

I have been comparing numpy using PyCall with Julia recently and observed a strange behavior. When I call numpy from Julia and do a dot product of two Vector{Float32} vectors, the result is Float64. However, when I run …

---

## [Type instability in nested quadgk calls](https://discourse.julialang.org/t/type-instability-in-nested-quadgk-calls/126667)

<div class="topic-metadata">

**Author:** [@mbasquens](https://discourse.julialang.org/u/mbasquens)\
**Replies:** 26\
**Last updated:** [March 10, 2025, 6:44pm UTC](https://discourse.julialang.org/t/type-instability-in-nested-quadgk-calls/126667 "2025-03-10T18:44:52Z")

</div>

Hi! I am having trouble with the type stability of quadgk when the integrand function is using quadgk itself. Here is the MWE: using QuadGK f(x) = quadgk(y -\> x\*y, 0., 1.)\[1\] quadgk(f, 0., 1.) Using code\_warntype on t…

---

## [Getting Franklin.jl to display plots with Literate.jl](https://discourse.julialang.org/t/getting-franklin-jl-to-display-plots-with-literate-jl/62025)

<div class="topic-metadata">

**Author:** [@mattgiamou](https://discourse.julialang.org/u/mattgiamou)\
**Replies:** 4\
**Last updated:** [March 10, 2025, 5:06pm UTC](https://discourse.julialang.org/t/getting-franklin-jl-to-display-plots-with-literate-jl/62025 "2025-03-10T17:06:55Z")

</div>

I’m following these instructions on getting Franklin.jl to deploy Julia notebooks with Literate.jl with GitHub pages. I’m using the following minimal example from the Literate.jl documentation: # Testing plot display: x…

---

## [How can I calculate the volume of a mesh?](https://discourse.julialang.org/t/how-can-i-calculate-the-volume-of-a-mesh/81450)

<div class="topic-metadata">

**Author:** [@thenry](https://discourse.julialang.org/u/thenry)\
**Replies:** 14\
**Last updated:** [March 10, 2025, 3:47pm UTC](https://discourse.julialang.org/t/how-can-i-calculate-the-volume-of-a-mesh/81450 "2025-03-10T15:47:50Z")

</div>

How can I calculate the volume of a mesh? The mesh is a closed triangles mesh, with 3-D coordinates; it is a surface mesh. I have tried the following, but I am getting an error: using GLMakie using FileIO using Mesh…

---

## [Controlling @threads (or similar) parallelism level](https://discourse.julialang.org/t/controlling-threads-or-similar-parallelism-level/126754)

<div class="topic-metadata">

**Author:** [@evanfields](https://discourse.julialang.org/u/evanfields)\
**Replies:** 4\
**Last updated:** [March 10, 2025, 12:45pm UTC](https://discourse.julialang.org/t/controlling-threads-or-similar-parallelism-level/126754 "2025-03-10T12:45:12Z")

</div>

I have a function which is, abstracting, Threads.@threads for i in 1:length(chunk) memory\_intensive\_computation(chunk\[i\]) end I don’t know a priori how memory intensive the computation will be, though I can assume …

---

## [How to plot two surfaces by Makie.jl](https://discourse.julialang.org/t/how-to-plot-two-surfaces-by-makie-jl/126750)

<div class="topic-metadata">

**Author:** [@Lee123](https://discourse.julialang.org/u/Lee123)\
**Replies:** 2\
**Last updated:** [March 10, 2025, 10:52am UTC](https://discourse.julialang.org/t/how-to-plot-two-surfaces-by-makie-jl/126750 "2025-03-10T10:52:02Z")

</div>

I want to plot two surfaces in one figure, for example using CairoMakie x = range(-pi, pi, 128) y = x' z1 = broadcast((x,y)-\>cos(x)+cos(y), x,y) z2 = -1.0.\*z1 f,\_,\_ = surface(x,x,z1; axis=(type=Axis3,),colormap=:jet) s…

---

## [Google Colab support for Julia 🎉](https://discourse.julialang.org/t/google-colab-support-for-julia/126598)

<div class="topic-metadata">

**Author:** [@MilesCranmer](https://discourse.julialang.org/u/MilesCranmer)\
**Replies:** 2\
**Last updated:** [March 10, 2025, 10:49am UTC](https://discourse.julialang.org/t/google-colab-support-for-julia/126598 "2025-03-10T10:49:15Z")

</div>

Edit: @Metrizable himself started a thread here: Julia in Colab :slight\_smile: Just saw this amazing news. Google Colab now supports Julia out-of-the-box!!

---

## [Symbolics, evaluate expression, but not all the way?](https://discourse.julialang.org/t/symbolics-evaluate-expression-but-not-all-the-way/126736)

<div class="topic-metadata">

**Author:** [@Veenty](https://discourse.julialang.org/u/Veenty)\
**Replies:** 1\
**Last updated:** [March 10, 2025, 12:11am UTC](https://discourse.julialang.org/t/symbolics-evaluate-expression-but-not-all-the-way/126736 "2025-03-10T00:11:07Z")

</div>

I have an expression of the form using Symbolics @variables x V1 = cosh(x+1) + sinh(x + 1) V2 = sinh(x - 1) Somehow I would like to evaluate this expressions at 0, but I would like for it too look like V1 = cosh(1) + …

---

## [Example of a hybrid Python-Julia package, based on Julia code](https://discourse.julialang.org/t/example-of-a-hybrid-python-julia-package-based-on-julia-code/126720)

<div class="topic-metadata">

**Author:** [@cdsousa](https://discourse.julialang.org/u/cdsousa)\
**Replies:** 5\
**Last updated:** [March 9, 2025, 11:21pm UTC](https://discourse.julialang.org/t/example-of-a-hybrid-python-julia-package-based-on-julia-code/126720 "2025-03-09T23:21:55Z")

</div>

How cursed can this be? :sweat\_smile:

---

## [How to debug an error in "type inference"](https://discourse.julialang.org/t/how-to-debug-an-error-in-type-inference/126122)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 8\
**Last updated:** [March 9, 2025, 3:17pm UTC](https://discourse.julialang.org/t/how-to-debug-an-error-in-type-inference/126122 "2025-03-09T15:17:19Z")

</div>

I have encountered a very weird issue, and I need some help on how to diagnose it. It somehow seems to happen between my code being run (which kind of seems to work), but before the output is returned. I.e. the issue doe…

---

## [Speeding up array multiplication](https://discourse.julialang.org/t/speeding-up-array-multiplication/126607)

<div class="topic-metadata">

**Author:** [@ttx002000](https://discourse.julialang.org/u/ttx002000)\
**Replies:** 7\
**Last updated:** [March 9, 2025, 10:20am UTC](https://discourse.julialang.org/t/speeding-up-array-multiplication/126607 "2025-03-09T10:20:29Z")

</div>

Dear Community members: I need advice for speeding up the following operations. I have three arrays, Fockmatrix, fcmatrix, densitymatrix densitymatrix and fcmatrix are already given, and they are passed as arguments …

---

## [Why hasn't LinearAlgebra been removed from the default sysimage?](https://discourse.julialang.org/t/why-hasnt-linearalgebra-been-removed-from-the-default-sysimage/126395)

<div class="topic-metadata">

**Author:** [@gitboy16](https://discourse.julialang.org/u/gitboy16)\
**Replies:** 56\
**Last updated:** [March 9, 2025, 6:42am UTC](https://discourse.julialang.org/t/why-hasnt-linearalgebra-been-removed-from-the-default-sysimage/126395 "2025-03-09T06:42:05Z")

</div>

Would it be possible to have a code example to illustrate type piracy and why LinearAlgebra shouldn’t be removed from the sysimage? I am not familiar with the concept and I am not sure to understand the comment that wa…

---

## [Background Color in inset plots in Plots.jl](https://discourse.julialang.org/t/background-color-in-inset-plots-in-plots-jl/126717)

<div class="topic-metadata">

**Author:** [@Nidish](https://discourse.julialang.org/u/Nidish)\
**Replies:** 2\
**Last updated:** [March 9, 2025, 6:14am UTC](https://discourse.julialang.org/t/background-color-in-inset-plots-in-plots-jl/126717 "2025-03-09T06:14:55Z")

</div>

Is it possible to insert inset plots with a background and a small rounded box around it so it’s more easily visible? Here’s an example where I can really use it. Here’s the non-runnable code I’m using to plot it. Just …

---

## [Does long (~250 ms) network latency break plotting over ssh?](https://discourse.julialang.org/t/does-long-250-ms-network-latency-break-plotting-over-ssh/126722)

<div class="topic-metadata">

**Author:** [@Tetrakai](https://discourse.julialang.org/u/Tetrakai)\
**Replies:** 3\
**Last updated:** [March 8, 2025, 11:44pm UTC](https://discourse.julialang.org/t/does-long-250-ms-network-latency-break-plotting-over-ssh/126722 "2025-03-08T23:44:51Z")

</div>

I am trying out AWS and came across an issue with plots. They worked fine when the server was in the same country, but when I chose a cheaper one in a different region began getting this: connect: Connection refused GKS…

---

## [Is there something like Pkg.gc for precompile caches?](https://discourse.julialang.org/t/is-there-something-like-pkg-gc-for-precompile-caches/126715)

<div class="topic-metadata">

**Author:** [@Benny](https://discourse.julialang.org/u/Benny)\
**Replies:** 0\
**Last updated:** [March 8, 2025, 7:34pm UTC](https://discourse.julialang.org/t/is-there-something-like-pkg-gc-for-precompile-caches/126715 "2025-03-08T19:34:13Z")

</div>

The .julia/compiled folder is building up with a lot of .ji and .dll files for versions and packages that I have long uninstalled with Pkg.gc, is there a way to get rid of the ones I don’t need anymore in the same vein? …

---

## [Printing vector of vectors with :compact output](https://discourse.julialang.org/t/printing-vector-of-vectors-with-compact-output/126515)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 7\
**Last updated:** [March 8, 2025, 10:00am UTC](https://discourse.julialang.org/t/printing-vector-of-vectors-with-compact-output/126515 "2025-03-08T10:00:23Z")

</div>

Following the docs example, we get matrices to be printed with the “compact” form of the elements: julia\> \[Polar(3, 4.0) Polar(4.0,5.3)\] 1×2 Matrix{Polar{Float64}}: 3.0ℯ4.0im 4.0ℯ5.3im and also with a dict with vecto…

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

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