# General Usage

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

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

**Page:** 538

---

## [^ vs exp for exponentiation](https://discourse.julialang.org/t/vs-exp-for-exponentiation/69437)

<div class="topic-metadata">

**Author:** [@Oscar\_Smith](https://discourse.julialang.org/u/Oscar_Smith)\
**Replies:** 3\
**Last updated:** [October 8, 2021, 2:30pm UTC](https://discourse.julialang.org/t/vs-exp-for-exponentiation/69437 "2021-10-08T14:30:38Z")

</div>

One last thing to note: If you care about performance, don’t use ^ whenever possible. exp (or exp2/exp10) will be 5x to 30x faster.

---

## [Noun chunks segmentation for text analysis](https://discourse.julialang.org/t/noun-chunks-segmentation-for-text-analysis/69424)

<div class="topic-metadata">

**Author:** [@Maxim\_Lubov](https://discourse.julialang.org/u/Maxim_Lubov)\
**Replies:** 0\
**Last updated:** [October 8, 2021, 8:44am UTC](https://discourse.julialang.org/t/noun-chunks-segmentation-for-text-analysis/69424 "2021-10-08T08:44:04Z")

</div>

Is there in Julia an analog of spaCy “noun chunks” segmentation?: https://spacy.io/usage/linguistic-features#noun-chunks

---

## [mul!(::Matrix, ::Matrix, ::UpperTriangular) is really slow](https://discourse.julialang.org/t/mul-matrix-matrix-uppertriangular-is-really-slow/69368)

<div class="topic-metadata">

**Author:** [@Luapulu](https://discourse.julialang.org/u/Luapulu)\
**Replies:** 4\
**Last updated:** [October 8, 2021, 6:57am UTC](https://discourse.julialang.org/t/mul-matrix-matrix-uppertriangular-is-really-slow/69368 "2021-10-08T06:57:25Z")

</div>

There seem to be efficient methods to do mul!(out, ::UpperTriangular, ::Matrix) and mul!(out, ::LowerTriangular, ::Matrix). However, when you reverse the arguments and use mul!(out, ::Matrix, ::UpperTriangular) the perfo…

---

## [Issues adding images to my package docs (built from Documenter.jl)](https://discourse.julialang.org/t/issues-adding-images-to-my-package-docs-built-from-documenter-jl/46480)

<div class="topic-metadata">

**Author:** [@vlandau](https://discourse.julialang.org/u/vlandau)\
**Replies:** 5\
**Last updated:** [October 8, 2021, 6:20am UTC](https://discourse.julialang.org/t/issues-adding-images-to-my-package-docs-built-from-documenter-jl/46480 "2021-10-08T06:20:09Z")

</div>

After a lot of trial and error I finally found out how to properly embed and render HTML code in .md files fed to Documenter.jl, but now I’m finding that the images aren’t showing up in a table I developed to place two i…

---

## [Modify file after script starts](https://discourse.julialang.org/t/modify-file-after-script-starts/69373)

<div class="topic-metadata">

**Author:** [@marllos](https://discourse.julialang.org/u/marllos)\
**Replies:** 4\
**Last updated:** [October 7, 2021, 9:16pm UTC](https://discourse.julialang.org/t/modify-file-after-script-starts/69373 "2021-10-07T21:16:10Z")

</div>

Hello everyone. I would like some clarification. I run a script that uses several files and takes 24 h. After this script starts, can I modify the files and make other runs, without interfering with the first run? I do t…

---

## [Distinguishing between unobserved parameters and control variables in DifferentialEquations](https://discourse.julialang.org/t/distinguishing-between-unobserved-parameters-and-control-variables-in-differentialequations/69142)

<div class="topic-metadata">

**Author:** [@GregCoyle](https://discourse.julialang.org/u/GregCoyle)\
**Replies:** 6\
**Last updated:** [October 7, 2021, 8:38pm UTC](https://discourse.julialang.org/t/distinguishing-between-unobserved-parameters-and-control-variables-in-differentialequations/69142 "2021-10-07T20:38:11Z")

</div>

Hello, I’m fresh off the boat to using Julia (coming from Python and Stan), and I am looking for the preferred generic solution to specifying an ODE with both unknown parameters and control variables/system forcings. As…

---

## [Problem with compat specification](https://discourse.julialang.org/t/problem-with-compat-specification/69386)

<div class="topic-metadata">

**Author:** [@Johncowk](https://discourse.julialang.org/u/Johncowk)\
**Replies:** 0\
**Last updated:** [October 7, 2021, 6:58pm UTC](https://discourse.julialang.org/t/problem-with-compat-specification/69386 "2021-10-07T18:58:56Z")

</div>

In order to adhere to the guidelines, I added compat entries the project.toml of my package, but for some reason that I can’t figure out, the package Plots.jl is creating me a lot of troubles. If I specify a version then…

---

## [Loosing performance with \`Threads.@threads\` for loop](https://discourse.julialang.org/t/loosing-performance-with-threads-threads-for-loop/69358)

<div class="topic-metadata">

**Author:** [@Kevin\_Kleinbeck](https://discourse.julialang.org/u/Kevin_Kleinbeck)\
**Replies:** 10\
**Last updated:** [October 7, 2021, 2:36pm UTC](https://discourse.julialang.org/t/loosing-performance-with-threads-threads-for-loop/69358 "2021-10-07T14:36:45Z")

</div>

I have strange performance issues when I use Threads.@threads to parallelize a for-loop. My machine runs on 40 cores: julia\> Threads.nthreads() 40 Now, I lose performance even with a quite simple example: N = 500 m = …

---

## [Cumsum reversed?](https://discourse.julialang.org/t/cumsum-reversed/69355)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 6\
**Last updated:** [October 7, 2021, 2:23pm UTC](https://discourse.julialang.org/t/cumsum-reversed/69355 "2021-10-07T14:23:52Z")

</div>

I need to do cumsum where I start at the end of vector v, and sum backwards. Is there a separate function for this, or should I just do cumsum(v\[end:-1:1\])\[end:-1:1\]?

---

## [Missing \`deleteat!\` method for SparseVector](https://discourse.julialang.org/t/missing-deleteat-method-for-sparsevector/69370)

<div class="topic-metadata">

**Author:** [@lrnv](https://discourse.julialang.org/u/lrnv)\
**Replies:** 8\
**Last updated:** [October 7, 2021, 2:17pm UTC](https://discourse.julialang.org/t/missing-deleteat-method-for-sparsevector/69370 "2021-10-07T14:17:06Z")

</div>

Hey, I came across the following missing method: deleteat!(::SparseVector{Float64, Int64}, ::Int64) Indeed, julia\> x = sparse(\[0,1,0\]) 3-element SparseVector{Int64, Int64} with 1 stored entry: \[2\] = 1 julia\> del…

---

## [Why is AbstractString not a subtype of AbstractVector?](https://discourse.julialang.org/t/why-is-abstractstring-not-a-subtype-of-abstractvector/69189)

<div class="topic-metadata">

**Author:** [@jonas-schulze](https://discourse.julialang.org/u/jonas-schulze)\
**Replies:** 10\
**Last updated:** [October 7, 2021, 1:28pm UTC](https://discourse.julialang.org/t/why-is-abstractstring-not-a-subtype-of-abstractvector/69189 "2021-10-07T13:28:28Z")

</div>

While working on https://github.com/JuliaCollections/DataStructures.jl/pull/759, which I thought would be a funny solution to a project euler riddle, I noticed that String is not a subtype of AbstractVector{Char}. Are th…

---

## [Preallocating Vector of Vectors](https://discourse.julialang.org/t/preallocating-vector-of-vectors/69304)

<div class="topic-metadata">

**Author:** [@mrVeng](https://discourse.julialang.org/u/mrVeng)\
**Replies:** 25\
**Last updated:** [October 7, 2021, 12:38pm UTC](https://discourse.julialang.org/t/preallocating-vector-of-vectors/69304 "2021-10-07T12:38:14Z")

</div>

Hi there, I have a project where I need to preallocate a Vector of Vectors. I could just use a multidimensional array, but this complicates things and makes the code less readable as well. Is there a way that I can prea…

---

## [Parametric type of another parametric type](https://discourse.julialang.org/t/parametric-type-of-another-parametric-type/69258)

<div class="topic-metadata">

**Author:** [@ismedina](https://discourse.julialang.org/u/ismedina)\
**Replies:** 11\
**Last updated:** [October 7, 2021, 12:21pm UTC](https://discourse.julialang.org/t/parametric-type-of-another-parametric-type/69258 "2021-10-07T12:21:58Z")

</div>

TL;DR: how to define a parametric type where the parameter is another parametric type? I want to design some algorithms handling point clouds, where each point has some weight. I want to allow for general point clouds a…

---

## [Displaying unitful dataframes](https://discourse.julialang.org/t/displaying-unitful-dataframes/69331)

<div class="topic-metadata">

**Author:** [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Replies:** 3\
**Last updated:** [October 7, 2021, 8:12am UTC](https://discourse.julialang.org/t/displaying-unitful-dataframes/69331 "2021-10-07T08:12:21Z")

</div>

What is the recommended procedure for displaying Unitful Dataframes? Example: using DataFrames, Unitful d = (0:10:1000)u"m" v = 1500u"m/s" .+ 1.5u"1/s"\*d t = \[0u"s"; cumsum(diff(d) ./ v\[1:end-1\])\] df = DataFrame(depth=…

---

## [How to display \\bordermatrix in Documenter.jl](https://discourse.julialang.org/t/how-to-display-bordermatrix-in-documenter-jl/69345)

<div class="topic-metadata">

**Author:** [@hytonwons](https://discourse.julialang.org/u/hytonwons)\
**Replies:** 0\
**Last updated:** [October 7, 2021, 5:51am UTC](https://discourse.julialang.org/t/how-to-display-bordermatrix-in-documenter-jl/69345 "2021-10-07T05:51:47Z")

</div>

Hi there, I was following LaTeX syntax in Documenter.jl when I need to display matrices with indices. Typically, we would use \\bordermatrix in LaTeX, however, it seems not to work in Documenter.jl. (I also turned to D…

---

## [Calculate the area under the curve based on calculating the area of single polygon](https://discourse.julialang.org/t/calculate-the-area-under-the-curve-based-on-calculating-the-area-of-single-polygon/69330)

<div class="topic-metadata">

**Author:** [@IsraelSI](https://discourse.julialang.org/u/IsraelSI)\
**Replies:** 6\
**Last updated:** [October 6, 2021, 11:12pm UTC](https://discourse.julialang.org/t/calculate-the-area-under-the-curve-based-on-calculating-the-area-of-single-polygon/69330 "2021-10-06T23:12:17Z")

</div>

Hi, sorry I’m new to julia and I’m stuck trying to make based on the function that calculates the area of a polygon to calculate the area under the curve of a strictly non-negative function on a given interval \[𝑎, 𝑏\]. Fo…

---

## [Issue updating agent properties - all values are the same! - Agents.jl](https://discourse.julialang.org/t/issue-updating-agent-properties-all-values-are-the-same-agents-jl/69255)

<div class="topic-metadata">

**Author:** [@bfried1](https://discourse.julialang.org/u/bfried1)\
**Replies:** 7\
**Last updated:** [October 6, 2021, 8:04pm UTC](https://discourse.julialang.org/t/issue-updating-agent-properties-all-values-are-the-same-agents-jl/69255 "2021-10-06T20:04:54Z")

</div>

I apologize in advance if the issue is trivial. I’m still learning how to use Agents.jl and I cannot figure out what this issue is. I will post my code and comment around it. The issue is stated below. The packages in …

---

## [Has anyone tried to compile Julia into WASM - seems like this is possible using LLVM](https://discourse.julialang.org/t/has-anyone-tried-to-compile-julia-into-wasm-seems-like-this-is-possible-using-llvm/69042)

<div class="topic-metadata">

**Author:** [@Glen1](https://discourse.julialang.org/u/Glen1)\
**Replies:** 4\
**Last updated:** [October 6, 2021, 6:02pm UTC](https://discourse.julialang.org/t/has-anyone-tried-to-compile-julia-into-wasm-seems-like-this-is-possible-using-llvm/69042 "2021-10-06T18:02:44Z")

</div>

Looking at RUST with WASM. this seems to be compiled into WASM using LLVM and run in the browser - would be good to use julia in the same capacity.

---

## [Quiet Pkg Installation/Precompilation](https://discourse.julialang.org/t/quiet-pkg-installation-precompilation/53796)

<div class="topic-metadata">

**Author:** [@Ian\_Slagle](https://discourse.julialang.org/u/Ian_Slagle)\
**Replies:** 5\
**Last updated:** [October 6, 2021, 4:18pm UTC](https://discourse.julialang.org/t/quiet-pkg-installation-precompilation/53796 "2021-10-06T16:18:24Z")

</div>

Is there a way to quietly install packages through Pkg? Normally, this is not an issue on my own computer, but the output that I get setting up an environment in Google Colab is a lot, so much that not all of it can be s…

---

## [Parallel/distributed k-means clustering replicates](https://discourse.julialang.org/t/parallel-distributed-k-means-clustering-replicates/68963)

<div class="topic-metadata">

**Author:** [@thompsonmj](https://discourse.julialang.org/u/thompsonmj)\
**Replies:** 1\
**Last updated:** [October 6, 2021, 3:34pm UTC](https://discourse.julialang.org/t/parallel-distributed-k-means-clustering-replicates/68963 "2021-10-06T15:34:20Z")

</div>

First time trying parallel processing; I’d like to run replicates for the kmeans algorithm in parallel to find a global minimum. Just calling kmeans on some data works fine: using Clustering n\_data\_points = 100000 dat…

---

## [Fft(x,n) when n\>length(x)](https://discourse.julialang.org/t/fft-x-n-when-n-length-x/69308)

<div class="topic-metadata">

**Author:** [@moeinkh88](https://discourse.julialang.org/u/moeinkh88)\
**Replies:** 4\
**Last updated:** [October 6, 2021, 3:15pm UTC](https://discourse.julialang.org/t/fft-x-n-when-n-length-x/69308 "2021-10-06T15:15:22Z")

</div>

I am trying to extract the n-point DFT of using fft for vector X. I am a MATLAB user, so, I run fft(X,n) when length(X)=16 and n=32. But it doesn’t work since fft in FFTW Pkg is limited to the length of vector X. Is ther…

---

## [Skipnothing is missing](https://discourse.julialang.org/t/skipnothing-is-missing/19155)

<div class="topic-metadata">

**Author:** [@galenlynch](https://discourse.julialang.org/u/galenlynch)\
**Replies:** 8\
**Last updated:** [October 6, 2021, 2:59pm UTC](https://discourse.julialang.org/t/skipnothing-is-missing/19155 "2021-10-06T14:59:07Z")

</div>

This is more of a feature request: skipmissing is useful, as would be skipnothing, if it existed. I know it’s easy to filter the nothing values away, but it’s also nice to drop the Union element type, as is achieved with…

---

## [See usage of Channel (i.e. how many items are enqueued)](https://discourse.julialang.org/t/see-usage-of-channel-i-e-how-many-items-are-enqueued/69284)

<div class="topic-metadata">

**Author:** [@torrance](https://discourse.julialang.org/u/torrance)\
**Replies:** 2\
**Last updated:** [October 6, 2021, 11:09am UTC](https://discourse.julialang.org/t/see-usage-of-channel-i-e-how-many-items-are-enqueued/69284 "2021-10-06T11:09:37Z")

</div>

I am using buffered Channels as a stream between different parts of my program, and I’d like to regularly find out how much of a buffered channel is actually used. For example, if the channel is regularly empty, I know …

---

## [Avoid creation of temporaries in non-trivial iterator](https://discourse.julialang.org/t/avoid-creation-of-temporaries-in-non-trivial-iterator/64498)

<div class="topic-metadata">

**Author:** [@mwallerb](https://discourse.julialang.org/u/mwallerb)\
**Replies:** 16\
**Last updated:** [October 6, 2021, 9:23am UTC](https://discourse.julialang.org/t/avoid-creation-of-temporaries-in-non-trivial-iterator/64498 "2021-10-06T09:23:57Z")

</div>

Consider the following Julia “compound” iterator: it merges two iterators, a and b , each of which are assumed to be sorted according to order, to a single ordered sequence: struct MergeSorted{T,A,B,O} a::A b::B…

---

## [Wrapping Templated C++-functions and embedding Julia-functions subject to templates](https://discourse.julialang.org/t/wrapping-templated-c-functions-and-embedding-julia-functions-subject-to-templates/69282)

<div class="topic-metadata">

**Author:** [@Jonas\_Hjulstad](https://discourse.julialang.org/u/Jonas_Hjulstad)\
**Replies:** 0\
**Last updated:** [October 6, 2021, 7:48am UTC](https://discourse.julialang.org/t/wrapping-templated-c-functions-and-embedding-julia-functions-subject-to-templates/69282 "2021-10-06T07:48:56Z")

</div>

I’m looking into the idea of treating instructions as data for an C++ Eigen-algorithm. I already assume that the g+±compiler will be able to resolve the wrapping to Julia using Cxxwrap: GitHub - JuliaInterop/CxxWrap.jl…

---

## [Why do I need to re-install Plots after updating Julia?](https://discourse.julialang.org/t/why-do-i-need-to-re-install-plots-after-updating-julia/68864)

<div class="topic-metadata">

**Author:** [@Jerry](https://discourse.julialang.org/u/Jerry)\
**Replies:** 3\
**Last updated:** [October 6, 2021, 6:13am UTC](https://discourse.julialang.org/t/why-do-i-need-to-re-install-plots-after-updating-julia/68864 "2021-10-06T06:13:12Z")

</div>

I just downloaded and installed Julia-1.6.app for macOS (1.6.3 I think), upgrading from 1.5.3. Now when I do using Plots it complains ERROR: ArgumentError: Package Plots not found in current path: Run import Pkg; Pkg.ad…

---

## [For deletion](https://discourse.julialang.org/t/for-deletion/69212)

<div class="topic-metadata">

**Author:** [@Nosferican](https://discourse.julialang.org/u/Nosferican)\
**Replies:** 0\
**Last updated:** [October 5, 2021, 1:52am UTC](https://discourse.julialang.org/t/for-deletion/69212 "2021-10-05T01:52:16Z")

</div>

Got my head around it.

---

## [How to use stipple table with selection?](https://discourse.julialang.org/t/how-to-use-stipple-table-with-selection/69277)

<div class="topic-metadata">

**Author:** [@wuxinyu](https://discourse.julialang.org/u/wuxinyu)\
**Replies:** 0\
**Last updated:** [October 6, 2021, 2:30am UTC](https://discourse.julialang.org/t/how-to-use-stipple-table-with-selection/69277 "2021-10-06T02:30:08Z")

</div>

I want to display my data in a table and with selection to select the data I want, but there is no document about stipple . How can I do it?

---

## [Programmatic goto](https://discourse.julialang.org/t/programmatic-goto/69271)

<div class="topic-metadata">

**Author:** [@cscherrer](https://discourse.julialang.org/u/cscherrer)\
**Replies:** 9\
**Last updated:** [October 6, 2021, 12:09am UTC](https://discourse.julialang.org/t/programmatic-goto/69271 "2021-10-06T00:09:57Z")

</div>

For probabilistic programming work, I was exploring the idea of adding @goto and @label statements in the code for a model, and then calling to an outside “driver” function to see where to go next. Prototyping this idea,…

---

## [Fastest way to apply function to rows without slices](https://discourse.julialang.org/t/fastest-way-to-apply-function-to-rows-without-slices/69257)

<div class="topic-metadata">

**Author:** [@abc](https://discourse.julialang.org/u/abc)\
**Replies:** 1\
**Last updated:** [October 5, 2021, 9:47pm UTC](https://discourse.julialang.org/t/fastest-way-to-apply-function-to-rows-without-slices/69257 "2021-10-05T21:47:33Z")

</div>

Hi! I have a function which takes two 2-element Array{Float64,1} as input. An example (mine is much more complicated, but can’t be shared sadly). It can look something like this. function Example(x,y) return norm(x…

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

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