# Latest

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

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

**Page:** 1892

---

## [Mutating a Set during iteration](https://discourse.julialang.org/t/mutating-a-set-during-iteration/30558)

<div class="topic-metadata">

**Author:** [@Vasily\_Pisarev](https://discourse.julialang.org/u/Vasily_Pisarev)\
**Replies:** 2\
**Last updated:** [October 31, 2019, 8:50pm UTC](https://discourse.julialang.org/t/mutating-a-set-during-iteration/30558 "2019-10-31T20:50:47Z")

</div>

Is it safe to iterate over a set and mutate it in process? Say, I have a Set{Int64} and want to replace all negative values in it by their absolute values. Is it OK to for x in set\_of\_ints if x \< 0 pop!(set…

---

## [Statically built .exe program using PackageCompiler.jl has dependency on project toml file?](https://discourse.julialang.org/t/statically-built-exe-program-using-packagecompiler-jl-has-dependency-on-project-toml-file/30559)

<div class="topic-metadata">

**Author:** [@Zhong\_Pan](https://discourse.julialang.org/u/Zhong_Pan)\
**Replies:** 1\
**Last updated:** [October 31, 2019, 8:34pm UTC](https://discourse.julialang.org/t/statically-built-exe-program-using-packagecompiler-jl-has-dependency-on-project-toml-file/30559 "2019-10-31T20:34:10Z")

</div>

Back in March 2019 when I was still using Julia 1.0, I built an example script into an executable binary on Windows to showcase the usage of a library I made in a standalone command line EXE. I just followed the tutorial…

---

## [Partial transpose / block transpose of matrix: transpose!() overwritten](https://discourse.julialang.org/t/partial-transpose-block-transpose-of-matrix-transpose-overwritten/30521)

<div class="topic-metadata">

**Author:** [@Egwene\_al\_Vere](https://discourse.julialang.org/u/Egwene_al_Vere)\
**Replies:** 5\
**Last updated:** [October 31, 2019, 5:13pm UTC](https://discourse.julialang.org/t/partial-transpose-block-transpose-of-matrix-transpose-overwritten/30521 "2019-10-31T17:13:49Z")

</div>

I’m writing a function to do partial transpose of some matrix. Mathematically, consider a d1-by-d1 blocked matrix, where each block is d2-by-d2, such that the whole matrix is n-by-n, with n=d1\*d2. The partial transpose I…

---

## [Julia doesn't recognise any installed packages](https://discourse.julialang.org/t/julia-doesnt-recognise-any-installed-packages/30540)

<div class="topic-metadata">

**Author:** [@Calum\_H](https://discourse.julialang.org/u/Calum_H)\
**Replies:** 11\
**Last updated:** [October 31, 2019, 3:38pm UTC](https://discourse.julialang.org/t/julia-doesnt-recognise-any-installed-packages/30540 "2019-10-31T15:38:21Z")

</div>

Hi all, Quite new to Julia packages so apologies if this is obvious. I’ve been creating and using two packages which are in my dev path. This has been working for a few weeks no problem. Today, I inserted package1 as a…

---

## [Best way to write nested try/catch blocks](https://discourse.julialang.org/t/best-way-to-write-nested-try-catch-blocks/30478)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 2\
**Last updated:** [October 31, 2019, 3:23pm UTC](https://discourse.julialang.org/t/best-way-to-write-nested-try-catch-blocks/30478 "2019-10-31T15:23:02Z")

</div>

I have a piece of code that tries a few things in a nested try/catch block which can look ugly. Is there a better way to write this? Using Macros perhaps? I can imagine wrting a macro with this syntax instead \`@nested\_t…

---

## [Plotting broken?](https://discourse.julialang.org/t/plotting-broken/29692)

<div class="topic-metadata">

**Author:** [@adannenberg](https://discourse.julialang.org/u/adannenberg)\
**Replies:** 19\
**Last updated:** [October 31, 2019, 3:13pm UTC](https://discourse.julialang.org/t/plotting-broken/29692 "2019-10-31T15:13:21Z")

</div>

After upgrading (in Atom + Juno on Ubuntu 19.04 inside VirtualBox) julia-client from 0.10.1 to 0.11.2, uber-juno from 0.2.0 to 0.3.0 I find the following problem. Any help? julia\> using Plots julia\> plot(1:5) Error s…

---

## ["Getvalue" and "JuMP.value" -\> collection JuMP decision variables](https://discourse.julialang.org/t/getvalue-and-jump-value-collection-jump-decision-variables/30510)

<div class="topic-metadata">

**Author:** [@baprata](https://discourse.julialang.org/u/baprata)\
**Replies:** 6\
**Last updated:** [October 31, 2019, 1:41pm UTC](https://discourse.julialang.org/t/getvalue-and-jump-value-collection-jump-decision-variables/30510 "2019-10-31T13:41:40Z")

</div>

I have the following decision variables in JuMP: @variable(model, x\[j in positions, k in orders, i in machines\], Bin) @variable(model, D\[i in machines, j in positions\] \>=0) The functions “getvalue” or “JuMP.value” are…

---

## [Implement an MPS-based MOI solver](https://discourse.julialang.org/t/implement-an-mps-based-moi-solver/29218)

<div class="topic-metadata">

**Author:** [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Replies:** 7\
**Last updated:** [October 31, 2019, 12:55pm UTC](https://discourse.julialang.org/t/implement-an-mps-based-moi-solver/29218 "2019-10-31T12:55:44Z")

</div>

I want to implement an MPS-based solver interface. The actual solver is on a server and I have to send an MPS file, get the solution back and update the JuMP model with the solution. Are there any existing packages tha…

---

## [SCIP gap limit](https://discourse.julialang.org/t/scip-gap-limit/30511)

<div class="topic-metadata">

**Author:** [@Raminel](https://discourse.julialang.org/u/Raminel)\
**Replies:** 7\
**Last updated:** [October 31, 2019, 11:43am UTC](https://discourse.julialang.org/t/scip-gap-limit/30511 "2019-10-31T11:43:46Z")

</div>

Hi all, I am using SCIP optimizer and do not know how to adjust the gab limit. using SCIP m = Model(with\_optimizer(SCIP.Optimizer)) if I follow the guide for SCIP.jl I would need MIO.set and it seems but this package…

---

## [DEX - Research language for array processing in the Haskell/ML family](https://discourse.julialang.org/t/dex-research-language-for-array-processing-in-the-haskell-ml-family/30489)

<div class="topic-metadata">

**Author:** [@oheil](https://discourse.julialang.org/u/oheil)\
**Replies:** 7\
**Last updated:** [October 31, 2019, 10:11am UTC](https://discourse.julialang.org/t/dex-research-language-for-array-processing-in-the-haskell-ml-family/30489 "2019-10-31T10:11:30Z")

</div>

Dex (named for “index”) is a research language for array processing in the Haskell/ML family. The goal of the project is to explore: Type systems for array programming Mathematical program transformations like diffe…

---

## [Loading Images is very slow, is there a work around?](https://discourse.julialang.org/t/loading-images-is-very-slow-is-there-a-work-around/30529)

<div class="topic-metadata">

**Author:** [@onetonfoot](https://discourse.julialang.org/u/onetonfoot)\
**Replies:** 2\
**Last updated:** [October 31, 2019, 10:06am UTC](https://discourse.julialang.org/t/loading-images-is-very-slow-is-there-a-work-around/30529 "2019-10-31T10:06:04Z")

</div>

Loading images seems to be very slow? Comparing my Julia code to Python using BenchmarkTools, FileIO path = "/home/dom/Pictures/sd1/jpegs/DSCF0201.jpg" @btime load(path); # 1.890 s (245 allocations: 206.01 MiB) Vs f…

---

## [How to make lines with Julia using Gadfly (Facility location problem)?](https://discourse.julialang.org/t/how-to-make-lines-with-julia-using-gadfly-facility-location-problem/30525)

<div class="topic-metadata">

**Author:** [@raul-utec](https://discourse.julialang.org/u/raul-utec)\
**Replies:** 1\
**Last updated:** [October 31, 2019, 9:12am UTC](https://discourse.julialang.org/t/how-to-make-lines-with-julia-using-gadfly-facility-location-problem/30525 "2019-10-31T09:12:36Z")

</div>

Im trying to make the facility location problem algorithm where i have to connect a supplying point to a supplied point , so i got hundreds of supplied points binded to many supplying points so i got something like this …

---

## [Documentation List of Packages . Wher is list of them?](https://discourse.julialang.org/t/documentation-list-of-packages-wher-is-list-of-them/30503)

<div class="topic-metadata">

**Author:** [@programista](https://discourse.julialang.org/u/programista)\
**Replies:** 10\
**Last updated:** [October 31, 2019, 8:58am UTC](https://discourse.julialang.org/t/documentation-list-of-packages-wher-is-list-of-them/30503 "2019-10-31T08:58:31Z")

</div>

Existing list o pacakges is not usefull . https://pkg.julialang.org/docs/ Where is full list of them ? i.e. alfabetical ? Thanks Paul

---

## [Status of and need for ParallelAccelerator](https://discourse.julialang.org/t/status-of-and-need-for-parallelaccelerator/19277)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 2\
**Last updated:** [October 31, 2019, 8:43am UTC](https://discourse.julialang.org/t/status-of-and-need-for-parallelaccelerator/19277 "2019-10-31T08:43:25Z")

</div>

I just notice it’s one of the packages that hasn’t been upgraded, still stuck on 0.6. I’m just thinking is this more of a testament of there no longer being a need with Julia 1.0+ much faster with or without say thread …

---

## [Save complex array into h5 file](https://discourse.julialang.org/t/save-complex-array-into-h5-file/30516)

<div class="topic-metadata">

**Author:** [@lazarusA](https://discourse.julialang.org/u/lazarusA)\
**Replies:** 15\
**Last updated:** [October 31, 2019, 7:34am UTC](https://discourse.julialang.org/t/save-complex-array-into-h5-file/30516 "2019-10-31T07:34:03Z")

</div>

Why this does not work? what is the appropriate syntax ? f = h5open("file.h5", "w") dset\_f = d\_create(f, "psi", datatype(Complex{Float64}), dataspace(5, 5, 10)) for i in 1:10 dset\_f\[:, :, i\] = zeros(Complex{Float64}…

---

## [How to get the non-Nothing type from \`Union{T,Nothing}\`](https://discourse.julialang.org/t/how-to-get-the-non-nothing-type-from-union-t-nothing/30523)

<div class="topic-metadata">

**Author:** [@singularitti](https://discourse.julialang.org/u/singularitti)\
**Replies:** 2\
**Last updated:** [October 31, 2019, 7:23am UTC](https://discourse.julialang.org/t/how-to-get-the-non-nothing-type-from-union-t-nothing/30523 "2019-10-31T07:23:18Z")

</div>

If I define const Maybe{T} = Union{T,Nothing} How to “pop” the T type from Maybe? I want to do this because I have the following type using Parameters @with\_kw struct A a::Maybe{String} = nothing b::Maybe{Flo…

---

## [Info: registering a new package - where can i find the UUID?](https://discourse.julialang.org/t/info-registering-a-new-package-where-can-i-find-the-uuid/30505)

<div class="topic-metadata">

**Author:** [@fipelle](https://discourse.julialang.org/u/fipelle)\
**Replies:** 2\
**Last updated:** [October 31, 2019, 6:23am UTC](https://discourse.julialang.org/t/info-registering-a-new-package-where-can-i-find-the-uuid/30505 "2019-10-31T06:23:36Z")

</div>

Hi, I am trying to register a (small) package I wrote for time series analysis. I am using it as a backend for more sophisticated algorithms that I plan to release on GitHub in the next couple of months. I am in the pr…

---

## [Are anonymous functions efficient in allocation terms?](https://discourse.julialang.org/t/are-anonymous-functions-efficient-in-allocation-terms/30522)

<div class="topic-metadata">

**Author:** [@rna1990](https://discourse.julialang.org/u/rna1990)\
**Replies:** 4\
**Last updated:** [October 31, 2019, 3:42am UTC](https://discourse.julialang.org/t/are-anonymous-functions-efficient-in-allocation-terms/30522 "2019-10-31T03:42:13Z")

</div>

Simple question: As a little step in a function I’m working on, I need to filter a unit range, say 1:5, just by taking one of its elements away, say 2. I understand that filter() is the way to go, combined with an anony…

---

## [Writing to shared arrays with CUDAnative](https://discourse.julialang.org/t/writing-to-shared-arrays-with-cudanative/30518)

<div class="topic-metadata">

**Author:** [@Raf](https://discourse.julialang.org/u/Raf)\
**Replies:** 0\
**Last updated:** [October 30, 2019, 11:48pm UTC](https://discourse.julialang.org/t/writing-to-shared-arrays-with-cudanative/30518 "2019-10-30T23:48:59Z")

</div>

I wondering what the potential and limits are to writing to shared arrays on the GPU in julia, and generally. My WIP spatial simulation package DynamicGrids.jl seems like a prime candidate fro running on the GPU, as the…

---

## [How to compile Julia on cluster with slightly different login / compute nodes?](https://discourse.julialang.org/t/how-to-compile-julia-on-cluster-with-slightly-different-login-compute-nodes/30515)

<div class="topic-metadata">

**Author:** [@marius311](https://discourse.julialang.org/u/marius311)\
**Replies:** 3\
**Last updated:** [October 30, 2019, 11:27pm UTC](https://discourse.julialang.org/t/how-to-compile-julia-on-cluster-with-slightly-different-login-compute-nodes/30515 "2019-10-30T23:27:07Z")

</div>

I’m on a cluster where I think the login / compute nodes are sufficiently different architectures that compiling Julia (1.3.0-rc4) on one and running on the either always yields a ERROR: Unable to find compatible target …

---

## [How to prevent type instability in for loops?](https://discourse.julialang.org/t/how-to-prevent-type-instability-in-for-loops/30508)

<div class="topic-metadata">

**Author:** [@Ronneesley](https://discourse.julialang.org/u/Ronneesley)\
**Replies:** 13\
**Last updated:** [October 30, 2019, 10:00pm UTC](https://discourse.julialang.org/t/how-to-prevent-type-instability-in-for-loops/30508 "2019-10-30T22:00:28Z")

</div>

When we create a for loop with range, Julia alert a type of instability in the range created. Using the code below. v = \[1, 2, 3\] function f(v::Array{Int, 1}) s = 0 for i = 1:length(v) s += v\[i\] end…

---

## [\[ANN\] GeoStats.jl v0.10](https://discourse.julialang.org/t/ann-geostats-jl-v0-10/30436)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 7\
**Last updated:** [October 30, 2019, 9:53pm UTC](https://discourse.julialang.org/t/ann-geostats-jl-v0-10/30436 "2019-10-30T21:53:28Z")

</div>

I am happy to release GeoStats.jl v0.10, an open-source framework for high-performance geostatistics. This release comes with some new exciting features including integration with the MLJ.jl framework for statistical le…

---

## [Saving Flux model with BSON (julia 1.2)](https://discourse.julialang.org/t/saving-flux-model-with-bson-julia-1-2/28383)

<div class="topic-metadata">

**Author:** [@rio](https://discourse.julialang.org/u/rio)\
**Replies:** 1\
**Last updated:** [October 30, 2019, 8:07pm UTC](https://discourse.julialang.org/t/saving-flux-model-with-bson-julia-1-2/28383 "2019-10-30T20:07:06Z")

</div>

Hi! I am new to Julia and I would like to learn it. When I try to run the code below using Flux, BSON model = Chain( Conv((3, 3), 1=\>16, pad=(1,1), relu), MaxPool((2,2)), Conv((3, 3), 16=\>32, pad=(1,1), r…

---

## [CDDLibrary not defined](https://discourse.julialang.org/t/cddlibrary-not-defined/30512)

<div class="topic-metadata">

**Author:** [@squirrel](https://discourse.julialang.org/u/squirrel)\
**Replies:** 1\
**Last updated:** [October 30, 2019, 7:48pm UTC](https://discourse.julialang.org/t/cddlibrary-not-defined/30512 "2019-10-30T19:48:18Z")

</div>

The packages were installed. Why is this telling me CDDLibrary is not defined? using Pkg Pkg.add("Polyhedra") Pkg.add("CDDLib") using CDDLib polyf = polyhedron(hrep, CDDLibrary())

---

## [How to get commit hash in Pkg3?](https://discourse.julialang.org/t/how-to-get-commit-hash-in-pkg3/11927)

<div class="topic-metadata">

**Author:** [@marius311](https://discourse.julialang.org/u/marius311)\
**Replies:** 4\
**Last updated:** [October 30, 2019, 7:47pm UTC](https://discourse.julialang.org/t/how-to-get-commit-hash-in-pkg3/11927 "2019-10-30T19:47:18Z")

</div>

With the old package manager, I could go into the package directory and do a git status or something similar to find out which commit I was on. How do I do this with Pkg3? While \]st does print a hash next to each package…

---

## [End keyword in creating CartesianIndex](https://discourse.julialang.org/t/end-keyword-in-creating-cartesianindex/30461)

<div class="topic-metadata">

**Author:** [@Amin\_Yahyaabadi](https://discourse.julialang.org/u/Amin_Yahyaabadi)\
**Replies:** 9\
**Last updated:** [October 30, 2019, 7:34pm UTC](https://discourse.julialang.org/t/end-keyword-in-creating-cartesianindex/30461 "2019-10-30T19:34:06Z")

</div>

I created an issue regarding end keyword in creating CartesianIndex in Julia repository a while ago (end keyword in creating CartesianIndex · Issue #33608 · JuliaLang/julia · GitHub): It is not possible to create a Car…

---

## [Merging dictionaries indexed by elements of struct type](https://discourse.julialang.org/t/merging-dictionaries-indexed-by-elements-of-struct-type/30499)

<div class="topic-metadata">

**Author:** [@Pierre-Emmanuel\_Chap](https://discourse.julialang.org/u/Pierre-Emmanuel_Chap)\
**Replies:** 2\
**Last updated:** [October 30, 2019, 6:19pm UTC](https://discourse.julialang.org/t/merging-dictionaries-indexed-by-elements-of-struct-type/30499 "2019-10-30T18:19:12Z")

</div>

Hello, I am failing merging correctly dictionaries that are indexed by a mutable struct that I defined before. Here is the code of a baby example : mutable struct my\_vector v::Vector{Int} end Base.:(==)(v1::my\_vector…

---

## [CSV.read: why do String columns show up as PooledArrays?](https://discourse.julialang.org/t/csv-read-why-do-string-columns-show-up-as-pooledarrays/30501)

<div class="topic-metadata">

**Author:** [@Sam\_Johnson](https://discourse.julialang.org/u/Sam_Johnson)\
**Replies:** 6\
**Last updated:** [October 30, 2019, 5:15pm UTC](https://discourse.julialang.org/t/csv-read-why-do-string-columns-show-up-as-pooledarrays/30501 "2019-10-30T17:15:04Z")

</div>

I’m opening a simple .CSV file with CSV.read with no parameter modifiers. The returned DataFrame is fine and describe(df) gives me the correct element types, which are all Int64 or Strings. When I try to onehot-encode t…

---

## [Newton vs the machine: solving the chaotic three-body problem using deep neural networks](https://discourse.julialang.org/t/newton-vs-the-machine-solving-the-chaotic-three-body-problem-using-deep-neural-networks/30406)

<div class="topic-metadata">

**Author:** [@johnh](https://discourse.julialang.org/u/johnh)\
**Replies:** 11\
**Last updated:** [October 30, 2019, 1:47am UTC](https://discourse.julialang.org/t/newton-vs-the-machine-solving-the-chaotic-three-body-problem-using-deep-neural-networks/30406 "2019-10-30T01:47:00Z")

</div>

Numpy and Tensorflow. Bet they would have been better using Flux and Zygote!

---

## [@nbinclude in the REPL](https://discourse.julialang.org/t/nbinclude-in-the-repl/30467)

<div class="topic-metadata">

**Author:** [@PhilipDLoewen](https://discourse.julialang.org/u/PhilipDLoewen)\
**Replies:** 4\
**Last updated:** [October 30, 2019, 4:05pm UTC](https://discourse.julialang.org/t/nbinclude-in-the-repl/30467 "2019-10-30T16:05:08Z")

</div>

Maybe this is a bug report. Please advise. I have a small notebook that runs perfectly when I open it in Jupyter, but not at the REPL. Working at a freshly-started Julia 1.2.0 REPL, when I say using NBInclude @nbinclu…

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

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