# Latest

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

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

**Page:** 1841

---

## [On AD of matrix, from Tracker to Zygote](https://discourse.julialang.org/t/on-ad-of-matrix-from-tracker-to-zygote/33667)

<div class="topic-metadata">

**Author:** [@vavrines](https://discourse.julialang.org/u/vavrines)\
**Replies:** 3\
**Last updated:** [January 22, 2020, 5:01pm UTC](https://discourse.julialang.org/t/on-ad-of-matrix-from-tracker-to-zygote/33667 "2020-01-22T17:01:44Z")

</div>

Since the Flux has moved to Zygote, I tried to modify some previous codes. The motivation is to calculate second-order derivatives of a matrix, but I met the following errors. With the setup x0 = 0.0; x1 = 2.0 y0 = 0.…

---

## [Create unit from string with Unitful.jl](https://discourse.julialang.org/t/create-unit-from-string-with-unitful-jl/33666)

<div class="topic-metadata">

**Author:** [@moesphere](https://discourse.julialang.org/u/moesphere)\
**Replies:** 1\
**Last updated:** [January 22, 2020, 4:13pm UTC](https://discourse.julialang.org/t/create-unit-from-string-with-unitful-jl/33666 "2020-01-22T16:13:18Z")

</div>

Is it possible to create a unit from a string with the Unitful.jl package at runtime without using eval? Something like this: unit\_str = "mol/L" unitful\_unit = unit(unit\_str) I only found u"..." and @u\_str, where stri…

---

## [Can't use NDSparse Created Using Query.jl](https://discourse.julialang.org/t/cant-use-ndsparse-created-using-query-jl/33620)

<div class="topic-metadata">

**Author:** [@HBreddam](https://discourse.julialang.org/u/HBreddam)\
**Replies:** 2\
**Last updated:** [January 22, 2020, 3:25pm UTC](https://discourse.julialang.org/t/cant-use-ndsparse-created-using-query-jl/33620 "2020-01-22T15:25:22Z")

</div>

Hi I want i have my data in Indexed tables and want to use Query.jl to make NDSparse tables for use in a creating a MIP model using JuMP. However when i have created the NDSparse test as seen below, i can’t get the dat…

---

## [Writing to file removes escape char](https://discourse.julialang.org/t/writing-to-file-removes-escape-char/33637)

<div class="topic-metadata">

**Author:** [@essenciary](https://discourse.julialang.org/u/essenciary)\
**Replies:** 6\
**Last updated:** [January 22, 2020, 2:31pm UTC](https://discourse.julialang.org/t/writing-to-file-removes-escape-char/33637 "2020-01-22T14:31:00Z")

</div>

I have this string s julia\> s = "abc.\\$foo" julia\> s "abc.\\$foo" When I write it to file, this happens: julia\> open("moo.jl", "w") do io write(io, s) end 8 And in moo.jl I have: abc.$foo So I get $fo…

---

## [Loading of Flux model using BSON: Tracker not found error?](https://discourse.julialang.org/t/loading-of-flux-model-using-bson-tracker-not-found-error/33659)

<div class="topic-metadata">

**Author:** [@compleat](https://discourse.julialang.org/u/compleat)\
**Replies:** 0\
**Last updated:** [January 22, 2020, 1:12pm UTC](https://discourse.julialang.org/t/loading-of-flux-model-using-bson-tracker-not-found-error/33659 "2020-01-22T13:12:08Z")

</div>

I am having difficulty loading a BSON-saved Flux model via: BSON.@load “my\_model.jls” resulting the error ERROR: LoadError: UndefVarError: Tracker not defined even though I had explicitly loaded Tracker via using Fl…

---

## [Julia: Juno's evalrepl deprecated on Atom](https://discourse.julialang.org/t/julia-junos-evalrepl-deprecated-on-atom/31842)

<div class="topic-metadata">

**Author:** [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Replies:** 6\
**Last updated:** [January 22, 2020, 12:46pm UTC](https://discourse.julialang.org/t/julia-junos-evalrepl-deprecated-on-atom/31842 "2020-01-22T12:46:10Z")

</div>

Hello, I am using Atom 1.33 as an IDE for Julia 1.3. At startup I get: Starting Julia... \_ \_ \_ \_(\_)\_ | Documentation: \[https://docs.julialang.org\](https://docs.julialang.org/) (\_) | (…

---

## [DEPOT\_PATH undefined despite JULIA\_DEPOT\_PATH being defined in the Environment](https://discourse.julialang.org/t/depot-path-undefined-despite-julia-depot-path-being-defined-in-the-environment/33453)

<div class="topic-metadata">

**Author:** [@compleat](https://discourse.julialang.org/u/compleat)\
**Replies:** 27\
**Last updated:** [January 22, 2020, 10:32am UTC](https://discourse.julialang.org/t/depot-path-undefined-despite-julia-depot-path-being-defined-in-the-environment/33453 "2020-01-22T10:32:30Z")

</div>

I have had Julia1.2 installed on a remote linux server and can start it up and run commands, but cannot import any modules (e.g. ‘using Pkg’) I get the error ERROR: LoadError: UndefVarError: DEPOT\_PATH not defined All …

---

## [Julia package not up-to-date](https://discourse.julialang.org/t/julia-package-not-up-to-date/33653)

<div class="topic-metadata">

**Author:** [@nxtruong](https://discourse.julialang.org/u/nxtruong)\
**Replies:** 1\
**Last updated:** [January 22, 2020, 8:07am UTC](https://discourse.julialang.org/t/julia-package-not-up-to-date/33653 "2020-01-22T08:07:47Z")

</div>

I am using Julia version 1.3.1 (2019-12-30) on Mac OS, official binary downloaded from Julia website. I wanted to add the package Parametron, so I used Julia’s Pkg interface to add it. It reported that the version of Pa…

---

## [\[ANN\] MonteCarloMeasurements.jl](https://discourse.julialang.org/t/ann-montecarlomeasurements-jl/23021)

<div class="topic-metadata">

**Author:** [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)\
**Replies:** 34\
**Last updated:** [January 22, 2020, 8:05am UTC](https://discourse.julialang.org/t/ann-montecarlomeasurements-jl/23021 "2020-01-22T08:05:44Z")

</div>

As a spinoff from a homework we gave in our julia course at our department, I created a small package to do nonlinear uncertainty propagation, MonteCarloMeasurements.jl. This package provides two types Particles \<: Real …

---

## [I've written softmax() function, but I don't get the proper answer](https://discourse.julialang.org/t/ive-written-softmax-function-but-i-dont-get-the-proper-answer/33610)

<div class="topic-metadata">

**Author:** [@dialektike](https://discourse.julialang.org/u/dialektike)\
**Replies:** 2\
**Last updated:** [January 22, 2020, 4:36am UTC](https://discourse.julialang.org/t/ive-written-softmax-function-but-i-dont-get-the-proper-answer/33610 "2020-01-22T04:36:32Z")

</div>

In order to study ML, I’m making my own softmax () function. I created a softmax () function as follows: function softmax(a) c = maximum(a) exp.(a .- c) / sum(exp.(a .- c)) end The sum of the values in the outp…

---

## [How to parameterize the name of a struct?](https://discourse.julialang.org/t/how-to-parameterize-the-name-of-a-struct/33623)

<div class="topic-metadata">

**Author:** [@Iulian.Cioarca](https://discourse.julialang.org/u/Iulian.Cioarca)\
**Replies:** 9\
**Last updated:** [January 21, 2020, 11:20pm UTC](https://discourse.julialang.org/t/how-to-parameterize-the-name-of-a-struct/33623 "2020-01-21T23:20:59Z")

</div>

I would like to define in an automatic way a struct like: struct MyStruct some\_field end where the struct name “MyStruct” can be read from a string array. I found https://github.com/cstjean/QuickTypes.jl, but from m…

---

## [Newcomer's guide to Julia package manager](https://discourse.julialang.org/t/newcomers-guide-to-julia-package-manager/33492)

<div class="topic-metadata">

**Author:** [@aaowens](https://discourse.julialang.org/u/aaowens)\
**Replies:** 14\
**Last updated:** [January 21, 2020, 9:12pm UTC](https://discourse.julialang.org/t/newcomers-guide-to-julia-package-manager/33492 "2020-01-21T21:12:27Z")

</div>

I wrote a blog post to help beginners understand package management in Julia. The intended audience is people who have no familiarity with the concept of packages, versions, etc. I’ve seen a lot of people try to run some…

---

## [Plot! function does not plot the right distribution](https://discourse.julialang.org/t/plot-function-does-not-plot-the-right-distribution/33635)

<div class="topic-metadata">

**Author:** [@Lixiang\_Wei](https://discourse.julialang.org/u/Lixiang_Wei)\
**Replies:** 3\
**Last updated:** [January 21, 2020, 9:12pm UTC](https://discourse.julialang.org/t/plot-function-does-not-plot-the-right-distribution/33635 "2020-01-21T21:12:22Z")

</div>

Hi, I have a problem when using plot!, which should add a curve of Normal(10,2) fitting on my histogram. However, in my plot, I could see the label for plot!, it is overlapping on x-axis. I am using Mac, my friend is us…

---

## [\`sol.du\` is \`nothing\` in \`DAESolution\`](https://discourse.julialang.org/t/sol-du-is-nothing-in-daesolution/33636)

<div class="topic-metadata">

**Author:** [@zekeriya.sari](https://discourse.julialang.org/u/zekeriya.sari)\
**Replies:** 0\
**Last updated:** [January 21, 2020, 8:32pm UTC](https://discourse.julialang.org/t/sol-du-is-nothing-in-daesolution/33636 "2020-01-21T20:32:37Z")

</div>

I tried the DAEProblem example in the manual of the DifferentialEquations. The example is given is here. using DifferentialEquations using Sundials function f(out,du,u,p,t) out\[1\] = - 0.04u\[1\] + 1e4\*u\[2\]…

---

## [Add \`if\` to for-loops like in comprehensions](https://discourse.julialang.org/t/add-if-to-for-loops-like-in-comprehensions/33632)

<div class="topic-metadata">

**Author:** [@bjarthur](https://discourse.julialang.org/u/bjarthur)\
**Replies:** 5\
**Last updated:** [January 21, 2020, 7:55pm UTC](https://discourse.julialang.org/t/add-if-to-for-loops-like-in-comprehensions/33632 "2020-01-21T19:55:07Z")

</div>

apologies if this has been discussed before, but i was surprised it didn’t work when i naively tried it: julia\> for i in 1:10 if i\>3 @info i end ERROR: syntax: incomplete: "for" at REPL\[1\]:1 requires end …

---

## [More specific definition for DenseArray](https://discourse.julialang.org/t/more-specific-definition-for-densearray/33591)

<div class="topic-metadata">

**Author:** [@emmt](https://discourse.julialang.org/u/emmt)\
**Replies:** 11\
**Last updated:** [January 21, 2020, 6:39pm UTC](https://discourse.julialang.org/t/more-specific-definition-for-densearray/33591 "2020-01-21T18:39:26Z")

</div>

The documentation of a DenseArray{T,N} says: N-dimensional dense array with elements of type T. The elements of a dense array are stored contiguously in memory. but this is a bit unspecific. For instance, my underst…

---

## [Allocations on threaded prefix algorithm](https://discourse.julialang.org/t/allocations-on-threaded-prefix-algorithm/33631)

<div class="topic-metadata">

**Author:** [@squirrel](https://discourse.julialang.org/u/squirrel)\
**Replies:** 0\
**Last updated:** [January 21, 2020, 6:10pm UTC](https://discourse.julialang.org/t/allocations-on-threaded-prefix-algorithm/33631 "2020-01-21T18:10:43Z")

</div>

I’m going through the Parallel Computing course at juliaacademy.com. They give this example of a prefix code being rewritten in parallel. However, the video does not go through it, and when I run it on my own, I get a lo…

---

## [MINLP optimization with user defined objective function](https://discourse.julialang.org/t/minlp-optimization-with-user-defined-objective-function/33627)

<div class="topic-metadata">

**Author:** [@martina](https://discourse.julialang.org/u/martina)\
**Replies:** 3\
**Last updated:** [January 21, 2020, 4:45pm UTC](https://discourse.julialang.org/t/minlp-optimization-with-user-defined-objective-function/33627 "2020-01-21T16:45:37Z")

</div>

Hello, I’m still very new with Julia, and I’m having troubles with my MINLP optimization problem that I used to solve with MATLAB. I can’t find a way to provide an user-defined objective function to the @NLobjective ma…

---

## [Nested index for a collection of JuMP variables?](https://discourse.julialang.org/t/nested-index-for-a-collection-of-jump-variables/33504)

<div class="topic-metadata">

**Author:** [@ccoffrin](https://discourse.julialang.org/u/ccoffrin)\
**Replies:** 2\
**Last updated:** [January 21, 2020, 4:40pm UTC](https://discourse.julialang.org/t/nested-index-for-a-collection-of-jump-variables/33504 "2020-01-21T16:40:09Z")

</div>

I would like to build a two index JuMP variable that can be accessed like x\[i\]\[j\] rather than x\[i,j\] is there a way to acomplish this with the @variable macro?

---

## [Parallelizaton on GPU slower than on CPU...?](https://discourse.julialang.org/t/parallelizaton-on-gpu-slower-than-on-cpu/33587)

<div class="topic-metadata">

**Author:** [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Replies:** 10\
**Last updated:** [January 21, 2020, 2:54pm UTC](https://discourse.julialang.org/t/parallelizaton-on-gpu-slower-than-on-cpu/33587 "2020-01-21T14:54:51Z")

</div>

I built a new PC and I’ve been toying around with some code just to see how it performs and I’m trying to understand why the following code (from the CUDA.jl docs) runs slower on my GPU than on my CPU (I have a Ryzen 9 3…

---

## [How can I get this to infer types?](https://discourse.julialang.org/t/how-can-i-get-this-to-infer-types/33617)

<div class="topic-metadata">

**Author:** [@Per](https://discourse.julialang.org/u/Per)\
**Replies:** 1\
**Last updated:** [January 21, 2020, 2:31pm UTC](https://discourse.julialang.org/t/how-can-i-get-this-to-infer-types/33617 "2020-01-21T14:31:36Z")

</div>

I’m having problems getting my code to infer a return type correctly. Here’s a MWE: using Test struct TwoTo{N} end @inline t(g::Base.Generator{\<:TwoTo{N}, F}) where {N,F} = ntuple(i-\>g.f(i+1), Val{N-1}()) f(r) = t(t(i f…

---

## [Voices of experience - abstract types as classes or interfaces?](https://discourse.julialang.org/t/voices-of-experience-abstract-types-as-classes-or-interfaces/33609)

<div class="topic-metadata">

**Author:** [@tro3](https://discourse.julialang.org/u/tro3)\
**Replies:** 4\
**Last updated:** [January 21, 2020, 1:56pm UTC](https://discourse.julialang.org/t/voices-of-experience-abstract-types-as-classes-or-interfaces/33609 "2020-01-21T13:56:25Z")

</div>

Not looking to start a religious war of any sort - just looking for the voices of experience before I dive into this next thing. I am new to Julia, but coming to the conclusion based on the dispatch behavior that I shou…

---

## [Recommendations for a Web App for Noob](https://discourse.julialang.org/t/recommendations-for-a-web-app-for-noob/15931)

<div class="topic-metadata">

**Author:** [@rickhg12hs](https://discourse.julialang.org/u/rickhg12hs)\
**Replies:** 18\
**Last updated:** [January 21, 2020, 1:19pm UTC](https://discourse.julialang.org/t/recommendations-for-a-web-app-for-noob/15931 "2020-01-21T13:19:24Z")

</div>

I’d like to make a very basic WebApp running locally where the user can see some basic text/graphics, select various options, toggles, items from a list, input text, select files, set parameters, etc. Underneath (the gut…

---

## [How to setup Julia workers to use specific number of cores?](https://discourse.julialang.org/t/how-to-setup-julia-workers-to-use-specific-number-of-cores/33597)

<div class="topic-metadata">

**Author:** [@indycdrom](https://discourse.julialang.org/u/indycdrom)\
**Replies:** 5\
**Last updated:** [January 21, 2020, 11:05am UTC](https://discourse.julialang.org/t/how-to-setup-julia-workers-to-use-specific-number-of-cores/33597 "2020-01-21T11:05:27Z")

</div>

I am a beginner, so I am trying my best to describe my issue as clearly as possible. I installed julia 1.2.0 in a windows 2012 with 2 CPU/socket (22 cores in each CPU) and 512GB RAM. I am wondering whether I can start …

---

## [Silly question. How to add a row to array?](https://discourse.julialang.org/t/silly-question-how-to-add-a-row-to-array/33601)

<div class="topic-metadata">

**Author:** [@BMval](https://discourse.julialang.org/u/BMval)\
**Replies:** 12\
**Last updated:** [January 21, 2020, 12:32pm UTC](https://discourse.julialang.org/t/silly-question-how-to-add-a-row-to-array/33601 "2020-01-21T12:32:48Z")

</div>

Very simple question. Please help me. a= \[2 3; 5 6\] push!(a, \[1 2\]) - does’t work append!(a, \[1 2\]) - doesn’t work thanks

---

## [Minor style question: promotion inside constructor and new](https://discourse.julialang.org/t/minor-style-question-promotion-inside-constructor-and-new/33615)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 4\
**Last updated:** [January 21, 2020, 12:31pm UTC](https://discourse.julialang.org/t/minor-style-question-promotion-inside-constructor-and-new/33615 "2020-01-21T12:31:03Z")

</div>

This is a minor style question: I have a solution but it is a bit convoluted, and I wonder how others do it. Suppose I want to cache something precomputed in a struct in the constructor (this is the only constructor, an…

---

## [Fix domain of von Mises distribution (Distributions.jl) to -π ~ + π](https://discourse.julialang.org/t/fix-domain-of-von-mises-distribution-distributions-jl-to/33613)

<div class="topic-metadata">

**Author:** [@SSU](https://discourse.julialang.org/u/SSU)\
**Replies:** 0\
**Last updated:** [January 21, 2020, 9:52am UTC](https://discourse.julialang.org/t/fix-domain-of-von-mises-distribution-distributions-jl-to/33613 "2020-01-21T09:52:49Z")

</div>

I am analyzing circular mixture time series data which the domain is \\pm \\pi. I am planning to use von Mises distribution in HMMBase.jl ( or Turing.jl) to estimate the parameters(e.g. \\mu, \\kappa) of my data. In Distri…

---

## [Issues updating to Julia 1.3.1](https://discourse.julialang.org/t/issues-updating-to-julia-1-3-1/33602)

<div class="topic-metadata">

**Author:** [@squirrel](https://discourse.julialang.org/u/squirrel)\
**Replies:** 2\
**Last updated:** [January 21, 2020, 7:30am UTC](https://discourse.julialang.org/t/issues-updating-to-julia-1-3-1/33602 "2020-01-21T07:30:25Z")

</div>

I had been running JuliaPro 1.2 in Atom 1.40.1 x64. I wanted to update to Julia 1.3 because I’m under the impression that it has more powerful multithreading. I downloaded julia and installed the Windows 64-bit exe from…

---

## [Is there in Julia something similar to min(X, Y) of Matlab where X and Y are matrices of same dimensions](https://discourse.julialang.org/t/is-there-in-julia-something-similar-to-min-x-y-of-matlab-where-x-and-y-are-matrices-of-same-dimensions/33475)

<div class="topic-metadata">

**Author:** [@Ujku\_KU](https://discourse.julialang.org/u/Ujku_KU)\
**Replies:** 4\
**Last updated:** [January 21, 2020, 6:25am UTC](https://discourse.julialang.org/t/is-there-in-julia-something-similar-to-min-x-y-of-matlab-where-x-and-y-are-matrices-of-same-dimensions/33475 "2020-01-21T06:25:17Z")

</div>

Hi guys, just wondering if there is a function in Julia similar to min(X, Y) (where X and Y are matrices of same dimension) of Matlab. The result is a matrix of the same dimensions as X and Y with elements t…

---

## [Why \`Tuple{Vararg{T, 2} where T} == Tuple{Any, Any}\`?](https://discourse.julialang.org/t/why-tuple-vararg-t-2-where-t-tuple-any-any/33511)

<div class="topic-metadata">

**Author:** [@Wenjie](https://discourse.julialang.org/u/Wenjie)\
**Replies:** 2\
**Last updated:** [January 21, 2020, 1:39am UTC](https://discourse.julialang.org/t/why-tuple-vararg-t-2-where-t-tuple-any-any/33511 "2020-01-21T01:39:20Z")

</div>

Why this is the case, instead of being a UnionAll like Arrays?

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

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