# Latest

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

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

**Page:** 1647

---

## [Setfield redundant load/store elision fails with unions](https://discourse.julialang.org/t/setfield-redundant-load-store-elision-fails-with-unions/45703)

<div class="topic-metadata">

**Author:** [@Christian\_Rorvik](https://discourse.julialang.org/u/Christian_Rorvik)\
**Replies:** 0\
**Last updated:** [August 28, 2020, 6:33pm UTC](https://discourse.julialang.org/t/setfield-redundant-load-store-elision-fails-with-unions/45703 "2020-08-28T18:33:15Z")

</div>

Not really an issue with Setfield.jl, but this is where I’ve most encountered this. When updating immutable types (e.g., in arrays or references), we need to construct an entirely new object with the desired fields repl…

---

## [Call a PowerModels' function in Matlab](https://discourse.julialang.org/t/call-a-powermodels-function-in-matlab/45647)

<div class="topic-metadata">

**Author:** [@Rasoul](https://discourse.julialang.org/u/Rasoul)\
**Replies:** 2\
**Last updated:** [August 28, 2020, 4:37pm UTC](https://discourse.julialang.org/t/call-a-powermodels-function-in-matlab/45647 "2020-08-28T16:37:11Z")

</div>

Hi All, I want to call the bound tightening code in the PowerModels (i.e. following function) in Matlab. run\_obbt\_opf(case, upper\_bound, solver, model\_constructor= QCWRTriPowerModel) I tried to call “bound\_tightening\_…

---

## [My Random Forest is very slow](https://discourse.julialang.org/t/my-random-forest-is-very-slow/45471)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 10\
**Last updated:** [August 28, 2020, 3:59pm UTC](https://discourse.julialang.org/t/my-random-forest-is-very-slow/45471 "2020-08-28T15:59:30Z")

</div>

I implemented Decision Tree and Random Forest classifiers/regressions based originally on Josh Gordon’s code in Python. The problem is that building the forest is very slow… It is said everywhere that one of the advant…

---

## [Function closures and ifelse with unexpected behaviour](https://discourse.julialang.org/t/function-closures-and-ifelse-with-unexpected-behaviour/45694)

<div class="topic-metadata">

**Author:** [@carlomontec](https://discourse.julialang.org/u/carlomontec)\
**Replies:** 7\
**Last updated:** [August 28, 2020, 3:31pm UTC](https://discourse.julialang.org/t/function-closures-and-ifelse-with-unexpected-behaviour/45694 "2020-08-28T15:31:52Z")

</div>

Hello, I am quite confused with the following behavior of this function: function switchcase(i, str) case = str if uppercase(case) == "A" @info "set case A" showcase(i) = @printf("case A number %i…

---

## [Using the same name for multiple items](https://discourse.julialang.org/t/using-the-same-name-for-multiple-items/45690)

<div class="topic-metadata">

**Author:** [@Nathan\_Boyer](https://discourse.julialang.org/u/Nathan_Boyer)\
**Replies:** 7\
**Last updated:** [August 28, 2020, 3:21pm UTC](https://discourse.julialang.org/t/using-the-same-name-for-multiple-items/45690 "2020-08-28T15:21:00Z")

</div>

Minimum working example of a function I tried to write is below. function f(start,stop; length=5,collect=false) r=range(start,stop,length=length) return collect ? collect(r) : r # Function works without this li…

---

## [Setting really small values in ODE to zero](https://discourse.julialang.org/t/setting-really-small-values-in-ode-to-zero/45693)

<div class="topic-metadata">

**Author:** [@levasco](https://discourse.julialang.org/u/levasco)\
**Replies:** 3\
**Last updated:** [August 28, 2020, 2:31pm UTC](https://discourse.julialang.org/t/setting-really-small-values-in-ode-to-zero/45693 "2020-08-28T14:31:03Z")

</div>

In modelling biological communities with ODEs, given that individuals are somewhat finite entities, I am trying to avoid infinitesimal densities which are mathematically correct but make no sense. More specifically, I wa…

---

## [Julia on Xeon Phi](https://discourse.julialang.org/t/julia-on-xeon-phi/45682)

<div class="topic-metadata">

**Author:** [@andrey2185](https://discourse.julialang.org/u/andrey2185)\
**Replies:** 2\
**Last updated:** [August 28, 2020, 2:19pm UTC](https://discourse.julialang.org/t/julia-on-xeon-phi/45682 "2020-08-28T14:19:56Z")

</div>

Hello, can I run Julia on Xeon Phi, just like on a pc?

---

## [Package names could not be resolved: \* MyPkg (91bcb2...e67b in manifest but not in project)](https://discourse.julialang.org/t/package-names-could-not-be-resolved-mypkg-91bcb2-e67b-in-manifest-but-not-in-project/45679)

<div class="topic-metadata">

**Author:** [@Luapulu](https://discourse.julialang.org/u/Luapulu)\
**Replies:** 2\
**Last updated:** [August 28, 2020, 2:04pm UTC](https://discourse.julialang.org/t/package-names-could-not-be-resolved-mypkg-91bcb2-e67b-in-manifest-but-not-in-project/45679 "2020-08-28T14:04:05Z")

</div>

Minimal Example I’m running julia1.3. I have a minimal Package called MyPkg. It contains a Project.toml file and a src folder with a MyPkg.jl file that is empty. . |-- Project.toml \`-- src \`-- MyPkg.jl The Project…

---

## [Nteract does not work](https://discourse.julialang.org/t/nteract-does-not-work/45689)

<div class="topic-metadata">

**Author:** [@Shashank\_manchester](https://discourse.julialang.org/u/Shashank_manchester)\
**Replies:** 1\
**Last updated:** [August 28, 2020, 1:43pm UTC](https://discourse.julialang.org/t/nteract-does-not-work/45689 "2020-08-28T13:43:31Z")

</div>

Hi Team, I have installed Julia 1.5 version along with nteract application, but when i launch nteract application on my windows 64 bit machine, nteract keeps loading and i do not see the white screen. Attaching the s…

---

## [Need someone to explain to me this](https://discourse.julialang.org/t/need-someone-to-explain-to-me-this/45645)

<div class="topic-metadata">

**Author:** [@sogrbilja](https://discourse.julialang.org/u/sogrbilja)\
**Replies:** 4\
**Last updated:** [August 28, 2020, 1:24pm UTC](https://discourse.julialang.org/t/need-someone-to-explain-to-me-this/45645 "2020-08-28T13:24:13Z")

</div>

I am very new to Julia and will learn, but I would ask you if you can help an explain this line by line to me: @constraints(model, begin # Constraint 1 - Only one value appears in each cell cell\[i in…

---

## [Value returned from Julia function used in C cause segfault](https://discourse.julialang.org/t/value-returned-from-julia-function-used-in-c-cause-segfault/45673)

<div class="topic-metadata">

**Author:** [@Clonkk](https://discourse.julialang.org/u/Clonkk)\
**Replies:** 0\
**Last updated:** [August 28, 2020, 10:41am UTC](https://discourse.julialang.org/t/value-returned-from-julia-function-used-in-c-cause-segfault/45673 "2020-08-28T10:41:59Z")

</div>

Hello, How to properly call a Julia function from C that returns a value(could be array, tuple, POD, string). When I try to do that, the program segfault during the jl\_call(...) before I can call a jl\_gc\_push on the jl…

---

## [Common legend using layouts](https://discourse.julialang.org/t/common-legend-using-layouts/45553)

<div class="topic-metadata">

**Author:** [@drarnau](https://discourse.julialang.org/u/drarnau)\
**Replies:** 4\
**Last updated:** [August 28, 2020, 1:07pm UTC](https://discourse.julialang.org/t/common-legend-using-layouts/45553 "2020-08-28T13:07:57Z")

</div>

Dear all, I am plotting this: plot(rand(32,10), layout = (2,5), legend=false) plot!(rand(32,10), layout = (2,5), legend=false) And I’d like to have just one legend saying what the blue lines stand for and what the ora…

---

## [Strange behavior when defining a function inside an \`if\`](https://discourse.julialang.org/t/strange-behavior-when-defining-a-function-inside-an-if/45684)

<div class="topic-metadata">

**Author:** [@ismedina](https://discourse.julialang.org/u/ismedina)\
**Replies:** 2\
**Last updated:** [August 28, 2020, 12:40pm UTC](https://discourse.julialang.org/t/strange-behavior-when-defining-a-function-inside-an-if/45684 "2020-08-28T12:40:50Z")

</div>

Hi! I have encountered this weird behavior when using Julia. If I define: function f(x) if x \> 0 function g() 1 end return g else function g() 0 en…

---

## [JuliaCon 2020 Birds of a Feather](https://discourse.julialang.org/t/juliacon-2020-birds-of-a-feather/39181)

<div class="topic-metadata">

**Author:** [@cscherrer](https://discourse.julialang.org/u/cscherrer)\
**Replies:** 24\
**Last updated:** [August 28, 2020, 12:31pm UTC](https://discourse.julialang.org/t/juliacon-2020-birds-of-a-feather/39181 "2020-08-28T12:31:48Z")

</div>

The “Probabilistic Programming in Julia” BoF proposal was accepted! Here’s the text: Julia’s PPL community is strong and growing. The various groups already have a strong professional relationship, but a BoF would help…

---

## [Always encounter this error after installing new packages on HPC?](https://discourse.julialang.org/t/always-encounter-this-error-after-installing-new-packages-on-hpc/44093)

<div class="topic-metadata">

**Author:** [@zxjroger](https://discourse.julialang.org/u/zxjroger)\
**Replies:** 2\
**Last updated:** [August 28, 2020, 11:45am UTC](https://discourse.julialang.org/t/always-encounter-this-error-after-installing-new-packages-on-hpc/44093 "2020-08-28T11:45:24Z")

</div>

Each time after I add a new Julia package on HPC, if I do not remove all the compiled packages in the folder “.julia/compiled” and then recompile, I will run into some random bugs. This is really annoying and I wonder wh…

---

## [Performance of NamedArrays vs Dictionaries of Tuples](https://discourse.julialang.org/t/performance-of-namedarrays-vs-dictionaries-of-tuples/1854)

<div class="topic-metadata">

**Author:** [@NickNack](https://discourse.julialang.org/u/NickNack)\
**Replies:** 2\
**Last updated:** [August 28, 2020, 9:27am UTC](https://discourse.julialang.org/t/performance-of-namedarrays-vs-dictionaries-of-tuples/1854 "2020-08-28T09:27:58Z")

</div>

I’d like to use a datastructure with named indexes for optimization models (using JuMP or Optim) or simulation models in ordinary Julia. The main purpose of named indexes is to enhance readability of complex models. I’m …

---

## [PMAP Throws Exception on ProcessExitedException](https://discourse.julialang.org/t/pmap-throws-exception-on-processexitedexception/45667)

<div class="topic-metadata">

**Author:** [@Edward\_Wall](https://discourse.julialang.org/u/Edward_Wall)\
**Replies:** 1\
**Last updated:** [August 28, 2020, 9:13am UTC](https://discourse.julialang.org/t/pmap-throws-exception-on-processexitedexception/45667 "2020-08-28T09:13:40Z")

</div>

A short question. Is there some way to use pmap such that the following doesn’t throw an exception and crash? I have a distributed system, where a process might use too much memory and be killed by the os. This seems to …

---

## [\[ANN\] EarthOrientation.jl](https://discourse.julialang.org/t/ann-earthorientation-jl/5200)

<div class="topic-metadata">

**Author:** [@helgee](https://discourse.julialang.org/u/helgee)\
**Replies:** 8\
**Last updated:** [August 28, 2020, 6:39am UTC](https://discourse.julialang.org/t/ann-earthorientation-jl/5200 "2020-08-28T06:39:25Z")

</div>

I proudly present EarthOrientation.jl. Fetch the latest IERS tables: using EarthOrientation EarthOrientation.update() Get the current Earth orientation parameters, e.g. for polar motion: xp, yp = polarmotion(now()) #…

---

## [Can someone help me on how to resolve package conflicts with dev'ed packages?](https://discourse.julialang.org/t/can-someone-help-me-on-how-to-resolve-package-conflicts-with-deved-packages/39351)

<div class="topic-metadata">

**Author:** [@chelate](https://discourse.julialang.org/u/chelate)\
**Replies:** 17\
**Last updated:** [August 28, 2020, 5:37am UTC](https://discourse.julialang.org/t/can-someone-help-me-on-how-to-resolve-package-conflicts-with-deved-packages/39351 "2020-08-28T05:37:46Z")

</div>

I’d like to understand better the registry system, and how to troubleshoot this error ERROR: Unsatisfiable requirements detected for package \<\<\>\> I wanted to use the newest version of SpecialFunctions.jl. The only seri…

---

## [Trouble installing Plots version 1+ with other packages](https://discourse.julialang.org/t/trouble-installing-plots-version-1-with-other-packages/45661)

<div class="topic-metadata">

**Author:** [@liuyxpp](https://discourse.julialang.org/u/liuyxpp)\
**Replies:** 0\
**Last updated:** [August 28, 2020, 5:29am UTC](https://discourse.julialang.org/t/trouble-installing-plots-version-1-with-other-packages/45661 "2020-08-28T05:29:55Z")

</div>

When I update Optim to v0.22.0, Plots will be forced to downgrade to v0.29.9. Then I try to update Plots, it changes nothing. After that, I run following and Optim is forced to downgrade to v0.21.0 (@v1.5) pkg\> add Plot…

---

## [Common API for tabular data backends](https://discourse.julialang.org/t/common-api-for-tabular-data-backends/21546)

<div class="topic-metadata">

**Author:** [@bkamins](https://discourse.julialang.org/u/bkamins)\
**Replies:** 44\
**Last updated:** [August 28, 2020, 1:35am UTC](https://discourse.julialang.org/t/common-api-for-tabular-data-backends/21546 "2020-08-28T01:35:43Z")

</div>

Following the discussion on Slack I would like to open a topic here to discuss the possibility to provide a common API for different packages/ecosystems providing tabular data handling. The major rationale is that this …

---

## [ERROR: Unknown package DataStructures found in the compatibility requirements of DiffEqBase](https://discourse.julialang.org/t/error-unknown-package-datastructures-found-in-the-compatibility-requirements-of-diffeqbase/45650)

<div class="topic-metadata">

**Author:** [@anon22248738](https://discourse.julialang.org/u/anon22248738)\
**Replies:** 2\
**Last updated:** [August 28, 2020, 1:09am UTC](https://discourse.julialang.org/t/error-unknown-package-datastructures-found-in-the-compatibility-requirements-of-diffeqbase/45650 "2020-08-28T01:09:10Z")

</div>

I was trying to get Surrogates.jl to work on my computer but ended up with this error after trying to re-update to the current version of DiffEqFlux. Now I can’t add any packages, and Pkg.resolve() and Pkg.update() also …

---

## [ModuleNotFoundError: No module named 'conda' when building PyCall](https://discourse.julialang.org/t/modulenotfounderror-no-module-named-conda-when-building-pycall/45646)

<div class="topic-metadata">

**Author:** [@glemieux](https://discourse.julialang.org/u/glemieux)\
**Replies:** 11\
**Last updated:** [August 28, 2020, 12:58am UTC](https://discourse.julialang.org/t/modulenotfounderror-no-module-named-conda-when-building-pycall/45646 "2020-08-28T00:58:25Z")

</div>

I initially ran into this error trying to use ClimateTools, but digging down into it, I think it’s a problem with how conda is setup within my Julia installation and outside of it. I have a local install of miniconda wi…

---

## [Updating to version 1.5](https://discourse.julialang.org/t/updating-to-version-1-5/45648)

<div class="topic-metadata">

**Author:** [@colinclout12](https://discourse.julialang.org/u/colinclout12)\
**Replies:** 1\
**Last updated:** [August 28, 2020, 12:55am UTC](https://discourse.julialang.org/t/updating-to-version-1-5/45648 "2020-08-28T00:55:31Z")

</div>

I use JuliaPro on a Windows computer, and want to upgrade to Julia 1.5. Is there a way to do this without uninstalling everything, then reinstalling it all again? For instance, could I download Julia 1.5 (not JuliaPro) a…

---

## [Building an MPI-parallelized library with BinaryBuilder.jl using MPI.jl](https://discourse.julialang.org/t/building-an-mpi-parallelized-library-with-binarybuilder-jl-using-mpi-jl/45629)

<div class="topic-metadata">

**Author:** [@sloede](https://discourse.julialang.org/u/sloede)\
**Replies:** 10\
**Last updated:** [August 27, 2020, 10:37pm UTC](https://discourse.julialang.org/t/building-an-mpi-parallelized-library-with-binarybuilder-jl-using-mpi-jl/45629 "2020-08-27T22:37:56Z")

</div>

We would like to use an external, MPI-parallelized library in our Julia project that itself is parallelized using MPI.jl. A key requirement for us, however, is to keep everything within the Julia package-sphere, thus we …

---

## [ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://discourse.julialang.org/t/colprac-contributors-guide-on-collaborative-practices-for-community-packages/41850)

<div class="topic-metadata">

**Author:** [@oxinabox](https://discourse.julialang.org/u/oxinabox)\
**Replies:** 6\
**Last updated:** [August 27, 2020, 10:30pm UTC](https://discourse.julialang.org/t/colprac-contributors-guide-on-collaborative-practices-for-community-packages/41850 "2020-08-27T22:30:16Z")

</div>

I am please to be announcing the release of ColPrac: the Contributor’s Guide on Collaborative Practices for Community Packages. This consists of a policy and some guidance for contributor to community packages. It’s li…

---

## [Using type alias inside struct](https://discourse.julialang.org/t/using-type-alias-inside-struct/45594)

<div class="topic-metadata">

**Author:** [@conditionality](https://discourse.julialang.org/u/conditionality)\
**Replies:** 4\
**Last updated:** [August 27, 2020, 10:15pm UTC](https://discourse.julialang.org/t/using-type-alias-inside-struct/45594 "2020-08-27T22:15:31Z")

</div>

I have this simple example: struct A const MyType = Int64 x::MyType end a = A(1) When I run it, I get a complaint about “unsupported const declaration on local variable”. Why doesn’t this work? If I lift the t…

---

## [How to combine two layers?](https://discourse.julialang.org/t/how-to-combine-two-layers/45635)

<div class="topic-metadata">

**Author:** [@natema](https://discourse.julialang.org/u/natema)\
**Replies:** 1\
**Last updated:** [August 27, 2020, 10:06pm UTC](https://discourse.julialang.org/t/how-to-combine-two-layers/45635 "2020-08-27T22:06:48Z")

</div>

Let’s say we have trained a model m1 m1 = Chain(Dense(10, 10, relu), Dense(10,2), softmax) and we have then substituted Dense(10,2) with Dense(10,4) and trained the latter layer only, getting a model m2 m2 = Chain(Den…

---

## [Is this a symptom of potential memory leak/corruption in Julia?](https://discourse.julialang.org/t/is-this-a-symptom-of-potential-memory-leak-corruption-in-julia/45625)

<div class="topic-metadata">

**Author:** [@lewis](https://discourse.julialang.org/u/lewis)\
**Replies:** 3\
**Last updated:** [August 27, 2020, 8:10pm UTC](https://discourse.julialang.org/t/is-this-a-symptom-of-potential-memory-leak-corruption-in-julia/45625 "2020-08-27T20:10:03Z")

</div>

I had a Julia session open for 2 days. I wasn’t doing much, just testing little fragments of code. At the same time I had launched Jupyterlab with 2 Julia notebooks open and running. Julia has no contract that it is re-e…

---

## [Banded matrix with ones in the lower triangular portion of the matrix](https://discourse.julialang.org/t/banded-matrix-with-ones-in-the-lower-triangular-portion-of-the-matrix/45591)

<div class="topic-metadata">

**Author:** [@joeynelson](https://discourse.julialang.org/u/joeynelson)\
**Replies:** 1\
**Last updated:** [August 27, 2020, 8:02pm UTC](https://discourse.julialang.org/t/banded-matrix-with-ones-in-the-lower-triangular-portion-of-the-matrix/45591 "2020-08-27T20:02:55Z")

</div>

I’m working on monotone spline fitting using an ispline basis. The matrix formed is similar to a banded matrix, but has all ones in the lower triangle portion below the banded portion. Additionally, I’m adding a consta…

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

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