# General Usage

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

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

**Page:** 942

---

## [ERROR: System image file failed consistency check: maybe opened the wrong version?](https://discourse.julialang.org/t/error-system-image-file-failed-consistency-check-maybe-opened-the-wrong-version/14829)

<div class="topic-metadata">

**Author:** [@Bernard\_GODARD](https://discourse.julialang.org/u/Bernard_GODARD)\
**Replies:** 1\
**Last updated:** [September 12, 2018, 2:39am UTC](https://discourse.julialang.org/t/error-system-image-file-failed-consistency-check-maybe-opened-the-wrong-version/14829 "2018-09-12T02:39:23Z")

</div>

julia 0.7 on Linux x64 $ cd julia-0.7.0-linux-x86\_64/share/julia $ julia build\_sysimg.jl --force After the build I cannot run julia: $ julia ERROR: System image file failed consistency check: maybe opened the wrong ve…

---

## [Developing a package: hacking the include order of files](https://discourse.julialang.org/t/developing-a-package-hacking-the-include-order-of-files/14778)

<div class="topic-metadata">

**Author:** [@DominiqueMakowski](https://discourse.julialang.org/u/DominiqueMakowski)\
**Replies:** 10\
**Last updated:** [September 11, 2018, 11:06pm UTC](https://discourse.julialang.org/t/developing-a-package-hacking-the-include-order-of-files/14778 "2018-09-11T23:06:39Z")

</div>

I am developing a package, let’s say Package.jl. In its scr directory, I have three files: A.jl and B.jl in which are defined three functions (a(), b() and c()), and the main Package.jl file. The latter includes: modul…

---

## [Logplot with zeros / infinite values](https://discourse.julialang.org/t/logplot-with-zeros-infinite-values/14822)

<div class="topic-metadata">

**Author:** [@foobar\_lv2](https://discourse.julialang.org/u/foobar_lv2)\
**Replies:** 2\
**Last updated:** [September 11, 2018, 8:56pm UTC](https://discourse.julialang.org/t/logplot-with-zeros-infinite-values/14822 "2018-09-11T20:56:33Z")

</div>

I want to plot some data that contains zeros, with log-axes. This does not work easily: using Plots xs=\[0.0,1.0,2.0\]; ys=xs.^2; plot(xs,ys; xaxis=:log) #ArgumentError: At least one finite value must be provided to forma…

---

## [Check if value is missing in DataFrame indexed by values (not by numerical indices)](https://discourse.julialang.org/t/check-if-value-is-missing-in-dataframe-indexed-by-values-not-by-numerical-indices/14828)

<div class="topic-metadata">

**Author:** [@kmundnic](https://discourse.julialang.org/u/kmundnic)\
**Replies:** 1\
**Last updated:** [September 11, 2018, 8:12pm UTC](https://discourse.julialang.org/t/check-if-value-is-missing-in-dataframe-indexed-by-values-not-by-numerical-indices/14828 "2018-09-11T20:12:41Z")

</div>

I have the following DataFrame: julia\> directories 247×133 DataFrame. Omitted printing of 127 columns │ Row │ receiverId │ 2018-03-05 │ 2018-03-06 │ 2018-03-07 │ ├─────┼───────────…

---

## [Memory allocation in type construction](https://discourse.julialang.org/t/memory-allocation-in-type-construction/14821)

<div class="topic-metadata">

**Author:** [@retrosnub](https://discourse.julialang.org/u/retrosnub)\
**Replies:** 2\
**Last updated:** [September 11, 2018, 7:58pm UTC](https://discourse.julialang.org/t/memory-allocation-in-type-construction/14821 "2018-09-11T19:58:39Z")

</div>

I’m trying to get rid of memory allocations and reduced my problem to the following: using BenchmarkTools struct A{T} a::T end a = rand(3, 3) @btime A($a) Does anybody know why this allocates 16 bytes and maybe how to …

---

## [TensorFlow.jl install in Mac error](https://discourse.julialang.org/t/tensorflow-jl-install-in-mac-error/14825)

<div class="topic-metadata">

**Author:** [@Songan\_Zhang](https://discourse.julialang.org/u/Songan_Zhang)\
**Replies:** 0\
**Last updated:** [September 11, 2018, 6:40pm UTC](https://discourse.julialang.org/t/tensorflow-jl-install-in-mac-error/14825 "2018-09-11T18:40:15Z")

</div>

Hi, I am trying to learn Julia and I want to use it to train a DDQN. Thus I would like to install the TensorFlow.jl. I am using a MAC system, and the editor is Atom. When I install it, it shows some error, said “Failed …

---

## [Trying to use Dataframes, just getting started](https://discourse.julialang.org/t/trying-to-use-dataframes-just-getting-started/14816)

<div class="topic-metadata">

**Author:** [@dixonpete](https://discourse.julialang.org/u/dixonpete)\
**Replies:** 2\
**Last updated:** [September 11, 2018, 3:17pm UTC](https://discourse.julialang.org/t/trying-to-use-dataframes-just-getting-started/14816 "2018-09-11T15:17:12Z")

</div>

Can you tell me what’s up with my Julia 1.0.0 installation? I installed Julia into /usr/share/bin of my fresh KDE Neon install. I updated and reloaded my .bashrc file so I can load Julia from the terminal. At the Julia…

---

## [Main intention of bang! (performance "vs" memory "vs" mutation)](https://discourse.julialang.org/t/main-intention-of-bang-performance-vs-memory-vs-mutation/14813)

<div class="topic-metadata">

**Author:** [@laborg](https://discourse.julialang.org/u/laborg)\
**Replies:** 1\
**Last updated:** [September 11, 2018, 2:02pm UTC](https://discourse.julialang.org/t/main-intention-of-bang-performance-vs-memory-vs-mutation/14813 "2018-09-11T14:02:06Z")

</div>

Im wondering what Julians mainly intend or promise when they offer a bang! version of a function: Less memory usage? Better runtime performance? In-place mutation? (my guess) It feels like that most of the time all…

---

## [Calling FFTW on other processes resulting ProcessExitException()](https://discourse.julialang.org/t/calling-fftw-on-other-processes-resulting-processexitexception/14798)

<div class="topic-metadata">

**Author:** [@shipengcheng1230](https://discourse.julialang.org/u/shipengcheng1230)\
**Replies:** 1\
**Last updated:** [September 11, 2018, 11:06am UTC](https://discourse.julialang.org/t/calling-fftw-on-other-processes-resulting-processexitexception/14798 "2018-09-11T11:06:58Z")

</div>

Hello, I am trying to call planned FFT on other processes, however, unsuccessfully: using Distributed addprocs(4) @everywhere using FFTW @everywhere FFTW.set\_num\_threads(1) x = rand(1024) plan = plan\_rfft(x, flags=FFT…

---

## [Data structure for discretely sampled continuous time trajectories](https://discourse.julialang.org/t/data-structure-for-discretely-sampled-continuous-time-trajectories/14785)

<div class="topic-metadata">

**Author:** [@mschauer](https://discourse.julialang.org/u/mschauer)\
**Replies:** 4\
**Last updated:** [September 11, 2018, 10:37am UTC](https://discourse.julialang.org/t/data-structure-for-discretely-sampled-continuous-time-trajectories/14785 "2018-09-11T10:37:54Z")

</div>

Maybe you can help me to order some thoughts: I am not sure if Discourse is the right tool/format, but I am happy for any feedback. In Bridge (GitHub - mschauer/Bridge.jl: A statistical toolbox for diffusion processes an…

---

## [Unable to compile simple C++ program with embedded Julia 1.0](https://discourse.julialang.org/t/unable-to-compile-simple-c-program-with-embedded-julia-1-0/14632)

<div class="topic-metadata">

**Author:** [@danielmatz](https://discourse.julialang.org/u/danielmatz)\
**Replies:** 28\
**Last updated:** [September 11, 2018, 1:43am UTC](https://discourse.julialang.org/t/unable-to-compile-simple-c-program-with-embedded-julia-1-0/14632 "2018-09-11T01:43:34Z")

</div>

I’m trying to build a simple embedding example in C++. I’m working on a CentOS 7 machine with GCC 4.8.5. I am using the generic Linux binaries from the downloads page for Julia 1.0. I get a bunch of errors like the fo…

---

## [How to draw Gantt chart using Plots](https://discourse.julialang.org/t/how-to-draw-gantt-chart-using-plots/14729)

<div class="topic-metadata">

**Author:** [@alkorang](https://discourse.julialang.org/u/alkorang)\
**Replies:** 8\
**Last updated:** [September 10, 2018, 8:08pm UTC](https://discourse.julialang.org/t/how-to-draw-gantt-chart-using-plots/14729 "2018-09-10T20:08:18Z")

</div>

Hello, I want to draw Gantt chart (someone told it broken bar chart) to represent a task timeline like below. But I cannot find any information how to draw this chart using Plots. Is there any way to draw this kind…

---

## [Allocation by StaticArrays in anonymous function/macro](https://discourse.julialang.org/t/allocation-by-staticarrays-in-anonymous-function-macro/14774)

<div class="topic-metadata">

**Author:** [@natschil](https://discourse.julialang.org/u/natschil)\
**Replies:** 2\
**Last updated:** [September 10, 2018, 4:50pm UTC](https://discourse.julialang.org/t/allocation-by-staticarrays-in-anonymous-function-macro/14774 "2018-09-10T16:50:54Z")

</div>

The following code produces 1 allocation of 32 bytes if the function is created by a macro (same effect if it were an anonymous function). It has 0 allocations if the function is not created by a macro. Note that the al…

---

## [How to create non-abstract subtypes of built-in abstract types? What is the Julia's substitute for Interfaces?](https://discourse.julialang.org/t/how-to-create-non-abstract-subtypes-of-built-in-abstract-types-what-is-the-julias-substitute-for-interfaces/14741)

<div class="topic-metadata">

**Author:** [@AdamR](https://discourse.julialang.org/u/AdamR)\
**Replies:** 3\
**Last updated:** [September 10, 2018, 9:05am UTC](https://discourse.julialang.org/t/how-to-create-non-abstract-subtypes-of-built-in-abstract-types-what-is-the-julias-substitute-for-interfaces/14741 "2018-09-10T09:05:22Z")

</div>

Julia is a duck-typed language and lacks language-enforced interfaces. Since it also contains a number of Abstract classes that user can specialize, I wonder, how do you make sure, that you have provided sufficient numbe…

---

## [DataFrame/JLD2 @load crashes Julia 0.7](https://discourse.julialang.org/t/dataframe-jld2-load-crashes-julia-0-7/13543)

<div class="topic-metadata">

**Author:** [@tk3369](https://discourse.julialang.org/u/tk3369)\
**Replies:** 4\
**Last updated:** [September 10, 2018, 5:24am UTC](https://discourse.julialang.org/t/dataframe-jld2-load-crashes-julia-0-7/13543 "2018-09-10T05:24:57Z")

</div>

Where should I file this bug? julia\> using DataFrames, JLD2 julia\> df = DataFrame(a=1:10, b=rand(10)) 10×2 DataFrame │ Row │ a │ b │ ├─────┼────┼──────────┤ │ 1 │ 1 │ 0.332317 │ │ 2 │ 2 │ 0.114318 │ │ 3 …

---

## [Measuring network I/O of Master/Worker communication](https://discourse.julialang.org/t/measuring-network-i-o-of-master-worker-communication/6245)

<div class="topic-metadata">

**Author:** [@lage](https://discourse.julialang.org/u/lage)\
**Replies:** 3\
**Last updated:** [September 9, 2018, 11:17pm UTC](https://discourse.julialang.org/t/measuring-network-i-o-of-master-worker-communication/6245 "2018-09-09T23:17:44Z")

</div>

hello, Is there any way to measure the network traffic from/to workers? I mean something like Docker NET I/O stats: docker stats | Docker Documentation We need to measure how much data was exchanged between a worker an…

---

## [Simplifying this dataframe aggregation operation](https://discourse.julialang.org/t/simplifying-this-dataframe-aggregation-operation/14648)

<div class="topic-metadata">

**Author:** [@lewis](https://discourse.julialang.org/u/lewis)\
**Replies:** 19\
**Last updated:** [September 9, 2018, 9:20pm UTC](https://discourse.julialang.org/t/simplifying-this-dataframe-aggregation-operation/14648 "2018-09-09T21:20:29Z")

</div>

Sometimes I struggle to think of a compact way of doing things. Well, most times. I have a dataframe of election results for a given election year: year state office district party votecount …

---

## [Iterators.product is not type stable?](https://discourse.julialang.org/t/iterators-product-is-not-type-stable/14481)

<div class="topic-metadata">

**Author:** [@Jean\_Michel](https://discourse.julialang.org/u/Jean_Michel)\
**Replies:** 20\
**Last updated:** [September 9, 2018, 5:28pm UTC](https://discourse.julialang.org/t/iterators-product-is-not-type-stable/14481 "2018-09-09T17:28:59Z")

</div>

I have a problem using product. I need a Cartesian product iterator but when I try using product it seems not type-stable as the following shows (Julia 1.0) julia\> m=\[1:2,3:5\] 2-element Array{UnitRange{Int64},1}: 1:2 …

---

## [Which Linux works best with Julia in Docker?](https://discourse.julialang.org/t/which-linux-works-best-with-julia-in-docker/13415)

<div class="topic-metadata">

**Author:** [@tk3369](https://discourse.julialang.org/u/tk3369)\
**Replies:** 4\
**Last updated:** [September 9, 2018, 3:11pm UTC](https://discourse.julialang.org/t/which-linux-works-best-with-julia-in-docker/13415 "2018-09-09T15:11:43Z")

</div>

Just wondering if anyone uses docker with Julia and know which variant of Linux performs best and is easiet to work with.

---

## [Running Julia in a Docker container on Azure](https://discourse.julialang.org/t/running-julia-in-a-docker-container-on-azure/8240)

<div class="topic-metadata">

**Author:** [@anon67531922](https://discourse.julialang.org/u/anon67531922)\
**Replies:** 4\
**Last updated:** [September 9, 2018, 2:58pm UTC](https://discourse.julialang.org/t/running-julia-in-a-docker-container-on-azure/8240 "2018-09-09T14:58:38Z")

</div>

Hi, I have been working with Julia for a while now under Windows on a local machine. Now, I want to deploy some code to Azure and my team has decided to try the official Julia docker repository. First, the official Doc…

---

## [Inconsistent behavior of map](https://discourse.julialang.org/t/inconsistent-behavior-of-map/14733)

<div class="topic-metadata">

**Author:** [@gpapo](https://discourse.julialang.org/u/gpapo)\
**Replies:** 1\
**Last updated:** [September 9, 2018, 2:56pm UTC](https://discourse.julialang.org/t/inconsistent-behavior-of-map/14733 "2018-09-09T14:56:11Z")

</div>

Why julia\> map(string, 1) "1" returns obviously a scalar but julia\> map(string, 'a') 1-element Array{String,1}: "a" returns an 1-dimensional array?

---

## [Installing Plots.jl](https://discourse.julialang.org/t/installing-plots-jl/6345)

<div class="topic-metadata">

**Author:** [@Philippe\_Maincon](https://discourse.julialang.org/u/Philippe_Maincon)\
**Replies:** 3\
**Last updated:** [September 9, 2018, 2:53pm UTC](https://discourse.julialang.org/t/installing-plots-jl/6345 "2018-09-09T14:53:33Z")

</div>

Hi, I havejust installed JuliaPro 0.6 (Windows 7), and I wish to use the Plots package. So I type Pkg.add("Plots") INFO: Cloning cache of PlotThemes from https://github.com/JuliaPlots/PlotThemes.jl.git INFO: Cloning …

---

## [ERROR: option '--worker' is missing an argument](https://discourse.julialang.org/t/error-option-worker-is-missing-an-argument/1355)

<div class="topic-metadata">

**Author:** [@noel\_ryan](https://discourse.julialang.org/u/noel_ryan)\
**Replies:** 2\
**Last updated:** [September 9, 2018, 2:47pm UTC](https://discourse.julialang.org/t/error-option-worker-is-missing-an-argument/1355 "2018-09-09T14:47:40Z")

</div>

Hi folks, I am trying to connect a windows julia session to a linux session using the following: addprocs(\[“user@host”\], dir=“full path directory structure”, exename=“path to julia executable”) I am getting the error …

---

## [Precompiling in 0.7](https://discourse.julialang.org/t/precompiling-in-0-7/14714)

<div class="topic-metadata">

**Author:** [@gideonsimpson](https://discourse.julialang.org/u/gideonsimpson)\
**Replies:** 1\
**Last updated:** [September 9, 2018, 5:45am UTC](https://discourse.julialang.org/t/precompiling-in-0-7/14714 "2018-09-09T05:45:31Z")

</div>

I have some custom modules that I use that worked fine in 0.6.x. At the top of them, I have the command \_\_precompile\_\_(). I’m now seeing the warnings: ┌ Warning: The call to compilecache failed to create a usable prec…

---

## [Pkg 1.0.0 Bug?](https://discourse.julialang.org/t/pkg-1-0-0-bug/14719)

<div class="topic-metadata">

**Author:** [@iwelch](https://discourse.julialang.org/u/iwelch)\
**Replies:** 0\
**Last updated:** [September 8, 2018, 11:39pm UTC](https://discourse.julialang.org/t/pkg-1-0-0-bug/14719 "2018-09-08T23:39:55Z")

</div>

The pkg update hung on my julia 1.0: julia\> Pkg.update() Updating registry at \`~/.julia/registries/General\` Updating git-repo \`https://github.com/JuliaRegistries/General.git\` ... Building HDF5 ─→ \`~/.julia/packa…

---

## [Reshaping a matrix for Reverse Kronecker product or Schmidt decomposition](https://discourse.julialang.org/t/reshaping-a-matrix-for-reverse-kronecker-product-or-schmidt-decomposition/14702)

<div class="topic-metadata">

**Author:** [@CNOT](https://discourse.julialang.org/u/CNOT)\
**Replies:** 3\
**Last updated:** [September 8, 2018, 9:17pm UTC](https://discourse.julialang.org/t/reshaping-a-matrix-for-reverse-kronecker-product-or-schmidt-decomposition/14702 "2018-09-08T21:17:12Z")

</div>

Before I begin, I hope MathJax works on Discourse. I am trying to do a generalization of Schmidt decomposition on a matrix, which means writing down a matrix H of size m\\times n, where m = m\_1 \\times m\_2 and n = n\_1\\tim…

---

## [Macro problem: Variable not defined](https://discourse.julialang.org/t/macro-problem-variable-not-defined/14697)

<div class="topic-metadata">

**Author:** [@bennedich](https://discourse.julialang.org/u/bennedich)\
**Replies:** 2\
**Last updated:** [September 8, 2018, 5:34pm UTC](https://discourse.julialang.org/t/macro-problem-variable-not-defined/14697 "2018-09-08T17:34:57Z")

</div>

This works: using BenchmarkTools fun = () -\> sqrt(3) @benchmark fun() This however: benchit(f) = @benchmark f() benchit(fun) Results in: ERROR: UndefVarError: f not defined Other macros work, e.g.: timeit(f) = @ti…

---

## [Pros & Cons of using modules vs plain include?](https://discourse.julialang.org/t/pros-cons-of-using-modules-vs-plain-include/14694)

<div class="topic-metadata">

**Author:** [@LeoK987](https://discourse.julialang.org/u/LeoK987)\
**Replies:** 14\
**Last updated:** [September 8, 2018, 12:46pm UTC](https://discourse.julialang.org/t/pros-cons-of-using-modules-vs-plain-include/14694 "2018-09-08T12:46:00Z")

</div>

I would like to understand the two ways of structuring and running scripts: put the scripts in modules, and use ‘using MyModule’ to run them; not put the scripts in any module, and use ‘include(“myfile.jl”)’ to run the…

---

## [Update Package to v0.7 and Building](https://discourse.julialang.org/t/update-package-to-v0-7-and-building/14699)

<div class="topic-metadata">

**Author:** [@MLackner](https://discourse.julialang.org/u/MLackner)\
**Replies:** 1\
**Last updated:** [September 8, 2018, 11:18am UTC](https://discourse.julialang.org/t/update-package-to-v0-7-and-building/14699 "2018-09-08T11:18:16Z")

</div>

Hi! I want to get the package LibRaw (https://github.com/CryptaLabs/LibRaw.jl) running again but have problems with the workflow. What I did is forking the GitHub repository and running (v0.7) pkg\> dev https://github.c…

---

## [JuMP getvalue() and getobjectivevalue()](https://discourse.julialang.org/t/jump-getvalue-and-getobjectivevalue/14701)

<div class="topic-metadata">

**Author:** [@Bernard\_GODARD](https://discourse.julialang.org/u/Bernard_GODARD)\
**Replies:** 0\
**Last updated:** [September 8, 2018, 10:54am UTC](https://discourse.julialang.org/t/jump-getvalue-and-getobjectivevalue/14701 "2018-09-08T10:54:06Z")

</div>

I am using JuMP master and Ipopt master on julia 0.7. Now that I finally managed to run the optimizer after a recent Ipopt update, how can I get the variables and objective value with the new JuMP interface? Thank you. …

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

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