# General Usage

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

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

**Page:** 825

---

## [Problems with IJulia](https://discourse.julialang.org/t/problems-with-ijulia/29617)

<div class="topic-metadata">

**Author:** [@alewolf](https://discourse.julialang.org/u/alewolf)\
**Replies:** 16\
**Last updated:** [October 10, 2019, 9:10pm UTC](https://discourse.julialang.org/t/problems-with-ijulia/29617 "2019-10-10T21:10:33Z")

</div>

Hi I am using Julia 1.2. I have a pre-installed version of anaconda - So before building IJulia I do the following ENV\["PYTHON"\]="C:\\\\ProgramData\\\\Anaconda3\\\\python" ENV\["JUPYTER"\]="C:\\\\ProgramData\\\\Anaconda3\\\\Scripts…

---

## [Warning about Mamba and JuMP](https://discourse.julialang.org/t/warning-about-mamba-and-jump/29743)

<div class="topic-metadata">

**Author:** [@marouane](https://discourse.julialang.org/u/marouane)\
**Replies:** 3\
**Last updated:** [October 10, 2019, 8:16pm UTC](https://discourse.julialang.org/t/warning-about-mamba-and-jump/29743 "2019-10-10T20:16:58Z")

</div>

i have a code where i’m using Mambaand JuMPand when i run the code, i get a warning like this: WARNING: both Mamba and JuMP export "Model"; uses of it in module QuantumRelay must be qualified Therefore i get an Error: …

---

## [ForwardDiff on keyword argument?](https://discourse.julialang.org/t/forwarddiff-on-keyword-argument/29733)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 3\
**Last updated:** [October 10, 2019, 7:29pm UTC](https://discourse.julialang.org/t/forwarddiff-on-keyword-argument/29733 "2019-10-10T19:29:50Z")

</div>

I have a function with parameters as a keyword argument, say: f(x;p = \[1,2,1\]) = p\[1\]\*x^2 + p\[2\]\*x + p\[3\] How do I compute the gradient g(x,p) = \\frac{\\partial f(x;p)}{\\partial p}?

---

## [Inferring return type of a method](https://discourse.julialang.org/t/inferring-return-type-of-a-method/29698)

<div class="topic-metadata">

**Author:** [@sw72](https://discourse.julialang.org/u/sw72)\
**Replies:** 3\
**Last updated:** [October 10, 2019, 6:47pm UTC](https://discourse.julialang.org/t/inferring-return-type-of-a-method/29698 "2019-10-10T18:47:25Z")

</div>

There is probably a simpler example but this is the essence of my problem: abstract type Abstract end struct Concrete1 \<: Abstract end struct Concrete2 \<: Abstract end struct Thing a::Abstract end (::Concrete1)(x)= 1+x…

---

## [@enum is slow?](https://discourse.julialang.org/t/enum-is-slow/29018)

<div class="topic-metadata">

**Author:** [@tuckermcclure](https://discourse.julialang.org/u/tuckermcclure)\
**Replies:** 4\
**Last updated:** [October 10, 2019, 6:26pm UTC](https://discourse.julialang.org/t/enum-is-slow/29018 "2019-10-10T18:26:15Z")

</div>

We have a project with 67 different enum types, each with say a dozen enumerated values. Each type and value is exported. Simply including this file takes about 15s, which is a surprisingly long time. When I comment out …

---

## [\`ELOOP\` when \`walkdir\`](https://discourse.julialang.org/t/eloop-when-walkdir/29679)

<div class="topic-metadata">

**Author:** [@innerlee](https://discourse.julialang.org/u/innerlee)\
**Replies:** 1\
**Last updated:** [October 10, 2019, 12:34pm UTC](https://discourse.julialang.org/t/eloop-when-walkdir/29679 "2019-10-10T12:34:47Z")

</div>

I modified the source code of walkdir a little bit to skip some irrelevant dirs. However, the code produces ELOOP error about when 2000 directories are processed. I do not understand the error. Is it because there are to…

---

## [Copy of immutable with multiple fields changed](https://discourse.julialang.org/t/copy-of-immutable-with-multiple-fields-changed/29719)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 3\
**Last updated:** [October 10, 2019, 11:58am UTC](https://discourse.julialang.org/t/copy-of-immutable-with-multiple-fields-changed/29719 "2019-10-10T11:58:57Z")

</div>

Is there a package which makes it convenient to get a copy of an (immutable) struct with new values for some fields? I am aware of Setfield, but my understanding (see below) is that it requires nesting to do this. using…

---

## [AssertionError](https://discourse.julialang.org/t/assertionerror/29690)

<div class="topic-metadata">

**Author:** [@marouane](https://discourse.julialang.org/u/marouane)\
**Replies:** 10\
**Last updated:** [October 10, 2019, 9:43am UTC](https://discourse.julialang.org/t/assertionerror/29690 "2019-10-10T09:43:45Z")

</div>

i have this piece of code: MAT=\[1 0;0 2\] n=count(!iszero,MAT) n0=MAT\[1:n\] @assert n0 == ones(n) i ran into an unexpected assertion error for this part, apparently @assertdidn’t evaluate the assert code line for some re…

---

## [Performance comparison with C++](https://discourse.julialang.org/t/performance-comparison-with-c/29682)

<div class="topic-metadata">

**Author:** [@gcalderone](https://discourse.julialang.org/u/gcalderone)\
**Replies:** 8\
**Last updated:** [October 10, 2019, 8:39am UTC](https://discourse.julialang.org/t/performance-comparison-with-c/29682 "2019-10-10T08:39:40Z")

</div>

I found a very simple task where the Julia performances are unexpectedly and significantly worse than C++. The core function to be benchmarked is as follows: function subr!(d1, nx, ny, d2) for iy in 1:ny fo…

---

## [Abstract constructor](https://discourse.julialang.org/t/abstract-constructor/29700)

<div class="topic-metadata">

**Author:** [@jlapeyre](https://discourse.julialang.org/u/jlapeyre)\
**Replies:** 1\
**Last updated:** [October 10, 2019, 5:55am UTC](https://discourse.julialang.org/t/abstract-constructor/29700 "2019-10-10T05:55:55Z")

</div>

I have a set of types that are related, e.g. by composition, but also logically (eg one can be converted to another). I have a parallel set of types that satisfy the same relations. I’d like to put as much as possible …

---

## [Consistent 2x Slowdown with v1.2](https://discourse.julialang.org/t/consistent-2x-slowdown-with-v1-2/29535)

<div class="topic-metadata">

**Author:** [@swishmas](https://discourse.julialang.org/u/swishmas)\
**Replies:** 6\
**Last updated:** [October 10, 2019, 5:55am UTC](https://discourse.julialang.org/t/consistent-2x-slowdown-with-v1-2/29535 "2019-10-10T05:55:54Z")

</div>

Hi there, I have been working on some code (~4,000 lines) for a while, and I was excited about the upcoming changes to the parallelization in v1.3. I felt I had very efficient code on v1.1(.1), but when I run the code …

---

## [Why is @enum 0-based?](https://discourse.julialang.org/t/why-is-enum-0-based/12722)

<div class="topic-metadata">

**Author:** [@gdkrmr](https://discourse.julialang.org/u/gdkrmr)\
**Replies:** 6\
**Last updated:** [October 9, 2019, 8:50pm UTC](https://discourse.julialang.org/t/why-is-enum-0-based/12722 "2019-10-09T20:50:40Z")

</div>

Arrays in Julia are 1-based, so why are Enums 0-based? julia\> Base.Enums.@enum ABC begin A B C end julia\> ABC(0) A::ABC = 0

---

## [Mamba Chains declaration for matrix of parameters](https://discourse.julialang.org/t/mamba-chains-declaration-for-matrix-of-parameters/29663)

<div class="topic-metadata">

**Author:** [@Steven\_Xu](https://discourse.julialang.org/u/Steven_Xu)\
**Replies:** 5\
**Last updated:** [October 9, 2019, 7:58pm UTC](https://discourse.julialang.org/t/mamba-chains-declaration-for-matrix-of-parameters/29663 "2019-10-09T19:58:33Z")

</div>

This might be a stupid question but I just want to make sure I am doing it correctly. I have read the document but is still unsure. I am trying to use Mamba’s NUTSVariate to implement a Bayesian neural network. My param…

---

## [Finding Position of Element in an Array](https://discourse.julialang.org/t/finding-position-of-element-in-an-array/12502)

<div class="topic-metadata">

**Author:** [@jazzieman](https://discourse.julialang.org/u/jazzieman)\
**Replies:** 46\
**Last updated:** [October 9, 2019, 1:10pm UTC](https://discourse.julialang.org/t/finding-position-of-element-in-an-array/12502 "2019-10-09T13:10:31Z")

</div>

I’m looking for a function (is there is one) where i can get the position of an element in an array? I have a 3D array of numbers and i want to obtain the position (i,j,k)of a particular number (element) in that array. …

---

## [Java to julia](https://discourse.julialang.org/t/java-to-julia/28051)

<div class="topic-metadata">

**Author:** [@Fuad\_Sami](https://discourse.julialang.org/u/Fuad_Sami)\
**Replies:** 11\
**Last updated:** [August 29, 2019, 8:57am UTC](https://discourse.julialang.org/t/java-to-julia/28051 "2019-08-29T08:57:12Z")

</div>

hi i am new i julia and i have an java code that want to convert it to julia. public static int sumpairs(Integer input , int k){ static int input = new int{1, 5, 2,4,3}; HashMap \<Integer,Integer\> map = new HashMap\<\>(…

---

## [Add image to docs](https://discourse.julialang.org/t/add-image-to-docs/29554)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 10\
**Last updated:** [October 9, 2019, 10:04am UTC](https://discourse.julialang.org/t/add-image-to-docs/29554 "2019-10-09T10:04:46Z")

</div>

I’m having trouble adding an image to my documentation. I tried two methods: !\[summary\_time\](../../Examples/Gaussian/results/summary\_time.png) \`\`\`@raw html \<img src="../../Examples/Gaussian/results/summary\_time.png" w…

---

## [Atom Julia client update error](https://discourse.julialang.org/t/atom-julia-client-update-error/29672)

<div class="topic-metadata">

**Author:** [@bionicinnovations](https://discourse.julialang.org/u/bionicinnovations)\
**Replies:** 1\
**Last updated:** [October 9, 2019, 6:39am UTC](https://discourse.julialang.org/t/atom-julia-client-update-error/29672 "2019-10-09T06:39:37Z")

</div>

I just updated some apps in Atom and now Julia client wont install. This is super annoying because I have a hard deadline to meet, and this is the second time this has happened over the past couple of months. Last time t…

---

## [Plotting with gr backend cannot display in REPL on ubuntu](https://discourse.julialang.org/t/plotting-with-gr-backend-cannot-display-in-repl-on-ubuntu/29671)

<div class="topic-metadata">

**Author:** [@helloBrisbane](https://discourse.julialang.org/u/helloBrisbane)\
**Replies:** 0\
**Last updated:** [October 9, 2019, 5:03am UTC](https://discourse.julialang.org/t/plotting-with-gr-backend-cannot-display-in-repl-on-ubuntu/29671 "2019-10-09T05:03:31Z")

</div>

try to using plotting in REPL on ubuntu, however it cannot display. running same code in jupyter notebook without problems. julia\> versioninfo() Julia Version 1.1.1 Commit 55e36cc308 (2019-05-16 04:10 UTC) Platform …

---

## [Transducers, paralelism and feedback loop](https://discourse.julialang.org/t/transducers-paralelism-and-feedback-loop/28189)

<div class="topic-metadata">

**Author:** [@Janis\_Erdmanis](https://discourse.julialang.org/u/Janis_Erdmanis)\
**Replies:** 13\
**Last updated:** [October 9, 2019, 3:26am UTC](https://discourse.julialang.org/t/transducers-paralelism-and-feedback-loop/28189 "2019-10-09T03:26:30Z")

</div>

After watching the JuliaCon talk on Transducers.jl, I started to wonder about multiple cases where iterators are not optimal. One of the instances that seem suited for transducers are the systems with a feedback loop. L…

---

## [Have you used julia 1.3 behind a web proxy?](https://discourse.julialang.org/t/have-you-used-julia-1-3-behind-a-web-proxy/29668)

<div class="topic-metadata">

**Author:** [@jackf](https://discourse.julialang.org/u/jackf)\
**Replies:** 0\
**Last updated:** [October 9, 2019, 12:53am UTC](https://discourse.julialang.org/t/have-you-used-julia-1-3-behind-a-web-proxy/29668 "2019-10-09T00:53:55Z")

</div>

Hi all. I’ve been having the following issue which is preventing me from download packages on the 1.3 release candidates on several machines behind a work web proxy: https://github.com/JuliaLang/julia/issues/33405 http…

---

## [Ssh2-sftp-client in ftp-remote-edit juno in atom](https://discourse.julialang.org/t/ssh2-sftp-client-in-ftp-remote-edit-juno-in-atom/29653)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 3\
**Last updated:** [October 8, 2019, 8:49pm UTC](https://discourse.julialang.org/t/ssh2-sftp-client-in-ftp-remote-edit-juno-in-atom/29653 "2019-10-08T20:49:08Z")

</div>

Not entirely Julia related, but I’m hoping someone here can shed some light: This has to do with working on a remote server with Juno. Has anyone been able to do that? If so, any idea what I’m doing wrong in this issue? …

---

## [JuliaRegistrator error - can not find \`Logging\`](https://discourse.julialang.org/t/juliaregistrator-error-can-not-find-logging/29664)

<div class="topic-metadata">

**Author:** [@essenciary](https://discourse.julialang.org/u/essenciary)\
**Replies:** 2\
**Last updated:** [October 8, 2019, 7:20pm UTC](https://discourse.julialang.org/t/juliaregistrator-error-can-not-find-logging/29664 "2019-10-08T19:20:56Z")

</div>

Attempting to register a new version of Genie errors out with: Error while trying to register: Error in (Julia)Project.toml: Package 'Logging' with UUID: 56ddb016-857b-54e1-b83d-db4d58db5568 not found in registry or std…

---

## [Update Atom Package in Julia](https://discourse.julialang.org/t/update-atom-package-in-julia/29613)

<div class="topic-metadata">

**Author:** [@Nitin](https://discourse.julialang.org/u/Nitin)\
**Replies:** 12\
**Last updated:** [October 8, 2019, 3:02pm UTC](https://discourse.julialang.org/t/update-atom-package-in-julia/29613 "2019-10-08T15:02:46Z")

</div>

The problem that I have is these warning messages shown below: Warning: Atom.jl: unrecognised message outline. └ @ Atom C:\\Users\\NG.julia\\packages\\Atom\\E4PBh\\src\\comm.jl:171 I have Atom v0.8.5. I already followed thi…

---

## [Unpack arguments from an array into function](https://discourse.julialang.org/t/unpack-arguments-from-an-array-into-function/29656)

<div class="topic-metadata">

**Author:** [@lazarusA](https://discourse.julialang.org/u/lazarusA)\
**Replies:** 2\
**Last updated:** [October 8, 2019, 2:47pm UTC](https://discourse.julialang.org/t/unpack-arguments-from-an-array-into-function/29656 "2019-10-08T14:47:20Z")

</div>

If I have an array of arguments, say args = \[arg1, arg2, agr3\] how do you unpack them into a function f that take as arguments the entries from args, namely f(arg1, agr2, arg3). in python it goes something like f(\*…

---

## [Makie: Draw two meshes in one scene: Struggling with positioning](https://discourse.julialang.org/t/makie-draw-two-meshes-in-one-scene-struggling-with-positioning/29651)

<div class="topic-metadata">

**Author:** [@zsoerenm](https://discourse.julialang.org/u/zsoerenm)\
**Replies:** 1\
**Last updated:** [October 8, 2019, 12:43pm UTC](https://discourse.julialang.org/t/makie-draw-two-meshes-in-one-scene-struggling-with-positioning/29651 "2019-10-08T12:43:37Z")

</div>

I tried to draw two boxes in one scene. Both should be centered, but it appears, that there is something else going on: using Makie scene = mesh(Rect3D(((1,1,0), (-1,-1,0.1))), color = "green") mesh!(scene, Rect3D(((.25…

---

## [Creating a new package](https://discourse.julialang.org/t/creating-a-new-package/29400)

<div class="topic-metadata">

**Author:** [@marouane](https://discourse.julialang.org/u/marouane)\
**Replies:** 7\
**Last updated:** [October 8, 2019, 10:13am UTC](https://discourse.julialang.org/t/creating-a-new-package/29400 "2019-10-08T10:13:27Z")

</div>

i’ve created a new package named QuantumRelay, and i’m putting all the files that i need for this package in one file and everything and i’ve added also all the dependencies needed and when i’m typing using QuantumRelay …

---

## [AM/PM in Date Format](https://discourse.julialang.org/t/am-pm-in-date-format/17356)

<div class="topic-metadata">

**Author:** [@MLackner](https://discourse.julialang.org/u/MLackner)\
**Replies:** 3\
**Last updated:** [October 8, 2019, 8:00am UTC](https://discourse.julialang.org/t/am-pm-in-date-format/17356 "2019-10-08T08:00:29Z")

</div>

Hi! How do I get the am/pm information from a string to a DateTime? I’ve got the following string: str = "11/7/2018 1:22:51 PM" and want to parse it as a DateTime: DateTime(str, dateformat"m/d/yyyy H:mm:ss ?") Whic…

---

## [Working with machine precision](https://discourse.julialang.org/t/working-with-machine-precision/29576)

<div class="topic-metadata">

**Author:** [@aahaselgrove](https://discourse.julialang.org/u/aahaselgrove)\
**Replies:** 10\
**Last updated:** [October 8, 2019, 6:54am UTC](https://discourse.julialang.org/t/working-with-machine-precision/29576 "2019-10-08T06:54:54Z")

</div>

If I execute 3\*0.1, Julia prints the value as 0.30000000000000004. I believe the inaccuracy is caused by machine precision, but it doesn’t seem useful to me that Julia would display this. I also note that I have never en…

---

## [FeatureSelector in MLJ Learning Networks](https://discourse.julialang.org/t/featureselector-in-mlj-learning-networks/29591)

<div class="topic-metadata">

**Author:** [@petrost](https://discourse.julialang.org/u/petrost)\
**Replies:** 4\
**Last updated:** [October 8, 2019, 6:21am UTC](https://discourse.julialang.org/t/featureselector-in-mlj-learning-networks/29591 "2019-10-08T06:21:01Z")

</div>

I am trying to build a simple learning network using MLJ, but the FeatureSelector() is not recognized as a valid model used on a node. Is there any alternative to that? In general, is there a way I can perform column-wi…

---

## [Adding limits to the Y-axis for SymPy.jl plots](https://discourse.julialang.org/t/adding-limits-to-the-y-axis-for-sympy-jl-plots/29571)

<div class="topic-metadata">

**Author:** [@00krishna](https://discourse.julialang.org/u/00krishna)\
**Replies:** 4\
**Last updated:** [October 8, 2019, 1:09am UTC](https://discourse.julialang.org/t/adding-limits-to-the-y-axis-for-sympy-jl-plots/29571 "2019-10-08T01:09:31Z")

</div>

I was using SymPy.jl to plot the phase flow of some simple dynamical systems. But I ran into an issue when plotting a particular equation with some discontinuities. \\dot{\\theta} = \\frac{\\sin{\\theta}}{\\mu + \\sin{\\theta}…

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

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