# General Usage

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

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

**Page:** 449

---

## [Badge for generic-safe/OffsetArray-safe packages](https://discourse.julialang.org/t/badge-for-generic-safe-offsetarray-safe-packages/81270)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 0\
**Last updated:** [May 18, 2022, 4:33pm UTC](https://discourse.julialang.org/t/badge-for-generic-safe-offsetarray-safe-packages/81270 "2022-05-18T16:33:39Z")

</div>

Most packages are safe (with or without @inbounds) when used with regular arrays. I do not want to get people to alarmed, but most packages are likely unsafe when the user uses OffsetArray.jl and passes such an array in…

---

## [Fastest way to turn table into Array?](https://discourse.julialang.org/t/fastest-way-to-turn-table-into-array/81255)

<div class="topic-metadata">

**Author:** [@marianoarnaiz](https://discourse.julialang.org/u/marianoarnaiz)\
**Replies:** 5\
**Last updated:** [May 18, 2022, 3:51pm UTC](https://discourse.julialang.org/t/fastest-way-to-turn-table-into-array/81255 "2022-05-18T15:51:54Z")

</div>

Hi all. One if the main parts of my daily workflow makes me turn large tables to matrixes and or n-dims-arrays. For example: For a X Y Z Property table with 1 million+ lines, I do: Lat=-90:1:90 Long=-180:1:180 Zi=\[…

---

## [Get a Symbol vector of all variable names in an Expr?](https://discourse.julialang.org/t/get-a-symbol-vector-of-all-variable-names-in-an-expr/39391)

<div class="topic-metadata">

**Author:** [@robsmith11](https://discourse.julialang.org/u/robsmith11)\
**Replies:** 2\
**Last updated:** [May 18, 2022, 1:38pm UTC](https://discourse.julialang.org/t/get-a-symbol-vector-of-all-variable-names-in-an-expr/39391 "2022-05-18T13:38:38Z")

</div>

Is there a simple and type stable way to do this? julia\> f(:(x^2+sum(x,y-3,z))) 4-element Array{Symbol,1}: :x :x :y :z

---

## [Mutating array workaround for reverse AD?](https://discourse.julialang.org/t/mutating-array-workaround-for-reverse-ad/81009)

<div class="topic-metadata">

**Author:** [@beryl](https://discourse.julialang.org/u/beryl)\
**Replies:** 5\
**Last updated:** [May 18, 2022, 12:00pm UTC](https://discourse.julialang.org/t/mutating-array-workaround-for-reverse-ad/81009 "2022-05-18T12:00:18Z")

</div>

Hi, I have yet another unsolved problem for reverse mode AD (or I think, this is the same problem as the one I posted previously: LoadError: ArgumentError: Converting an instance of ReverseDiff.TrackedReal{Float64, Floa…

---

## [Unable to get a normalized density plot!](https://discourse.julialang.org/t/unable-to-get-a-normalized-density-plot/81251)

<div class="topic-metadata">

**Author:** [@devanshu](https://discourse.julialang.org/u/devanshu)\
**Replies:** 8\
**Last updated:** [May 18, 2022, 11:47am UTC](https://discourse.julialang.org/t/unable-to-get-a-normalized-density-plot/81251 "2022-05-18T11:47:44Z")

</div>

Hi, I am trying to get the density plot of a data set. I am using the StatsPlots package for this. My code looks like this density(data, fill=(0, 0.5), normalize=true). But I still don’t get a normalized plot. I wonde…

---

## [Does program interruption close open files automatically?](https://discourse.julialang.org/t/does-program-interruption-close-open-files-automatically/79774)

<div class="topic-metadata">

**Author:** [@nandoconde](https://discourse.julialang.org/u/nandoconde)\
**Replies:** 1\
**Last updated:** [May 18, 2022, 9:47am UTC](https://discourse.julialang.org/t/does-program-interruption-close-open-files-automatically/79774 "2022-05-18T09:47:16Z")

</div>

This post talks about not closing a file on purpose. What about unintentionally exiting the program? Will my files be blocked (I’m on Windows)? I seem to remember having some problems with MATLAB years ago, and I had t…

---

## [(LTS) version support badges](https://discourse.julialang.org/t/lts-version-support-badges/73730)

<div class="topic-metadata">

**Author:** [@Crown421](https://discourse.julialang.org/u/Crown421)\
**Replies:** 1\
**Last updated:** [May 18, 2022, 9:17am UTC](https://discourse.julialang.org/t/lts-version-support-badges/73730 "2022-05-18T09:17:51Z")

</div>

I am not sure if this is strictly the right place to raise this, but I had a (potentially half-baked) idea and wanted to see what other people thought. Now that Julia 1.6 is the LTS, there is movement in various package…

---

## [Batch\_gcd in Julia](https://discourse.julialang.org/t/batch-gcd-in-julia/81204)

<div class="topic-metadata">

**Author:** [@AntoineHus](https://discourse.julialang.org/u/AntoineHus)\
**Replies:** 3\
**Last updated:** [May 18, 2022, 8:31am UTC](https://discourse.julialang.org/t/batch-gcd-in-julia/81204 "2022-05-18T08:31:53Z")

</div>

Hello everybody, On a recent project I was working on, I had to implement the Batch\_GCD algorithm from Bernstein. This algorithm could be use to check Weak keys in RSA. In which package should I ask the integration of…

---

## [Catching deprecated keyword arguments (with Parameters.jl)](https://discourse.julialang.org/t/catching-deprecated-keyword-arguments-with-parameters-jl/81235)

<div class="topic-metadata">

**Author:** [@sstroemer](https://discourse.julialang.org/u/sstroemer)\
**Replies:** 0\
**Last updated:** [May 18, 2022, 7:00am UTC](https://discourse.julialang.org/t/catching-deprecated-keyword-arguments-with-parameters-jl/81235 "2022-05-18T07:00:08Z")

</div>

Consider a struct like @with\_kw struct MyStruct a::Int = 3 b::Int = 5 end b is no longer needed, so I am looking to deprecate it in the future, changing to @with\_kw struct MyStruct a::Int = 3 end Now, if …

---

## [Annotated heatmaps in Gadfly do not fully show the annotations in the first and last column](https://discourse.julialang.org/t/annotated-heatmaps-in-gadfly-do-not-fully-show-the-annotations-in-the-first-and-last-column/81217)

<div class="topic-metadata">

**Author:** [@Brinkhuis](https://discourse.julialang.org/u/Brinkhuis)\
**Replies:** 1\
**Last updated:** [May 18, 2022, 6:18am UTC](https://discourse.julialang.org/t/annotated-heatmaps-in-gadfly-do-not-fully-show-the-annotations-in-the-first-and-last-column/81217 "2022-05-18T06:18:59Z")

</div>

Coming from Python I tried to reproduce this Seaborn heatmap using Gadfly. The (only) issue I have is that the first and last columns appear smaller than the other columns. As a result the annotations are not fully reada…

---

## [Garbage collection: More manual control](https://discourse.julialang.org/t/garbage-collection-more-manual-control/17951)

<div class="topic-metadata">

**Author:** [@foobar\_lv2](https://discourse.julialang.org/u/foobar_lv2)\
**Replies:** 3\
**Last updated:** [May 18, 2022, 1:55am UTC](https://discourse.julialang.org/t/garbage-collection-more-manual-control/17951 "2022-05-18T01:55:27Z")

</div>

I’ll first describe how I understand julia’s garbage collection from a high level. Then, my first question is whether I got this right. The next questions are about some manual control to improve performance. So, how do…

---

## [How to perform a reduction on wrappers of StaticArrays?](https://discourse.julialang.org/t/how-to-perform-a-reduction-on-wrappers-of-staticarrays/81209)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 0\
**Last updated:** [May 17, 2022, 4:08pm UTC](https://discourse.julialang.org/t/how-to-perform-a-reduction-on-wrappers-of-staticarrays/81209 "2022-05-17T16:08:34Z")

</div>

The axes of a reduced array are computed using Base.reduced\_indices. There seems to be a fundamental limitation here, that Base.reduced\_indices expects the axis types to remain unchanged. However, given that the size of …

---

## [Reducing Genie latency](https://discourse.julialang.org/t/reducing-genie-latency/60550)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 2\
**Last updated:** [May 17, 2022, 5:22pm UTC](https://discourse.julialang.org/t/reducing-genie-latency/60550 "2022-05-17T17:22:49Z")

</div>

After running git clone https://github.com/GenieFramework/Genie.jl.git cd Genie.jl I run GENIE\_ENV=prod julia --project=. and \]instantiate. Then I can run the web server. julia\> using Genie; route(()-\>"hello world",…

---

## [A problem of plot](https://discourse.julialang.org/t/a-problem-of-plot/81193)

<div class="topic-metadata">

**Author:** [@wangpuming](https://discourse.julialang.org/u/wangpuming)\
**Replies:** 3\
**Last updated:** [May 17, 2022, 4:32pm UTC](https://discourse.julialang.org/t/a-problem-of-plot/81193 "2022-05-17T16:32:57Z")

</div>

I ran the following code and got this problem.How can I solve it. a=\[2,3,4,5,6\] plot(a) SystemError: opening file “C:\\Users\\王埔铭\\AppData\\Local\\Temp\\jl\_TnSmfa6ko7.png”: No such file or directory systemerror(::String, ::…

---

## [Delimited files](https://discourse.julialang.org/t/delimited-files/81138)

<div class="topic-metadata">

**Author:** [@rocco\_sprmnt21](https://discourse.julialang.org/u/rocco_sprmnt21)\
**Replies:** 5\
**Last updated:** [May 17, 2022, 4:09pm UTC](https://discourse.julialang.org/t/delimited-files/81138 "2022-05-17T16:09:29Z")

</div>

\#Say I have data in the following format v = \[(1, 0.1, \[1, 2, 3\]), (2, 0.2, \[3,4,5\])\] #I can write it to a delimited file using using DelimitedFiles open("testdlm.csv", "w") do io writedlm(io, v) end # The co…

---

## [Largest software project(s) in Julia](https://discourse.julialang.org/t/largest-software-project-s-in-julia/81137)

<div class="topic-metadata">

**Author:** [@grasph](https://discourse.julialang.org/u/grasph)\
**Replies:** 6\
**Last updated:** [May 17, 2022, 2:35pm UTC](https://discourse.julialang.org/t/largest-software-project-s-in-julia/81137 "2022-05-17T14:35:07Z")

</div>

Hello, I order to understand the problematic of use of the Julia language for very large software project (\>100,000 code statements, \>100 developers), I would like to know which is the largest project or which are the l…

---

## [NCDatasets precompile error](https://discourse.julialang.org/t/ncdatasets-precompile-error/81132)

<div class="topic-metadata">

**Author:** [@ryofurue](https://discourse.julialang.org/u/ryofurue)\
**Replies:** 8\
**Last updated:** [May 17, 2022, 1:12pm UTC](https://discourse.julialang.org/t/ncdatasets-precompile-error/81132 "2022-05-17T13:12:09Z")

</div>

pkg\> add NCDatasets gave an error message 1 dependency errored. To see a full report either run import Pkg; Pkg.precompile(). So, I did import Pkg; Pkg.precompile() and got the messages at the bottom. I use macOS Catal…

---

## [How to create a new window after closing the first one](https://discourse.julialang.org/t/how-to-create-a-new-window-after-closing-the-first-one/81187)

<div class="topic-metadata">

**Author:** [@Rossati](https://discourse.julialang.org/u/Rossati)\
**Replies:** 0\
**Last updated:** [May 17, 2022, 10:03am UTC](https://discourse.julialang.org/t/how-to-create-a-new-window-after-closing-the-first-one/81187 "2022-05-17T10:03:11Z")

</div>

Hi I create a window with Gtk widgets where I choose from combo another window. The window is not created and Julia crash: FATAL ERROR: Gtk state corrupted by error thrown in a callback: ERROR: AssertionError: g\_stack…

---

## [Gradual increasing of step size for a range of values](https://discourse.julialang.org/t/gradual-increasing-of-step-size-for-a-range-of-values/81152)

<div class="topic-metadata">

**Author:** [@devanshu](https://discourse.julialang.org/u/devanshu)\
**Replies:** 10\
**Last updated:** [May 17, 2022, 10:01am UTC](https://discourse.julialang.org/t/gradual-increasing-of-step-size-for-a-range-of-values/81152 "2022-05-17T10:01:59Z")

</div>

Hi, I want to create an array of values ranging from 1 to 5000. For this, I use LinRange(0, 5000, 200). However, for my purpose, I need more points for the lower regime compared to the higher ones. For this I tried, par…

---

## [Conventional name for an optional workspace keyword argument](https://discourse.julialang.org/t/conventional-name-for-an-optional-workspace-keyword-argument/81172)

<div class="topic-metadata">

**Author:** [@Lilith](https://discourse.julialang.org/u/Lilith)\
**Replies:** 2\
**Last updated:** [May 17, 2022, 6:04am UTC](https://discourse.julialang.org/t/conventional-name-for-an-optional-workspace-keyword-argument/81172 "2022-05-17T06:04:06Z")

</div>

I have a function sort! that operates out of place and accepts an optional workspace vector as a keyword argument for performance reasons. Is there a conventional name for this argument? y = similar(first(x)) for xi in …

---

## [Whitespace in layout in Makie](https://discourse.julialang.org/t/whitespace-in-layout-in-makie/59657)

<div class="topic-metadata">

**Author:** [@AshtonSBradley](https://discourse.julialang.org/u/AshtonSBradley)\
**Replies:** 5\
**Last updated:** [May 17, 2022, 5:38am UTC](https://discourse.julialang.org/t/whitespace-in-layout-in-makie/59657 "2022-05-17T05:38:39Z")

</div>

I have a fairly involved layout, and I can’t see how to get the whitespace to be used up, while not forcing some figures to get pushed into others. If I make the resolution height smaller, I get overlap of rows, even tho…

---

## [Pluto "Process Exited" due to segmentation fault on macos](https://discourse.julialang.org/t/pluto-process-exited-due-to-segmentation-fault-on-macos/74558)

<div class="topic-metadata">

**Author:** [@iskyd](https://discourse.julialang.org/u/iskyd)\
**Replies:** 5\
**Last updated:** [May 16, 2022, 11:37pm UTC](https://discourse.julialang.org/t/pluto-process-exited-due-to-segmentation-fault-on-macos/74558 "2022-05-16T23:37:19Z")

</div>

Everytime I restart the same notebook I got “Process Exited - Restart”. In the log I found From worker 2: signal (11): Segmentation fault: 11 … Worker 2 terminated. Unhandled Task ERROR: EOFError: read end of file …

---

## [Getting the functional form of a pdf using Kernel density estimation](https://discourse.julialang.org/t/getting-the-functional-form-of-a-pdf-using-kernel-density-estimation/81158)

<div class="topic-metadata">

**Author:** [@devanshu](https://discourse.julialang.org/u/devanshu)\
**Replies:** 0\
**Last updated:** [May 16, 2022, 5:24pm UTC](https://discourse.julialang.org/t/getting-the-functional-form-of-a-pdf-using-kernel-density-estimation/81158 "2022-05-16T17:24:10Z")

</div>

Hi, I have obtained sampled data points through some numerical calculations, and I want to estimate its pdf. Using KernelDensity.jl package, it is possible to estimate the KDE which can be used for visualization, however…

---

## [Unable to eliminate an unwanted allocation](https://discourse.julialang.org/t/unable-to-eliminate-an-unwanted-allocation/80966)

<div class="topic-metadata">

**Author:** [@peremato](https://discourse.julialang.org/u/peremato)\
**Replies:** 23\
**Last updated:** [May 16, 2022, 3:35pm UTC](https://discourse.julialang.org/t/unable-to-eliminate-an-unwanted-allocation/80966 "2022-05-16T15:35:44Z")

</div>

I have spend several hours to eliminate a very elusive allocation that happens in a package that I intend to run on a GPU, which any allocation is fatal. I have tried all the standard methods to eliminate it (@code\_warnt…

---

## [How can I read back a delimited file with mixed column types involving vectors](https://discourse.julialang.org/t/how-can-i-read-back-a-delimited-file-with-mixed-column-types-involving-vectors/81082)

<div class="topic-metadata">

**Author:** [@liuyxpp](https://discourse.julialang.org/u/liuyxpp)\
**Replies:** 10\
**Last updated:** [May 16, 2022, 1:51pm UTC](https://discourse.julialang.org/t/how-can-i-read-back-a-delimited-file-with-mixed-column-types-involving-vectors/81082 "2022-05-16T13:51:04Z")

</div>

Say I have data in the following format v = \[(1, 0.1, \[1, 2, 3\]), (2, 0.2, \[3,4,5\])\] I can write it to a delimited file using using DelimitedFiles open("test.csv", w) do io writedlm(io, v) end The content of tes…

---

## [Using a range in Symbolics.jl](https://discourse.julialang.org/t/using-a-range-in-symbolics-jl/81139)

<div class="topic-metadata">

**Author:** [@hughjonesd](https://discourse.julialang.org/u/hughjonesd)\
**Replies:** 1\
**Last updated:** [May 16, 2022, 1:44pm UTC](https://discourse.julialang.org/t/using-a-range-in-symbolics-jl/81139 "2022-05-16T13:44:16Z")

</div>

I’m playing with Symbolics.jl. I’d like to define a function which sums items over a range, e.g. @variables a b sumsq(a, b) = sum(l -\> l^2, a:b) @register sumsq Reading Frequently Asked Questions · Symbolics.jl makes m…

---

## [Sparse solve vs BandedMatrix; time and allocation surprise](https://discourse.julialang.org/t/sparse-solve-vs-bandedmatrix-time-and-allocation-surprise/45119)

<div class="topic-metadata">

**Author:** [@ctkelley](https://discourse.julialang.org/u/ctkelley)\
**Replies:** 29\
**Last updated:** [May 16, 2022, 9:47am UTC](https://discourse.julialang.org/t/sparse-solve-vs-bandedmatrix-time-and-allocation-surprise/45119 "2022-05-16T09:47:22Z")

</div>

I’m trying to understand why the SparseSuite \\ is so much worse than what I get with BandedMatrices. My test case, which reflects the results of my application, uses two matrices with the same elements, but stored diffe…

---

## [Stipple Data Processing](https://discourse.julialang.org/t/stipple-data-processing/81120)

<div class="topic-metadata">

**Author:** [@monty](https://discourse.julialang.org/u/monty)\
**Replies:** 2\
**Last updated:** [May 16, 2022, 6:16am UTC](https://discourse.julialang.org/t/stipple-data-processing/81120 "2022-05-16T06:16:19Z")

</div>

It will be great if there is an example demonstrating how you can upload and process a CSV file. For example, it will be nice to show you can upload a custom CSV file to perform k-means clustering using the example Stip…

---

## [Macro to "steal" types from another package](https://discourse.julialang.org/t/macro-to-steal-types-from-another-package/80585)

<div class="topic-metadata">

**Author:** [@ablaom](https://discourse.julialang.org/u/ablaom)\
**Replies:** 6\
**Last updated:** [May 16, 2022, 1:07am UTC](https://discourse.julialang.org/t/macro-to-steal-types-from-another-package/80585 "2022-05-16T01:07:15Z")

</div>

Package A defines a bunch of types whose interface I would like to extend in Package B. However, to do this in a straightforward way, Package B requires those types to subtype B.SomeAbstractType. To mitigate this I am pl…

---

## [Understending \`dims\` kwarg](https://discourse.julialang.org/t/understending-dims-kwarg/81121)

<div class="topic-metadata">

**Author:** [@eliascarv](https://discourse.julialang.org/u/eliascarv)\
**Replies:** 1\
**Last updated:** [May 15, 2022, 11:55pm UTC](https://discourse.julialang.org/t/understending-dims-kwarg/81121 "2022-05-15T23:55:51Z")

</div>

When I use mean function with dims=1 (the row dimension) in a matrix, the mean of each column is returned. Example: julia\> using Statistics julia\> a = \[3 5 4 5 9 8 4 9 9 9 5 6\] 3×4 Mat…

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

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