# General Usage

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

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

**Page:** 159

---

## [How to convert contractions from TensorOperations to ITensor?](https://discourse.julialang.org/t/how-to-convert-contractions-from-tensoroperations-to-itensor/115750)

<div class="topic-metadata">

**Author:** [@Uranium238](https://discourse.julialang.org/u/Uranium238)\
**Replies:** 1\
**Last updated:** [June 17, 2024, 2:16pm UTC](https://discourse.julialang.org/t/how-to-convert-contractions-from-tensoroperations-to-itensor/115750 "2024-06-17T14:16:58Z")

</div>

I am trying to write a code for an iterative solver of a set of non linear equations. Doing this needs computation of a lot of Tensor Contractions which I had been doing using TensorOperations.jl . My code is running fin…

---

## [Installer for Windows](https://discourse.julialang.org/t/installer-for-windows/115755)

<div class="topic-metadata">

**Author:** [@Thomas\_Schweikle](https://discourse.julialang.org/u/Thomas_Schweikle)\
**Replies:** 1\
**Last updated:** [June 17, 2024, 1:06pm UTC](https://discourse.julialang.org/t/installer-for-windows/115755 "2024-06-17T13:06:47Z")

</div>

Installing on Windows for all users does not work if no local administrator is available. The installer will always install for users. Why? Because the installer has to do elevation itself if the user calling the insta…

---

## [Find values on a plot with the mouse](https://discourse.julialang.org/t/find-values-on-a-plot-with-the-mouse/115743)

<div class="topic-metadata">

**Author:** [@NaSi](https://discourse.julialang.org/u/NaSi)\
**Replies:** 1\
**Last updated:** [June 17, 2024, 11:31am UTC](https://discourse.julialang.org/t/find-values-on-a-plot-with-the-mouse/115743 "2024-06-17T11:31:10Z")

</div>

Hello ! I am using GLMakie to vizualise some data : fig = Figure() ax1 = Axis(fig\[1,1\]) lines(space\_sampling,data\[:,100\]) I would like to be able to go on the plot and to find the values of coordinates for any point…

---

## [Unstable ODE within Turing model](https://discourse.julialang.org/t/unstable-ode-within-turing-model/115419)

<div class="topic-metadata">

**Author:** [@caesoma](https://discourse.julialang.org/u/caesoma)\
**Replies:** 8\
**Last updated:** [June 17, 2024, 10:18am UTC](https://discourse.julialang.org/t/unstable-ode-within-turing-model/115419 "2024-06-17T10:18:39Z")

</div>

I have a fairly complicated ODE system I am using within Turing for HMC sampling. Sampling seems to work fine: traces and metrics look good in general. However, when I extract a few random samples from the chain and run …

---

## [How to delete a variable from memory in Julia?](https://discourse.julialang.org/t/how-to-delete-a-variable-from-memory-in-julia/115649)

<div class="topic-metadata">

**Author:** [@Uranium238](https://discourse.julialang.org/u/Uranium238)\
**Replies:** 12\
**Last updated:** [June 17, 2024, 8:26am UTC](https://discourse.julialang.org/t/how-to-delete-a-variable-from-memory-in-julia/115649 "2024-06-17T08:26:58Z")

</div>

Below is a very memory and performance intensive part of my code which aims to a system of non-linear equations via tensor contractions. Performance and memory intensive codefunction calculate\_residual\_memeff(T2) # …

---

## [Failed process: error while adding python cis library](https://discourse.julialang.org/t/failed-process-error-while-adding-python-cis-library/115551)

<div class="topic-metadata">

**Author:** [@raman\_kumar](https://discourse.julialang.org/u/raman_kumar)\
**Replies:** 37\
**Last updated:** [June 17, 2024, 6:42am UTC](https://discourse.julialang.org/t/failed-process-error-while-adding-python-cis-library/115551 "2024-06-17T06:42:08Z")

</div>

I want to add cis library which has api in python. using CondaPkg; CondaPkg.add("cis") @abraemer

---

## [How do I define eltype for custom composite type?](https://discourse.julialang.org/t/how-do-i-define-eltype-for-custom-composite-type/115726)

<div class="topic-metadata">

**Author:** [@vshesh](https://discourse.julialang.org/u/vshesh)\
**Replies:** 4\
**Last updated:** [June 17, 2024, 1:05am UTC](https://discourse.julialang.org/t/how-do-i-define-eltype-for-custom-composite-type/115726 "2024-06-17T01:05:09Z")

</div>

I tried creating my own container type alias: Forest{Tree} = Union{\<: AbstractVector{\<: Tree}, \<: AbstractSet{\<: Tree}} I want to do, in essence: Base.eltype(::Type{Forest{T}}) where T = T julia\> eltype(Forest{Int})…

---

## [Question about my Plots](https://discourse.julialang.org/t/question-about-my-plots/115638)

<div class="topic-metadata">

**Author:** [@abcde](https://discourse.julialang.org/u/abcde)\
**Replies:** 2\
**Last updated:** [June 17, 2024, 12:13am UTC](https://discourse.julialang.org/t/question-about-my-plots/115638 "2024-06-17T00:13:50Z")

</div>

julia\> using Plots \[ Info: Precompiling Plots \[91a5bcdd-55d7-5caf-9e0b-520d859cae80\] ERROR: LoadError: LoadError: InitError: could not load library “C:\\Users\\Administrator.julia\\artifacts\\2ef92b843c5dee978e2aaf8494e…

---

## [Understanding display of equations and computation with Symbolics.jl](https://discourse.julialang.org/t/understanding-display-of-equations-and-computation-with-symbolics-jl/114558)

<div class="topic-metadata">

**Author:** [@hatmatrix](https://discourse.julialang.org/u/hatmatrix)\
**Replies:** 2\
**Last updated:** [June 16, 2024, 9:47pm UTC](https://discourse.julialang.org/t/understanding-display-of-equations-and-computation-with-symbolics-jl/114558 "2024-06-16T21:47:35Z")

</div>

I got from the documentation that you can use Symbolics.jl and Latexify.jl together to display your equations. However, what can be evaluated gets evaluated right away so in that sense not the same as sympy or Sympy.jl …

---

## [Vector of vectors with floats: Type confusion](https://discourse.julialang.org/t/vector-of-vectors-with-floats-type-confusion/115707)

<div class="topic-metadata">

**Author:** [@Santiago\_Lopez](https://discourse.julialang.org/u/Santiago_Lopez)\
**Replies:** 4\
**Last updated:** [June 16, 2024, 9:32pm UTC](https://discourse.julialang.org/t/vector-of-vectors-with-floats-type-confusion/115707 "2024-06-16T21:32:49Z")

</div>

I have a vector of vectors vv. Each vector v in vv is of type Vector{Float32}: julia\> unique(typeof.(vv)) 1-element Vector{DataType}: Vector{Float32} (alias for Array{Float32, 1}) However, julia\> typeof(vv) Vector{Ve…

---

## [Deserialization in a Module()](https://discourse.julialang.org/t/deserialization-in-a-module/115577)

<div class="topic-metadata">

**Author:** [@ablaom](https://discourse.julialang.org/u/ablaom)\
**Replies:** 2\
**Last updated:** [June 16, 2024, 8:11pm UTC](https://discourse.julialang.org/t/deserialization-in-a-module/115577 "2024-06-16T20:11:35Z")

</div>

I don’t understand why the code below errors: module TestMod MyMod = Module() Core.eval( MyMod, quote using Serialization f() = "hello" …

---

## [Using \`Enum\`s as indices](https://discourse.julialang.org/t/using-enum-s-as-indices/115718)

<div class="topic-metadata">

**Author:** [@sgaure](https://discourse.julialang.org/u/sgaure)\
**Replies:** 3\
**Last updated:** [June 16, 2024, 7:02pm UTC](https://discourse.julialang.org/t/using-enum-s-as-indices/115718 "2024-06-16T19:02:50Z")

</div>

I’m using enum’s for some purposes. In particular for indexing arrays. It works fine, except for some types of broadcasting: a = \[zeros(10) for \_ in 1:4\]; b = \[zeros(10) for \_ in 1:4\]; @enum Count one=1 two three four …

---

## [Wanted: an API for merging sorted collections](https://discourse.julialang.org/t/wanted-an-api-for-merging-sorted-collections/115722)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 1\
**Last updated:** [June 16, 2024, 6:57pm UTC](https://discourse.julialang.org/t/wanted-an-api-for-merging-sorted-collections/115722 "2024-06-16T18:57:56Z")

</div>

I don’t think there’s a public function for the merge algorithm anywhere in Julia or the ecosystem. It’s what merge sort is based on. Wikipedia introduces merging like this: Merge algorithms are a family of algorithms …

---

## [Why Julia doesn't throw error if pre-declared array is reassigned to a new differently sized array?](https://discourse.julialang.org/t/why-julia-doesnt-throw-error-if-pre-declared-array-is-reassigned-to-a-new-differently-sized-array/115697)

<div class="topic-metadata">

**Author:** [@singularity](https://discourse.julialang.org/u/singularity)\
**Replies:** 16\
**Last updated:** [June 16, 2024, 2:10pm UTC](https://discourse.julialang.org/t/why-julia-doesnt-throw-error-if-pre-declared-array-is-reassigned-to-a-new-differently-sized-array/115697 "2024-06-16T14:10:29Z")

</div>

Another confusing thing with Julia. Why does julia not throw an error if I declare an array as x::Vector{Float64} = zeros(100); and then reassign as x = rand(50); How can I ensure bound-checking with this kind of fre…

---

## [LocalRegistry on Azure DevOps](https://discourse.julialang.org/t/localregistry-on-azure-devops/111649)

<div class="topic-metadata">

**Author:** [@kealme](https://discourse.julialang.org/u/kealme)\
**Replies:** 2\
**Last updated:** [June 16, 2024, 10:57am UTC](https://discourse.julialang.org/t/localregistry-on-azure-devops/111649 "2024-06-16T10:57:01Z")

</div>

Hi, I’m developing some packages. In Python, my workflow for this is as follows: Developing: Develop package and start release pipeline in Azure DevOps DevOps publishes the Python Package in the Azure Artifact Feed U…

---

## [Multithreading when task vary in length (and need temporary arrays)](https://discourse.julialang.org/t/multithreading-when-task-vary-in-length-and-need-temporary-arrays/115689)

<div class="topic-metadata">

**Author:** [@nicolas](https://discourse.julialang.org/u/nicolas)\
**Replies:** 5\
**Last updated:** [June 16, 2024, 9:10am UTC](https://discourse.julialang.org/t/multithreading-when-task-vary-in-length-and-need-temporary-arrays/115689 "2024-06-16T09:10:45Z")

</div>

I am running simulations on my personal computer. The compute time of each draw/specification can vary significantly (in an unpredictable way). I think Threads.@threads schedules each iteration of a loop between threads …

---

## [Zoom in GLMakie 3d plot then save](https://discourse.julialang.org/t/zoom-in-glmakie-3d-plot-then-save/65745)

<div class="topic-metadata">

**Author:** [@sim](https://discourse.julialang.org/u/sim)\
**Replies:** 15\
**Last updated:** [June 16, 2024, 7:36am UTC](https://discourse.julialang.org/t/zoom-in-glmakie-3d-plot-then-save/65745 "2024-06-16T07:36:02Z")

</div>

Hello, I need some help to perform some simple operations on GLMakie. I want, say, to draw a simple torus juste like this example, zoom in, and save the plot, but I could find no example on how to use Makie’s zoom! func…

---

## [\`local\` just in case: good idea or code smell?](https://discourse.julialang.org/t/local-just-in-case-good-idea-or-code-smell/115668)

<div class="topic-metadata">

**Author:** [@Nathan\_Boyer](https://discourse.julialang.org/u/Nathan_Boyer)\
**Replies:** 8\
**Last updated:** [June 16, 2024, 3:55am UTC](https://discourse.julialang.org/t/local-just-in-case-good-idea-or-code-smell/115668 "2024-06-16T03:55:03Z")

</div>

I often write local to ensure a variable does not accidently reuse another definition such as in the example below. Is that a good idea, or is there something more sophisticated I should be doing to test local scoping? f…

---

## [Determining if a symbolic expression is positive and real](https://discourse.julialang.org/t/determining-if-a-symbolic-expression-is-positive-and-real/115538)

<div class="topic-metadata">

**Author:** [@thquinn](https://discourse.julialang.org/u/thquinn)\
**Replies:** 5\
**Last updated:** [June 16, 2024, 2:40am UTC](https://discourse.julialang.org/t/determining-if-a-symbolic-expression-is-positive-and-real/115538 "2024-06-16T02:40:08Z")

</div>

I’m about to start rewriting a physics simulation from Wolfram Client Library for Python to Julia using Symbolics.jl. The simulation consists of collisions between circles and line segments. At each time step, I find th…

---

## [How to specify thousand separator with CSV.read data](https://discourse.julialang.org/t/how-to-specify-thousand-separator-with-csv-read-data/86890)

<div class="topic-metadata">

**Author:** [@Nikx](https://discourse.julialang.org/u/Nikx)\
**Replies:** 7\
**Last updated:** [June 16, 2024, 1:10am UTC](https://discourse.julialang.org/t/how-to-specify-thousand-separator-with-csv-read-data/86890 "2024-06-16T01:10:58Z")

</div>

My Excel spread uses apostrophes to separate thousands and even worse it uses" ’ " instead of straight apostroph e.g. 1’000. Is there a way to specify this in CSV.read()? Because when I import data it interprets 1’000 a…

---

## [ModelingToolkit change parameter vector size based on structural parameter](https://discourse.julialang.org/t/modelingtoolkit-change-parameter-vector-size-based-on-structural-parameter/109914)

<div class="topic-metadata">

**Author:** [@BambOoxX](https://discourse.julialang.org/u/BambOoxX)\
**Replies:** 4\
**Last updated:** [June 15, 2024, 6:30pm UTC](https://discourse.julialang.org/t/modelingtoolkit-change-parameter-vector-size-based-on-structural-parameter/109914 "2024-06-15T18:30:39Z")

</div>

Hi all, I’m trying to model a nonlinear component with @mtkmodel in ModelingToolkit. The base model with a given nonlinerity order (3 in this case) is @mtkmodel NLComponent begin @parameters begin r\[1:3\] …

---

## [How to investigate output of type instability checks?](https://discourse.julialang.org/t/how-to-investigate-output-of-type-instability-checks/115639)

<div class="topic-metadata">

**Author:** [@Uranium238](https://discourse.julialang.org/u/Uranium238)\
**Replies:** 11\
**Last updated:** [June 15, 2024, 4:44pm UTC](https://discourse.julialang.org/t/how-to-investigate-output-of-type-instability-checks/115639 "2024-06-15T16:44:29Z")

</div>

I am trying to eliminate the type instabilities that might cause my code (shown below) of an iterative solver to some non linear system of equations to become slow: using Printf,Plots, TimerOutputs include("ccd-helper.j…

---

## [System of SDE with complex noise](https://discourse.julialang.org/t/system-of-sde-with-complex-noise/111469)

<div class="topic-metadata">

**Author:** [@matt1](https://discourse.julialang.org/u/matt1)\
**Replies:** 1\
**Last updated:** [June 15, 2024, 11:00am UTC](https://discourse.julialang.org/t/system-of-sde-with-complex-noise/111469 "2024-06-15T11:00:46Z")

</div>

Hello! Let’s say I want to solve numerically the following stochastic partial differential equation: \\begin{equation} du(x,y,t)=\\nabla^{2}u(x,y,t) dt+k\\cdot dW^{r}(x,y,t)+i k\\cdot dW^{c}(x,y,t)) \\end{equation}, wher…

---

## [How to export the documentation of a Julia package to PDF?](https://discourse.julialang.org/t/how-to-export-the-documentation-of-a-julia-package-to-pdf/115683)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 4\
**Last updated:** [June 15, 2024, 9:13am UTC](https://discourse.julialang.org/t/how-to-export-the-documentation-of-a-julia-package-to-pdf/115683 "2024-06-15T09:13:55Z")

</div>

Some of the documentations of Julia packages on the webpages generated with Documenter.jl are so good that I want to convert them into full structured PDF so that I can print and read them just like reading papers or boo…

---

## [Unexpected Memory Allocation of Broadcasting Copy](https://discourse.julialang.org/t/unexpected-memory-allocation-of-broadcasting-copy/115634)

<div class="topic-metadata">

**Author:** [@0samuraiE](https://discourse.julialang.org/u/0samuraiE)\
**Replies:** 4\
**Last updated:** [June 15, 2024, 2:59am UTC](https://discourse.julialang.org/t/unexpected-memory-allocation-of-broadcasting-copy/115634 "2024-06-15T02:59:47Z")

</div>

Hi all. I encounted the problem as topic saids. julia\> a = zeros(4, 4, 3) julia\> @btime @views $a\[:, :, 2\] .= $a\[:, :, 2\] 38.862 ns (1 allocation: 192 bytes) julia\> @btime @views for i in eachindex($a\[:, :, 2\]) …

---

## [Using a modifier function on the output of DifferentialEquation for plotting](https://discourse.julialang.org/t/using-a-modifier-function-on-the-output-of-differentialequation-for-plotting/115669)

<div class="topic-metadata">

**Author:** [@cmdenis](https://discourse.julialang.org/u/cmdenis)\
**Replies:** 3\
**Last updated:** [June 14, 2024, 9:39pm UTC](https://discourse.julialang.org/t/using-a-modifier-function-on-the-output-of-differentialequation-for-plotting/115669 "2024-06-14T21:39:55Z")

</div>

Hello, I am using the (fantastic) DifferentialEquation.jl package to run some simulation and would like to plot the solution, but after applying a modifying function on the solution. What I mean is that I would like to…

---

## [Named pipes](https://discourse.julialang.org/t/named-pipes/115627)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 18\
**Last updated:** [June 14, 2024, 7:06pm UTC](https://discourse.julialang.org/t/named-pipes/115627 "2024-06-14T19:06:26Z")

</div>

Is there something like “named pipes” in Julia? (I just learned that those things exist). The goal is to provide a “file” as input to an external program while avoiding explicitly writing the file to disc. Does that ex…

---

## [Unexpected additional behavior when using zip to construct NamedTuple](https://discourse.julialang.org/t/unexpected-additional-behavior-when-using-zip-to-construct-namedtuple/115623)

<div class="topic-metadata">

**Author:** [@duzaichuan](https://discourse.julialang.org/u/duzaichuan)\
**Replies:** 7\
**Last updated:** [June 14, 2024, 6:52pm UTC](https://discourse.julialang.org/t/unexpected-additional-behavior-when-using-zip-to-construct-namedtuple/115623 "2024-06-14T18:52:56Z")

</div>

Hi, I use Julia1.10.4 in Archlinux. I try to use zip to dynamically create a named tuple, like this test = (; zip((:a, :b), fill(zeros(3), 2))...) =\> (a=\[0.0, 0.0, 0.0\], b=\[0.0, 0.0, 0.0\]) However, very strange, when…

---

## [My dependency changed one of its dependencies - can't build my package anymore](https://discourse.julialang.org/t/my-dependency-changed-one-of-its-dependencies-cant-build-my-package-anymore/115659)

<div class="topic-metadata">

**Author:** [@Santiago\_Lopez](https://discourse.julialang.org/u/Santiago_Lopez)\
**Replies:** 1\
**Last updated:** [June 14, 2024, 5:45pm UTC](https://discourse.julialang.org/t/my-dependency-changed-one-of-its-dependencies-cant-build-my-package-anymore/115659 "2024-06-14T17:45:15Z")

</div>

Hi, I pushed a minor changed to my Julia’s package repo and got the following error during the Documenter build: ERROR: LoadError: LoadError: ArgumentError: Package Polynomials does not have MakieCore in its dependenci…

---

## [Calling Finalize from Running Finalizer](https://discourse.julialang.org/t/calling-finalize-from-running-finalizer/115365)

<div class="topic-metadata">

**Author:** [@PatrickHaecker](https://discourse.julialang.org/u/PatrickHaecker)\
**Replies:** 4\
**Last updated:** [June 14, 2024, 3:42pm UTC](https://discourse.julialang.org/t/calling-finalize-from-running-finalizer/115365 "2024-06-14T15:42:01Z")

</div>

I haven’t found it in the documentation, so I wanted to have it confirmed/documented: Assume you have two objects, both having a finalizer. One finalizer needs to be called before the other, because there is a dependenc…

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

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