# General Usage

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

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

**Page:** 397

---

## [Question on Julia Blog Post regarding Performance](https://discourse.julialang.org/t/question-on-julia-blog-post-regarding-performance/87342)

<div class="topic-metadata">

**Author:** [@TI36XPro](https://discourse.julialang.org/u/TI36XPro)\
**Replies:** 1\
**Last updated:** [September 16, 2022, 3:48am UTC](https://discourse.julialang.org/t/question-on-julia-blog-post-regarding-performance/87342 "2022-09-16T03:48:15Z")

</div>

I was searching around for Julia comparisons to C++ and found this write-up from 2019. I follow most of it but one point I was curious about is near the end where they implemented @simd, @fastmath, and @inbounds. I wou…

---

## [How to collect sin(t) or (sin(t)) ^2 coefficients in a expression](https://discourse.julialang.org/t/how-to-collect-sin-t-or-sin-t-2-coefficients-in-a-expression/87109)

<div class="topic-metadata">

**Author:** [@Starpower\_Power](https://discourse.julialang.org/u/Starpower_Power)\
**Replies:** 5\
**Last updated:** [September 16, 2022, 12:48am UTC](https://discourse.julialang.org/t/how-to-collect-sin-t-or-sin-t-2-coefficients-in-a-expression/87109 "2022-09-16T00:48:16Z")

</div>

using LinearAlgebra using SymPy @vars t x y m=\[cos(t) -sin(t) 0; sin(t) cos(t) 0; 0 0 1\]; a = inv(m)\*\[x;y;t\] b=a'\*a So, I want the coefficient of sin(t) or (sin(t))^2 in final expression b.

---

## [Jupyter notebook don't show the plots after loaded sysimaged PyPlot.jl package](https://discourse.julialang.org/t/jupyter-notebook-dont-show-the-plots-after-loaded-sysimaged-pyplot-jl-package/38219)

<div class="topic-metadata">

**Author:** [@Jieyi\_Xiong](https://discourse.julialang.org/u/Jieyi_Xiong)\
**Replies:** 2\
**Last updated:** [September 16, 2022, 12:25am UTC](https://discourse.julialang.org/t/jupyter-notebook-dont-show-the-plots-after-loaded-sysimaged-pyplot-jl-package/38219 "2022-09-16T00:25:40Z")

</div>

I’d like to boost the loading speed of PyPlot.jl in IJulia-Jupyter model. I created sysimage of this package as below: using PackageCompiler create\_sysimage(:PyPlot, sysimage\_path="/path/to/pyplot.so") and checked this…

---

## [Interpolate along single dimension of multidimensional array](https://discourse.julialang.org/t/interpolate-along-single-dimension-of-multidimensional-array/87290)

<div class="topic-metadata">

**Author:** [@snowgum](https://discourse.julialang.org/u/snowgum)\
**Replies:** 6\
**Last updated:** [September 15, 2022, 6:21pm UTC](https://discourse.julialang.org/t/interpolate-along-single-dimension-of-multidimensional-array/87290 "2022-09-15T18:21:57Z")

</div>

I’m trying to convert a Python code to Julia that makes use of scipy.interpolate.interp1d, and I’m having difficulty finding the best way to do this in Julia. The interp1d function does 1D interpolation along a given dim…

---

## [How to know which Julia package to trust?](https://discourse.julialang.org/t/how-to-know-which-julia-package-to-trust/87304)

<div class="topic-metadata">

**Author:** [@Nav](https://discourse.julialang.org/u/Nav)\
**Replies:** 7\
**Last updated:** [September 15, 2022, 3:47pm UTC](https://discourse.julialang.org/t/how-to-know-which-julia-package-to-trust/87304 "2022-09-15T15:47:57Z")

</div>

I’ve seen this discussion, but it doesn’t seem to bring forth a solution. The problem: When I (or anyone) wants to select a Julia package for a task, it’s difficult to choose, because: We don’t know how well it has b…

---

## [Code in Threads.@threads takes longer than in single-threaded code](https://discourse.julialang.org/t/code-in-threads-threads-takes-longer-than-in-single-threaded-code/87313)

<div class="topic-metadata">

**Author:** [@dafred](https://discourse.julialang.org/u/dafred)\
**Replies:** 0\
**Last updated:** [September 15, 2022, 1:57pm UTC](https://discourse.julialang.org/t/code-in-threads-threads-takes-longer-than-in-single-threaded-code/87313 "2022-09-15T13:57:27Z")

</div>

So I’m trying to reduce execution times of closure loss that is returned from construct loss. I figured that multithreading might help me. I am mostly interested in speeding up ForwardDiff.gradient(loss, p\_initial) but…

---

## [How to split all chars from string array](https://discourse.julialang.org/t/how-to-split-all-chars-from-string-array/45965)

<div class="topic-metadata">

**Author:** [@programista](https://discourse.julialang.org/u/programista)\
**Replies:** 5\
**Last updated:** [September 15, 2022, 1:29pm UTC](https://discourse.julialang.org/t/how-to-split-all-chars-from-string-array/45965 "2022-09-15T13:29:10Z")

</div>

julia\> (dane\[1,5\]) "TEST" julia\> split(dane\[1,5\],"") 4-element Array{SubString{String},1}: "T" "E" "S" "T" ''' is ok, but ''' julia\> split.(string.(dane\[:,5\],"")) 1074955-element Array{Array{SubString{String},1},1…

---

## [Template not applied to site generated by Franklin.jl](https://discourse.julialang.org/t/template-not-applied-to-site-generated-by-franklin-jl/87279)

<div class="topic-metadata">

**Author:** [@wsshin](https://discourse.julialang.org/u/wsshin)\
**Replies:** 5\
**Last updated:** [September 15, 2022, 1:27pm UTC](https://discourse.julialang.org/t/template-not-applied-to-site-generated-by-franklin-jl/87279 "2022-09-15T13:27:58Z")

</div>

I am trying to host a static site created by Franklin.jl using GitHub Pages of my job’s GitHub Enterprise Server. The hosting part seems working fine because I can access the website through my job’s private network. H…

---

## [Have a function accept an argument of type \`Array{Real}\`](https://discourse.julialang.org/t/have-a-function-accept-an-argument-of-type-array-real/87307)

<div class="topic-metadata">

**Author:** [@this\_josh](https://discourse.julialang.org/u/this_josh)\
**Replies:** 3\
**Last updated:** [September 15, 2022, 12:25pm UTC](https://discourse.julialang.org/t/have-a-function-accept-an-argument-of-type-array-real/87307 "2022-09-15T12:25:29Z")

</div>

I have a function function square(a::Real) return a\[1\]^2 end this works with both Int64 and Float64. But if I make it accept an array of Reals I get this julia\> function square(a::Array{Real}) return a…

---

## [Why the current version of a document is not showing in the google search?](https://discourse.julialang.org/t/why-the-current-version-of-a-document-is-not-showing-in-the-google-search/87308)

<div class="topic-metadata">

**Author:** [@ab2z](https://discourse.julialang.org/u/ab2z)\
**Replies:** 0\
**Last updated:** [September 15, 2022, 10:03am UTC](https://discourse.julialang.org/t/why-the-current-version-of-a-document-is-not-showing-in-the-google-search/87308 "2022-09-15T10:03:44Z")

</div>

searching in google for the InMemoryDatasets has led me to the old version of the package InMemoryDatasets in the Juliahub. For the sake of user time saving, it would be suggested, if Juliahub always point to the latest…

---

## [Multithreading workflow - alternative for :static scheduling](https://discourse.julialang.org/t/multithreading-workflow-alternative-for-static-scheduling/87271)

<div class="topic-metadata">

**Author:** [@kfrb](https://discourse.julialang.org/u/kfrb)\
**Replies:** 2\
**Last updated:** [September 15, 2022, 9:15am UTC](https://discourse.julialang.org/t/multithreading-workflow-alternative-for-static-scheduling/87271 "2022-09-15T09:15:35Z")

</div>

As stated in the docs (Documentation for Threads.@threads): “:static scheduling exists for supporting transition of code written before Julia 1.3. In newly written library functions, :static scheduling is discouraged b…

---

## [Is reading from a dict always threadsafe?](https://discourse.julialang.org/t/is-reading-from-a-dict-always-threadsafe/87287)

<div class="topic-metadata">

**Author:** [@Satvik](https://discourse.julialang.org/u/Satvik)\
**Replies:** 1\
**Last updated:** [September 14, 2022, 8:32pm UTC](https://discourse.julialang.org/t/is-reading-from-a-dict-always-threadsafe/87287 "2022-09-14T20:32:44Z")

</div>

Writing to a dict is not thread safe, but reading appears to be: test\_dict = Dict(i =\> i+1 for i in 1:10\_000) ThreadsX.map(x -\> getindex(test\_dict, x), 1:10\_000) \> 10000-element Vector{Int64}: 2 3 4 …

---

## [Threads.@threads ~44 times slower than single threaded code](https://discourse.julialang.org/t/threads-threads-44-times-slower-than-single-threaded-code/87282)

<div class="topic-metadata">

**Author:** [@Kaguro](https://discourse.julialang.org/u/Kaguro)\
**Replies:** 8\
**Last updated:** [September 14, 2022, 8:15pm UTC](https://discourse.julialang.org/t/threads-threads-44-times-slower-than-single-threaded-code/87282 "2022-09-14T20:15:43Z")

</div>

Hello All. I have a program where I basically solve a system of ODEs at N time points using Euler method, and add the solution to an array. N is ~1000 Then I wrap this in another loop which runs the inner loop M times.…

---

## [Using Distributed.jl from within Weave.jl?](https://discourse.julialang.org/t/using-distributed-jl-from-within-weave-jl/87238)

<div class="topic-metadata">

**Author:** [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Replies:** 3\
**Last updated:** [September 14, 2022, 7:03pm UTC](https://discourse.julialang.org/t/using-distributed-jl-from-within-weave-jl/87238 "2022-09-14T19:03:38Z")

</div>

I’m using Distributed from within my Weave.jl document because I have a machine which has a big store of data, and I’m asking it to process that data and return me some summary/filtered version of it. When I select bits…

---

## [How to show a struct in html](https://discourse.julialang.org/t/how-to-show-a-struct-in-html/87273)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 9\
**Last updated:** [September 14, 2022, 6:30pm UTC](https://discourse.julialang.org/t/how-to-show-a-struct-in-html/87273 "2022-09-14T18:30:13Z")

</div>

I have the following code: using Parameters import Base.show const BOLD = "\\e\[1m" const RED = "\\033\[31;1m" const GREEN = "\\033\[32;1m" const NORMAL = "\\e\[0m" @with\_kw mutable struct ChargerResult search\_strin…

---

## [Incorrect plot for small values](https://discourse.julialang.org/t/incorrect-plot-for-small-values/87254)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 3\
**Last updated:** [September 14, 2022, 4:27pm UTC](https://discourse.julialang.org/t/incorrect-plot-for-small-values/87254 "2022-09-14T16:27:22Z")

</div>

I’m a bit puzzled by what’s happening here, is this a known issue? (@v1.8) pkg\> st -m Plots Status \`~/.julia/environments/v1.8/Manifest.toml\` \[91a5bcdd\] Plots v1.33.0 julia\> using Plots julia\> r = range(-1, 1, lengt…

---

## [Help needed regarding making list, and modifying them, inside a DataFrame](https://discourse.julialang.org/t/help-needed-regarding-making-list-and-modifying-them-inside-a-dataframe/87231)

<div class="topic-metadata">

**Author:** [@Juan\_Mac\_Donagh](https://discourse.julialang.org/u/Juan_Mac_Donagh)\
**Replies:** 5\
**Last updated:** [September 14, 2022, 3:03pm UTC](https://discourse.julialang.org/t/help-needed-regarding-making-list-and-modifying-them-inside-a-dataframe/87231 "2022-09-14T15:03:30Z")

</div>

Hi all. I need helping figuring out how to make this: I have a DataFrame that look like this: df = DataFrame() df.pdb\_names = \["C1\_1", "C1\_1", "C1\_2", "C1\_3", "C2\_1", "C2\_2"\] df.missings\_range = \[\[2,5\],\[9,10\], \[9,10…

---

## [Sparse is not defined](https://discourse.julialang.org/t/sparse-is-not-defined/87276)

<div class="topic-metadata">

**Author:** [@m\_shah2](https://discourse.julialang.org/u/m_shah2)\
**Replies:** 1\
**Last updated:** [September 14, 2022, 2:47pm UTC](https://discourse.julialang.org/t/sparse-is-not-defined/87276 "2022-09-14T14:47:20Z")

</div>

When I try to run W = sparse(W + W’); it gives the following error. UndefVarError: sparse not defined Stacktrace: \[1\] top-level scope @ In\[13\]:21 \[2\] eval @ .\\boot.jl:368 \[inlined\] \[3\] include\_string(mapexpr::typ…

---

## [Materialize transducer into existing storage](https://discourse.julialang.org/t/materialize-transducer-into-existing-storage/87258)

<div class="topic-metadata">

**Author:** [@mfiano](https://discourse.julialang.org/u/mfiano)\
**Replies:** 4\
**Last updated:** [September 14, 2022, 2:38pm UTC](https://discourse.julialang.org/t/materialize-transducer-into-existing-storage/87258 "2022-09-14T14:38:00Z")

</div>

I defined a reducible for my Kernel type, which works fine, and I can materialize pipelines with collect, etc. I now want to be able to write a function that does kernel |\> Map(func) |\> # ... materialize into existing v…

---

## [How to log10 scale on bar plot y axis with Makie](https://discourse.julialang.org/t/how-to-log10-scale-on-bar-plot-y-axis-with-makie/87200)

<div class="topic-metadata">

**Author:** [@Hester](https://discourse.julialang.org/u/Hester)\
**Replies:** 2\
**Last updated:** [September 14, 2022, 2:27pm UTC](https://discourse.julialang.org/t/how-to-log10-scale-on-bar-plot-y-axis-with-makie/87200 "2022-09-14T14:27:15Z")

</div>

I am trying to display a bar plot with a log10 scale in the y axis, but I get the error Found invalid x-limits (0.0f0, 125.0f0) for scale log10 which is defined on the interval 0.0..Inf (open) despite my data not contain…

---

## [How to Fix Plot GUI/WIndow not showing again / Anymore?](https://discourse.julialang.org/t/how-to-fix-plot-gui-window-not-showing-again-anymore/87209)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 2\
**Last updated:** [September 14, 2022, 12:05pm UTC](https://discourse.julialang.org/t/how-to-fix-plot-gui-window-not-showing-again-anymore/87209 "2022-09-14T12:05:38Z")

</div>

I have a problem, probably due to plotting a lot of graphs. I can’t plot anymore. Either using pyplot() or gr() as backend the plot window / gui does not comes out, I try with working codes and the window never shown aga…

---

## [How to implement Lionel Zoubritzky's removetype() function?](https://discourse.julialang.org/t/how-to-implement-lionel-zoubritzkys-removetype-function/87089)

<div class="topic-metadata">

**Author:** [@Henri\_Laurie](https://discourse.julialang.org/u/Henri_Laurie)\
**Replies:** 13\
**Last updated:** [September 14, 2022, 11:43am UTC](https://discourse.julialang.org/t/how-to-implement-lionel-zoubritzkys-removetype-function/87089 "2022-09-14T11:43:18Z")

</div>

I am so impressed by the clarity of @liozou’s presentation of the Bezanson et al paper “Julia: Dynamism and Performance Reconciled by Design”. Unfortunately I can’t seem to find a pdf of the slides, and I would love to r…

---

## [Convert math model to latex](https://discourse.julialang.org/t/convert-math-model-to-latex/87266)

<div class="topic-metadata">

**Author:** [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Replies:** 2\
**Last updated:** [September 14, 2022, 11:41am UTC](https://discourse.julialang.org/t/convert-math-model-to-latex/87266 "2022-09-14T11:41:57Z")

</div>

Hello, I have a model based on a set of ordinary differential equations, wrapped in a function. Is it possible to convert it into latex? For instance, function X!(du, u, p, t) A = p\[:a\] # parameter a B = p\[:…

---

## [Bounds error while iterating over for loop](https://discourse.julialang.org/t/bounds-error-while-iterating-over-for-loop/87245)

<div class="topic-metadata">

**Author:** [@m\_shah2](https://discourse.julialang.org/u/m_shah2)\
**Replies:** 3\
**Last updated:** [September 14, 2022, 11:37am UTC](https://discourse.julialang.org/t/bounds-error-while-iterating-over-for-loop/87245 "2022-09-14T11:37:43Z")

</div>

I am trying to run a for loop by iterating over aij where aij is of type Vector{CartesianIndex{2}} (alias for Array{CartesianIndex{2}, 1}). The code is: for (x, y) in zip(aij) xout = find(U\[x, :\]) yout = find(U\[y, :\]…

---

## [Real time data in Pluto notebooks?](https://discourse.julialang.org/t/real-time-data-in-pluto-notebooks/87240)

<div class="topic-metadata">

**Author:** [@anon69491625](https://discourse.julialang.org/u/anon69491625)\
**Replies:** 2\
**Last updated:** [September 14, 2022, 1:04am UTC](https://discourse.julialang.org/t/real-time-data-in-pluto-notebooks/87240 "2022-09-14T01:04:12Z")

</div>

Hi all a noob here. I have a ZMQ data stream of IPM’s which update a dataframe. Has anyone used Pluto to house a LIVE ( constantly) updated dataframe in a Pluto cell? the intent is to have a live data environment tha…

---

## [Slow \`reduce(vcat, itr)\`](https://discourse.julialang.org/t/slow-reduce-vcat-itr/87115)

<div class="topic-metadata">

**Author:** [@DNF](https://discourse.julialang.org/u/DNF)\
**Replies:** 26\
**Last updated:** [September 13, 2022, 11:03pm UTC](https://discourse.julialang.org/t/slow-reduce-vcat-itr/87115 "2022-09-13T23:03:50Z")

</div>

reduce(vcat, itr) and reduce(hcat, itr) have special implementations that are supposed to make them faster than vcat(itr...) and hcat(itr...), at least for long iterators. But I am seeing the opposite: It starts out ok: …

---

## [Using @everywhere include() from Distributed.jl?](https://discourse.julialang.org/t/using-everywhere-include-from-distributed-jl/87237)

<div class="topic-metadata">

**Author:** [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Replies:** 4\
**Last updated:** [September 13, 2022, 9:28pm UTC](https://discourse.julialang.org/t/using-everywhere-include-from-distributed-jl/87237 "2022-09-13T21:28:51Z")

</div>

I’ve got a Weave document (.jmd) and I’m using @everywhere include("./utilities.jl") There’s an error that says the remote machine is trying to load a file not in the current directory, but the same directory as on my …

---

## [Error finding shared libraries when running executable](https://discourse.julialang.org/t/error-finding-shared-libraries-when-running-executable/87230)

<div class="topic-metadata">

**Author:** [@anon22248738](https://discourse.julialang.org/u/anon22248738)\
**Replies:** 2\
**Last updated:** [September 13, 2022, 7:52pm UTC](https://discourse.julialang.org/t/error-finding-shared-libraries-when-running-executable/87230 "2022-09-13T19:52:10Z")

</div>

I’m trying to call a executable from Julia using the run() command but am having some issues.I have a command that calls a Fortran executable with a number of arguments exe --flag arg --flag2 arg and I can successfully r…

---

## [Manipulating Panel Data in Julia](https://discourse.julialang.org/t/manipulating-panel-data-in-julia/83109)

<div class="topic-metadata">

**Author:** [@IljaK91](https://discourse.julialang.org/u/IljaK91)\
**Replies:** 6\
**Last updated:** [September 13, 2022, 6:30pm UTC](https://discourse.julialang.org/t/manipulating-panel-data-in-julia/83109 "2022-09-13T18:30:23Z")

</div>

Hey everyone, I was looking for a straightforward way to do common manipulations in panel data within Julia. For instance, let’s say I have a panel of many countries and years. I would like to calculate the growth rate …

---

## [VSCode julia terminal goes partially white-on-white after screensaver wake (linux)](https://discourse.julialang.org/t/vscode-julia-terminal-goes-partially-white-on-white-after-screensaver-wake-linux/87222)

<div class="topic-metadata">

**Author:** [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Replies:** 0\
**Last updated:** [September 13, 2022, 3:39pm UTC](https://discourse.julialang.org/t/vscode-julia-terminal-goes-partially-white-on-white-after-screensaver-wake-linux/87222 "2022-09-13T15:39:04Z")

</div>

Anyone else seen this behavior? I typed “foobar” at the prompt, but only the b shows up, none of the warnings are visible… etc. On Linux, with nvidia drivers. Changing the color theme, and then changing it back fix…

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

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