# General Usage

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

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

**Page:** 387

---

## [How to do a nested parallelization of two nested functions?](https://discourse.julialang.org/t/how-to-do-a-nested-parallelization-of-two-nested-functions/88334)

<div class="topic-metadata">

**Author:** [@structural](https://discourse.julialang.org/u/structural)\
**Replies:** 13\
**Last updated:** [October 7, 2022, 11:33am UTC](https://discourse.julialang.org/t/how-to-do-a-nested-parallelization-of-two-nested-functions/88334 "2022-10-07T11:33:58Z")

</div>

Suppose I have two functions, with one nested inside the other. I have N processors for the computation. Is it possible to distribute the outer function over n1 processors and distribute each call of the inside function …

---

## [Doubly linked list with initial list and mutation](https://discourse.julialang.org/t/doubly-linked-list-with-initial-list-and-mutation/88375)

<div class="topic-metadata">

**Author:** [@DanielVandH](https://discourse.julialang.org/u/DanielVandH)\
**Replies:** 3\
**Last updated:** [October 7, 2022, 10:19am UTC](https://discourse.julialang.org/t/doubly-linked-list-with-initial-list-and-mutation/88375 "2022-10-07T10:19:11Z")

</div>

I want to use a doubly linked list that wraps around the indices 1,...,n, so that next(i) = mod(i+1, n) and prev(i) = mod(i-2, n) + 1. I also then need to modify these values later, setting e.g. next(prev(π(i))) = next(π…

---

## [Shift-Inverse diagonalization in Julia](https://discourse.julialang.org/t/shift-inverse-diagonalization-in-julia/87994)

<div class="topic-metadata">

**Author:** [@devanshu](https://discourse.julialang.org/u/devanshu)\
**Replies:** 7\
**Last updated:** [October 7, 2022, 9:57am UTC](https://discourse.julialang.org/t/shift-inverse-diagonalization-in-julia/87994 "2022-10-07T09:57:29Z")

</div>

What is the best technique to use the shift-inverse diagonalisation technique in Julia? I have used Arpack.jl but it doesn’t seem to be much faster; I am not sure how it handles the inverse part. So I would like to under…

---

## [Combine Makie \`fontsize\` attribute with \`lines(\` command](https://discourse.julialang.org/t/combine-makie-fontsize-attribute-with-lines-command/88352)

<div class="topic-metadata">

**Author:** [@mschauer](https://discourse.julialang.org/u/mschauer)\
**Replies:** 3\
**Last updated:** [October 7, 2022, 5:28am UTC](https://discourse.julialang.org/t/combine-makie-fontsize-attribute-with-lines-command/88352 "2022-10-07T05:28:00Z")

</div>

How do I combine Makie fontsize attribute with lines( command. The help text only show how to use it with Figure

---

## [How to update Julia in ssh clusters](https://discourse.julialang.org/t/how-to-update-julia-in-ssh-clusters/88351)

<div class="topic-metadata">

**Author:** [@greivin](https://discourse.julialang.org/u/greivin)\
**Replies:** 11\
**Last updated:** [October 6, 2022, 11:35pm UTC](https://discourse.julialang.org/t/how-to-update-julia-in-ssh-clusters/88351 "2022-10-06T23:35:39Z")

</div>

I’m working as a PhD student in a lab with ssh clusters, I have the access to connect to each one of them (there’s no queue system, as it is a small lab, hence, as long as someone is not using a lot of cores in each comp…

---

## [PETSc Error](https://discourse.julialang.org/t/petsc-error/87081)

<div class="topic-metadata">

**Author:** [@DEVASMIT\_DUTTA](https://discourse.julialang.org/u/DEVASMIT_DUTTA)\
**Replies:** 2\
**Last updated:** [October 6, 2022, 9:16pm UTC](https://discourse.julialang.org/t/petsc-error/87081 "2022-10-06T21:16:32Z")

</div>

Hi, I am operating on macOS Monterey, version 12.5.1, and i am facing an issue when i try to run code using GridapPETSc, below is the error in stack-trace PETSc Error --- Application was linked against both OpenMPI and …

---

## [Saving SDE data using DataFrames.jl naming of columns](https://discourse.julialang.org/t/saving-sde-data-using-dataframes-jl-naming-of-columns/88325)

<div class="topic-metadata">

**Author:** [@Max\_Beez](https://discourse.julialang.org/u/Max_Beez)\
**Replies:** 6\
**Last updated:** [October 6, 2022, 8:52pm UTC](https://discourse.julialang.org/t/saving-sde-data-using-dataframes-jl-naming-of-columns/88325 "2022-10-06T20:52:48Z")

</div>

I am simulating an SDE using DifferentialEquations.jl and I am using DataFrames.jl to save the solution data. I get a data frame with columns named timestamp, value1, value2 and value3. I would like to use SDEFunction …

---

## [Communication JavaScript application (client) and a Julia application (server)](https://discourse.julialang.org/t/communication-javascript-application-client-and-a-julia-application-server/88358)

<div class="topic-metadata">

**Author:** [@Ricardo\_Lima](https://discourse.julialang.org/u/Ricardo_Lima)\
**Replies:** 3\
**Last updated:** [October 6, 2022, 6:39pm UTC](https://discourse.julialang.org/t/communication-javascript-application-client-and-a-julia-application-server/88358 "2022-10-06T18:39:53Z")

</div>

I need to create a communication via socket between a javascript application (client) and a julia application (server). I searched the forum and didn’t find something that works, can someone help me with an example that…

---

## [Round Dates.Time variable](https://discourse.julialang.org/t/round-dates-time-variable/88306)

<div class="topic-metadata">

**Author:** [@fipelle](https://discourse.julialang.org/u/fipelle)\
**Replies:** 7\
**Last updated:** [October 6, 2022, 5:46pm UTC](https://discourse.julialang.org/t/round-dates-time-variable/88306 "2022-10-06T17:46:43Z")

</div>

Hi, I am trying to round two variables - say X and Y - of type Dates.Time. X has value 09:30:01.017, Y has value 09:59:59.103 and I would like to round them to 09:30:00.000 and 10:00:00.000. I have tried using floor and…

---

## [Package is not updating, but why?](https://discourse.julialang.org/t/package-is-not-updating-but-why/88338)

<div class="topic-metadata">

**Author:** [@bernhard](https://discourse.julialang.org/u/bernhard)\
**Replies:** 5\
**Last updated:** [October 6, 2022, 3:09pm UTC](https://discourse.julialang.org/t/package-is-not-updating-but-why/88338 "2022-10-06T15:09:52Z")

</div>

I have a private package (which I cannot share) where DataFrames is not updating. I cannot find any reason in the Project.toml file why it should be fixed to v1.3.6. Should Pkg.status(; outdated=true) provide the reas…

---

## [Method overloading doesn't work inside a function](https://discourse.julialang.org/t/method-overloading-doesnt-work-inside-a-function/88339)

<div class="topic-metadata">

**Author:** [@wsshin](https://discourse.julialang.org/u/wsshin)\
**Replies:** 6\
**Last updated:** [October 6, 2022, 3:04pm UTC](https://discourse.julialang.org/t/method-overloading-doesnt-work-inside-a-function/88339 "2022-10-06T15:04:58Z")

</div>

The following method overloading works: julia\> VERSION v"1.8.0" julia\> myfun1(x, y) = x+y # method to overload myfun1 (generic function with 1 method) julia\> myfun1(x) = myfun1(x, 1) # overloading myfun1 (generic fu…

---

## [Makie reverse axis](https://discourse.julialang.org/t/makie-reverse-axis/55756)

<div class="topic-metadata">

**Author:** [@neuralian](https://discourse.julialang.org/u/neuralian)\
**Replies:** 4\
**Last updated:** [October 6, 2022, 2:40pm UTC](https://discourse.julialang.org/t/makie-reverse-axis/55756 "2022-10-06T14:40:34Z")

</div>

How do I reverse an axis in a Makie scene (figure)? The documentation says " You can manually reverse an axis by setting ax.xreversed = true or ax.yreversed = true ", but … fig = Figure() ax = fig\[1,1\] ... ax.xreversed…

---

## [Views of arrays inside a mutable struct](https://discourse.julialang.org/t/views-of-arrays-inside-a-mutable-struct/88337)

<div class="topic-metadata">

**Author:** [@SiddhantDeshmukh](https://discourse.julialang.org/u/SiddhantDeshmukh)\
**Replies:** 3\
**Last updated:** [October 6, 2022, 2:01pm UTC](https://discourse.julialang.org/t/views-of-arrays-inside-a-mutable-struct/88337 "2022-10-06T14:01:36Z")

</div>

Hi, I’m encountering some unexpected behaviour when using views of arrays inside of a mutable struct. Here is the basic structure: using Parameters @with\_kw mutable struct Grid prim::Array{Float64, 3} = zeros(Float64,…

---

## [Does passing a dataframe declared outside a function as an argument improves performance?](https://discourse.julialang.org/t/does-passing-a-dataframe-declared-outside-a-function-as-an-argument-improves-performance/88318)

<div class="topic-metadata">

**Author:** [@mb96](https://discourse.julialang.org/u/mb96)\
**Replies:** 4\
**Last updated:** [October 6, 2022, 12:15pm UTC](https://discourse.julialang.org/t/does-passing-a-dataframe-declared-outside-a-function-as-an-argument-improves-performance/88318 "2022-10-06T12:15:23Z")

</div>

Hi there, I had a question regarding performance of functions in general which act or use DataFrames. Let say I read in a csv file into a DataFrame in a my main program (code). Then I declare a function which uses such …

---

## [Strange error when passing a DataFrame to pmap](https://discourse.julialang.org/t/strange-error-when-passing-a-dataframe-to-pmap/88316)

<div class="topic-metadata">

**Author:** [@mb96](https://discourse.julialang.org/u/mb96)\
**Replies:** 1\
**Last updated:** [October 6, 2022, 8:10am UTC](https://discourse.julialang.org/t/strange-error-when-passing-a-dataframe-to-pmap/88316 "2022-10-06T08:10:06Z")

</div>

Hi there! I am having an error when parallelizing my code with the Distributed library from which I use pmap. The following code might seem a bit strange but it is a (as much as possible) simplification of what I was run…

---

## [Julia 1.6.7 LTS Pkg.add(“Gtk”) on Windows 10](https://discourse.julialang.org/t/julia-1-6-7-lts-pkg-add-gtk-on-windows-10/88315)

<div class="topic-metadata">

**Author:** [@Pilbum](https://discourse.julialang.org/u/Pilbum)\
**Replies:** 2\
**Last updated:** [October 6, 2022, 4:26am UTC](https://discourse.julialang.org/t/julia-1-6-7-lts-pkg-add-gtk-on-windows-10/88315 "2022-10-06T04:26:39Z")

</div>

I asked the same question on New to Julia category and just repeat here. I am trying to install Gtk, but got an error message as below. ERROR: Unable to automatically install ‘adwaita\_icon\_theme’ from ‘C:\\Users\\me.juli…

---

## [How do I use LsqFit to fit points with an associated error?](https://discourse.julialang.org/t/how-do-i-use-lsqfit-to-fit-points-with-an-associated-error/88291)

<div class="topic-metadata">

**Author:** [@ultrapoci](https://discourse.julialang.org/u/ultrapoci)\
**Replies:** 2\
**Last updated:** [October 5, 2022, 8:32pm UTC](https://discourse.julialang.org/t/how-do-i-use-lsqfit-to-fit-points-with-an-associated-error/88291 "2022-10-05T20:32:07Z")

</div>

I have these points I want to fit: x y err 24.0 0.0386341 4.29118e-5 24.33 0.03952 2.10541e-5 24.66 0.0398329 1.76137e-5 25.0 0.0399503 1.75643e-5 25.33 0.0399654 1.63191e-5 25.66 0.0398724 …

---

## [Downloading Julia on a host system through the terminal](https://discourse.julialang.org/t/downloading-julia-on-a-host-system-through-the-terminal/88303)

<div class="topic-metadata">

**Author:** [@mb96](https://discourse.julialang.org/u/mb96)\
**Replies:** 3\
**Last updated:** [October 5, 2022, 6:46pm UTC](https://discourse.julialang.org/t/downloading-julia-on-a-host-system-through-the-terminal/88303 "2022-10-05T18:46:00Z")

</div>

Hi there, I am using a host Mac computer as a cluster (through remote controlling) and I want to install the latest Julia version on it but it has to be done through the terminal. Theres an old version installed in the …

---

## [Plots + PlotlyJS + LaTeX](https://discourse.julialang.org/t/plots-plotlyjs-latex/38250)

<div class="topic-metadata">

**Author:** [@Oto\_Brzobohaty](https://discourse.julialang.org/u/Oto_Brzobohaty)\
**Replies:** 14\
**Last updated:** [October 5, 2022, 3:46pm UTC](https://discourse.julialang.org/t/plots-plotlyjs-latex/38250 "2022-10-05T15:46:28Z")

</div>

I love PlotlyJS interactivity mainly in Jupyter notebook or VS Code Plot pane, on the other hand, I had always problems with latex in labels. Recently, I noticed that in one of my julia environment (Julia 1.3.1, jupyter…

---

## [Exponent operator failing for large exponents](https://discourse.julialang.org/t/exponent-operator-failing-for-large-exponents/88286)

<div class="topic-metadata">

**Author:** [@mb96](https://discourse.julialang.org/u/mb96)\
**Replies:** 11\
**Last updated:** [October 5, 2022, 3:39pm UTC](https://discourse.julialang.org/t/exponent-operator-failing-for-large-exponents/88286 "2022-10-05T15:39:25Z")

</div>

Hi there I tried exponentiating 2 to large powers with the ^ operator but when exponent gets large I get a zero.

---

## [Text Analysis API Error](https://discourse.julialang.org/t/text-analysis-api-error/88262)

<div class="topic-metadata">

**Author:** [@nosewitz](https://discourse.julialang.org/u/nosewitz)\
**Replies:** 2\
**Last updated:** [October 5, 2022, 1:36pm UTC](https://discourse.julialang.org/t/text-analysis-api-error/88262 "2022-10-05T13:36:05Z")

</div>

I am attempting to make a model for sensitivity analysis by only keeping the intersection of tokens between a test set and a training set of documents. To do this I am converting both sets of documents into Corpus and fi…

---

## [Random Segmentation Fault on GitHub tests](https://discourse.julialang.org/t/random-segmentation-fault-on-github-tests/88172)

<div class="topic-metadata">

**Author:** [@markowkes](https://discourse.julialang.org/u/markowkes)\
**Replies:** 4\
**Last updated:** [October 5, 2022, 12:54pm UTC](https://discourse.julialang.org/t/random-segmentation-fault-on-github-tests/88172 "2022-10-05T12:54:19Z")

</div>

A package I have developed randomly fails to pass github tests due to a segmentation fault. For example, this test failed: https://github.com/markowkes/Biofilm.jl/actions/runs/3175253204/jobs/5173336213. I have seen a …

---

## [Loading .svg into Plot for further processing](https://discourse.julialang.org/t/loading-svg-into-plot-for-further-processing/88252)

<div class="topic-metadata">

**Author:** [@Nash](https://discourse.julialang.org/u/Nash)\
**Replies:** 8\
**Last updated:** [October 5, 2022, 11:40am UTC](https://discourse.julialang.org/t/loading-svg-into-plot-for-further-processing/88252 "2022-10-05T11:40:19Z")

</div>

I am working on an image that combines a chart, white space, and text. I am using Plot for this. I start by producing the chart and then save it as a .png image. Then I load the image and add various designs like white s…

---

## [Arithmetic with types](https://discourse.julialang.org/t/arithmetic-with-types/88278)

<div class="topic-metadata">

**Author:** [@prittjam](https://discourse.julialang.org/u/prittjam)\
**Replies:** 1\
**Last updated:** [October 5, 2022, 10:06am UTC](https://discourse.julialang.org/t/arithmetic-with-types/88278 "2022-10-05T10:06:41Z")

</div>

How can I add types that are integers and pass them along to other parameterized types? e.g., const PointRpN{N \<: Integer, T \<: AbstractFloat} = Euclidean.PointNd{N+1,T} const PointRp2{T \<: AbstractFloat} = PointRpN{2…

---

## [Annotations in Plot save as black when image format is PNG, although the REPL shows the correct custom color](https://discourse.julialang.org/t/annotations-in-plot-save-as-black-when-image-format-is-png-although-the-repl-shows-the-correct-custom-color/88277)

<div class="topic-metadata">

**Author:** [@Nash](https://discourse.julialang.org/u/Nash)\
**Replies:** 0\
**Last updated:** [October 5, 2022, 8:59am UTC](https://discourse.julialang.org/t/annotations-in-plot-save-as-black-when-image-format-is-png-although-the-repl-shows-the-correct-custom-color/88277 "2022-10-05T08:59:06Z")

</div>

When I annotate a plot in a custom, non-black, color, and save it as PNG, the image saved does not show the custom colored text, but shows it in black. Please see the following example: Has anyone encountered this probl…

---

## [Isstructtype()](https://discourse.julialang.org/t/isstructtype/88268)

<div class="topic-metadata">

**Author:** [@Lincoln\_Hannah](https://discourse.julialang.org/u/Lincoln_Hannah)\
**Replies:** 5\
**Last updated:** [October 5, 2022, 5:49am UTC](https://discourse.julialang.org/t/isstructtype/88268 "2022-10-05T05:49:29Z")

</div>

Is it possible to do something like function my\_func( x::I ) where isstructtype(I) #function body end

---

## [How to substitute variable in expression contains its derivative also](https://discourse.julialang.org/t/how-to-substitute-variable-in-expression-contains-its-derivative-also/88241)

<div class="topic-metadata">

**Author:** [@Starpower\_Power](https://discourse.julialang.org/u/Starpower_Power)\
**Replies:** 2\
**Last updated:** [October 4, 2022, 11:35pm UTC](https://discourse.julialang.org/t/how-to-substitute-variable-in-expression-contains-its-derivative-also/88241 "2022-10-04T23:35:35Z")

</div>

using SymPy using PyCall sp = pyimport("sympy") t1 = sp.Function("theta\_1")(t) f = t1^2 +t1 df = sp.diff(f,t) # so df = 2\*t1\*(d(t1)/d(t))+ (d(t1)/d(t)) # if substitution done of t1 value that is t1 = 2 s = df.subs(\[(…

---

## [Check the solution based on the factorization Matrices of KLU](https://discourse.julialang.org/t/check-the-solution-based-on-the-factorization-matrices-of-klu/88180)

<div class="topic-metadata">

**Author:** [@Amro](https://discourse.julialang.org/u/Amro)\
**Replies:** 6\
**Last updated:** [October 4, 2022, 8:27pm UTC](https://discourse.julialang.org/t/check-the-solution-based-on-the-factorization-matrices-of-klu/88180 "2022-10-04T20:27:57Z")

</div>

I am trying to play with KLU matrices based on KLU.jl. However, I am having false instead of true when I am comparing Q\*((P\*A\*Q)\\P\*b) == A\\b. Could you please correct me given that the below A and b are taken from my rea…

---

## [Arithmetic performance of expression](https://discourse.julialang.org/t/arithmetic-performance-of-expression/88196)

<div class="topic-metadata">

**Author:** [@Jojo](https://discourse.julialang.org/u/Jojo)\
**Replies:** 11\
**Last updated:** [October 4, 2022, 8:01pm UTC](https://discourse.julialang.org/t/arithmetic-performance-of-expression/88196 "2022-10-04T20:01:56Z")

</div>

Hello!, Recently I’ve noticed that Julia performs better when I don’t associate the terms in a expression im using in a for loop. Why is (1), faster than (2)? According to @btime (2) is 0.3 seconds slower than (1) aft…

---

## [SVD solver for Sparse Matrices](https://discourse.julialang.org/t/svd-solver-for-sparse-matrices/88246)

<div class="topic-metadata">

**Author:** [@nosewitz](https://discourse.julialang.org/u/nosewitz)\
**Replies:** 7\
**Last updated:** [October 4, 2022, 6:23pm UTC](https://discourse.julialang.org/t/svd-solver-for-sparse-matrices/88246 "2022-10-04T18:23:18Z")

</div>

I want to use singular value decomposition on large sparse matrices (18,000 x 8,000) and while the built-in LinearAlgebra function does the trick, it does not operate on the SparseMatrix type. My current solution is just…

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

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