# Latest

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

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

**Page:** 1988

---

## [Iterators.Repeated and Iterators.Take are not AbstractArrays](https://discourse.julialang.org/t/iterators-repeated-and-iterators-take-are-not-abstractarrays/24696)

<div class="topic-metadata">

**Author:** [@jonas-schulze](https://discourse.julialang.org/u/jonas-schulze)\
**Replies:** 4\
**Last updated:** [May 29, 2019, 11:29am UTC](https://discourse.julialang.org/t/iterators-repeated-and-iterators-take-are-not-abstractarrays/24696 "2019-05-29T11:29:19Z")

</div>

I tried to create a bidiagonal matrix using iterators: using .Iterators Bidiagonal(repeated(13, 37), repeated(42), :L) which doesn’t work: ERROR: MethodError: no method matching Bidiagonal(::Base.Iterators.Take{Base.I…

---

## [Cassette: compiler pass to translate branch to function](https://discourse.julialang.org/t/cassette-compiler-pass-to-translate-branch-to-function/24722)

<div class="topic-metadata">

**Author:** [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)\
**Replies:** 0\
**Last updated:** [May 29, 2019, 10:17am UTC](https://discourse.julialang.org/t/cassette-compiler-pass-to-translate-branch-to-function/24722 "2019-05-29T10:17:40Z")

</div>

I would like to use Cassette.jl to implement a compiler pass. The task is to (conditioned on types) translate code that contains a branch into a map over a function that contains the branch. An example of the transformat…

---

## [Building JuMP models through functions](https://discourse.julialang.org/t/building-jump-models-through-functions/24636)

<div class="topic-metadata">

**Author:** [@iharjunk](https://discourse.julialang.org/u/iharjunk)\
**Replies:** 5\
**Last updated:** [May 29, 2019, 10:48am UTC](https://discourse.julialang.org/t/building-jump-models-through-functions/24636 "2019-05-29T10:48:15Z")

</div>

Hello all, I would like to make my Julia/JuMP code more flexible and prepare it for larger test cases. For this I would need to Read in data from a given directory Build a model based on it - here since the model is l…

---

## [A priority queue with a vector of priorities](https://discourse.julialang.org/t/a-priority-queue-with-a-vector-of-priorities/24719)

<div class="topic-metadata">

**Author:** [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Replies:** 1\
**Last updated:** [May 29, 2019, 8:45am UTC](https://discourse.julialang.org/t/a-priority-queue-with-a-vector-of-priorities/24719 "2019-05-29T08:45:33Z")

</div>

This is fairly straightforward. I need to create a structure with keys and priorities. Then, priority queue would be a good candidate. For my understanding, each pair in the default priority queue of Julia has only one k…

---

## [Macro - parse argument type from input string](https://discourse.julialang.org/t/macro-parse-argument-type-from-input-string/24717)

<div class="topic-metadata">

**Author:** [@bernhard](https://discourse.julialang.org/u/bernhard)\
**Replies:** 5\
**Last updated:** [May 29, 2019, 8:21am UTC](https://discourse.julialang.org/t/macro-parse-argument-type-from-input-string/24717 "2019-05-29T08:21:34Z")

</div>

I am trying to define this function (with “Int” as a string argument) through a macro function my\_function\_name(x::Int) return x\*x+one(x) end Here is my best try (which fails). I realize this MWE is not meaningful…

---

## [Errors when building some packages on OS X 10.11](https://discourse.julialang.org/t/errors-when-building-some-packages-on-os-x-10-11/24646)

<div class="topic-metadata">

**Author:** [@Nathaniel](https://discourse.julialang.org/u/Nathaniel)\
**Replies:** 3\
**Last updated:** [May 29, 2019, 4:31am UTC](https://discourse.julialang.org/t/errors-when-building-some-packages-on-os-x-10-11/24646 "2019-05-29T04:31:14Z")

</div>

I am getting errors along the lines of the following when trying to build some packages. The message says it’s an “error” that I’m running OS X 10.11, but I can’t tell if that’s the reason it’s not building, or if the re…

---

## [Optimizing Multidimensional Discrete Trapezoidal Integral](https://discourse.julialang.org/t/optimizing-multidimensional-discrete-trapezoidal-integral/24598)

<div class="topic-metadata">

**Author:** [@francesco.alemanno](https://discourse.julialang.org/u/francesco.alemanno)\
**Replies:** 12\
**Last updated:** [May 28, 2019, 9:45am UTC](https://discourse.julialang.org/t/optimizing-multidimensional-discrete-trapezoidal-integral/24598 "2019-05-28T09:45:00Z")

</div>

Update: Turned the fastest code in this thread in a small self contained package, in case someone needs it. Original Content of the post using BenchmarkTools @fastmath function trapz(x::T1, y::T2) where {fT,T1\<:Abstra…

---

## [Make the work of GC visible?](https://discourse.julialang.org/t/make-the-work-of-gc-visible/24642)

<div class="topic-metadata">

**Author:** [@lobingera](https://discourse.julialang.org/u/lobingera)\
**Replies:** 1\
**Last updated:** [May 28, 2019, 7:49pm UTC](https://discourse.julialang.org/t/make-the-work-of-gc-visible/24642 "2019-05-28T19:49:11Z")

</div>

Is there are recommended way to make the work of GC visible? Like a command line option or compile time option? (or putting breakpoints in /bin/julia and run in gdb …). I’m (still) hunting a sig11 bug in (my) code and t…

---

## [Generate Random Symmetric Matrices with pmap](https://discourse.julialang.org/t/generate-random-symmetric-matrices-with-pmap/24706)

<div class="topic-metadata">

**Author:** [@VincentTam](https://discourse.julialang.org/u/VincentTam)\
**Replies:** 2\
**Last updated:** [May 28, 2019, 7:39pm UTC](https://discourse.julialang.org/t/generate-random-symmetric-matrices-with-pmap/24706 "2019-05-28T19:39:02Z")

</div>

I would like to call Symmetric() inside an @everywhere function, and use pmap to generate an array of Symmetric matrices, which are half of the sizeof normal ones, but I received an UndefVarError. using LinearAlgebra, D…

---

## [No ldiv!(x, A, b) on Bidiagonal matrices](https://discourse.julialang.org/t/no-ldiv-x-a-b-on-bidiagonal-matrices/24704)

<div class="topic-metadata">

**Author:** [@jonas-schulze](https://discourse.julialang.org/u/jonas-schulze)\
**Replies:** 0\
**Last updated:** [May 28, 2019, 6:59pm UTC](https://discourse.julialang.org/t/no-ldiv-x-a-b-on-bidiagonal-matrices/24704 "2019-05-28T18:59:40Z")

</div>

Suppose using LinearAlgebra n = 10 A = Bidiagonal(rand(n,n), :L) F = factorize(A) b = rand(n) x = similar(b) Then F === A and ldiv!(x, F, b) throws a no-method-error while ldiv!(F, b) is fine. Is this intended?

---

## [How to use multithread in IJulia](https://discourse.julialang.org/t/how-to-use-multithread-in-ijulia/24703)

<div class="topic-metadata">

**Author:** [@VincentTam](https://discourse.julialang.org/u/VincentTam)\
**Replies:** 2\
**Last updated:** [May 28, 2019, 6:16pm UTC](https://discourse.julialang.org/t/how-to-use-multithread-in-ijulia/24703 "2019-05-28T18:16:32Z")

</div>

I tried running julia -p2, using IJulia and notebook(), then in my notebook, I ran nprocs(), but it says the function is undefined.

---

## [Monte Carlo problem (distributed computing, DifferentialEquations pkg) with ForwardDiff AD for parameter estimation](https://discourse.julialang.org/t/monte-carlo-problem-distributed-computing-differentialequations-pkg-with-forwarddiff-ad-for-parameter-estimation/24697)

<div class="topic-metadata">

**Author:** [@moesphere](https://discourse.julialang.org/u/moesphere)\
**Replies:** 1\
**Last updated:** [May 28, 2019, 4:41pm UTC](https://discourse.julialang.org/t/monte-carlo-problem-distributed-computing-differentialequations-pkg-with-forwarddiff-ad-for-parameter-estimation/24697 "2019-05-28T16:41:44Z")

</div>

I am trying to use a Monte Carlo problem (distributed computing) from the Differential Equations package for parameter estimation using AD from ForwardDiff. It is working when I define the objective function directly in…

---

## [Recommendations for how to browse source code](https://discourse.julialang.org/t/recommendations-for-how-to-browse-source-code/24303)

<div class="topic-metadata">

**Author:** [@Ross\_Boylan](https://discourse.julialang.org/u/Ross_Boylan)\
**Replies:** 25\
**Last updated:** [May 28, 2019, 4:28pm UTC](https://discourse.julialang.org/t/recommendations-for-how-to-browse-source-code/24303 "2019-05-28T16:28:08Z")

</div>

I want to understand how the GLM package works by looking at the source code. I used the package manager’s develop command to get the code. I asked for a local install, thinking it would go to my local directory. Bu…

---

## [Fun with Flux and Differential equations?](https://discourse.julialang.org/t/fun-with-flux-and-differential-equations/24676)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 12\
**Last updated:** [May 28, 2019, 4:04pm UTC](https://discourse.julialang.org/t/fun-with-flux-and-differential-equations/24676 "2019-05-28T16:04:15Z")

</div>

I’m playing around with machine learning (Flux) for dynamic systems. To make things concrete and simple, I have invented a scalar system: \\frac{dy}{dt} = 2(4-y)-10^2\\exp(-1/u)y^2 + 10^3\\exp(-1/u)y which could represen…

---

## [Fast way to display category data as image](https://discourse.julialang.org/t/fast-way-to-display-category-data-as-image/24695)

<div class="topic-metadata">

**Author:** [@Nathaniel](https://discourse.julialang.org/u/Nathaniel)\
**Replies:** 3\
**Last updated:** [May 28, 2019, 2:26pm UTC](https://discourse.julialang.org/t/fast-way-to-display-category-data-as-image/24695 "2019-05-28T14:26:32Z")

</div>

I have a 500x500 array of Int64s between 1 and 10, representing arbitrary categories. I can display this as an image by doing the following in a notebook: using Colors colors = distinguishable\_colors(10) and then \[col…

---

## [Using \`length\` makes the function type unstable](https://discourse.julialang.org/t/using-length-makes-the-function-type-unstable/22165)

<div class="topic-metadata">

**Author:** [@affans](https://discourse.julialang.org/u/affans)\
**Replies:** 18\
**Last updated:** [May 28, 2019, 2:20pm UTC](https://discourse.julialang.org/t/using-length-makes-the-function-type-unstable/22165 "2019-05-28T14:20:21Z")

</div>

function countries() a = JSON.parsefile("country\_data.json", dicttype=Dict, use\_mmap=true) c = Vector{String}(undef, length(a)) for (i, d) in enumerate(a) c\[i\] = string(d\["name"\]) end return …

---

## [Error while adding a package](https://discourse.julialang.org/t/error-while-adding-a-package/24176)

<div class="topic-metadata">

**Author:** [@Arsenii\_Grinchenko](https://discourse.julialang.org/u/Arsenii_Grinchenko)\
**Replies:** 9\
**Last updated:** [May 28, 2019, 2:09pm UTC](https://discourse.julialang.org/t/error-while-adding-a-package/24176 "2019-05-28T14:09:00Z")

</div>

I’m new to Julia, and I’ve installed Atom and a couple of packages already. However when I’ve tried to add PowerModels package, I’ve recieved an error message: ERROR: Unsatisfiable requirements detected for package Powe…

---

## [DiffEqFlux / diffeq\_adjoint: no method matching back!(::Float64)](https://discourse.julialang.org/t/diffeqflux-diffeq-adjoint-no-method-matching-back-float64/24648)

<div class="topic-metadata">

**Author:** [@mihai](https://discourse.julialang.org/u/mihai)\
**Replies:** 3\
**Last updated:** [May 28, 2019, 1:36pm UTC](https://discourse.julialang.org/t/diffeqflux-diffeq-adjoint-no-method-matching-back-float64/24648 "2019-05-28T13:36:18Z")

</div>

Hi all, I’m new to julia and ML, so maybe it’s something obvious, but I’m a bit lost now. I would like to optimize a large set of parameters (N ODE’s with N \> 2k) to fit to data. From reading the documentation of DiffEq…

---

## [Openssl library missing with linux mint](https://discourse.julialang.org/t/openssl-library-missing-with-linux-mint/24679)

<div class="topic-metadata">

**Author:** [@Saer\_Samanipour](https://discourse.julialang.org/u/Saer_Samanipour)\
**Replies:** 1\
**Last updated:** [May 28, 2019, 1:14pm UTC](https://discourse.julialang.org/t/openssl-library-missing-with-linux-mint/24679 "2019-05-28T13:14:01Z")

</div>

Hi, I have recently moved my julia codes from a Windows machine to a linux mint one and getting the below error when trying to use a module that I wrote. “error compiling import\_files: error compiling cdf\_Import: error…

---

## [Zero-cost way to check if \`NamedTuple\` has a field?](https://discourse.julialang.org/t/zero-cost-way-to-check-if-namedtuple-has-a-field/24684)

<div class="topic-metadata">

**Author:** [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Replies:** 6\
**Last updated:** [May 28, 2019, 12:25pm UTC](https://discourse.julialang.org/t/zero-cost-way-to-check-if-namedtuple-has-a-field/24684 "2019-05-28T12:25:10Z")

</div>

Is there a way to check if a NamedTuple has a field :a that is elided by the compiler? For example, let t=(a=1, b=2). Then the fact that t has fields :a,:b is known at compile time (because this info is in the type of t)…

---

## [Is it safe to write more data to a file than space you have on ram?](https://discourse.julialang.org/t/is-it-safe-to-write-more-data-to-a-file-than-space-you-have-on-ram/24691)

<div class="topic-metadata">

**Author:** [@HBaghdadi1995](https://discourse.julialang.org/u/HBaghdadi1995)\
**Replies:** 1\
**Last updated:** [May 28, 2019, 11:55am UTC](https://discourse.julialang.org/t/is-it-safe-to-write-more-data-to-a-file-than-space-you-have-on-ram/24691 "2019-05-28T11:55:10Z")

</div>

Let’s say I have 8GB of ram and decided to open a file and over the course of my software’s run I decide to write 16GB of data to the file. Is this safe or could it cause a crash? If it is safe, how does it work? Does i…

---

## [How to avoid Stack overflow](https://discourse.julialang.org/t/how-to-avoid-stack-overflow/24681)

<div class="topic-metadata">

**Author:** [@StevenSiew](https://discourse.julialang.org/u/StevenSiew)\
**Replies:** 2\
**Last updated:** [May 28, 2019, 9:07am UTC](https://discourse.julialang.org/t/how-to-avoid-stack-overflow/24681 "2019-05-28T09:07:33Z")

</div>

I have a program below which calculates Pi using Zeta(2) function, but it stack overflows when the limit is 260000 const limit=260000 @inline function formula(n::Int64) return 1.0/(Float64(n)\*Float64(n)) end funct…

---

## [How to speed up this simple code? Multithreading, simd, inbounds](https://discourse.julialang.org/t/how-to-speed-up-this-simple-code-multithreading-simd-inbounds/19681)

<div class="topic-metadata">

**Author:** [@Juan](https://discourse.julialang.org/u/Juan)\
**Replies:** 39\
**Last updated:** [January 29, 2019, 8:22pm UTC](https://discourse.julialang.org/t/how-to-speed-up-this-simple-code-multithreading-simd-inbounds/19681 "2019-01-29T20:22:20Z")

</div>

I’m starting to use Julia and comparing its speed to R. For this simple example their speeds are almost the same. How would you make it faster? function f2(N) S = 0 Threads.@threads for i in 1:N se = 1:i …

---

## [EXCEPTION\_ACCESS\_VIOLATION in windows64](https://discourse.julialang.org/t/exception-access-violation-in-windows64/24660)

<div class="topic-metadata">

**Author:** [@s-baumann](https://discourse.julialang.org/u/s-baumann)\
**Replies:** 3\
**Last updated:** [May 28, 2019, 5:33am UTC](https://discourse.julialang.org/t/exception-access-violation-in-windows64/24660 "2019-05-28T05:33:10Z")

</div>

I have a bug to report in Version 1.1.0 (2019-01-21) on 64 bit Windows. I get Julia crashing and the following bug report a bunch of times Please submit a bug report with steps to reproduce this fault, and any error m…

---

## [Repeated serialization for distributed simulation](https://discourse.julialang.org/t/repeated-serialization-for-distributed-simulation/24672)

<div class="topic-metadata">

**Author:** [@nsna](https://discourse.julialang.org/u/nsna)\
**Replies:** 0\
**Last updated:** [May 28, 2019, 2:41am UTC](https://discourse.julialang.org/t/repeated-serialization-for-distributed-simulation/24672 "2019-05-28T02:41:38Z")

</div>

I’m trying to maximize a likelihood function that involves a large number of simulations of a reasonably complex model. Serialization time is a bottleneck. Does anything jump out as being a problem? Here is an example t…

---

## [Using @async and/or Channels to handle incoming data and process it](https://discourse.julialang.org/t/using-async-and-or-channels-to-handle-incoming-data-and-process-it/24669)

<div class="topic-metadata">

**Author:** [@pyrex41](https://discourse.julialang.org/u/pyrex41)\
**Replies:** 0\
**Last updated:** [May 28, 2019, 1:59am UTC](https://discourse.julialang.org/t/using-async-and-or-channels-to-handle-incoming-data-and-process-it/24669 "2019-05-28T01:59:01Z")

</div>

I am trying to implement what i think is a pretty standard use case for using Tasks / CoRoutines, but I am struggling to adapt the examples in the docs to my specific use case. Here’s an outline of what I want to do: #…

---

## [Grid Interpolation of Data from Polar-Orbiting Satellites](https://discourse.julialang.org/t/grid-interpolation-of-data-from-polar-orbiting-satellites/10080)

<div class="topic-metadata">

**Author:** [@naufalwx](https://discourse.julialang.org/u/naufalwx)\
**Replies:** 25\
**Last updated:** [May 28, 2019, 12:48am UTC](https://discourse.julialang.org/t/grid-interpolation-of-data-from-polar-orbiting-satellites/10080 "2019-05-28T00:48:36Z")

</div>

Hi all, I’ve been coding for a little over two years now, but it has mostly been to make plots and perform simple calculations. Most other times, I have colleagues who also code in Julia and have codes/functions/package…

---

## [\[ANN\] PlotAxes.jl](https://discourse.julialang.org/t/ann-plotaxes-jl/24605)

<div class="topic-metadata">

**Author:** [@haberdashPI](https://discourse.julialang.org/u/haberdashPI)\
**Replies:** 4\
**Last updated:** [May 27, 2019, 9:32pm UTC](https://discourse.julialang.org/t/ann-plotaxes-jl/24605 "2019-05-27T21:32:37Z")

</div>

Hello there! I’ve registered a small package intended to simplify generating visualizations of medium dimensional data (~1-6 dimensions): PlotAxes. I find it handy during interactive, exploratory data analysis. You can …

---

## [How to plot in different notebooks in Jupyter?](https://discourse.julialang.org/t/how-to-plot-in-different-notebooks-in-jupyter/24662)

<div class="topic-metadata">

**Author:** [@PabloBME](https://discourse.julialang.org/u/PabloBME)\
**Replies:** 1\
**Last updated:** [May 27, 2019, 8:50pm UTC](https://discourse.julialang.org/t/how-to-plot-in-different-notebooks-in-jupyter/24662 "2019-05-27T20:50:45Z")

</div>

I’m new and I’m learning Julia in Jupyter. I took this code from the internet to start plotting and it worked perfectly: using Pkg Pkg.add(“PyPlot”) using PyPlot x = range(0,stop=2pi,length=1000); y = sin.(3x + 4c…

---

## [Concerning parametric types only present in keyword arguments](https://discourse.julialang.org/t/concerning-parametric-types-only-present-in-keyword-arguments/24632)

<div class="topic-metadata">

**Author:** [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)\
**Replies:** 5\
**Last updated:** [May 27, 2019, 7:29pm UTC](https://discourse.julialang.org/t/concerning-parametric-types-only-present-in-keyword-arguments/24632 "2019-05-27T19:29:56Z")

</div>

The code excerpts are MREs. I wrote the following method: f(a :: T; b :: S = zero(S)) where {T, S} = convert(S, a) + b It is kinda obvious in hindsight it should not have worked (maybe not even allowed to exist): \> …

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

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