# General Usage

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

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

**Page:** 895

---

## [Makie based data labeling setup](https://discourse.julialang.org/t/makie-based-data-labeling-setup/20459)

<div class="topic-metadata">

**Author:** [@amckay1](https://discourse.julialang.org/u/amckay1)\
**Replies:** 10\
**Last updated:** [February 11, 2019, 7:20pm UTC](https://discourse.julialang.org/t/makie-based-data-labeling-setup/20459 "2019-02-11T19:20:45Z")

</div>

Hi all, I’m trying to create a Julia-based image labeling solution for downstream ML (ideally Flux) transfer learning. I didn’t see anything that obviously fit, so decided to try and build my own. I am very impressed wit…

---

## [Poor performance while multithreading (Julia 1.0)](https://discourse.julialang.org/t/poor-performance-while-multithreading-julia-1-0/20325)

<div class="topic-metadata">

**Author:** [@dkiese](https://discourse.julialang.org/u/dkiese)\
**Replies:** 28\
**Last updated:** [February 11, 2019, 9:38am UTC](https://discourse.julialang.org/t/poor-performance-while-multithreading-julia-1-0/20325 "2019-02-11T09:38:14Z")

</div>

Hello everyone, this is my first post (although not my first encounter with Julia), so please bear with me if I am doing everything wrong. Okay, so now here is my Problem. I have a working code, that solves a set of co…

---

## [Memoize and broken compilation](https://discourse.julialang.org/t/memoize-and-broken-compilation/20572)

<div class="topic-metadata">

**Author:** [@leiteiro](https://discourse.julialang.org/u/leiteiro)\
**Replies:** 10\
**Last updated:** [February 11, 2019, 3:06am UTC](https://discourse.julialang.org/t/memoize-and-broken-compilation/20572 "2019-02-11T03:06:34Z")

</div>

After I have moved from 0.6.3 to Julia 1.1 I get the WARNING: eval into closed module Memoize: Expr(:const, Symbol("##A\_memoized\_cache") = Expr(:call, :IdDict)) \*\* incremental compilation may be broken for this module…

---

## [Way to speed up a 2x2 block matrix solver?](https://discourse.julialang.org/t/way-to-speed-up-a-2x2-block-matrix-solver/20628)

<div class="topic-metadata">

**Author:** [@djsegal](https://discourse.julialang.org/u/djsegal)\
**Replies:** 0\
**Last updated:** [February 10, 2019, 7:31pm UTC](https://discourse.julialang.org/t/way-to-speed-up-a-2x2-block-matrix-solver/20628 "2019-02-10T19:31:33Z")

</div>

Hi All, So I made a package that solves a 2x2 block system, according to: This assumes that you have some matrix that is predominantly banded. Using BandedMatrix.jl, I tried to take a crack at optimizing the solver…

---

## [Quickest tabular file format when I do not know the number of rows](https://discourse.julialang.org/t/quickest-tabular-file-format-when-i-do-not-know-the-number-of-rows/20627)

<div class="topic-metadata">

**Author:** [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Replies:** 2\
**Last updated:** [February 10, 2019, 8:02pm UTC](https://discourse.julialang.org/t/quickest-tabular-file-format-when-i-do-not-know-the-number-of-rows/20627 "2019-02-10T20:02:47Z")

</div>

There are many different ways to handle file IO. I noticed that there might be a big difference with respect to whether the number of rows is known in advance or not, in terms of speed, if I plan to read the file row by …

---

## [@async calls to C API yields?](https://discourse.julialang.org/t/async-calls-to-c-api-yields/15399)

<div class="topic-metadata">

**Author:** [@felipenoris](https://discourse.julialang.org/u/felipenoris)\
**Replies:** 4\
**Last updated:** [February 10, 2019, 5:15pm UTC](https://discourse.julialang.org/t/async-calls-to-c-api-yields/15399 "2019-02-10T17:15:31Z")

</div>

I’m calling a function in an external API with ccall. That C function makes an IO operation internally. If I call it with @async will the scheduler yield automatically, or do I have to hook this to libuv to make it async…

---

## [Reaching the 4,194,304 dimensional Hilbert space](https://discourse.julialang.org/t/reaching-the-4-194-304-dimensional-hilbert-space/20370)

<div class="topic-metadata">

**Author:** [@chakravala](https://discourse.julialang.org/u/chakravala)\
**Replies:** 13\
**Last updated:** [February 10, 2019, 4:25pm UTC](https://discourse.julialang.org/t/reaching-the-4-194-304-dimensional-hilbert-space/20370 "2019-02-10T16:25:07Z")

</div>

As of right now, I have achieved the capability to extend the tensor product space of Grassmann.jl to the 4,194,304 dimensional Hilbert space of 2^{22} by constructing an efficient representation. Because there are 22 in…

---

## [How to count how many registered packages of Julia exists?](https://discourse.julialang.org/t/how-to-count-how-many-registered-packages-of-julia-exists/20583)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 7\
**Last updated:** [February 10, 2019, 6:28am UTC](https://discourse.julialang.org/t/how-to-count-how-many-registered-packages-of-julia-exists/20583 "2019-02-10T06:28:27Z")

</div>

Hello, for some info about Julia I would like to know how many registered packages of Julia are out there. https://pkg.julialang.org/ seems dead (“Last updated 2018-08-05”) How can I know how many total registered pack…

---

## [Nuklear.jl - A Julia wrapper for Nuklear?](https://discourse.julialang.org/t/nuklear-jl-a-julia-wrapper-for-nuklear/17990)

<div class="topic-metadata">

**Author:** [@scelles](https://discourse.julialang.org/u/scelles)\
**Replies:** 20\
**Last updated:** [February 10, 2019, 3:57am UTC](https://discourse.julialang.org/t/nuklear-jl-a-julia-wrapper-for-nuklear/17990 "2019-02-10T03:57:50Z")

</div>

Hello, Nuklear is graphical user interface toolkit written in ANSI C. It’s a single header library written in C89 (ANSI C), with small codebase (~18kLOC) It’s focussed on portability, efficiency and simplicity and hav…

---

## [Finite differences with Julia](https://discourse.julialang.org/t/finite-differences-with-julia/20591)

<div class="topic-metadata">

**Author:** [@pnavaro](https://discourse.julialang.org/u/pnavaro)\
**Replies:** 5\
**Last updated:** [February 9, 2019, 7:25pm UTC](https://discourse.julialang.org/t/finite-differences-with-julia/20591 "2019-02-09T19:25:05Z")

</div>

Dear Julia users, Is there a way to improve performance of this kind of code without devectorizing (use loops). All variables are 2d arrays. I solve a PDE problem with finite differences method. Thanks for your help 99…

---

## [Functional implementation of collect](https://discourse.julialang.org/t/functional-implementation-of-collect/15177)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 4\
**Last updated:** [February 9, 2019, 4:13pm UTC](https://discourse.julialang.org/t/functional-implementation-of-collect/15177 "2019-02-09T16:13:13Z")

</div>

I am working on something that is in a sense a generalization of collect (except it would pick named tuples apart into vectors, apply some simple RLE compression, etc), and I wanted to understand the type widening part b…

---

## [Use multi-line arguments to macros without commas with a (new) block structure](https://discourse.julialang.org/t/use-multi-line-arguments-to-macros-without-commas-with-a-new-block-structure/20577)

<div class="topic-metadata">

**Author:** [@stakaz](https://discourse.julialang.org/u/stakaz)\
**Replies:** 12\
**Last updated:** [February 9, 2019, 7:28am UTC](https://discourse.julialang.org/t/use-multi-line-arguments-to-macros-without-commas-with-a-new-block-structure/20577 "2019-02-09T07:28:51Z")

</div>

Hello, I just thought about the option to use multi-line statements for macro calls without the need to use comma in them. So I am interested in being able to rewrite this @mymacro a b "123" (1,2,3) into this @mymacr…

---

## [Are composite types type-unstable?](https://discourse.julialang.org/t/are-composite-types-type-unstable/20599)

<div class="topic-metadata">

**Author:** [@heliosdrm](https://discourse.julialang.org/u/heliosdrm)\
**Replies:** 3\
**Last updated:** [February 8, 2019, 11:54pm UTC](https://discourse.julialang.org/t/are-composite-types-type-unstable/20599 "2019-02-08T23:54:54Z")

</div>

I define a composite type with fields of different types: struct MyType i::Int f::Float64 end And then: julia\> a = MyType(1,1.0) MyType(1, 1.0) julia\> @code\_warntype a.i Body::Union{Float64, Int64} 18 1 ─ %1 …

---

## [What's in the .mem files?](https://discourse.julialang.org/t/whats-in-the-mem-files/20592)

<div class="topic-metadata">

**Author:** [@tanhevg](https://discourse.julialang.org/u/tanhevg)\
**Replies:** 1\
**Last updated:** [February 8, 2019, 9:19pm UTC](https://discourse.julialang.org/t/whats-in-the-mem-files/20592 "2019-02-08T21:19:02Z")

</div>

Hello, I have run julia with --track-allocation=all, and it has generated a bunch of .mem files for my code. Some of my lines are annotated with numbers on the left hand side. What exactly do those numbers mean? Are the…

---

## [Brodcasting operator not defined in a macro](https://discourse.julialang.org/t/brodcasting-operator-not-defined-in-a-macro/20587)

<div class="topic-metadata">

**Author:** [@ffevotte](https://discourse.julialang.org/u/ffevotte)\
**Replies:** 1\
**Last updated:** [February 8, 2019, 4:34pm UTC](https://discourse.julialang.org/t/brodcasting-operator-not-defined-in-a-macro/20587 "2019-02-08T16:34:17Z")

</div>

The broadcasted division (./) works as it should in functions: function foo() \[1 2 3\] ./ \[4 5 6\] end julia\> foo() 1×3 Array{Float64,2}: 0.25 0.4 0.5 … but not in macros: macro foo() quote \[1 2 3\] .…

---

## [How can you dispatch on Iterator eltype including generators?](https://discourse.julialang.org/t/how-can-you-dispatch-on-iterator-eltype-including-generators/20511)

<div class="topic-metadata">

**Author:** [@ndinsmore](https://discourse.julialang.org/u/ndinsmore)\
**Replies:** 10\
**Last updated:** [February 8, 2019, 2:25pm UTC](https://discourse.julialang.org/t/how-can-you-dispatch-on-iterator-eltype-including-generators/20511 "2019-02-08T14:25:09Z")

</div>

Ho can you dispatch on Iterator eltype including generators? I ask in an attempt to fix the following interface problem. Right now I am working on the get function of an interface that has many different types to disp…

---

## [Issue when Converting object of Type day to year](https://discourse.julialang.org/t/issue-when-converting-object-of-type-day-to-year/20560)

<div class="topic-metadata">

**Author:** [@Erisme](https://discourse.julialang.org/u/Erisme)\
**Replies:** 10\
**Last updated:** [February 8, 2019, 9:54am UTC](https://discourse.julialang.org/t/issue-when-converting-object-of-type-day-to-year/20560 "2019-02-08T09:54:22Z")

</div>

Hi, I think I am having a bug when I want to convert number of days between 2 dates into years: I have: DateFinObservation = Dates.Date(2008,12,31) DateNaiss = Dates.Date.(t.DateNaissance,“mm/dd/yyyy”) test= DateFin…

---

## [which version of Julia should we update to? ](https://discourse.julialang.org/t/which-version-of-julia-should-we-update-to/20564)

<div class="topic-metadata">

**Author:** [@ezgikurt](https://discourse.julialang.org/u/ezgikurt)\
**Replies:** 3\
**Last updated:** [February 8, 2019, 7:47am UTC](https://discourse.julialang.org/t/which-version-of-julia-should-we-update-to/20564 "2019-02-08T07:47:58Z")

</div>

Hi, not sure if this the correct place for this topic but here goes. We are using Julia in our projects and are in the process of updating our codes from 0.5.2 and 0.6.4 to 1.\*. I see that 1.0.3 is the long-term support…

---

## [PackageCompiler - "has no known versions!"](https://discourse.julialang.org/t/packagecompiler-has-no-known-versions/20435)

<div class="topic-metadata">

**Author:** [@hhaensel](https://discourse.julialang.org/u/hhaensel)\
**Replies:** 11\
**Last updated:** [February 8, 2019, 7:10am UTC](https://discourse.julialang.org/t/packagecompiler-has-no-known-versions/20435 "2019-02-08T07:10:54Z")

</div>

I am having difficulties with compiling my own package. I have my own package “Foo” functional and registered. (v1.0) pkg\> st Status \`C:\\Users\\m136270\\.julia\\environments\\v1.0\\Project.toml\` \[537997a7\] AbstractPlo…

---

## [How to reload a newly created package](https://discourse.julialang.org/t/how-to-reload-a-newly-created-package/20566)

<div class="topic-metadata">

**Author:** [@biona001](https://discourse.julialang.org/u/biona001)\
**Replies:** 5\
**Last updated:** [February 8, 2019, 4:37am UTC](https://discourse.julialang.org/t/how-to-reload-a-newly-created-package/20566 "2019-02-08T04:37:52Z")

</div>

I created a new package following the documentation. Specifically, I am stuck on this section where it says “and reloading the package…”. I cannot reload the package after restarting the REPL. If I did not screw somethin…

---

## [Use\_intel\_libm = 1](https://discourse.julialang.org/t/use-intel-libm-1/16817)

<div class="topic-metadata">

**Author:** [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Replies:** 5\
**Last updated:** [February 8, 2019, 4:03am UTC](https://discourse.julialang.org/t/use-intel-libm-1/16817 "2019-02-08T04:03:09Z")

</div>

Is anyone successfully using Intel Math Library (USE\_INTEL\_LIBM = 1 in Make.user) in a self-compiled Julia 1.0.1? Pre 1.0 I always used USE\_INTEL\_LIBM and USE\_INTEL\_MKL to replace all OpenBLAS by Intel pendants without …

---

## [Reduce allocations for matrix differential equations function](https://discourse.julialang.org/t/reduce-allocations-for-matrix-differential-equations-function/20520)

<div class="topic-metadata">

**Author:** [@Egwene\_al\_Vere](https://discourse.julialang.org/u/Egwene_al_Vere)\
**Replies:** 10\
**Last updated:** [February 8, 2019, 2:41am UTC](https://discourse.julialang.org/t/reduce-allocations-for-matrix-differential-equations-function/20520 "2019-02-08T02:41:38Z")

</div>

Here’s a sample function for use with a differential equation solver to solve a system of matrices equations, d M\_i / dt =f(M\_{1...n}). The matrix M\_i is represented by m\[:,:,i\], and its time derivative is stored in dm. …

---

## [Problems using pmap(), and doubt about the number of workers/processes to use](https://discourse.julialang.org/t/problems-using-pmap-and-doubt-about-the-number-of-workers-processes-to-use/20510)

<div class="topic-metadata">

**Author:** [@ale](https://discourse.julialang.org/u/ale)\
**Replies:** 3\
**Last updated:** [February 7, 2019, 10:28pm UTC](https://discourse.julialang.org/t/problems-using-pmap-and-doubt-about-the-number-of-workers-processes-to-use/20510 "2019-02-07T22:28:37Z")

</div>

Hello everyone, I am using Julia 0.6.4. I am trying to use parallel computing in a Monte Carlo simulation program, by utilizing the pmap() function, so to apply the same function my\_function to different inputs (which …

---

## [Best way to deal with broadcasting of intrinsics on CuArrays?](https://discourse.julialang.org/t/best-way-to-deal-with-broadcasting-of-intrinsics-on-cuarrays/20522)

<div class="topic-metadata">

**Author:** [@dfdx](https://discourse.julialang.org/u/dfdx)\
**Replies:** 4\
**Last updated:** [February 7, 2019, 8:03pm UTC](https://discourse.julialang.org/t/best-way-to-deal-with-broadcasting-of-intrinsics-on-cuarrays/20522 "2019-02-07T20:03:59Z")

</div>

Let’s say we have a function that uses Base intrinsics like exp: logistic(x) = 1 / (1 + exp(-x)) If we broadcast it over CuArrays, e.g.: A = cu(rand(5, 10)) logistic.(x) we expectedly get a warning (and even crashes …

---

## [Error Travis Julia form GitHub Repository -- ERROR: KeyError: key "git-tree-sha1" not found](https://discourse.julialang.org/t/error-travis-julia-form-github-repository-error-keyerror-key-git-tree-sha1-not-found/20536)

<div class="topic-metadata">

**Author:** [@Carmine\_Spagnuolo](https://discourse.julialang.org/u/Carmine_Spagnuolo)\
**Replies:** 10\
**Last updated:** [February 7, 2019, 3:45pm UTC](https://discourse.julialang.org/t/error-travis-julia-form-github-repository-error-keyerror-key-git-tree-sha1-not-found/20536 "2019-02-07T15:45:27Z")

</div>

Can anyone help me? I have a Julia repo on GitHub, I am trying to build using travis…al build on local machine works but on travis I have the following error: $ julia --color=yes -e "if VERSION \< v\\"0.7.0-DEV.5183\\"; P…

---

## [How to use osmnx python package in julia?](https://discourse.julialang.org/t/how-to-use-osmnx-python-package-in-julia/20541)

<div class="topic-metadata">

**Author:** [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Replies:** 9\
**Last updated:** [February 7, 2019, 3:15pm UTC](https://discourse.julialang.org/t/how-to-use-osmnx-python-package-in-julia/20541 "2019-02-07T15:15:06Z")

</div>

Hi, I installed osmnx using pip3 install \*\*\*\*\* , and I tested it out with a simple python code. It works out as expected. Then, I’d like to be able to import osmnx. After searching from the internet, I need to use the Py…

---

## [Is there diff() method for other operations?](https://discourse.julialang.org/t/is-there-diff-method-for-other-operations/20527)

<div class="topic-metadata">

**Author:** [@djsegal](https://discourse.julialang.org/u/djsegal)\
**Replies:** 6\
**Last updated:** [February 7, 2019, 12:41pm UTC](https://discourse.julialang.org/t/is-there-diff-method-for-other-operations/20527 "2019-02-07T12:41:22Z")

</div>

For example: a = \[ 2 , 4 , 8 , 16 , 32 \] diff(a) =\> \[ 2 , 4 , 8 , 16 \] How do you do this for other operations? This might include something like: a = \[ 2 , 4 , 8 , 16 , 32 \] average(a) =\> \[ 3 , 6 , 12 , 24 \] // …

---

## [Call a python function (under a virtual environment) (use a returned python object) from julia](https://discourse.julialang.org/t/call-a-python-function-under-a-virtual-environment-use-a-returned-python-object-from-julia/20534)

<div class="topic-metadata">

**Author:** [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Replies:** 1\
**Last updated:** [February 7, 2019, 12:28pm UTC](https://discourse.julialang.org/t/call-a-python-function-under-a-virtual-environment-use-a-returned-python-object-from-julia/20534 "2019-02-07T12:28:11Z")

</div>

I was thinking to use a returned python object from the other python script, in my main julia package. I’m using Atom. I searched from the internet and found the following link: So I tried it out in the REPL of Julia. …

---

## [How to wrap a concrete type in a user-defined type?](https://discourse.julialang.org/t/how-to-wrap-a-concrete-type-in-a-user-defined-type/20491)

<div class="topic-metadata">

**Author:** [@singularitti](https://discourse.julialang.org/u/singularitti)\
**Replies:** 4\
**Last updated:** [February 7, 2019, 9:08am UTC](https://discourse.julialang.org/t/how-to-wrap-a-concrete-type-in-a-user-defined-type/20491 "2019-02-07T09:08:45Z")

</div>

Julia does not allow inherit concrete types. So how should I implement my type using existing concrete type? For example, I want to implement MyArray with AxisArrays. AxisArray, they share the same methods, the only diff…

---

## [Debugging code generation when testing with package manager](https://discourse.julialang.org/t/debugging-code-generation-when-testing-with-package-manager/20524)

<div class="topic-metadata">

**Author:** [@m-j-w](https://discourse.julialang.org/u/m-j-w)\
**Replies:** 3\
**Last updated:** [February 7, 2019, 8:48am UTC](https://discourse.julialang.org/t/debugging-code-generation-when-testing-with-package-manager/20524 "2019-02-07T08:48:21Z")

</div>

I’m the developer of the package CpuId. I’m currently facing an issue which appears to only occur when testing the package through the package manager, viz. typing \]test CpuId. In that case, the core functions containing…

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

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