# General Usage

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

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

**Page:** 977

---

## [Help with BinDeps](https://discourse.julialang.org/t/help-with-bindeps/11094)

<div class="topic-metadata">

**Author:** [@tobias.knopp](https://discourse.julialang.org/u/tobias.knopp)\
**Replies:** 0\
**Last updated:** [May 23, 2018, 11:48am UTC](https://discourse.julialang.org/t/help-with-bindeps/11094 "2018-05-23T11:48:38Z")

</div>

Hi, I am facing issues with BinDeps and Gtk.jl. The issue is that under the latest ubuntu it asks for sudo although the required library libgtk-3-0 is already installed. Here is the build file: https://github.com/Julia…

---

## [Problem installing packages](https://discourse.julialang.org/t/problem-installing-packages/11090)

<div class="topic-metadata">

**Author:** [@tfk17lstm](https://discourse.julialang.org/u/tfk17lstm)\
**Replies:** 1\
**Last updated:** [May 23, 2018, 11:40am UTC](https://discourse.julialang.org/t/problem-installing-packages/11090 "2018-05-23T11:40:02Z")

</div>

Dear colleagues, I am trying to install different solvers for JuMP but I am getting this errors: Pkg.add("Ipopt") INFO: Cloning cache of Ipopt from https://github.com/JuliaOpt/Ipopt.jl.git INFO: Installing Ipopt v0.3.0…

---

## [How to upgrade Julia version via JuliaPro](https://discourse.julialang.org/t/how-to-upgrade-julia-version-via-juliapro/4555)

<div class="topic-metadata">

**Author:** [@Yifan\_Liu](https://discourse.julialang.org/u/Yifan_Liu)\
**Replies:** 1\
**Last updated:** [May 23, 2018, 10:07am UTC](https://discourse.julialang.org/t/how-to-upgrade-julia-version-via-juliapro/4555 "2018-05-23T10:07:18Z")

</div>

I am currently using Julia Version 0.5.2 under the JuliaPro IDE. I want to know how I can upgrade Julia without having to reinstall the JuliaPro whole thing.

---

## [Extending Base methods with same name, completely different meaning?](https://discourse.julialang.org/t/extending-base-methods-with-same-name-completely-different-meaning/11082)

<div class="topic-metadata">

**Author:** [@louisponet](https://discourse.julialang.org/u/louisponet)\
**Replies:** 3\
**Last updated:** [May 23, 2018, 8:46am UTC](https://discourse.julialang.org/t/extending-base-methods-with-same-name-completely-different-meaning/11082 "2018-05-23T08:46:37Z")

</div>

There has been a lot of discussion recently, usually very deep and thorough/language designy, about the extension behaviour of methods. Now most of these discussions that I very loosely followed seem to address how the l…

---

## [Is rebuilding the system image necessary?](https://discourse.julialang.org/t/is-rebuilding-the-system-image-necessary/11078)

<div class="topic-metadata">

**Author:** [@drinkwell](https://discourse.julialang.org/u/drinkwell)\
**Replies:** 1\
**Last updated:** [May 23, 2018, 7:54am UTC](https://discourse.julialang.org/t/is-rebuilding-the-system-image-necessary/11078 "2018-05-23T07:54:59Z")

</div>

I remember reading this blog post by @ChrisRackauckas a while ago. ‘Gotcha #7’ mentions rebuilding the system image so that you get hardware specific optimisations. Is this still necessary? I’m using JuliaPro in case …

---

## [Best practices for including data in a module as a constant array](https://discourse.julialang.org/t/best-practices-for-including-data-in-a-module-as-a-constant-array/11077)

<div class="topic-metadata">

**Author:** [@ajkeith](https://discourse.julialang.org/u/ajkeith)\
**Replies:** 7\
**Last updated:** [May 23, 2018, 1:23am UTC](https://discourse.julialang.org/t/best-practices-for-including-data-in-a-module-as-a-constant-array/11077 "2018-05-23T01:23:02Z")

</div>

I’m having trouble finding the best way to include data in a module. Basically I have a small array (5 x 5) of constant data, but to interface with other packages, I want to define a function that just returns the elemen…

---

## [Reducing without allocating in stdlib and \`Base\`](https://discourse.julialang.org/t/reducing-without-allocating-in-stdlib-and-base/11072)

<div class="topic-metadata">

**Author:** [@ExpandingMan](https://discourse.julialang.org/u/ExpandingMan)\
**Replies:** 9\
**Last updated:** [May 23, 2018, 1:04am UTC](https://discourse.julialang.org/t/reducing-without-allocating-in-stdlib-and-base/11072 "2018-05-23T01:04:00Z")

</div>

Here’s a little challenge for you: given a collection A find a\_{max} \\in A s.t. f(a\_{max}) \\ge f(a) ~ \\forall a \\in A (in other words, find the supremum of the set f(A)). Here’s the naive implementation: function maxf(…

---

## [Something weird on Julia master](https://discourse.julialang.org/t/something-weird-on-julia-master/11076)

<div class="topic-metadata">

**Author:** [@giordano](https://discourse.julialang.org/u/giordano)\
**Replies:** 2\
**Last updated:** [May 22, 2018, 5:42pm UTC](https://discourse.julialang.org/t/something-weird-on-julia-master/11076 "2018-05-22T17:42:57Z")

</div>

Sorry for the little descriptive title, I really don’t know how to summarize this stuff which is driving me crazy. While testing Measurements.jl on Julia master I ran into an issue. This is a minimal code reproducing t…

---

## [Filtering rows of a 2-d array](https://discourse.julialang.org/t/filtering-rows-of-a-2-d-array/10986)

<div class="topic-metadata">

**Author:** [@Ferran\_Mazzanti](https://discourse.julialang.org/u/Ferran_Mazzanti)\
**Replies:** 4\
**Last updated:** [May 22, 2018, 11:05am UTC](https://discourse.julialang.org/t/filtering-rows-of-a-2-d-array/10986 "2018-05-22T11:05:09Z")

</div>

Hi folks, I guess you can help me regarding this (quite novice) question. The fact is that I have a 2d array of several thousand rows and 5 columns, and I need to filter all the rows of the original array when the corre…

---

## [DataFrame element-wise equality filter](https://discourse.julialang.org/t/dataframe-element-wise-equality-filter/11070)

<div class="topic-metadata">

**Author:** [@essenciary](https://discourse.julialang.org/u/essenciary)\
**Replies:** 2\
**Last updated:** [May 22, 2018, 10:25am UTC](https://discourse.julialang.org/t/dataframe-element-wise-equality-filter/11070 "2018-05-22T10:25:31Z")

</div>

I’m probably missing something super obvious, but I can’t figure out why the filtering of the DataFrame doesn’t work as expected in this example (I’m expecting the filtering to return the row as the code value is the sam…

---

## [How to optimize these nesting loops?](https://discourse.julialang.org/t/how-to-optimize-these-nesting-loops/11066)

<div class="topic-metadata">

**Author:** [@111](https://discourse.julialang.org/u/111)\
**Replies:** 12\
**Last updated:** [May 22, 2018, 8:24am UTC](https://discourse.julialang.org/t/how-to-optimize-these-nesting-loops/11066 "2018-05-22T08:24:54Z")

</div>

The code is: nE = 2 eMax = 3.0 epsilon = linspace(0, eMax, nE) function transition\_momentum() u0 = load("data/gs.jld")\["u"\] D = zeros(Complex128, nE, nE) x, p = xpgrid(nx, dx, dp) for jE in 1:nE …

---

## [Weird Eval Problem / Help needed](https://discourse.julialang.org/t/weird-eval-problem-help-needed/11062)

<div class="topic-metadata">

**Author:** [@Qiyamah](https://discourse.julialang.org/u/Qiyamah)\
**Replies:** 2\
**Last updated:** [May 22, 2018, 5:59am UTC](https://discourse.julialang.org/t/weird-eval-problem-help-needed/11062 "2018-05-22T05:59:36Z")

</div>

julia\> mydict = Dict{Symbol,Any}() Dict{Symbol,Any} with 0 entries julia\> mydict\[:m\] = 100 100 julia\> eval(:($(Expr(:escape, :(mydict\[:m\]))))) ERROR: syntax: invalid syntax (escape (call (outerref getindex) (outerref …

---

## [Parallel computation with variable memory consumption](https://discourse.julialang.org/t/parallel-computation-with-variable-memory-consumption/11065)

<div class="topic-metadata">

**Author:** [@tk3369](https://discourse.julialang.org/u/tk3369)\
**Replies:** 0\
**Last updated:** [May 22, 2018, 4:50am UTC](https://discourse.julialang.org/t/parallel-computation-with-variable-memory-consumption/11065 "2018-05-22T04:50:26Z")

</div>

Hi all, I have a batch job that I’d like to run in parallel and leverage all cpu cores. However, each process in the batch may consume different amount of memory - some big some small. Naively, I would code a for-loop…

---

## [Default return value for find functions when no match found](https://discourse.julialang.org/t/default-return-value-for-find-functions-when-no-match-found/11035)

<div class="topic-metadata">

**Author:** [@greg\_plowman](https://discourse.julialang.org/u/greg_plowman)\
**Replies:** 3\
**Last updated:** [May 22, 2018, 2:58am UTC](https://discourse.julialang.org/t/default-return-value-for-find-functions-when-no-match-found/11035 "2018-05-22T02:58:05Z")

</div>

For v0.7 the find functions return nothing when no match is found. Would it be convenient to provide a default parameter to return if no match is found, similar to the get function? For example: findlast(!iszero, A, 0…

---

## [Logging in Julia 0.6.2](https://discourse.julialang.org/t/logging-in-julia-0-6-2/11054)

<div class="topic-metadata">

**Author:** [@rakeshvar](https://discourse.julialang.org/u/rakeshvar)\
**Replies:** 3\
**Last updated:** [May 22, 2018, 12:33am UTC](https://discourse.julialang.org/t/logging-in-julia-0-6-2/11054 "2018-05-22T00:33:18Z")

</div>

This is a real noob question. I want to use Logging in Julia. I really liked the Python package logging. Right now I am passing down showtrace variables into functions :disappointed: I see in the latest documentation th…

---

## [Unexpected behavior of JuliaDB](https://discourse.julialang.org/t/unexpected-behavior-of-juliadb/11061)

<div class="topic-metadata">

**Author:** [@askvorts](https://discourse.julialang.org/u/askvorts)\
**Replies:** 0\
**Last updated:** [May 21, 2018, 11:35pm UTC](https://discourse.julialang.org/t/unexpected-behavior-of-juliadb/11061 "2018-05-21T23:35:39Z")

</div>

Not sure if this is expected behavior using JuliaDB x = table(\[1,2\],\[3,4\], names = \[:a,:b\]) println(x) y = table((\[1,2\],\[3,4\])) println(y) z = table((\[1,2\],\[3,4\]), names = \[:a,:b\]) println(z) gives Table with 2 rows,…

---

## [Aligned Julia Arrays?](https://discourse.julialang.org/t/aligned-julia-arrays/10993)

<div class="topic-metadata">

**Author:** [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)\
**Replies:** 37\
**Last updated:** [May 21, 2018, 9:43pm UTC](https://discourse.julialang.org/t/aligned-julia-arrays/10993 "2018-05-21T21:43:17Z")

</div>

Hi, Is it possible to control the data alignment of Julia Arrays (for example to enable direct use of the vloada function of SIMD.jl package) ?

---

## [Multiplication with Complex numbers and Inf give inconsistent answers - bug?](https://discourse.julialang.org/t/multiplication-with-complex-numbers-and-inf-give-inconsistent-answers-bug/11026)

<div class="topic-metadata">

**Author:** [@jcook](https://discourse.julialang.org/u/jcook)\
**Replies:** 12\
**Last updated:** [May 21, 2018, 9:38pm UTC](https://discourse.julialang.org/t/multiplication-with-complex-numbers-and-inf-give-inconsistent-answers-bug/11026 "2018-05-21T21:38:49Z")

</div>

Dear All, I expected that this julia\> 1\*(im\*Inf) 0.0 + Inf\*im would give the same answer as this julia\> 1\*im\*Inf NaN + Inf\*im but it didn’t! Is this a bug? My version: julia\> versioninfo() Julia Version 0.6.3-pre.…

---

## [(withdrawn but cannot figure out how to delete my own post)](https://discourse.julialang.org/t/withdrawn-but-cannot-figure-out-how-to-delete-my-own-post/11048)

<div class="topic-metadata">

**Author:** [@ronubi](https://discourse.julialang.org/u/ronubi)\
**Replies:** 6\
**Last updated:** [May 21, 2018, 9:05pm UTC](https://discourse.julialang.org/t/withdrawn-but-cannot-figure-out-how-to-delete-my-own-post/11048 "2018-05-21T21:05:17Z")

</div>

nevermind - problem was trailing comma on for statement

---

## [Evaluating an expression in a non-standard way](https://discourse.julialang.org/t/evaluating-an-expression-in-a-non-standard-way/11036)

<div class="topic-metadata">

**Author:** [@Qiyamah](https://discourse.julialang.org/u/Qiyamah)\
**Replies:** 1\
**Last updated:** [May 21, 2018, 7:56pm UTC](https://discourse.julialang.org/t/evaluating-an-expression-in-a-non-standard-way/11036 "2018-05-21T19:56:13Z")

</div>

Hi everyone I have constructed an expression like follows: quote for i = 1:$(Expr(:escape, Context(m))) $(Expr(:escape, Context(Base.println("hi")))) end end I want to evaluate this expression , but as…

---

## [Calling javascript libraries from within Julia](https://discourse.julialang.org/t/calling-javascript-libraries-from-within-julia/11053)

<div class="topic-metadata">

**Author:** [@amckay1](https://discourse.julialang.org/u/amckay1)\
**Replies:** 2\
**Last updated:** [May 21, 2018, 7:04pm UTC](https://discourse.julialang.org/t/calling-javascript-libraries-from-within-julia/11053 "2018-05-21T19:04:31Z")

</div>

So I’ve used PyCall very successfully for calling python packages, but how would people suggest calling and working with javascript from within Julia? JSExpr.jl and WebIO.jl look promising, but if I want to import a libr…

---

## [DimensionMismatch ("Cannot Multiply two vectors")](https://discourse.julialang.org/t/dimensionmismatch-cannot-multiply-two-vectors/10989)

<div class="topic-metadata">

**Author:** [@tfk17lstm](https://discourse.julialang.org/u/tfk17lstm)\
**Replies:** 4\
**Last updated:** [May 21, 2018, 1:18pm UTC](https://discourse.julialang.org/t/dimensionmismatch-cannot-multiply-two-vectors/10989 "2018-05-21T13:18:37Z")

</div>

Dear Julia users, I am getting the following error when I try to multiply some coefficients contained in my matrix Data G by the values in another matrix P. The code is the following one: while bd\>dualitygap q=0; for i …

---

## [Displaying complex version of numeric type](https://discourse.julialang.org/t/displaying-complex-version-of-numeric-type/11016)

<div class="topic-metadata">

**Author:** [@purplishrock](https://discourse.julialang.org/u/purplishrock)\
**Replies:** 13\
**Last updated:** [May 21, 2018, 9:41am UTC](https://discourse.julialang.org/t/displaying-complex-version-of-numeric-type/11016 "2018-05-21T09:41:33Z")

</div>

I’m creating a numeric type (fixed point) and ran into the following problem when trying to print: here’s the definition of the type type Fixed{m, f} \<: Real x :: Int64 end c = complex(a,b) println(c) ERROR: Lo…

---

## [Char == String?](https://discourse.julialang.org/t/char-string/11030)

<div class="topic-metadata">

**Author:** [@iwelch](https://discourse.julialang.org/u/iwelch)\
**Replies:** 8\
**Last updated:** [May 21, 2018, 2:42am UTC](https://discourse.julialang.org/t/char-string/11030 "2018-05-21T02:42:41Z")

</div>

just curious. what is the idea behind julia\> 'y' == "Y" false can a char string comparison ever be true? if not, would it make sense to designate this as an error? such a comparison is more indicative of an attempt …

---

## [Has anyone had experience with Kaggle?](https://discourse.julialang.org/t/has-anyone-had-experience-with-kaggle/11021)

<div class="topic-metadata">

**Author:** [@djsegal](https://discourse.julialang.org/u/djsegal)\
**Replies:** 1\
**Last updated:** [May 20, 2018, 12:06pm UTC](https://discourse.julialang.org/t/has-anyone-had-experience-with-kaggle/11021 "2018-05-20T12:06:43Z")

</div>

I just found out that Kaggle has a way to run julia scripts. https://github.com/Kaggle/docker-julia Has anyone had any luck with it? What did you use it for?

---

## [Plots.jl @layout macro usage](https://discourse.julialang.org/t/plots-jl-layout-macro-usage/11024)

<div class="topic-metadata">

**Author:** [@standarddeviant](https://discourse.julialang.org/u/standarddeviant)\
**Replies:** 1\
**Last updated:** [May 20, 2018, 3:44pm UTC](https://discourse.julialang.org/t/plots-jl-layout-macro-usage/11024 "2018-05-20T15:44:40Z")

</div>

I’m trying to use Plots.jl to create a custom layout with the slick @layout macro. The only docs I see are here: http://docs.juliaplots.org/latest/layouts/#advanced-layouts What I’d like to do is have a plot that has …

---

## [\`make\` error while building the latest (as of today) version of Julia](https://discourse.julialang.org/t/make-error-while-building-the-latest-as-of-today-version-of-julia/11006)

<div class="topic-metadata">

**Author:** [@Robert\_Honig](https://discourse.julialang.org/u/Robert_Honig)\
**Replies:** 2\
**Last updated:** [May 20, 2018, 9:55am UTC](https://discourse.julialang.org/t/make-error-while-building-the-latest-as-of-today-version-of-julia/11006 "2018-05-20T09:55:15Z")

</div>

I want to build Julia on my own. I cloned the latest Julia repo from git and installed the required dependencies. On running make, I get the following error: robert@robhoenig:~/git/julia$ make make: /home/robert/git/jul…

---

## [How to speed up array comparisons?](https://discourse.julialang.org/t/how-to-speed-up-array-comparisons/11019)

<div class="topic-metadata">

**Author:** [@Noel\_Araujo](https://discourse.julialang.org/u/Noel_Araujo)\
**Replies:** 12\
**Last updated:** [May 20, 2018, 7:11am UTC](https://discourse.julialang.org/t/how-to-speed-up-array-comparisons/11019 "2018-05-20T07:11:06Z")

</div>

I need to fix a bottleneck in my code during comparison of an array and a variable. I’ve tested the map() function and it speed up my code only when I declare the number directly. If I store my number inside a variable …

---

## [Set errorbar color in Plots](https://discourse.julialang.org/t/set-errorbar-color-in-plots/11020)

<div class="topic-metadata">

**Author:** [@babaq](https://discourse.julialang.org/u/babaq)\
**Replies:** 2\
**Last updated:** [May 20, 2018, 12:24am UTC](https://discourse.julialang.org/t/set-errorbar-color-in-plots/11020 "2018-05-20T00:24:49Z")

</div>

Hi, I am plotting multiple series with errorbar, the color can be set, but the errorbar caps are all black, I want it to be the same as the line color, or how to set the explicit errorbar(including caps) colors?

---

## [Cannot use a Dates.Hour and Dates.Month as keys in the same Dict](https://discourse.julialang.org/t/cannot-use-a-dates-hour-and-dates-month-as-keys-in-the-same-dict/10845)

<div class="topic-metadata">

**Author:** [@bluesmoon](https://discourse.julialang.org/u/bluesmoon)\
**Replies:** 9\
**Last updated:** [May 19, 2018, 7:36pm UTC](https://discourse.julialang.org/t/cannot-use-a-dates-hour-and-dates-month-as-keys-in-the-same-dict/10845 "2018-05-19T19:36:40Z")

</div>

It appears that I cannot have a Dict with Dates.Hour(1) and Dates.Month(1) as keys. I can have absolutely any other type/value as a key in this Dict, but I cannot put these two keys together in the same Dict. It does no…

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

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