# Latest

**URL:** https://discourse.julialang.org/latest.md?page=1834

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

**Page:** 1835

---

## [\[JuMP\] Use ConstraintRef to add additional constraint](https://discourse.julialang.org/t/jump-use-constraintref-to-add-additional-constraint/34046)

<div class="topic-metadata">

**Author:** [@acauligi](https://discourse.julialang.org/u/acauligi)\
**Replies:** 1\
**Last updated:** [January 31, 2020, 8:09pm UTC](https://discourse.julialang.org/t/jump-use-constraintref-to-add-additional-constraint/34046 "2020-01-31T20:09:07Z")

</div>

Hi, I have an affine inequality constraint in a JuMP model (that was constructed off-line) and would like to add a new constraint using the expression from the ConstraintRef associated with the affine constraint. e.g.: …

---

## [PEG (parsing expression grammars)](https://discourse.julialang.org/t/peg-parsing-expression-grammars/34040)

<div class="topic-metadata">

**Author:** [@HugoTrentesaux](https://discourse.julialang.org/u/HugoTrentesaux)\
**Replies:** 1\
**Last updated:** [January 31, 2020, 8:00pm UTC](https://discourse.julialang.org/t/peg-parsing-expression-grammars/34040 "2020-01-31T20:00:42Z")

</div>

I recently came to PEG through https://pest.rs/ and wondered if Julia had this kind of packages. I came across this topic : ANN: Automa.jl - a package to compile regular expressions to Julia which gives some insights of …

---

## [Duality problem](https://discourse.julialang.org/t/duality-problem/34045)

<div class="topic-metadata">

**Author:** [@mahsap58](https://discourse.julialang.org/u/mahsap58)\
**Replies:** 0\
**Last updated:** [January 31, 2020, 7:25pm UTC](https://discourse.julialang.org/t/duality-problem/34045 "2020-01-31T19:25:14Z")

</div>

Hi i am trying to use the ValueShapes package for getting the dual variables of my primal problem i faced this error Failed to precompile ValueShapes \[136a8f8c-c49b-4edb-8b98-f3d64d48be8f\] No deps.jl file could be foun…

---

## [Do I need ATOM and/or JUNO to use Julia if I have a PC with ONLY command line?](https://discourse.julialang.org/t/do-i-need-atom-and-or-juno-to-use-julia-if-i-have-a-pc-with-only-command-line/34043)

<div class="topic-metadata">

**Author:** [@Aizzaac](https://discourse.julialang.org/u/Aizzaac)\
**Replies:** 3\
**Last updated:** [January 31, 2020, 6:57pm UTC](https://discourse.julialang.org/t/do-i-need-atom-and-or-juno-to-use-julia-if-i-have-a-pc-with-only-command-line/34043 "2020-01-31T18:57:53Z")

</div>

Hello I have a machine with ONLY command line. So, do I have to install Atom and/or Juno to use Julia? or IJulia? I will use Julia to do AI with tensorflow, knet, etc Thank you very much

---

## [What does and does-not get computed on the GPU? (CuArrays)](https://discourse.julialang.org/t/what-does-and-does-not-get-computed-on-the-gpu-cuarrays/34042)

<div class="topic-metadata">

**Author:** [@jaynick](https://discourse.julialang.org/u/jaynick)\
**Replies:** 1\
**Last updated:** [January 31, 2020, 6:41pm UTC](https://discourse.julialang.org/t/what-does-and-does-not-get-computed-on-the-gpu-cuarrays/34042 "2020-01-31T18:41:26Z")

</div>

Is there a easy explanation or “rule of thumb” about which computations are run on the GPU? For example, if there is a matrix ‘W’ and array ‘a’, both on the gpu, I am sure that W\*a is computed on the GPU. But what abou…

---

## [\[Convex.jl\] Suppress warnings when printing problem tree](https://discourse.julialang.org/t/convex-jl-suppress-warnings-when-printing-problem-tree/34029)

<div class="topic-metadata">

**Author:** [@4aHxKzD](https://discourse.julialang.org/u/4aHxKzD)\
**Replies:** 2\
**Last updated:** [January 31, 2020, 3:22pm UTC](https://discourse.julialang.org/t/convex-jl-suppress-warnings-when-printing-problem-tree/34029 "2020-01-31T15:22:48Z")

</div>

Is there a way to suppress warnings such as Warning: Expression not DCP compliant. when printing the problem tree?

---

## [Package LsqFit not found in current path - calling julia via PyJulia](https://discourse.julialang.org/t/package-lsqfit-not-found-in-current-path-calling-julia-via-pyjulia/34031)

<div class="topic-metadata">

**Author:** [@Kethex](https://discourse.julialang.org/u/Kethex)\
**Replies:** 0\
**Last updated:** [January 31, 2020, 3:19pm UTC](https://discourse.julialang.org/t/package-lsqfit-not-found-in-current-path-calling-julia-via-pyjulia/34031 "2020-01-31T15:19:05Z")

</div>

Hello! I’m using Julia 1.4. I’m trying to make a Python program which calls upon Julia using \[PyJulia\] (GitHub - JuliaPy/pyjulia: python interface to julia) and calls a .jl file I have stored in the same directory. This…

---

## [Inner constructor, correct type for \`new\`](https://discourse.julialang.org/t/inner-constructor-correct-type-for-new/34013)

<div class="topic-metadata">

**Author:** [@timueh](https://discourse.julialang.org/u/timueh)\
**Replies:** 9\
**Last updated:** [January 31, 2020, 2:43pm UTC](https://discourse.julialang.org/t/inner-constructor-correct-type-for-new/34013 "2020-01-31T14:43:06Z")

</div>

I have a question about what to write in the curly braces of the new{...}() function for inner constructors. Consider this piece of code struct MyType{T} \<: MyAbstractType{T} x::T y::T function MyType(x, y)…

---

## [Help with gradient](https://discourse.julialang.org/t/help-with-gradient/33943)

<div class="topic-metadata">

**Author:** [@ccc1685](https://discourse.julialang.org/u/ccc1685)\
**Replies:** 6\
**Last updated:** [January 31, 2020, 1:31pm UTC](https://discourse.julialang.org/t/help-with-gradient/33943 "2020-01-31T13:31:10Z")

</div>

Hi, I have a loss function that involves a probability density that requires several matrix operations to derive. When I tried running gradient on it through either Flux or Zygote I get this error: Mutating arrays is n…

---

## [How to annotate function to return 1D array of the same type as the input 2D array?](https://discourse.julialang.org/t/how-to-annotate-function-to-return-1d-array-of-the-same-type-as-the-input-2d-array/34018)

<div class="topic-metadata">

**Author:** [@Azamat](https://discourse.julialang.org/u/Azamat)\
**Replies:** 1\
**Last updated:** [January 31, 2020, 1:03pm UTC](https://discourse.julialang.org/t/how-to-annotate-function-to-return-1d-array-of-the-same-type-as-the-input-2d-array/34018 "2020-01-31T13:03:00Z")

</div>

How do I express something like this: julia\> function f(mat₁::T{2}, mat₂::T{2})::T{1} where {T \<: DenseArray{\<:Real,N} where N} return eachcol(mat₁) .⋅ eachcol(mat₂) end ERROR: TypeError: in Type{...} e…

---

## [Single type Binary reading](https://discourse.julialang.org/t/single-type-binary-reading/33993)

<div class="topic-metadata">

**Author:** [@jrson](https://discourse.julialang.org/u/jrson)\
**Replies:** 2\
**Last updated:** [January 31, 2020, 11:26am UTC](https://discourse.julialang.org/t/single-type-binary-reading/33993 "2020-01-31T11:26:18Z")

</div>

Hi, I am a new to Julia, and I need some help. % Load data in Matlab fileID = fopen('./data\_6000x3199.bin'); Data = fread(fileID,\[6000,3199\],'single'); fclose(fildID); How can I convert this simple code from Matlab to …

---

## [Array of random Rationals](https://discourse.julialang.org/t/array-of-random-rationals/33994)

<div class="topic-metadata">

**Author:** [@squirrel](https://discourse.julialang.org/u/squirrel)\
**Replies:** 3\
**Last updated:** [January 31, 2020, 10:43am UTC](https://discourse.julialang.org/t/array-of-random-rationals/33994 "2020-01-31T10:43:56Z")

</div>

I’d like to extend rand to make a vector of rational numbers, and I’m having difficulty defining the function. For example, here’s one of the several versions I’ve tried. function rand(::Rational{T}, n) where T\<:Integer…

---

## [How do I turn array data into an image?](https://discourse.julialang.org/t/how-do-i-turn-array-data-into-an-image/33974)

<div class="topic-metadata">

**Author:** [@samantp](https://discourse.julialang.org/u/samantp)\
**Replies:** 10\
**Last updated:** [January 31, 2020, 10:15am UTC](https://discourse.julialang.org/t/how-do-i-turn-array-data-into-an-image/33974 "2020-01-31T10:15:32Z")

</div>

I’m just trying julia from MATLAB, in which it was quite intuitive to download arrays and display them as images (imshow worked without issue mostly and there was the imagesc function when an array needed to be scaled). …

---

## [How to work with array of reals in HMC](https://discourse.julialang.org/t/how-to-work-with-array-of-reals-in-hmc/33953)

<div class="topic-metadata">

**Author:** [@johnheyer](https://discourse.julialang.org/u/johnheyer)\
**Replies:** 7\
**Last updated:** [January 31, 2020, 10:01am UTC](https://discourse.julialang.org/t/how-to-work-with-array-of-reals-in-hmc/33953 "2020-01-31T10:01:11Z")

</div>

Hi @Tamas\_Papp, I’m sorry if this is a simple question. I am trying to use your DynamicHMC package and sample from R^n . I have set up my code similarly to: https://github.com/tpapp/DynamicHMCExamples.jl/blob/master/src…

---

## [Jacobian of a multi-inputs function](https://discourse.julialang.org/t/jacobian-of-a-multi-inputs-function/33787)

<div class="topic-metadata">

**Author:** [@AhmedAlreweny](https://discourse.julialang.org/u/AhmedAlreweny)\
**Replies:** 9\
**Last updated:** [January 31, 2020, 8:48am UTC](https://discourse.julialang.org/t/jacobian-of-a-multi-inputs-function/33787 "2020-01-31T08:48:16Z")

</div>

Hello, I have a function which represents the mapping F(x,p), where x is a vector and p is a scalar parameter. The function (mapping) output is a vector. I would like to compute the the jacobian (in this case the direc…

---

## [Julia on ipad pro](https://discourse.julialang.org/t/julia-on-ipad-pro/10628)

<div class="topic-metadata">

**Author:** [@Ferran\_Mazzanti](https://discourse.julialang.org/u/Ferran_Mazzanti)\
**Replies:** 7\
**Last updated:** [January 31, 2020, 7:10am UTC](https://discourse.julialang.org/t/julia-on-ipad-pro/10628 "2020-01-31T07:10:51Z")

</div>

Dear all, I was wondering if it is possible to have julia on the ipad… The new ipad pro seems to be pretty powerful compared to some laptops, so I was wondering if there is any sort of repl and/or jupyter coding system …

---

## [How can write a function to find unique elements in array without any allocation?](https://discourse.julialang.org/t/how-can-write-a-function-to-find-unique-elements-in-array-without-any-allocation/34005)

<div class="topic-metadata">

**Author:** [@Manu\_Francis](https://discourse.julialang.org/u/Manu_Francis)\
**Replies:** 4\
**Last updated:** [January 31, 2020, 6:07am UTC](https://discourse.julialang.org/t/how-can-write-a-function-to-find-unique-elements-in-array-without-any-allocation/34005 "2020-01-31T06:07:32Z")

</div>

Hi, I am using unique function to find unique elements in an array. But the memory allocation to use this function is increasing with array size. In my case array size is nearly 10000, and it causes 36 allocation. a =…

---

## [I'm new to Julia and I can't get this constraint to work](https://discourse.julialang.org/t/im-new-to-julia-and-i-cant-get-this-constraint-to-work/34004)

<div class="topic-metadata">

**Author:** [@T\_S](https://discourse.julialang.org/u/T_S)\
**Replies:** 0\
**Last updated:** [January 31, 2020, 1:33am UTC](https://discourse.julialang.org/t/im-new-to-julia-and-i-cant-get-this-constraint-to-work/34004 "2020-01-31T01:33:06Z")

</div>

I am using JuMP. here is the line: @constraint(m, \[i=1:size(sets)\[2\]\], sum(sets\[j,i\]\*apples\_set\[j\] for j in 1:num\_apples) + sum(sets\[num\_apples+j,i\]\*pears\_set\[j\] for j in 1:num\_pears) \<= num\_overlap) Can someone atleas…

---

## [Way to train model in Julia and deploy in Javascript?](https://discourse.julialang.org/t/way-to-train-model-in-julia-and-deploy-in-javascript/34002)

<div class="topic-metadata">

**Author:** [@djsegal](https://discourse.julialang.org/u/djsegal)\
**Replies:** 0\
**Last updated:** [January 30, 2020, 11:53pm UTC](https://discourse.julialang.org/t/way-to-train-model-in-julia-and-deploy-in-javascript/34002 "2020-01-30T23:53:43Z")

</div>

I recently built an Airbnb price prediction tool in Javascript. However I had to do a lot of my initial work and EDA in Python using Scikit-learn. This seemed like a two language problem, so was wondering if anyone had …

---

## [Animation with threads in Plots.jl?](https://discourse.julialang.org/t/animation-with-threads-in-plots-jl/33958)

<div class="topic-metadata">

**Author:** [@jling](https://discourse.julialang.org/u/jling)\
**Replies:** 8\
**Last updated:** [January 30, 2020, 11:04pm UTC](https://discourse.julialang.org/t/animation-with-threads-in-plots-jl/33958 "2020-01-30T23:04:29Z")

</div>

Since the canonical way of making animation involes: anim = @animate for i in some\_range plotting(blah...., i) end gif(anim, path\_var) is would be natural to parallelize this process since @animate IO a bun…

---

## [Question about indexing into an array of arrays](https://discourse.julialang.org/t/question-about-indexing-into-an-array-of-arrays/34000)

<div class="topic-metadata">

**Author:** [@jonathan-durbin](https://discourse.julialang.org/u/jonathan-durbin)\
**Replies:** 1\
**Last updated:** [January 30, 2020, 10:24pm UTC](https://discourse.julialang.org/t/question-about-indexing-into-an-array-of-arrays/34000 "2020-01-30T22:24:36Z")

</div>

Still learning about how best to use julia. This is probably more of a curious thing I noticed than anything else. If I create an array like so: a = \[1, 2\], \[3, 4\]\] Both of the following return what I would expect: a…

---

## [IFFT Scaling](https://discourse.julialang.org/t/ifft-scaling/33979)

<div class="topic-metadata">

**Author:** [@jleman](https://discourse.julialang.org/u/jleman)\
**Replies:** 5\
**Last updated:** [January 30, 2020, 9:25pm UTC](https://discourse.julialang.org/t/ifft-scaling/33979 "2020-01-30T21:25:38Z")

</div>

Does anyone know if there is a 1/N or 1/sqrt(N) scaling in the IFFT function of FFTW.jl? I am taking the IFFT of an array of complex numbers sampled from a continuous frequency domain function. The resulting time domai…

---

## [Equivalent of list() (R) in Julia](https://discourse.julialang.org/t/equivalent-of-list-r-in-julia/2860)

<div class="topic-metadata">

**Author:** [@Jonathan\_Droxler](https://discourse.julialang.org/u/Jonathan_Droxler)\
**Replies:** 19\
**Last updated:** [January 30, 2020, 8:54pm UTC](https://discourse.julialang.org/t/equivalent-of-list-r-in-julia/2860 "2020-01-30T20:54:31Z")

</div>

Dear all, Quite new in Julia (I’m already a big fan), I was wondering if there exist any data structure in Julia like “list()” in R. I search in the documentation, on google. Maybe I didn’t search well but I didn’t find…

---

## [Wrapping Python PyViz Graphics Libraries](https://discourse.julialang.org/t/wrapping-python-pyviz-graphics-libraries/33997)

<div class="topic-metadata">

**Author:** [@ea42gh](https://discourse.julialang.org/u/ea42gh)\
**Replies:** 0\
**Last updated:** [January 30, 2020, 8:15pm UTC](https://discourse.julialang.org/t/wrapping-python-pyviz-graphics-libraries/33997 "2020-01-30T20:15:07Z")

</div>

What would be a good starting point to read to figure out how to wrap python graph libraries http://holoviews.org/ and Panel Documentation — Panel v0.13.1 ? Has somebody already attempted it?

---

## [Using Plots.jl within a package \_iteratively\_](https://discourse.julialang.org/t/using-plots-jl-within-a-package-iteratively/33852)

<div class="topic-metadata">

**Author:** [@ianfiske](https://discourse.julialang.org/u/ianfiske)\
**Replies:** 10\
**Last updated:** [January 30, 2020, 7:50pm UTC](https://discourse.julialang.org/t/using-plots-jl-within-a-package-iteratively/33852 "2020-01-30T19:50:24Z")

</div>

Hi, I am doing some optimization iteratively. I produce plots iteratively, updating the plot after each variable-update. I am trying to figure out how to avoid depending on Plots.jl in my package for cases when the plo…

---

## [JuliaCon 2020 tickets are now on sale](https://discourse.julialang.org/t/juliacon-2020-tickets-are-now-on-sale/31828)

<div class="topic-metadata">

**Author:** [@avik](https://discourse.julialang.org/u/avik)\
**Replies:** 1\
**Last updated:** [January 30, 2020, 6:20pm UTC](https://discourse.julialang.org/t/juliacon-2020-tickets-are-now-on-sale/31828 "2020-01-30T18:20:51Z")

</div>

JuliaCon 2020 tickets are now on sale! Get yours now at JuliaCon 2020: Registration Similar to last year, all tickets have a 50% discounts available for students. If you are not a student, this year we have a 10% discou…

---

## [Input signal for solving system of ODEs](https://discourse.julialang.org/t/input-signal-for-solving-system-of-odes/33982)

<div class="topic-metadata">

**Author:** [@Matthew\_Overlin](https://discourse.julialang.org/u/Matthew_Overlin)\
**Replies:** 1\
**Last updated:** [January 30, 2020, 7:18pm UTC](https://discourse.julialang.org/t/input-signal-for-solving-system-of-odes/33982 "2020-01-30T19:18:06Z")

</div>

Hello. I currently have a working solution, but it is quite slow because of the way I have implemented it. Before I perform an ODE integration, I establish input signals VD, VQ at times given in time\_V. time\_V, VD, an…

---

## [\[ANN\] VPTrees.jl - nearest neighbor search in metric spaces](https://discourse.julialang.org/t/ann-vptrees-jl-nearest-neighbor-search-in-metric-spaces/31477)

<div class="topic-metadata">

**Author:** [@altre](https://discourse.julialang.org/u/altre)\
**Replies:** 20\
**Last updated:** [January 30, 2020, 6:56pm UTC](https://discourse.julialang.org/t/ann-vptrees-jl-nearest-neighbor-search-in-metric-spaces/31477 "2020-01-30T18:56:08Z")

</div>

VPTrees.jl A Vantage Point Tree is a simple data structure effective for use in fast nearest neighbor search and range search for any metric developed by Peter Yianilos: Data structures and algorithms for nearest neighb…

---

## [How do I load a vector of Strings into a BallTree in NearestNeighbors.jl?](https://discourse.julialang.org/t/how-do-i-load-a-vector-of-strings-into-a-balltree-in-nearestneighbors-jl/33950)

<div class="topic-metadata">

**Author:** [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Replies:** 1\
**Last updated:** [January 30, 2020, 6:54pm UTC](https://discourse.julialang.org/t/how-do-i-load-a-vector-of-strings-into-a-balltree-in-nearestneighbors-jl/33950 "2020-01-30T18:54:26Z")

</div>

I’m trying to figure out how to load a vector of strings into a BallTree from NearestNeighbors.jl and I could really use some guidance. From what I understand, I can create my own Metric and use it with a BallTree so her…

---

## [How do you create a transparent .png using Images.jl?](https://discourse.julialang.org/t/how-do-you-create-a-transparent-png-using-images-jl/33981)

<div class="topic-metadata">

**Author:** [@NiclasMattsson](https://discourse.julialang.org/u/NiclasMattsson)\
**Replies:** 3\
**Last updated:** [January 30, 2020, 6:51pm UTC](https://discourse.julialang.org/t/how-do-you-create-a-transparent-png-using-images-jl/33981 "2020-01-30T18:51:15Z")

</div>

The following does not work. In Photoshop terms, it creates a .png with a (solid black) background layer instead of an ordinary layer, and background layers cannot have transparent pixels. julia\> using Images julia\> im…

[Previous page](https://discourse.julialang.org/latest.md?page=1833)

[Next page](https://discourse.julialang.org/latest.md?page=1835)
