# General Usage

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

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

**Page:** 421

---

## [LinearMap : error while running LinearMap](https://discourse.julialang.org/t/linearmap-error-while-running-linearmap/41966)

<div class="topic-metadata">

**Author:** [@saikrishna](https://discourse.julialang.org/u/saikrishna)\
**Replies:** 17\
**Last updated:** [July 20, 2022, 4:12am UTC](https://discourse.julialang.org/t/linearmap-error-while-running-linearmap/41966 "2022-07-20T04:12:15Z")

</div>

I tried to run Julia-1.6.0 dev version in my laptop. When running the LinearMap function, I encountered an error, which I have attached along with this query. I would like any suggestions to improve. Thanks in advance, …

---

## [Vector{Task}() and Vector{Task}](https://discourse.julialang.org/t/vector-task-and-vector-task/84500)

<div class="topic-metadata">

**Author:** [@marllos](https://discourse.julialang.org/u/marllos)\
**Replies:** 4\
**Last updated:** [July 20, 2022, 3:54am UTC](https://discourse.julialang.org/t/vector-task-and-vector-task/84500 "2022-07-20T03:54:28Z")

</div>

Hello everyone! What is the difference between Vector{Task}() and Vector{Task}? The code below does not work with Vector{Task}, only with Vector{Task}(). Is there a better way to write this code? Julia Version 1.7.3 f…

---

## [Need help for github action adaption](https://discourse.julialang.org/t/need-help-for-github-action-adaption/84439)

<div class="topic-metadata">

**Author:** [@Rratic](https://discourse.julialang.org/u/Rratic)\
**Replies:** 1\
**Last updated:** [July 19, 2022, 11:50pm UTC](https://discourse.julialang.org/t/need-help-for-github-action-adaption/84439 "2022-07-19T23:50:15Z")

</div>

Currently I’m developing a package and wants it to be easily used by github actions, and I plan to write the code under src/git.jl But the problem is I can’t figure out what I should do after reading related docs and vi…

---

## [Count number of overlapping polygons with Julia?](https://discourse.julialang.org/t/count-number-of-overlapping-polygons-with-julia/57400)

<div class="topic-metadata">

**Author:** [@vlandau](https://discourse.julialang.org/u/vlandau)\
**Replies:** 2\
**Last updated:** [July 19, 2022, 8:36pm UTC](https://discourse.julialang.org/t/count-number-of-overlapping-polygons-with-julia/57400 "2022-07-19T20:36:30Z")

</div>

Hi all, I have a series of partially overlapping polygons in a single shapefile, and I need to create a new shapefile that has the number of overlapping polygons in each intersection. e.g. this. There is a way to do it …

---

## [Complex colormap in Julia Plots?](https://discourse.julialang.org/t/complex-colormap-in-julia-plots/84212)

<div class="topic-metadata">

**Author:** [@PrintRind](https://discourse.julialang.org/u/PrintRind)\
**Replies:** 8\
**Last updated:** [July 19, 2022, 8:19pm UTC](https://discourse.julialang.org/t/complex-colormap-in-julia-plots/84212 "2022-07-19T20:19:32Z")

</div>

Hi, is there any colormap that can be used together with Julia Plots that encodes amplitude and phase of a complex field in a single color plot? E.g. hue encodes the phase and “lightness” or value the amplitude. Simil…

---

## [Sentry support for Julia](https://discourse.julialang.org/t/sentry-support-for-julia/21237)

<div class="topic-metadata">

**Author:** [@mrkaspa](https://discourse.julialang.org/u/mrkaspa)\
**Replies:** 6\
**Last updated:** [July 19, 2022, 7:34pm UTC](https://discourse.julialang.org/t/sentry-support-for-julia/21237 "2022-07-19T19:34:27Z")

</div>

Has anyone have used sentry Platforms | Sentry Documentation with julia I can not find a package for it

---

## [Speeding up some non-optimized Julia functions](https://discourse.julialang.org/t/speeding-up-some-non-optimized-julia-functions/84358)

<div class="topic-metadata">

**Author:** [@O\_Julia](https://discourse.julialang.org/u/O_Julia)\
**Replies:** 47\
**Last updated:** [July 19, 2022, 7:09pm UTC](https://discourse.julialang.org/t/speeding-up-some-non-optimized-julia-functions/84358 "2022-07-19T19:09:07Z")

</div>

Hi, I am converting some of my Python codes to Julia language. For minimal working example, I have simplified most time consuming part of my codes and give them below. In the current version. The Python codes are approxi…

---

## [Is there any reason to use NaN instead of missing?](https://discourse.julialang.org/t/is-there-any-reason-to-use-nan-instead-of-missing/84396)

<div class="topic-metadata">

**Author:** [@Benny](https://discourse.julialang.org/u/Benny)\
**Replies:** 11\
**Last updated:** [July 19, 2022, 5:59pm UTC](https://discourse.julialang.org/t/is-there-any-reason-to-use-nan-instead-of-missing/84396 "2022-07-19T17:59:27Z")

</div>

I know that NaN isn’t going away because of the IEEE 754 standard on floating point behavior, but is there ever a reason to use NaN instead of converting and using missings as much as possible? Both are propagating non-v…

---

## [Change construction type parameters for a type in a vector?](https://discourse.julialang.org/t/change-construction-type-parameters-for-a-type-in-a-vector/84441)

<div class="topic-metadata">

**Author:** [@emmettgb](https://discourse.julialang.org/u/emmettgb)\
**Replies:** 14\
**Last updated:** [July 19, 2022, 5:52pm UTC](https://discourse.julialang.org/t/change-construction-type-parameters-for-a-type-in-a-vector/84441 "2022-07-19T17:52:17Z")

</div>

I have an abstract type: abstract type Pickle end I have a sub-type mutable struct Dill \<: Pickle rating::Integer end If I construct a Vector{Dill}: \[Dill(5), Dill(6,)\] The type of this is Vector{Dill}. What I …

---

## [Package or method to determine truth table or is a statement is a Tautology?](https://discourse.julialang.org/t/package-or-method-to-determine-truth-table-or-is-a-statement-is-a-tautology/84415)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 6\
**Last updated:** [July 19, 2022, 4:39pm UTC](https://discourse.julialang.org/t/package-or-method-to-determine-truth-table-or-is-a-statement-is-a-tautology/84415 "2022-07-19T16:39:20Z")

</div>

Hi all, I was wondering is there anything close to or similar function/method that can be used to determine if a combination of 2 values are tautology (a statement that is always true). It is a basic logic statements i…

---

## [Is it possible to create a virtual environment using CUDA?](https://discourse.julialang.org/t/is-it-possible-to-create-a-virtual-environment-using-cuda/84185)

<div class="topic-metadata">

**Author:** [@Fathya.Salih](https://discourse.julialang.org/u/Fathya.Salih)\
**Replies:** 3\
**Last updated:** [July 19, 2022, 3:25pm UTC](https://discourse.julialang.org/t/is-it-possible-to-create-a-virtual-environment-using-cuda/84185 "2022-07-19T15:25:03Z")

</div>

Hello! I am trying to use julia 1.2.0 on a remote GPU system and I am having trouble creating a virtual environment where I can add the packages I need. These are the packages available in the remote machine: (v1.2) pk…

---

## [Where does this allocation come from and how to avoid it? StaticArrays and structures](https://discourse.julialang.org/t/where-does-this-allocation-come-from-and-how-to-avoid-it-staticarrays-and-structures/84462)

<div class="topic-metadata">

**Author:** [@coloboquito](https://discourse.julialang.org/u/coloboquito)\
**Replies:** 3\
**Last updated:** [July 19, 2022, 2:50pm UTC](https://discourse.julialang.org/t/where-does-this-allocation-come-from-and-how-to-avoid-it-staticarrays-and-structures/84462 "2022-07-19T14:50:13Z")

</div>

Hello! I’m trying to optimize my code and I’m stuck on this. Here is a minimum working example of my problem. f(x :: T, y :: T, z :: T) = SA\[x, y, z\] struct Foo{T \<: Real} x :: T; y :: T; z :: T end f(foo :: Foo…

---

## [BLAS performance testing for Julia 1.8](https://discourse.julialang.org/t/blas-performance-testing-for-julia-1-8/69520)

<div class="topic-metadata">

**Author:** [@viralbshah](https://discourse.julialang.org/u/viralbshah)\
**Replies:** 30\
**Last updated:** [July 19, 2022, 7:30am UTC](https://discourse.julialang.org/t/blas-performance-testing-for-julia-1-8/69520 "2022-07-19T07:30:38Z")

</div>

OpenBLAS had two threading related defaults that we used to set until recently, both of which are now relaxed, since openblas has improved on both these fronts: We used to build openblas with 32 max threads (at some po…

---

## [Grouping by Split, apply, combine](https://discourse.julialang.org/t/grouping-by-split-apply-combine/84417)

<div class="topic-metadata">

**Author:** [@Optimization](https://discourse.julialang.org/u/Optimization)\
**Replies:** 9\
**Last updated:** [July 19, 2022, 10:06am UTC](https://discourse.julialang.org/t/grouping-by-split-apply-combine/84417 "2022-07-19T10:06:48Z")

</div>

I have a big set of 4-tuples and would like to group them based on their third position. As an example: using SplitApplyCombine A = \[(1,5,2,5), (,12,5,9,6), (7,5,2,6), (11,5,2,5), (8,5,9,6), (3,5,3,6), (7,5,9,6), (1,5,3…

---

## [RGB has a length but no iterate?](https://discourse.julialang.org/t/rgb-has-a-length-but-no-iterate/84446)

<div class="topic-metadata">

**Author:** [@xor0110](https://discourse.julialang.org/u/xor0110)\
**Replies:** 2\
**Last updated:** [July 19, 2022, 9:34am UTC](https://discourse.julialang.org/t/rgb-has-a-length-but-no-iterate/84446 "2022-07-19T09:34:36Z")

</div>

I’m defining a handy function for me to flatten data recursively into matrices and tensors. One way to do it is to descend into the list-of-lists until we see something with length(x)==1, and then we consider that to be …

---

## [How transform the c++ code to julia?](https://discourse.julialang.org/t/how-transform-the-c-code-to-julia/84392)

<div class="topic-metadata">

**Author:** [@zsz00](https://discourse.julialang.org/u/zsz00)\
**Replies:** 12\
**Last updated:** [July 19, 2022, 5:12am UTC](https://discourse.julialang.org/t/how-transform-the-c-code-to-julia/84392 "2022-07-19T05:12:49Z")

</div>

how transform the c++ code to julia ?? How modify the julia code so that it works as the c++ code? ignore the part of visualization (opencv). code in : use ffmpeg to get and draw motion vector. c++ code typedef st…

---

## [How to use all of the cpu cores in IJulia using broadcasting function?](https://discourse.julialang.org/t/how-to-use-all-of-the-cpu-cores-in-ijulia-using-broadcasting-function/84418)

<div class="topic-metadata">

**Author:** [@Phuntsho](https://discourse.julialang.org/u/Phuntsho)\
**Replies:** 4\
**Last updated:** [July 19, 2022, 5:10am UTC](https://discourse.julialang.org/t/how-to-use-all-of-the-cpu-cores-in-ijulia-using-broadcasting-function/84418 "2022-07-19T05:10:55Z")

</div>

I am relatively new to Julia and I have been exploring how to parallel process functions in IJulia. I have created a Jupyter notebook for 128 cores using the directions given here. I can confirm that it has imported all …

---

## [Github action stable and dev documentations](https://discourse.julialang.org/t/github-action-stable-and-dev-documentations/84385)

<div class="topic-metadata">

**Author:** [@\_stla](https://discourse.julialang.org/u/_stla)\
**Replies:** 8\
**Last updated:** [July 18, 2022, 9:54pm UTC](https://discourse.julialang.org/t/github-action-stable-and-dev-documentations/84385 "2022-07-18T21:54:51Z")

</div>

Hello, I’d like to register my package JackPolynomials (and others). I have a Github action for the documentation: docs: name: Documentation runs-on: ubuntu-latest steps: - uses: actions/checkout@v2…

---

## [Speeding up mapslices](https://discourse.julialang.org/t/speeding-up-mapslices/61907)

<div class="topic-metadata">

**Author:** [@nandoconde](https://discourse.julialang.org/u/nandoconde)\
**Replies:** 0\
**Last updated:** [May 27, 2021, 9:01am UTC](https://discourse.julialang.org/t/speeding-up-mapslices/61907 "2021-05-27T09:01:28Z")

</div>

Hello! I was trying to perform a matrix inversion in a 3-D array along the third dimension (more info here) and reached two possible solutions. First solution – Manual inversion I am not worrying too much about strange…

---

## [Alternative to Matlab Signal Integrity Toolbox using Julia?](https://discourse.julialang.org/t/alternative-to-matlab-signal-integrity-toolbox-using-julia/84403)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 3\
**Last updated:** [July 18, 2022, 7:20pm UTC](https://discourse.julialang.org/t/alternative-to-matlab-signal-integrity-toolbox-using-julia/84403 "2022-07-18T19:20:31Z")

</div>

Is there a way to do signal integrity analysis with Julia in a similar way to using this Matlab toolbox: Signal Integrity Toolbox - MATLAB ?

---

## [Who understands julia's typeinference in depth?](https://discourse.julialang.org/t/who-understands-julias-typeinference-in-depth/84419)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 1\
**Last updated:** [July 18, 2022, 7:00pm UTC](https://discourse.julialang.org/t/who-understands-julias-typeinference-in-depth/84419 "2022-07-18T19:00:33Z")

</div>

I already opened an issue for some weird typeinference which blocks me optimizing one of my packages. It would be really great if someone with in-depth julia compiler type-inference knowledge can take a look: https://gi…

---

## [Reading output from external program in stdout](https://discourse.julialang.org/t/reading-output-from-external-program-in-stdout/84289)

<div class="topic-metadata">

**Author:** [@Elmo](https://discourse.julialang.org/u/Elmo)\
**Replies:** 7\
**Last updated:** [July 18, 2022, 4:16pm UTC](https://discourse.julialang.org/t/reading-output-from-external-program-in-stdout/84289 "2022-07-18T16:16:31Z")

</div>

I am trying to use Julia to read messages sent to me through xmpp using go-sendxmpp. By following the readme of this package, I can successfully use the terminal to listen to all messages sent to me through: PS C:\\Users…

---

## [Overlaying single value on a histogram](https://discourse.julialang.org/t/overlaying-single-value-on-a-histogram/84393)

<div class="topic-metadata">

**Author:** [@AnshPatel7](https://discourse.julialang.org/u/AnshPatel7)\
**Replies:** 2\
**Last updated:** [July 18, 2022, 1:48pm UTC](https://discourse.julialang.org/t/overlaying-single-value-on-a-histogram/84393 "2022-07-18T13:48:43Z")

</div>

Hi, I’m using the hist function in the CairoMakie package to create a layout of histograms. The histograms show the distribution of means from bootstrapping. I also have the theoretical mean values which I would like to…

---

## [Julia alternatives or interface for ACADO for NMPC?](https://discourse.julialang.org/t/julia-alternatives-or-interface-for-acado-for-nmpc/84401)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 0\
**Last updated:** [July 18, 2022, 12:04pm UTC](https://discourse.julialang.org/t/julia-alternatives-or-interface-for-acado-for-nmpc/84401 "2022-07-18T12:04:17Z")

</div>

There is a MATLAB interface/ wrapper for the ACADO C++ library, see: Features Would it make sense to create a wrapper in Julia? Or would it be better to implement this functionality (non-linear optimal control, non-lin…

---

## [Clustering.jl Silhouettes Distances](https://discourse.julialang.org/t/clustering-jl-silhouettes-distances/33810)

<div class="topic-metadata">

**Author:** [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Replies:** 8\
**Last updated:** [July 18, 2022, 11:04am UTC](https://discourse.julialang.org/t/clustering-jl-silhouettes-distances/33810 "2022-07-18T11:04:03Z")

</div>

The docs state: Note that si≤1, and that si is close to 1 when the i-th point lies well within its own cluster. This property allows using mean(silhouettes(assignments, counts, X)) as a measure of clustering quality. H…

---

## [Search nested namedtuples by key](https://discourse.julialang.org/t/search-nested-namedtuples-by-key/84352)

<div class="topic-metadata">

**Author:** [@rocco\_sprmnt21](https://discourse.julialang.org/u/rocco_sprmnt21)\
**Replies:** 5\
**Last updated:** [July 18, 2022, 10:15am UTC](https://discourse.julialang.org/t/search-nested-namedtuples-by-key/84352 "2022-07-18T10:15:09Z")

</div>

using the Functor package I quickly found how to search by value type, but not by key. Is it possible to do this (ie search by key) in some way or with the help of another package? julia\> nt=(gr='a',f1=1, f2=(gr='b', f…

---

## [Poll: Do you use convenience functions such as \`zeros\` to construct OffsetArrays?](https://discourse.julialang.org/t/poll-do-you-use-convenience-functions-such-as-zeros-to-construct-offsetarrays/84377)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 4\
**Last updated:** [July 18, 2022, 8:59am UTC](https://discourse.julialang.org/t/poll-do-you-use-convenience-functions-such-as-zeros-to-construct-offsetarrays/84377 "2022-07-18T08:59:34Z")

</div>

Recently, it has been pointed out that the type-piracy committed by OffsetArrays can lead to unexpected results. In particular, OffsetArrays provides the convenience method zeros(::Union{Integer, AbstractUnitRange}...) t…

---

## [On-the-fly plotting in a script](https://discourse.julialang.org/t/on-the-fly-plotting-in-a-script/84390)

<div class="topic-metadata">

**Author:** [@Nathaniel](https://discourse.julialang.org/u/Nathaniel)\
**Replies:** 2\
**Last updated:** [July 18, 2022, 9:46am UTC](https://discourse.julialang.org/t/on-the-fly-plotting-in-a-script/84390 "2022-07-18T09:46:53Z")

</div>

I am writing a julia script and would like to do the following: open a plot window run a few steps of my model update the plot window to show the current status of the model repeat steps 2 and 3 indefinitely I found a…

---

## [How do I obtain \`sizeof(struct sigaction)\`? Clang.jl?](https://discourse.julialang.org/t/how-do-i-obtain-sizeof-struct-sigaction-clang-jl/84344)

<div class="topic-metadata">

**Author:** [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Replies:** 4\
**Last updated:** [July 18, 2022, 8:33am UTC](https://discourse.julialang.org/t/how-do-i-obtain-sizeof-struct-sigaction-clang-jl/84344 "2022-07-18T08:33:42Z")

</div>

I would like to figure out the value printed by this C program in Julia. #include \<signal.h\> #include \<stdio.h\> int main() { printf("%ld", sizeof(struct sigaction)); return 0; } On my system, this print…

---

## [Combine two strings and put in seperate line as single strings](https://discourse.julialang.org/t/combine-two-strings-and-put-in-seperate-line-as-single-strings/84370)

<div class="topic-metadata">

**Author:** [@ayodyas](https://discourse.julialang.org/u/ayodyas)\
**Replies:** 3\
**Last updated:** [July 18, 2022, 8:02am UTC](https://discourse.julialang.org/t/combine-two-strings-and-put-in-seperate-line-as-single-strings/84370 "2022-07-18T08:02:03Z")

</div>

I have a=‘light’, b=‘switch’, I combined a and b using c=a\*b and got 'lightswitch but I need c= light switch purpose is to node labeling, where the size is limited

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

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