# General Usage

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

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

**Page:** 824

---

## [Cannot add or dev a specific package](https://discourse.julialang.org/t/cannot-add-or-dev-a-specific-package/29915)

<div class="topic-metadata">

**Author:** [@jocklawrie](https://discourse.julialang.org/u/jocklawrie)\
**Replies:** 2\
**Last updated:** [October 15, 2019, 12:16am UTC](https://discourse.julialang.org/t/cannot-add-or-dev-a-specific-package/29915 "2019-10-15T00:16:10Z")

</div>

Hi all, I am trying to add a package in a private repository to a new project. I get the error below. I’ve had no trouble adding packages in the same repository to the same project. I also can’t dev the package. Any…

---

## [Dictionary comprehension with interdependent variables](https://discourse.julialang.org/t/dictionary-comprehension-with-interdependent-variables/29909)

<div class="topic-metadata">

**Author:** [@marcusps](https://discourse.julialang.org/u/marcusps)\
**Replies:** 2\
**Last updated:** [October 14, 2019, 6:00pm UTC](https://discourse.julialang.org/t/dictionary-comprehension-with-interdependent-variables/29909 "2019-10-14T18:00:58Z")

</div>

I want to build a dictionary that corresponds to an lower triangular array (i.e., a\[i,j\] only exists if i\>j). How can I write a dictionary comprehension that achieves this? I tried Dict( (i,j) =\> f(i,j) for j in i+1:N…

---

## [Enable interpolation when doing Meta.parse()](https://discourse.julialang.org/t/enable-interpolation-when-doing-meta-parse/29906)

<div class="topic-metadata">

**Author:** [@AlwaysPS](https://discourse.julialang.org/u/AlwaysPS)\
**Replies:** 0\
**Last updated:** [October 14, 2019, 3:28pm UTC](https://discourse.julialang.org/t/enable-interpolation-when-doing-meta-parse/29906 "2019-10-14T15:28:01Z")

</div>

I’m trying to build a toy program using the nonlinear facility of JuMP. The general structure looks like this: function solve(constraint::String) model = Model() vars = @variable(model, \[1:10\], base\_name="x") …

---

## [How to get the significand and the exponent of a floating point number?](https://discourse.julialang.org/t/how-to-get-the-significand-and-the-exponent-of-a-floating-point-number/29900)

<div class="topic-metadata">

**Author:** [@gmouts](https://discourse.julialang.org/u/gmouts)\
**Replies:** 3\
**Last updated:** [October 14, 2019, 1:58pm UTC](https://discourse.julialang.org/t/how-to-get-the-significand-and-the-exponent-of-a-floating-point-number/29900 "2019-10-14T13:58:24Z")

</div>

Given a floating point number, I would like to print the significand and the exponent in binary. This is for teaching purposes. I guess I can use mathematical functions to get them but on one hand it seems that this can…

---

## [Seemingly incorrect dependencies resolution in Pkg](https://discourse.julialang.org/t/seemingly-incorrect-dependencies-resolution-in-pkg/29845)

<div class="topic-metadata">

**Author:** [@rdyro](https://discourse.julialang.org/u/rdyro)\
**Replies:** 8\
**Last updated:** [October 14, 2019, 4:31am UTC](https://discourse.julialang.org/t/seemingly-incorrect-dependencies-resolution-in-pkg/29845 "2019-10-14T04:31:20Z")

</div>

I’m trying to develop Zygote, but can’t successfully install the latest development version from Github. When I try installing the package from the Github repo directly or trying to use the dev command with it, I get the…

---

## [Variable declarations within let blocks](https://discourse.julialang.org/t/variable-declarations-within-let-blocks/29882)

<div class="topic-metadata">

**Author:** [@yurivish](https://discourse.julialang.org/u/yurivish)\
**Replies:** 2\
**Last updated:** [October 14, 2019, 2:31am UTC](https://discourse.julialang.org/t/variable-declarations-within-let-blocks/29882 "2019-10-14T02:31:11Z")

</div>

Is there any semantic difference between the following two forms? let a = 2, b = 3 a + b end and let a = 2 b = 3 a + b end I’m specifically curious about whether these are equivalent with respect to a…

---

## [Make IJulia completly independent from Python](https://discourse.julialang.org/t/make-ijulia-completly-independent-from-python/17375)

<div class="topic-metadata">

**Author:** [@Juan](https://discourse.julialang.org/u/Juan)\
**Replies:** 27\
**Last updated:** [October 13, 2019, 9:54pm UTC](https://discourse.julialang.org/t/make-ijulia-completly-independent-from-python/17375 "2019-10-13T21:54:09Z")

</div>

Why do we need to have python installed on our computers in order to use Julia? If we want to use Julia through a GUI such as VS Code, Juno, Jupyter… we need to install IJulia and therefore python. Is there any alterna…

---

## [Error "Package does not have LinearAlgebra in its dependencies" running \`Pkg.test\`](https://discourse.julialang.org/t/error-package-does-not-have-linearalgebra-in-its-dependencies-running-pkg-test/29763)

<div class="topic-metadata">

**Author:** [@riccardomurri](https://discourse.julialang.org/u/riccardomurri)\
**Replies:** 3\
**Last updated:** [October 13, 2019, 9:38pm UTC](https://discourse.julialang.org/t/error-package-does-not-have-linearalgebra-in-its-dependencies-running-pkg-test/29763 "2019-10-13T21:38:49Z")

</div>

Hello! I am trying to write my first Julia package (called “BEAM”), but keep getting an error when I run Pkg.test("BEAM"): (BEAM) pkg\> test BEAM Testing BEAM Resolving package versions... ERROR: LoadError: Argument…

---

## [Interpolate a ND vector at once](https://discourse.julialang.org/t/interpolate-a-nd-vector-at-once/29844)

<div class="topic-metadata">

**Author:** [@MatsMor](https://discourse.julialang.org/u/MatsMor)\
**Replies:** 3\
**Last updated:** [October 13, 2019, 8:25pm UTC](https://discourse.julialang.org/t/interpolate-a-nd-vector-at-once/29844 "2019-10-13T20:25:38Z")

</div>

Hi all, I am trying to perform linear interpolation on some gridded data using the Interpolations.jl package. Suppose that I have 2 variables (x,y) and a function z=f(x,y). I want to interpolate a vector of values V={…

---

## [Wrong line reported in error on parse error?](https://discourse.julialang.org/t/wrong-line-reported-in-error-on-parse-error/29866)

<div class="topic-metadata">

**Author:** [@pixel27](https://discourse.julialang.org/u/pixel27)\
**Replies:** 0\
**Last updated:** [October 13, 2019, 4:01pm UTC](https://discourse.julialang.org/t/wrong-line-reported-in-error-on-parse-error/29866 "2019-10-13T16:01:13Z")

</div>

Would this be considered a bug? When you loading this: function foo(c:Int, b::Dict{String, Any}) # move # down # some local a : Dict{String, Any} = b\["d"\] return a end I get: ERROR: LoadError: sy…

---

## [How to make clickable julia script for Windows](https://discourse.julialang.org/t/how-to-make-clickable-julia-script-for-windows/8618)

<div class="topic-metadata">

**Author:** [@favba](https://discourse.julialang.org/u/favba)\
**Replies:** 7\
**Last updated:** [October 13, 2019, 2:03pm UTC](https://discourse.julialang.org/t/how-to-make-clickable-julia-script-for-windows/8618 "2019-10-13T14:03:21Z")

</div>

This questions is more a windows question than a Julia one, so, I’m sorry if this is out of place. Background I’m taking a Computational Fluid Dynamics class, where we will be building a cfd code along the semester, and…

---

## [Tuple vs Union as struct parameter](https://discourse.julialang.org/t/tuple-vs-union-as-struct-parameter/29820)

<div class="topic-metadata">

**Author:** [@Qiyamah](https://discourse.julialang.org/u/Qiyamah)\
**Replies:** 3\
**Last updated:** [October 13, 2019, 12:34pm UTC](https://discourse.julialang.org/t/tuple-vs-union-as-struct-parameter/29820 "2019-10-13T12:34:39Z")

</div>

This seems OK. julia\> struct TupleTest{T\<:Tuple} end julia\> TupleTest{Tuple{Int,Float64}} TupleTest{Tuple{Int64,Float64}} However this is not: julia\> struct UnionTest{U\<:Union} end julia\> UnionTest{Union…

---

## [Error trying to isntall Jupyter notebook](https://discourse.julialang.org/t/error-trying-to-isntall-jupyter-notebook/29790)

<div class="topic-metadata">

**Author:** [@Baederlee](https://discourse.julialang.org/u/Baederlee)\
**Replies:** 4\
**Last updated:** [October 13, 2019, 10:18am UTC](https://discourse.julialang.org/t/error-trying-to-isntall-jupyter-notebook/29790 "2019-10-13T10:18:07Z")

</div>

Hello, I am having trouble after installing Julia on a new Laptop. I want to add jupyter notebook to my Julia. So after adding IJulia, I type "using IJulia; notebook() ". After some downloading I get the Error-message be…

---

## [Generate all subsets of a set](https://discourse.julialang.org/t/generate-all-subsets-of-a-set/12810)

<div class="topic-metadata">

**Author:** [@iin](https://discourse.julialang.org/u/iin)\
**Replies:** 13\
**Last updated:** [October 13, 2019, 1:23am UTC](https://discourse.julialang.org/t/generate-all-subsets-of-a-set/12810 "2019-10-13T01:23:18Z")

</div>

Hi, I’m very new in Julia, & I really need help to generate all subsets of a set. For example: I have a set \[1, 2, 3, 4, 5\], then I need to generate all subsets from it, such \[\[1,2\], \[1,3\], \[2,3\],…\[2,3,4\], …\[2,3,4,5\], e…

---

## [Preview longer arrays and dictionaries in Workspace : Atom - Julia](https://discourse.julialang.org/t/preview-longer-arrays-and-dictionaries-in-workspace-atom-julia/29827)

<div class="topic-metadata">

**Author:** [@KSepetanc](https://discourse.julialang.org/u/KSepetanc)\
**Replies:** 1\
**Last updated:** [October 13, 2019, 1:18am UTC](https://discourse.julialang.org/t/preview-longer-arrays-and-dictionaries-in-workspace-atom-julia/29827 "2019-10-13T01:18:08Z")

</div>

I am using PowerModels package and it has rather long dictionaries as model data. When the inner structure has a lot of rows, it displays either …=\>… for a dict. or just … for arrays. I don’t see any way to preview mor…

---

## [Good Practises for making performant DSL's? (My Dissertation Topic)](https://discourse.julialang.org/t/good-practises-for-making-performant-dsls-my-dissertation-topic/29832)

<div class="topic-metadata">

**Author:** [@Specs](https://discourse.julialang.org/u/Specs)\
**Replies:** 2\
**Last updated:** [October 12, 2019, 10:21pm UTC](https://discourse.julialang.org/t/good-practises-for-making-performant-dsls-my-dissertation-topic/29832 "2019-10-12T22:21:18Z")

</div>

Hiya, I’m currently a final year student and my supervisor is into scientific computing. He has a tool that makes heavy use of a DSL written into python and he wants me to investigate whether writing DSL’s in Julia are …

---

## [Building Clp](https://discourse.julialang.org/t/building-clp/29835)

<div class="topic-metadata">

**Author:** [@marouane](https://discourse.julialang.org/u/marouane)\
**Replies:** 0\
**Last updated:** [October 12, 2019, 9:19pm UTC](https://discourse.julialang.org/t/building-clp/29835 "2019-10-12T21:19:41Z")

</div>

i wanted to build my module and then it showed me that there is a problem in Clp, and now i’m having hard times to build it it shows me this : Building Clp → \`~/.julia/packages/Clp/9Gz64/deps/build.log\` ┌ Error: Error …

---

## [I hope you like brainteasers](https://discourse.julialang.org/t/i-hope-you-like-brainteasers/29813)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 0\
**Last updated:** [October 12, 2019, 7:21am UTC](https://discourse.julialang.org/t/i-hope-you-like-brainteasers/29813 "2019-10-12T07:21:21Z")

</div>

We all know how important it is to keep data that we process “local”. That should help the CPU memory pipeline to supply the data quickly. One of the standard operations in the finite element method is the “gather”: col…

---

## [Performance of (a::AbstractType)(args...) function declarations](https://discourse.julialang.org/t/performance-of-a-abstracttype-args-function-declarations/29825)

<div class="topic-metadata">

**Author:** [@grahamas](https://discourse.julialang.org/u/grahamas)\
**Replies:** 3\
**Last updated:** [October 12, 2019, 6:45pm UTC](https://discourse.julialang.org/t/performance-of-a-abstracttype-args-function-declarations/29825 "2019-10-12T18:45:12Z")

</div>

I just finished refactoring my code to replace a lot of function calls of the form f(a::AbstractType, args…) with (a::AbstractType)(args…) since I can do that in 1.3, and it works out to slightly cleaner code. However, …

---

## [Help me optimize dynamic programming code](https://discourse.julialang.org/t/help-me-optimize-dynamic-programming-code/29794)

<div class="topic-metadata">

**Author:** [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Replies:** 7\
**Last updated:** [October 12, 2019, 5:36pm UTC](https://discourse.julialang.org/t/help-me-optimize-dynamic-programming-code/29794 "2019-10-12T17:36:21Z")

</div>

I am working on a dynamic programming assignment for macro-economics that has code in Matlab which I tried to translate to Julia. However I cannot get the performance to be what it should be. Here is the loop solving t…

---

## [IJulia weird problem on Win 10, v. 1903](https://discourse.julialang.org/t/ijulia-weird-problem-on-win-10-v-1903/29819)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 0\
**Last updated:** [October 12, 2019, 2:53pm UTC](https://discourse.julialang.org/t/ijulia-weird-problem-on-win-10-v-1903/29819 "2019-10-12T14:53:58Z")

</div>

I use IJulia (recent version) on Julia v. 1.2.0 for 64bit Windows 10, latest update. I have the weirdest problem with IJulia… but only sometimes. Here is what happens: Shift-return doesn’t execute Code cells, but shif…

---

## [Expected type promotion with user-defined type not happening](https://discourse.julialang.org/t/expected-type-promotion-with-user-defined-type-not-happening/29803)

<div class="topic-metadata">

**Author:** [@jonniedie](https://discourse.julialang.org/u/jonniedie)\
**Replies:** 3\
**Last updated:** [October 12, 2019, 12:18pm UTC](https://discourse.julialang.org/t/expected-type-promotion-with-user-defined-type-not-happening/29803 "2019-10-12T12:18:28Z")

</div>

I traced a bug in some of my code down to some behavior that I don’t quite understand regarding type promotion. I’m not sure if the issue is with the MonteCarloMeasurements package I’m using or my general misunderstandin…

---

## [Bad performance in simple array broadcast operations](https://discourse.julialang.org/t/bad-performance-in-simple-array-broadcast-operations/29771)

<div class="topic-metadata">

**Author:** [@tomas.bolano](https://discourse.julialang.org/u/tomas.bolano)\
**Replies:** 5\
**Last updated:** [October 12, 2019, 11:40am UTC](https://discourse.julialang.org/t/bad-performance-in-simple-array-broadcast-operations/29771 "2019-10-12T11:40:37Z")

</div>

Hi, I was rewriting some Matlab code into Julia, and I noticed that one function which used array broadcasting operations ran several times slower on Julia. I though this was really strange and I made a simple test func…

---

## [Julia: Symbol Lookup Error](https://discourse.julialang.org/t/julia-symbol-lookup-error/29797)

<div class="topic-metadata">

**Author:** [@natgeo-wong](https://discourse.julialang.org/u/natgeo-wong)\
**Replies:** 3\
**Last updated:** [October 11, 2019, 11:32pm UTC](https://discourse.julialang.org/t/julia-symbol-lookup-error/29797 "2019-10-11T23:32:09Z")

</div>

Hi! I’m currently using Julia on both a local laptop (macos) and a linux remote server. Julia has been working fine on my computer, but occasionally, on my linux remote server, I keep getting the following error when I…

---

## [Boundserror in Zygote custom adjoint](https://discourse.julialang.org/t/boundserror-in-zygote-custom-adjoint/29739)

<div class="topic-metadata">

**Author:** [@jbmuir](https://discourse.julialang.org/u/jbmuir)\
**Replies:** 1\
**Last updated:** [October 11, 2019, 6:18pm UTC](https://discourse.julialang.org/t/boundserror-in-zygote-custom-adjoint/29739 "2019-10-11T18:18:25Z")

</div>

I’m learning how to define a custom adjoint in Zygote for a type and get a BoundsError testing the gradient for my example case. Code is as below (note that the adjoint definition is probably wrong, but the dimensions s…

---

## [Puzzle with memory allocation](https://discourse.julialang.org/t/puzzle-with-memory-allocation/29780)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 2\
**Last updated:** [October 11, 2019, 3:14pm UTC](https://discourse.julialang.org/t/puzzle-with-memory-allocation/29780 "2019-10-11T15:14:42Z")

</div>

The line in the below code if inrange(... allocates for some reason a lot of memory. For the life of me I can’t figure out why. Any ideas? - # Initialize the output list 230953488 vlist= zeros(FInt, size…

---

## [Can't build ODEInterface on MacOS, "ld: library not found for -ldylib1.o"](https://discourse.julialang.org/t/cant-build-odeinterface-on-macos-ld-library-not-found-for-ldylib1-o/29634)

<div class="topic-metadata">

**Author:** [@minkailin](https://discourse.julialang.org/u/minkailin)\
**Replies:** 7\
**Last updated:** [October 11, 2019, 8:55am UTC](https://discourse.julialang.org/t/cant-build-odeinterface-on-macos-ld-library-not-found-for-ldylib1-o/29634 "2019-10-11T08:55:12Z")

</div>

I’m trying to use ODEInterface and ODEInterfaceDiffEq but encountered the following problem. I’m not sure what the issue is or how to resolve it? I am using Julia 1.0.3 on macOS Mojave 10.14.6.

---

## [Pass additional parameters to affect! in solving ODEs](https://discourse.julialang.org/t/pass-additional-parameters-to-affect-in-solving-odes/29755)

<div class="topic-metadata">

**Author:** [@biona001](https://discourse.julialang.org/u/biona001)\
**Replies:** 2\
**Last updated:** [October 11, 2019, 5:32am UTC](https://discourse.julialang.org/t/pass-additional-parameters-to-affect-in-solving-odes/29755 "2019-10-11T05:32:38Z")

</div>

Hello community, I’m trying to make a lot of ODE simulations and each has a specific callback condition. In affect!, I need to change a few compartments of integrator.u according to some known values. How can I do this? …

---

## [Juno, julia-client install error](https://discourse.julialang.org/t/juno-julia-client-install-error/29570)

<div class="topic-metadata">

**Author:** [@zhangliye](https://discourse.julialang.org/u/zhangliye)\
**Replies:** 6\
**Last updated:** [October 11, 2019, 4:20am UTC](https://discourse.julialang.org/t/juno-julia-client-install-error/29570 "2019-10-11T04:20:28Z")

</div>

I install JUNO from the GUI in Atom caused by a bug of Atom not solved at present. I tried to install julia-client from the command console. After running the command of “apm install julia-client” , I got the following e…

---

## [Image resizing while preserving average](https://discourse.julialang.org/t/image-resizing-while-preserving-average/29704)

<div class="topic-metadata">

**Author:** [@johnheyer](https://discourse.julialang.org/u/johnheyer)\
**Replies:** 14\
**Last updated:** [October 10, 2019, 11:23pm UTC](https://discourse.julialang.org/t/image-resizing-while-preserving-average/29704 "2019-10-10T23:23:25Z")

</div>

Hello! I am new to Julia and need some help in image processing. The arrays which I am working with are histogram 2D probability mass functions, so maintaining a sum of 1 in the image is important. What’s interesting, …

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

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