# General Usage

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

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

**Page:** 758

---

## [Macro for parallel out-of-order execution?](https://discourse.julialang.org/t/macro-for-parallel-out-of-order-execution/38706)

<div class="topic-metadata">

**Author:** [@oschulz](https://discourse.julialang.org/u/oschulz)\
**Replies:** 7\
**Last updated:** [May 5, 2020, 10:46am UTC](https://discourse.julialang.org/t/macro-for-parallel-out-of-order-execution/38706 "2020-05-05T10:46:05Z")

</div>

Do we have a macro in some package that turns something like this @parallel\_out\_of\_order begin a = foo() bar() b = baz() end into an equivalent of this future\_1 = Threads.@spawn foo() future\_2 = Th…

---

## [Create a colorbar given the range of levelset and colors](https://discourse.julialang.org/t/create-a-colorbar-given-the-range-of-levelset-and-colors/38763)

<div class="topic-metadata">

**Author:** [@mleprovost](https://discourse.julialang.org/u/mleprovost)\
**Replies:** 0\
**Last updated:** [May 4, 2020, 8:40pm UTC](https://discourse.julialang.org/t/create-a-colorbar-given-the-range-of-levelset-and-colors/38763 "2020-05-04T20:40:07Z")

</div>

Hello, I would like to plot only the colorbar, given the range of level sets clims and the range of color to use. I have something like this in mind: using Plots colorbar(clims = (-2, 2), color = cgrad((colormap("RdBu…

---

## [Using push! on a plot with time objects](https://discourse.julialang.org/t/using-push-on-a-plot-with-time-objects/38750)

<div class="topic-metadata">

**Author:** [@achugb](https://discourse.julialang.org/u/achugb)\
**Replies:** 4\
**Last updated:** [May 4, 2020, 6:17pm UTC](https://discourse.julialang.org/t/using-push-on-a-plot-with-time-objects/38750 "2020-05-04T18:17:10Z")

</div>

Is there a way to push additional datapoints to a plot when using time objects? The code below throws an error. Am I doing something wrong? using Plots using Dates x = \[now(), now() + Second(1)\] p = plot(Time.(x), 1:2)…

---

## [How to temporarily suppress all error and warning messages?](https://discourse.julialang.org/t/how-to-temporarily-suppress-all-error-and-warning-messages/38725)

<div class="topic-metadata">

**Author:** [@orialb](https://discourse.julialang.org/u/orialb)\
**Replies:** 5\
**Last updated:** [May 4, 2020, 4:01pm UTC](https://discourse.julialang.org/t/how-to-temporarily-suppress-all-error-and-warning-messages/38725 "2020-05-04T16:01:12Z")

</div>

Hi, I want to be able to temporarily suppress all errors and warnings. I tried doing something like this using redirect\_stderr : foo() = @warn "oh oh" io = open("tmp.err","w") redirect\_stderr(io) do foo() end clo…

---

## [Install Lsqfit package](https://discourse.julialang.org/t/install-lsqfit-package/38746)

<div class="topic-metadata">

**Author:** [@mb218](https://discourse.julialang.org/u/mb218)\
**Replies:** 1\
**Last updated:** [May 4, 2020, 3:38pm UTC](https://discourse.julialang.org/t/install-lsqfit-package/38746 "2020-05-04T15:38:33Z")

</div>

I have installed Julia on Windows 10 as JuliaPro (https://juliacomputing.com/products/juliapro.html) LTS (v 1.05-2). I want to run some curve-fitting and LsqFit seems to be the appropriate package. This isn’t included in…

---

## [InexactError when plotting Time object](https://discourse.julialang.org/t/inexacterror-when-plotting-time-object/38720)

<div class="topic-metadata">

**Author:** [@achugb](https://discourse.julialang.org/u/achugb)\
**Replies:** 3\
**Last updated:** [May 4, 2020, 2:07pm UTC](https://discourse.julialang.org/t/inexacterror-when-plotting-time-object/38720 "2020-05-04T14:07:08Z")

</div>

I’m getting an InexactError when I run this code and I can’t figure out why using Plots using Dates y = \[Int(1)\] x=\[Time(now())\] p=plot(x,y) Error showing value of type Plots.Plot{Plots.GRBackend}: ERROR: InexactError…

---

## [Questions re Using Julia](https://discourse.julialang.org/t/questions-re-using-julia/38663)

<div class="topic-metadata">

**Author:** [@pberrett](https://discourse.julialang.org/u/pberrett)\
**Replies:** 28\
**Last updated:** [May 4, 2020, 1:36pm UTC](https://discourse.julialang.org/t/questions-re-using-julia/38663 "2020-05-04T13:36:04Z")

</div>

Hi everyone Please be gentle, this is my first post. I have posted it here because it spans a number of areas. First, I have written a program in python that loads a series of images, analyses them and identifies poten…

---

## [Need help on improving performance of a small subfunction](https://discourse.julialang.org/t/need-help-on-improving-performance-of-a-small-subfunction/38675)

<div class="topic-metadata">

**Author:** [@O\_Julia](https://discourse.julialang.org/u/O_Julia)\
**Replies:** 21\
**Last updated:** [May 4, 2020, 11:58am UTC](https://discourse.julialang.org/t/need-help-on-improving-performance-of-a-small-subfunction/38675 "2020-05-04T11:58:07Z")

</div>

There is a function in my main program and I have realised that this function consumes most of time in my program. Is it possible to speed up this mentioned function given below function fun1(r::Matrix,od::Int64,γ::Floa…

---

## [Proper parametric subtyping of AbstractArray](https://discourse.julialang.org/t/proper-parametric-subtyping-of-abstractarray/38723)

<div class="topic-metadata">

**Author:** [@tlienart](https://discourse.julialang.org/u/tlienart)\
**Replies:** 4\
**Last updated:** [May 4, 2020, 10:03am UTC](https://discourse.julialang.org/t/proper-parametric-subtyping-of-abstractarray/38723 "2020-05-04T10:03:02Z")

</div>

I ended up banging my head against this yesterday, I guess I’m interested by both the how to do this properly as well as the why did the other ways not work in order to get better at this parametric type business. Aim: …

---

## [Way to add tests that utilize jupyter notebooks?](https://discourse.julialang.org/t/way-to-add-tests-that-utilize-jupyter-notebooks/38341)

<div class="topic-metadata">

**Author:** [@djsegal](https://discourse.julialang.org/u/djsegal)\
**Replies:** 6\
**Last updated:** [May 4, 2020, 9:01am UTC](https://discourse.julialang.org/t/way-to-add-tests-that-utilize-jupyter-notebooks/38341 "2020-05-04T09:01:22Z")

</div>

Was wondering what’s the best way to: run jupyter notebooks during a test suite check the output similar to repl output Would be helpful to have a rosetta stone style answer with tests that are doing string asserts on…

---

## [Linear Algebra tricks?](https://discourse.julialang.org/t/linear-algebra-tricks/38618)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 28\
**Last updated:** [May 4, 2020, 5:59am UTC](https://discourse.julialang.org/t/linear-algebra-tricks/38618 "2020-05-04T05:59:16Z")

</div>

Two questions related to Linear Algebra: I need an identity matrix in some computations. Two ways to achieve this: julia\> Matrix{Integer}(I,3,3) 3×3 Array{Integer,2}: true 0 0 0 true 0 0 0 t…

---

## [Cumsum! safe to use in-place?](https://discourse.julialang.org/t/cumsum-safe-to-use-in-place/38690)

<div class="topic-metadata">

**Author:** [@dmitrip](https://discourse.julialang.org/u/dmitrip)\
**Replies:** 9\
**Last updated:** [May 3, 2020, 7:13pm UTC](https://discourse.julialang.org/t/cumsum-safe-to-use-in-place/38690 "2020-05-03T19:13:40Z")

</div>

Is it safe to use cumsum!(x, x) to replace the contents of x with cumsum(x) (in order to avoid allocating another vector to hold the result)? Am I relying on implementation details that may change?

---

## [Special Functions (Elliptic.jl) and arbitrary precision](https://discourse.julialang.org/t/special-functions-elliptic-jl-and-arbitrary-precision/38658)

<div class="topic-metadata">

**Author:** [@StarecZosima](https://discourse.julialang.org/u/StarecZosima)\
**Replies:** 9\
**Last updated:** [May 3, 2020, 6:43pm UTC](https://discourse.julialang.org/t/special-functions-elliptic-jl-and-arbitrary-precision/38658 "2020-05-03T18:43:46Z")

</div>

I do not understand how to work in arbitrary precision in Julia. I encountered the problem when using a function from the Elliptic.jl package K(1-10^-23) returns Inf while for example Mathematica accuratel…

---

## [How to use developed package in IJulia?](https://discourse.julialang.org/t/how-to-use-developed-package-in-ijulia/38676)

<div class="topic-metadata">

**Author:** [@dcastel](https://discourse.julialang.org/u/dcastel)\
**Replies:** 2\
**Last updated:** [May 3, 2020, 5:20pm UTC](https://discourse.julialang.org/t/how-to-use-developed-package-in-ijulia/38676 "2020-05-03T17:20:29Z")

</div>

Hi all, I was creating a pull request for Plots.jl when I wanted to test a feature available in a Jupyter notebook. In various ways I tried including the locally developed package into the notebook but I did not succeed…

---

## [What is the different in BinaryBuilder between a server build and local build?](https://discourse.julialang.org/t/what-is-the-different-in-binarybuilder-between-a-server-build-and-local-build/38679)

<div class="topic-metadata">

**Author:** [@pixel27](https://discourse.julialang.org/u/pixel27)\
**Replies:** 7\
**Last updated:** [May 3, 2020, 4:17pm UTC](https://discourse.julialang.org/t/what-is-the-different-in-binarybuilder-between-a-server-build-and-local-build/38679 "2020-05-03T16:17:11Z")

</div>

Tesseract in Yggdrasil is at 4.1.0 and there have been “many bug fixes” in the 4.1.1 release. So I wanted to see if I could upgrade it to 4.1.1. I updated the build\_tarballs.jl to pull down the 4.1.1 source for Tessera…

---

## [Julia bindings to SandDance for Plotting/Visualization?](https://discourse.julialang.org/t/julia-bindings-to-sanddance-for-plotting-visualization/38615)

<div class="topic-metadata">

**Author:** [@oschulz](https://discourse.julialang.org/u/oschulz)\
**Replies:** 4\
**Last updated:** [May 3, 2020, 10:44am UTC](https://discourse.julialang.org/t/julia-bindings-to-sanddance-for-plotting-visualization/38615 "2020-05-03T10:44:43Z")

</div>

Is anybody thinking about building Julia bindings for MS Sanddance? It’s relatively new, combining Vega for layout and Deck.gl for WebGL rendering. The demos are really impressive. CC @davidanthoff

---

## [Bug types in Julia: what types of bugs in Julia programs have you experienced? Are they different from bug types in general programming languages like C/C++?](https://discourse.julialang.org/t/bug-types-in-julia-what-types-of-bugs-in-julia-programs-have-you-experienced-are-they-different-from-bug-types-in-general-programming-languages-like-c-c/38640)

<div class="topic-metadata">

**Author:** [@julia.user.buet](https://discourse.julialang.org/u/julia.user.buet)\
**Replies:** 5\
**Last updated:** [May 3, 2020, 9:10am UTC](https://discourse.julialang.org/t/bug-types-in-julia-what-types-of-bugs-in-julia-programs-have-you-experienced-are-they-different-from-bug-types-in-general-programming-languages-like-c-c/38640 "2020-05-03T09:10:29Z")

</div>

Dear community, Hope everyone is doing safe in these stressful times. I am just getting started with Julia programs and wanted to know about the bug types that typically occur. Are bug types the same as C/C++ or Java? D…

---

## [Could someone demystify arrays for me?](https://discourse.julialang.org/t/could-someone-demystify-arrays-for-me/38643)

<div class="topic-metadata">

**Author:** [@krstoff](https://discourse.julialang.org/u/krstoff)\
**Replies:** 1\
**Last updated:** [May 3, 2020, 5:36am UTC](https://discourse.julialang.org/t/could-someone-demystify-arrays-for-me/38643 "2020-05-03T05:36:48Z")

</div>

I was having trouble finding performance characteristics for push! and pushfirst! on Vector{T} so I wrote a quick test comparing the two and was surprised to find that they were the same speed - even when intermixed. I d…

---

## [Light to dark in grid](https://discourse.julialang.org/t/light-to-dark-in-grid/38642)

<div class="topic-metadata">

**Author:** [@Varghese](https://discourse.julialang.org/u/Varghese)\
**Replies:** 0\
**Last updated:** [May 3, 2020, 2:10am UTC](https://discourse.julialang.org/t/light-to-dark-in-grid/38642 "2020-05-03T02:10:50Z")

</div>

How do I show increasing gradient in hline and vline in gr. For example, here is some code pl = plot( xlim = (0,5),ylim = (0,5), legend = false ) vlcolor = palette(\[:lightgreen, :green\],5) hlcolor = palette(\[:lightgray…

---

## [GitHub create gist](https://discourse.julialang.org/t/github-create-gist/38616)

<div class="topic-metadata">

**Author:** [@Wikunia](https://discourse.julialang.org/u/Wikunia)\
**Replies:** 1\
**Last updated:** [May 2, 2020, 4:22pm UTC](https://discourse.julialang.org/t/github-create-gist/38616 "2020-05-02T16:22:42Z")

</div>

Not sure where the error is which is the reason why I ask here and not at GitHub.jl I want to create a gist with: using GitHub gist\_json = """ { "description": "Hello World Examples", "public":…

---

## [Adding package tags for JuliaHub and juliapackages.com?](https://discourse.julialang.org/t/adding-package-tags-for-juliahub-and-juliapackages-com/38601)

<div class="topic-metadata">

**Author:** [@oschulz](https://discourse.julialang.org/u/oschulz)\
**Replies:** 3\
**Last updated:** [May 2, 2020, 1:49pm UTC](https://discourse.julialang.org/t/adding-package-tags-for-juliahub-and-juliapackages-com/38601 "2020-05-02T13:49:02Z")

</div>

How do I add category tags to my package, so that juliahub.com and juliapackages.com will take them up? Sorry, I feel this must have been asked before, but I can’t find it.

---

## [Query.jl: Group dataframe along two variables](https://discourse.julialang.org/t/query-jl-group-dataframe-along-two-variables/38546)

<div class="topic-metadata">

**Author:** [@IljaK91](https://discourse.julialang.org/u/IljaK91)\
**Replies:** 4\
**Last updated:** [May 2, 2020, 12:43pm UTC](https://discourse.julialang.org/t/query-jl-group-dataframe-along-two-variables/38546 "2020-05-02T12:43:15Z")

</div>

Hello everybody, I am trying to learn how to use Query.jl more efficiently, because it seems like a great tool once you get the hang of it. I have the following structure: I have many firms with daily observations. I w…

---

## [Issue with build MKL on Windows 10](https://discourse.julialang.org/t/issue-with-build-mkl-on-windows-10/38502)

<div class="topic-metadata">

**Author:** [@Andrei\_Bobrov](https://discourse.julialang.org/u/Andrei_Bobrov)\
**Replies:** 5\
**Last updated:** [May 2, 2020, 8:35am UTC](https://discourse.julialang.org/t/issue-with-build-mkl-on-windows-10/38502 "2020-05-02T08:35:35Z")

</div>

I am have issue with build MKL after install MKL.jl (antivirus (Kaspersky) disabled). (@v1.4) pkg\> build MKL Building MKL → \`J:\\Julia\_depot\\packages\\MKL\\1edTo\\deps\\build.log\` ┌ Error: Error building \`MKL\`: │ Generati…

---

## [Revise stops tracking changes](https://discourse.julialang.org/t/revise-stops-tracking-changes/36895)

<div class="topic-metadata">

**Author:** [@sloede](https://discourse.julialang.org/u/sloede)\
**Replies:** 5\
**Last updated:** [May 2, 2020, 8:09am UTC](https://discourse.julialang.org/t/revise-stops-tracking-changes/36895 "2020-05-02T08:09:03Z")

</div>

After certain types of errors, Revise.jl stops tracking changes. One such error type seem to be syntax errors, but other times I feel like there are additional cases where Revise just stops monitoring files. Note that I …

---

## [Julia connnection to jupyterlab problem](https://discourse.julialang.org/t/julia-connnection-to-jupyterlab-problem/38345)

<div class="topic-metadata">

**Author:** [@CearthCao](https://discourse.julialang.org/u/CearthCao)\
**Replies:** 2\
**Last updated:** [May 2, 2020, 2:54am UTC](https://discourse.julialang.org/t/julia-connnection-to-jupyterlab-problem/38345 "2020-05-02T02:54:06Z")

</div>

Hi, I got a problem, when I open a \*.ipynb file, it cannot open the jupyterlab, but display like this:

---

## [Is it possible to test a Yggdrasil build before it's merged in?](https://discourse.julialang.org/t/is-it-possible-to-test-a-yggdrasil-build-before-its-merged-in/38589)

<div class="topic-metadata">

**Author:** [@pixel27](https://discourse.julialang.org/u/pixel27)\
**Replies:** 2\
**Last updated:** [May 2, 2020, 1:02am UTC](https://discourse.julialang.org/t/is-it-possible-to-test-a-yggdrasil-build-before-its-merged-in/38589 "2020-05-02T01:02:27Z")

</div>

Basically I made a pull request to update Leptonica to the latest version. However Leptonica can be built with or without various libraries, i.e. if the GIF library is not found then GIF images will not be supported. T…

---

## [Avoiding type instability when slicing a tuple](https://discourse.julialang.org/t/avoiding-type-instability-when-slicing-a-tuple/38567)

<div class="topic-metadata">

**Author:** [@Mason](https://discourse.julialang.org/u/Mason)\
**Replies:** 10\
**Last updated:** [May 2, 2020, 12:37am UTC](https://discourse.julialang.org/t/avoiding-type-instability-when-slicing-a-tuple/38567 "2020-05-02T00:37:58Z")

</div>

This question is an adapted version of what appeared here in the JuliaLang Zulip helpdesk. Suppose I have a function that takes in a heterogeneously typed Tuple and will return a slice of that tuple where the slice ind…

---

## [Vector addition in Julia slower than numpy in Linux](https://discourse.julialang.org/t/vector-addition-in-julia-slower-than-numpy-in-linux/38520)

<div class="topic-metadata">

**Author:** [@aminsadeghi](https://discourse.julialang.org/u/aminsadeghi)\
**Replies:** 21\
**Last updated:** [May 1, 2020, 9:02pm UTC](https://discourse.julialang.org/t/vector-addition-in-julia-slower-than-numpy-in-linux/38520 "2020-05-01T21:02:51Z")

</div>

I tried this on Julia 1.4 on Ubuntu 19.10: import numpy as np a = np.random.rand(500\_000) b = np.random.rand(500\_000) %timeit a + b 115 µs ± 1.03 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each) using Benchma…

---

## [Einstein convention for slicing or how to view diagonals in tensors](https://discourse.julialang.org/t/einstein-convention-for-slicing-or-how-to-view-diagonals-in-tensors/38553)

<div class="topic-metadata">

**Author:** [@Sebastian\_Vollmer](https://discourse.julialang.org/u/Sebastian_Vollmer)\
**Replies:** 10\
**Last updated:** [May 1, 2020, 8:46pm UTC](https://discourse.julialang.org/t/einstein-convention-for-slicing-or-how-to-view-diagonals-in-tensors/38553 "2020-05-01T20:46:47Z")

</div>

I have looked Einsum.jl and TensorOperations.jl to replicate following behavior np.einsum: https://docs.scipy.org/doc/numpy/reference/generated/numpy.einsum.html Views returned from einsum are now writeable whenever th…

---

## [Efficient way of turning iterator into a matrix](https://discourse.julialang.org/t/efficient-way-of-turning-iterator-into-a-matrix/38309)

<div class="topic-metadata">

**Author:** [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Replies:** 11\
**Last updated:** [May 1, 2020, 7:36pm UTC](https://discourse.julialang.org/t/efficient-way-of-turning-iterator-into-a-matrix/38309 "2020-05-01T19:36:34Z")

</div>

I have the following goal: Take in an iterator which does not necessarily have eltype(itr) defined. If the iterator is looping through numbers, return a vector of those numbers. If the iterator is not through numbers,…

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

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