# Latest

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

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

**Page:** 1976

---

## [Julia plot not saved properly](https://discourse.julialang.org/t/julia-plot-not-saved-properly/25162)

<div class="topic-metadata">

**Author:** [@surajp92](https://discourse.julialang.org/u/surajp92)\
**Replies:** 8\
**Last updated:** [June 19, 2019, 9:38pm UTC](https://discourse.julialang.org/t/julia-plot-not-saved-properly/25162 "2019-06-19T21:38:21Z")

</div>

I am using Plots to create the XY plot and then saving it in the pdf format. But the text in the ylabel is not saved properly. The power of the 10 is not saved and the number appears like 1.0X10 instead of 1.0X10^-8. Bel…

---

## [JuliaBox needs an update](https://discourse.julialang.org/t/juliabox-needs-an-update/25457)

<div class="topic-metadata">

**Author:** [@Paul\_Soderlind](https://discourse.julialang.org/u/Paul_Soderlind)\
**Replies:** 0\
**Last updated:** [June 19, 2019, 7:50pm UTC](https://discourse.julialang.org/t/juliabox-needs-an-update/25457 "2019-06-19T19:50:58Z")

</div>

Hi, JuliaBox currently offers 0.6 and 1.03, with an emphasis on 0.6 (easier package handling, etc). I kindly ask for a road map. In particular, is a move to 1.1.1 (or at least 1.04) in the pipe line? The reason for ask…

---

## [Question about @threads](https://discourse.julialang.org/t/question-about-threads/25404)

<div class="topic-metadata">

**Author:** [@jw3126](https://discourse.julialang.org/u/jw3126)\
**Replies:** 3\
**Last updated:** [June 19, 2019, 7:17pm UTC](https://discourse.julialang.org/t/question-about-threads/25404 "2019-06-19T19:17:50Z")

</div>

I have some workload and want to work on it using all threads. If I do Threads.@threads for \_ in 1:nthreads() # doit end Is it guaranteed, that all threads are used, or could it be that one thread occurs multiple …

---

## [Result diverges on 129th iteration?](https://discourse.julialang.org/t/result-diverges-on-129th-iteration/25453)

<div class="topic-metadata">

**Author:** [@chakravala](https://discourse.julialang.org/u/chakravala)\
**Replies:** 3\
**Last updated:** [June 19, 2019, 7:01pm UTC](https://discourse.julialang.org/t/result-diverges-on-129th-iteration/25453 "2019-06-19T19:01:43Z")

</div>

My goal is to make the implementation of my qlog function specialized for MultiVector types. In the Grassmann.jl package, I have the generic Grassmann.qlog implementation, which has a lot of unnecessary allocations made…

---

## [Question about UndefVarError in for loop](https://discourse.julialang.org/t/question-about-undefvarerror-in-for-loop/25442)

<div class="topic-metadata">

**Author:** [@RaquelSantos](https://discourse.julialang.org/u/RaquelSantos)\
**Replies:** 2\
**Last updated:** [June 19, 2019, 6:03pm UTC](https://discourse.julialang.org/t/question-about-undefvarerror-in-for-loop/25442 "2019-06-19T18:03:20Z")

</div>

@variable(model,Y\[1:n\], lower\_bound=0) T = Float64.(model.TP) D = Float64.(model.TD) Yy = transpose(Y) a = Int64 b = Int64 a = 1 b = n for j in 1:m @constraint(model,Yy\[1:n\].\*T\[a:b\] .\<= D\[j\]) a = a+n b = b+n …

---

## [Approach to avoid memory allocation with struct with abstract type fields](https://discourse.julialang.org/t/approach-to-avoid-memory-allocation-with-struct-with-abstract-type-fields/24822)

<div class="topic-metadata">

**Author:** [@sfriedowitz](https://discourse.julialang.org/u/sfriedowitz)\
**Replies:** 8\
**Last updated:** [June 19, 2019, 5:47pm UTC](https://discourse.julialang.org/t/approach-to-avoid-memory-allocation-with-struct-with-abstract-type-fields/24822 "2019-06-19T17:47:46Z")

</div>

I am working on some molecular simulation code, and am hitting a road block on figuring on a good design structure to avoid memory allocation for a container that will store different concrete subtypes of a single abstra…

---

## [How to plot a timeline](https://discourse.julialang.org/t/how-to-plot-a-timeline/25095)

<div class="topic-metadata">

**Author:** [@Yifan\_Liu](https://discourse.julialang.org/u/Yifan_Liu)\
**Replies:** 23\
**Last updated:** [June 19, 2019, 5:13pm UTC](https://discourse.julialang.org/t/how-to-plot-a-timeline/25095 "2019-06-19T17:13:25Z")

</div>

I want to ask how I can plot a timeline like this one in Julia

---

## [Write out an animation incrementally](https://discourse.julialang.org/t/write-out-an-animation-incrementally/25410)

<div class="topic-metadata">

**Author:** [@samo](https://discourse.julialang.org/u/samo)\
**Replies:** 12\
**Last updated:** [June 19, 2019, 5:05pm UTC](https://discourse.julialang.org/t/write-out-an-animation-incrementally/25410 "2019-06-19T17:05:02Z")

</div>

Context Until now, I have been using the following approach to create animations: using Plots anim = Animation(); for it = 1:nt # Computations # ... # Visualization (e.g. every 10th time step) if mod(i…

---

## [Mapslices causes an error with Flux and GPU arrays](https://discourse.julialang.org/t/mapslices-causes-an-error-with-flux-and-gpu-arrays/25448)

<div class="topic-metadata">

**Author:** [@tanhevg](https://discourse.julialang.org/u/tanhevg)\
**Replies:** 2\
**Last updated:** [June 19, 2019, 3:46pm UTC](https://discourse.julialang.org/t/mapslices-causes-an-error-with-flux-and-gpu-arrays/25448 "2019-06-19T15:46:49Z")

</div>

I wonder, if this is a known issue. Quick Google search has not revealed anything. using CuArrays, Flux f(x) = sum(mapslices(t-\>sqrt(sum(t.\*t)), x, dims=2)) df(x) = Tracker.gradient(f, x) x = rand(10, 10) |\> gpu df(x) E…

---

## [Dispatch on decorated (sub)types](https://discourse.julialang.org/t/dispatch-on-decorated-sub-types/25396)

<div class="topic-metadata">

**Author:** [@kellertuer](https://discourse.julialang.org/u/kellertuer)\
**Replies:** 6\
**Last updated:** [June 19, 2019, 3:33pm UTC](https://discourse.julialang.org/t/dispatch-on-decorated-sub-types/25396 "2019-06-19T15:33:03Z")

</div>

I was just wondering on how one could do multiple dispatch when using a decorator pattern and subtypes. Imagine the following example abstract type A end struct A1 \<: A c::Int end struct A2 \<: A c::Float64 end …

---

## [Performance Help, Algorithm Is Not Scaling Well](https://discourse.julialang.org/t/performance-help-algorithm-is-not-scaling-well/25315)

<div class="topic-metadata">

**Author:** [@dburch](https://discourse.julialang.org/u/dburch)\
**Replies:** 15\
**Last updated:** [June 19, 2019, 3:02pm UTC](https://discourse.julialang.org/t/performance-help-algorithm-is-not-scaling-well/25315 "2019-06-19T15:02:58Z")

</div>

I have an array with arrays inside. I created an algorithm to find duplicated elements in arrays in the array. It works correctly, but when I start scaling up to thousands or tens of thousands of records, then it is not …

---

## [How to pass the output of custom layers into Dense layer](https://discourse.julialang.org/t/how-to-pass-the-output-of-custom-layers-into-dense-layer/25421)

<div class="topic-metadata">

**Author:** [@stu](https://discourse.julialang.org/u/stu)\
**Replies:** 1\
**Last updated:** [June 19, 2019, 2:16pm UTC](https://discourse.julialang.org/t/how-to-pass-the-output-of-custom-layers-into-dense-layer/25421 "2019-06-19T14:16:03Z")

</div>

I am trying to do the following example: using Flux encoderA = Dense(10, 2) encoderB(x) = atan(x\[2\], x\[1\]) decoderA(x) = \[\[cos(x)\], \[sin(x)\]\] decoderB = Dense(2, 10) m1 = Chain(encoderA, encoderB, decoderA, decoderB) …

---

## [Does compilation time for methods depend on input?](https://discourse.julialang.org/t/does-compilation-time-for-methods-depend-on-input/25440)

<div class="topic-metadata">

**Author:** [@srb](https://discourse.julialang.org/u/srb)\
**Replies:** 5\
**Last updated:** [June 19, 2019, 1:12pm UTC](https://discourse.julialang.org/t/does-compilation-time-for-methods-depend-on-input/25440 "2019-06-19T13:12:16Z")

</div>

Just a simple questions about compile times, Say I have a function that takes an Integer argument and does some calculations depending on said integer. Does the compilation time depend on how big the integer is? Say, f…

---

## [How to make parallel subprocesses?](https://discourse.julialang.org/t/how-to-make-parallel-subprocesses/25005)

<div class="topic-metadata">

**Author:** [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)\
**Replies:** 6\
**Last updated:** [June 19, 2019, 10:56am UTC](https://discourse.julialang.org/t/how-to-make-parallel-subprocesses/25005 "2019-06-19T10:56:46Z")

</div>

I am trying to create small subprocesses that would operate in parallel to my main process. In the example below I have 10 different agents that are callable and that generate some numbers. I am interested in saving thes…

---

## [Splatting extra keyword arguments?](https://discourse.julialang.org/t/splatting-extra-keyword-arguments/25423)

<div class="topic-metadata">

**Author:** [@dstarerstor](https://discourse.julialang.org/u/dstarerstor)\
**Replies:** 4\
**Last updated:** [June 19, 2019, 4:19am UTC](https://discourse.julialang.org/t/splatting-extra-keyword-arguments/25423 "2019-06-19T04:19:39Z")

</div>

I recently tried to splat a collection of extra keyword arguments from one function into another and found it very weird that they are interpreted as non-keyword argument pairs by the second function. For example, take t…

---

## [Relaxing constraint of Complex](https://discourse.julialang.org/t/relaxing-constraint-of-complex/25317)

<div class="topic-metadata">

**Author:** [@adamnemecek](https://discourse.julialang.org/u/adamnemecek)\
**Replies:** 10\
**Last updated:** [June 19, 2019, 12:05am UTC](https://discourse.julialang.org/t/relaxing-constraint-of-complex/25317 "2019-06-19T00:05:21Z")

</div>

Hello, currently Complex is defined as follows struct Complex{T\<:Real} \<: Number re::T im::T end I think that it would make sense to relax the T requirement from Real to Number (or something else). E.g. Maybe …

---

## [JuliaDB - Saving to CSV](https://discourse.julialang.org/t/juliadb-saving-to-csv/7509)

<div class="topic-metadata">

**Author:** [@sdmcallister](https://discourse.julialang.org/u/sdmcallister)\
**Replies:** 11\
**Last updated:** [June 18, 2019, 9:30pm UTC](https://discourse.julialang.org/t/juliadb-saving-to-csv/7509 "2019-06-18T21:30:04Z")

</div>

If I have a table with 36 columns and 500,000 plus rows, is there an established method for saving the table as a .CSV for use in other applications? Thanks

---

## [Nested ArrayPartition cause reduce over an empty collection](https://discourse.julialang.org/t/nested-arraypartition-cause-reduce-over-an-empty-collection/25424)

<div class="topic-metadata">

**Author:** [@shipengcheng1230](https://discourse.julialang.org/u/shipengcheng1230)\
**Replies:** 0\
**Last updated:** [June 18, 2019, 8:40pm UTC](https://discourse.julialang.org/t/nested-arraypartition-cause-reduce-over-an-empty-collection/25424 "2019-06-18T20:40:40Z")

</div>

Hi, I was trying to simulate a physical system consisting of heterogeneous subpart sizes (i.e. arrays), so I use RecursiveArrayTools. Consider the following MWE: julia\> using DifferentialEquations julia\> function foo(d…

---

## [ERROR: Unsatisfiable requirements detected for package ASTInterpreter2 \[e6d88f4b\]](https://discourse.julialang.org/t/error-unsatisfiable-requirements-detected-for-package-astinterpreter2-e6d88f4b/22225)

<div class="topic-metadata">

**Author:** [@Mohammed\_Sabbah](https://discourse.julialang.org/u/Mohammed_Sabbah)\
**Replies:** 6\
**Last updated:** [June 18, 2019, 8:04pm UTC](https://discourse.julialang.org/t/error-unsatisfiable-requirements-detected-for-package-astinterpreter2-e6d88f4b/22225 "2019-06-18T20:04:51Z")

</div>

Hi, I am trying to add some packages but the following error arise: (v1.0) pkg\> add Makie Resolving package versions... ERROR: Unsatisfiable requirements detected for package ASTInterpreter2 \[e6d88f4b\]: ASTInterpreter…

---

## [Generic function to call arbitrary Julia function and its arguments](https://discourse.julialang.org/t/generic-function-to-call-arbitrary-julia-function-and-its-arguments/25407)

<div class="topic-metadata">

**Author:** [@mrVeng](https://discourse.julialang.org/u/mrVeng)\
**Replies:** 6\
**Last updated:** [June 18, 2019, 7:25pm UTC](https://discourse.julialang.org/t/generic-function-to-call-arbitrary-julia-function-and-its-arguments/25407 "2019-06-18T19:25:59Z")

</div>

Hi there, I am currently migrating from R. In R, i used the “do.call” function for many of own functions, which is a generic function that allows to call any arbitrary R function with its arguments in a string. This co…

---

## [What datatypes can you pass into train!](https://discourse.julialang.org/t/what-datatypes-can-you-pass-into-train/25377)

<div class="topic-metadata">

**Author:** [@stu](https://discourse.julialang.org/u/stu)\
**Replies:** 3\
**Last updated:** [June 18, 2019, 7:02pm UTC](https://discourse.julialang.org/t/what-datatypes-can-you-pass-into-train/25377 "2019-06-18T19:02:10Z")

</div>

cannot find good documentation of this anywhere

---

## [JuliaDB w/ Workers on Remote Machine](https://discourse.julialang.org/t/juliadb-w-workers-on-remote-machine/25412)

<div class="topic-metadata">

**Author:** [@versipellis](https://discourse.julialang.org/u/versipellis)\
**Replies:** 2\
**Last updated:** [June 18, 2019, 6:25pm UTC](https://discourse.julialang.org/t/juliadb-w-workers-on-remote-machine/25412 "2019-06-18T18:25:36Z")

</div>

I have a workflow set up right now where I want to use my laptop as the master process, with addprocs(machine\_spec) pointing to a remote machine I’m SSHing to (with Julia and all dependencies installed). The data is stor…

---

## [\[ANN\] JuDoc.jl: a static site generator in Julia](https://discourse.julialang.org/t/ann-judoc-jl-a-static-site-generator-in-julia/23693)

<div class="topic-metadata">

**Author:** [@tlienart](https://discourse.julialang.org/u/tlienart)\
**Replies:** 15\
**Last updated:** [June 18, 2019, 5:07pm UTC](https://discourse.julialang.org/t/ann-judoc-jl-a-static-site-generator-in-julia/23693 "2019-06-18T17:07:22Z")

</div>

Hi, JuDoc.jl is a simple static site generator (SSG) for Julia with a focus on simplicity, technical blogging and light, fast-loading pages. It is inspired from an older simple SSG: Jemdoc (in python). There’s a multi…

---

## [Difference between f(T::Type) and f(::Type{T}) where T?](https://discourse.julialang.org/t/difference-between-f-t-type-and-f-type-t-where-t/25402)

<div class="topic-metadata">

**Author:** [@sairus7](https://discourse.julialang.org/u/sairus7)\
**Replies:** 9\
**Last updated:** [June 18, 2019, 5:02pm UTC](https://discourse.julialang.org/t/difference-between-f-t-type-and-f-type-t-where-t/25402 "2019-06-18T17:02:47Z")

</div>

In particular, in abstract arrays docs there is a method to imlement: similar(A, ::Type{S}, dims::Dims) But in Julia source there is another notation: similar(a::Array, T::Type, dims::Dims{N}) where {N} So, are thees…

---

## [JuMP: filtering the output of JuMP.value.(x)](https://discourse.julialang.org/t/jump-filtering-the-output-of-jump-value-x/25391)

<div class="topic-metadata">

**Author:** [@PatrickHealy](https://discourse.julialang.org/u/PatrickHealy)\
**Replies:** 3\
**Last updated:** [June 18, 2019, 4:42pm UTC](https://discourse.julialang.org/t/jump-filtering-the-output-of-jump-value-x/25391 "2019-06-18T16:42:48Z")

</div>

Is there a nice idiom for filtering all of the elements of a JuMP array of binaries that are set? Even with iterating over the elements of JuMP.value.(x) in a for-loop I don’t seem to be able to catch the indices in a u…

---

## [JuMP v0.19 and CPLEX versions](https://discourse.julialang.org/t/jump-v0-19-and-cplex-versions/25253)

<div class="topic-metadata">

**Author:** [@PatrickHealy](https://discourse.julialang.org/u/PatrickHealy)\
**Replies:** 5\
**Last updated:** [June 18, 2019, 2:09pm UTC](https://discourse.julialang.org/t/jump-v0-19-and-cplex-versions/25253 "2019-06-18T14:09:06Z")

</div>

Greetings. While upgrading to julia 1.1.1 I thought it would be a good time to upgrade to JuMP 0.19. However, I could not add the CPLEX package (the executable and libraries could not be found) because CPLEX12.6 is not…

---

## [Question about arrays](https://discourse.julialang.org/t/question-about-arrays/25405)

<div class="topic-metadata">

**Author:** [@RaquelSantos](https://discourse.julialang.org/u/RaquelSantos)\
**Replies:** 1\
**Last updated:** [June 18, 2019, 1:12pm UTC](https://discourse.julialang.org/t/question-about-arrays/25405 "2019-06-18T13:12:30Z")

</div>

@variable(model,Y\[1:n\], lower\_bound=0) T = Float64.(model.TP) a = Int64 b = Int64 a = 1 b = n Y\[1:n\]\*T\[a:b\] - MethodError: no method matching \*(::Array{VariableRef,1}, ::Array{Float64,1})

---

## [Anyone making a Julia MUD?](https://discourse.julialang.org/t/anyone-making-a-julia-mud/25361)

<div class="topic-metadata">

**Author:** [@cce](https://discourse.julialang.org/u/cce)\
**Replies:** 14\
**Last updated:** [June 18, 2019, 12:43pm UTC](https://discourse.julialang.org/t/anyone-making-a-julia-mud/25361 "2019-06-18T12:43:47Z")

</div>

So, it’s way off to left field, but is anyone working on a MUD in Julia? In particular, I’m looking for an introduction to Julia book for a small cohort of middle-school kids and one way that I think they could be drawn …

---

## [How to specify the type of a Tracked CuArray?](https://discourse.julialang.org/t/how-to-specify-the-type-of-a-tracked-cuarray/25406)

<div class="topic-metadata">

**Author:** [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)\
**Replies:** 0\
**Last updated:** [June 18, 2019, 12:37pm UTC](https://discourse.julialang.org/t/how-to-specify-the-type-of-a-tracked-cuarray/25406 "2019-06-18T12:37:41Z")

</div>

Hello, I have a function that calls neural networks on the gpu and I would like to specify the return type for performances. using Flux net = Chain(Dense(3,2,relu)) |\> gpu function foo(net::Chain, input::CuArray{Float3…

---

## [Isbits functions with parameter arguments](https://discourse.julialang.org/t/isbits-functions-with-parameter-arguments/25397)

<div class="topic-metadata">

**Author:** [@fedoroff](https://discourse.julialang.org/u/fedoroff)\
**Replies:** 4\
**Last updated:** [June 18, 2019, 12:02pm UTC](https://discourse.julialang.org/t/isbits-functions-with-parameter-arguments/25397 "2019-06-18T12:02:06Z")

</div>

Imagine, I have a function that depends on some parameters, like step functions in DIfferentialEuations.jl. I would like to define these parameters once and avoid passing them as arguments at every function call. As a so…

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

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