# Latest

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

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

**Page:** 1770

---

## [Illegal instruction in binary artifacts](https://discourse.julialang.org/t/illegal-instruction-in-binary-artifacts/37894)

<div class="topic-metadata">

**Author:** [@Pavel\_Kalouguine](https://discourse.julialang.org/u/Pavel_Kalouguine)\
**Replies:** 5\
**Last updated:** [April 21, 2020, 2:10pm UTC](https://discourse.julialang.org/t/illegal-instruction-in-binary-artifacts/37894 "2020-04-21T14:10:38Z")

</div>

It seems that I stumbled upon this issue: https://github.com/JuliaGraphics/Gtk.jl/issues/494 when testing Makie on my config (it is Debian 10 on AMD A6-3600, not ssse3, so I had to build Julia 1.4.1 from the source). J…

---

## [How bad is type piracy actually?](https://discourse.julialang.org/t/how-bad-is-type-piracy-actually/37913)

<div class="topic-metadata">

**Author:** [@lobingera](https://discourse.julialang.org/u/lobingera)\
**Replies:** 12\
**Last updated:** [April 21, 2020, 2:02pm UTC](https://discourse.julialang.org/t/how-bad-is-type-piracy-actually/37913 "2020-04-21T14:02:38Z")

</div>

In the world of C, typedef/struct definitions mostly reside in header files and can be included at will, so a type can be made available for interfacing between libraries. In the world of julia type defintions reside wi…

---

## [Addprocs() fails with IOError on SLURM](https://discourse.julialang.org/t/addprocs-fails-with-ioerror-on-slurm/37951)

<div class="topic-metadata">

**Author:** [@dkiese](https://discourse.julialang.org/u/dkiese)\
**Replies:** 2\
**Last updated:** [April 21, 2020, 11:19am UTC](https://discourse.julialang.org/t/addprocs-fails-with-ioerror-on-slurm/37951 "2020-04-21T11:19:57Z")

</div>

Hello everyone, I am currently trying to run hybrid shared-distributed memory code on a large computing cluster, which is configured with SLURM. My code is roughly structured like this using Distributed using ClusterMa…

---

## [Visualization of nonlinear optimization algorithms for teaching](https://discourse.julialang.org/t/visualization-of-nonlinear-optimization-algorithms-for-teaching/37945)

<div class="topic-metadata">

**Author:** [@leclere](https://discourse.julialang.org/u/leclere)\
**Replies:** 3\
**Last updated:** [April 21, 2020, 8:10am UTC](https://discourse.julialang.org/t/visualization-of-nonlinear-optimization-algorithms-for-teaching/37945 "2020-04-21T08:10:51Z")

</div>

I am looking for example code / notebooks that help visualize algorithm iterations for teaching purposes. I am looking for standard nonlinear optimization stuff (like plotting contour lines of nonlinear function in R^2, …

---

## [ERROR: UndefVarError: A not defined](https://discourse.julialang.org/t/error-undefvarerror-a-not-defined/37948)

<div class="topic-metadata">

**Author:** [@QUANG\_VU\_NGUY\_N\_PH\_M](https://discourse.julialang.org/u/QUANG_VU_NGUY_N_PH_M)\
**Replies:** 4\
**Last updated:** [April 21, 2020, 7:50am UTC](https://discourse.julialang.org/t/error-undefvarerror-a-not-defined/37948 "2020-04-21T07:50:54Z")

</div>

g(x) = 2 + x A = 0 for i =1:2 A += g(i) end I got an error: ERROR: UndefVarError: A not defined. I thought that I defined A = 0 before the loop. How to fix this? Thank you in advanced!

---

## [How to get dependencies of latest version from Deps.toml?](https://discourse.julialang.org/t/how-to-get-dependencies-of-latest-version-from-deps-toml/37942)

<div class="topic-metadata">

**Author:** [@djsegal](https://discourse.julialang.org/u/djsegal)\
**Replies:** 2\
**Last updated:** [April 21, 2020, 5:43am UTC](https://discourse.julialang.org/t/how-to-get-dependencies-of-latest-version-from-deps-toml/37942 "2020-04-21T05:43:36Z")

</div>

Let’s say you have a Deps.toml file: Deps.toml How do you parse it to get the dependency packages that the latest version would have? // related to: JuliaPackages.jl#3 One hiccup is I have no clue what \["0.14-0"\] m…

---

## [Global variable cannot be read within if-else-loop](https://discourse.julialang.org/t/global-variable-cannot-be-read-within-if-else-loop/37932)

<div class="topic-metadata">

**Author:** [@kendrawu](https://discourse.julialang.org/u/kendrawu)\
**Replies:** 2\
**Last updated:** [April 21, 2020, 5:20am UTC](https://discourse.julialang.org/t/global-variable-cannot-be-read-within-if-else-loop/37932 "2020-04-21T05:20:59Z")

</div>

Here is a sample code I have created: function fn\_update\_a(a, b, c, d) a = fn(c,d) b = vcat(b,a) return a, b end for isim in 1:10 a = fn(c, d) if isim==1 b = deepcopy(a) else a=1 pri…

---

## [Gaussian Process](https://discourse.julialang.org/t/gaussian-process/37940)

<div class="topic-metadata">

**Author:** [@Praise](https://discourse.julialang.org/u/Praise)\
**Replies:** 1\
**Last updated:** [April 21, 2020, 2:58am UTC](https://discourse.julialang.org/t/gaussian-process/37940 "2020-04-21T02:58:54Z")

</div>

Hi, I would like to perform Gaussian Process Regression on a certain set of data I have in a csv file. Basically, I have a number of columns in my csv file. Now, based on what I have looked for, I have found two ways of …

---

## [Julia 1.3, 1.4 on MacOS and Intel MKL Error](https://discourse.julialang.org/t/julia-1-3-1-4-on-macos-and-intel-mkl-error/36469)

<div class="topic-metadata">

**Author:** [@ablaom](https://discourse.julialang.org/u/ablaom)\
**Replies:** 23\
**Last updated:** [April 21, 2020, 2:08am UTC](https://discourse.julialang.org/t/julia-1-3-1-4-on-macos-and-intel-mkl-error/36469 "2020-04-21T02:08:44Z")

</div>

Sorry in advance if this is the wrong place to post. I am looking for any help narrowing down the source of a MacOS only / Julia 1.3, 1.4 only failure for the MLJModels.jl package: “Intel MKL Error”. Copied from the i…

---

## [Because size() doesn't work](https://discourse.julialang.org/t/because-size-doesnt-work/37939)

<div class="topic-metadata">

**Author:** [@EmilioAlvizo](https://discourse.julialang.org/u/EmilioAlvizo)\
**Replies:** 6\
**Last updated:** [April 21, 2020, 2:07am UTC](https://discourse.julialang.org/t/because-size-doesnt-work/37939 "2020-04-21T02:07:22Z")

</div>

I want to size the array dimensions which in this case are 5 and 6, but I don’t know why it doesn’t A=zeros(5,6) size(A) and I get the following error MethodError: objects of type Tuple{Int64,Int64} are not callable

---

## [Underdetermined Linear System General Solution](https://discourse.julialang.org/t/underdetermined-linear-system-general-solution/37865)

<div class="topic-metadata">

**Author:** [@Alex\_Ellison](https://discourse.julialang.org/u/Alex_Ellison)\
**Replies:** 7\
**Last updated:** [April 21, 2020, 12:24am UTC](https://discourse.julialang.org/t/underdetermined-linear-system-general-solution/37865 "2020-04-21T00:24:54Z")

</div>

Hey all, this may be more of a question about linear algebra than it is about Julia. Given an underdetermined linear system A x = b, where A has dimensions (m, n) we expect there to be a vector space of dimension (m - n)…

---

## [Gadfly Layer Order (Geom.point and Geom.line)](https://discourse.julialang.org/t/gadfly-layer-order-geom-point-and-geom-line/37798)

<div class="topic-metadata">

**Author:** [@Humphrey\_Lee](https://discourse.julialang.org/u/Humphrey_Lee)\
**Replies:** 22\
**Last updated:** [April 21, 2020, 12:11am UTC](https://discourse.julialang.org/t/gadfly-layer-order-geom-point-and-geom-line/37798 "2020-04-21T00:11:33Z")

</div>

In Gadfly, I have multiple layers (expensive, I know) - a combination of Geom.point and Geom.line (from function). I tried (Compositing · Gadfly.jl) to arrange/ order such that the line is on top, but unsuccessful. Any i…

---

## [DifferentialEquations deal with oscillations](https://discourse.julialang.org/t/differentialequations-deal-with-oscillations/35650)

<div class="topic-metadata">

**Author:** [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Replies:** 10\
**Last updated:** [April 20, 2020, 10:19pm UTC](https://discourse.julialang.org/t/differentialequations-deal-with-oscillations/35650 "2020-04-20T22:19:46Z")

</div>

Hello, I don’t know if this is more a math question than computational one, but since in the end the implementation with Julia is what I seek, I am posting it here. I am using DifferentialEquations to model some data th…

---

## [Julia v1.4.1 has been released](https://discourse.julialang.org/t/julia-v1-4-1-has-been-released/37724)

<div class="topic-metadata">

**Author:** [@ararslan](https://discourse.julialang.org/u/ararslan)\
**Replies:** 4\
**Last updated:** [April 20, 2020, 10:18pm UTC](https://discourse.julialang.org/t/julia-v1-4-1-has-been-released/37724 "2020-04-20T22:18:04Z")

</div>

Julia version 1.4.1, the first patch release in the 1.4 series of releases, is now available. You can get binaries for Linux (i686, x86-64, AArch64, ARMv7), FreeBSD (x86-64), macOS, and Windows (32-, 64-bit) at Download …

---

## [Can one override "using" or "import" keywords?](https://discourse.julialang.org/t/can-one-override-using-or-import-keywords/37924)

<div class="topic-metadata">

**Author:** [@xzackli](https://discourse.julialang.org/u/xzackli)\
**Replies:** 2\
**Last updated:** [April 20, 2020, 9:07pm UTC](https://discourse.julialang.org/t/can-one-override-using-or-import-keywords/37924 "2020-04-20T21:07:29Z")

</div>

Is it possible to change the behavior of a particular import or using command? I know this sounds pretty terrible, and I’m only 10% serious about actually doing this. In particular, can one modify import SomePackage to t…

---

## [SSL with MYSQL.jl](https://discourse.julialang.org/t/ssl-with-mysql-jl/37928)

<div class="topic-metadata">

**Author:** [@victora](https://discourse.julialang.org/u/victora)\
**Replies:** 0\
**Last updated:** [April 20, 2020, 8:58pm UTC](https://discourse.julialang.org/t/ssl-with-mysql-jl/37928 "2020-04-20T20:58:31Z")

</div>

Hello everyone - I have been trying unsuccessfully to connect to a mysql db in a jupyter notebook with the following: ( using JuliaPro install ) # connecting to mysql using MySQL, DBInterface, Tables, DataFrames conn = …

---

## [How to groupby a column and take the mean while ignoring missing values](https://discourse.julialang.org/t/how-to-groupby-a-column-and-take-the-mean-while-ignoring-missing-values/37918)

<div class="topic-metadata">

**Author:** [@Julia1](https://discourse.julialang.org/u/Julia1)\
**Replies:** 1\
**Last updated:** [April 20, 2020, 8:36pm UTC](https://discourse.julialang.org/t/how-to-groupby-a-column-and-take-the-mean-while-ignoring-missing-values/37918 "2020-04-20T20:36:06Z")

</div>

Hi how’s it going, I’m trying to do by(df, col1, numeric\_col=\>mean) however it’s not working. I tried skipmissing=true but turns out that skips any group that has even 1 missing value. If the values of numeric\_col for …

---

## [How to plot a simple stacked area chart](https://discourse.julialang.org/t/how-to-plot-a-simple-stacked-area-chart/21351)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 5\
**Last updated:** [April 20, 2020, 8:29pm UTC](https://discourse.julialang.org/t/how-to-plot-a-simple-stacked-area-chart/21351 "2020-04-20T20:29:21Z")

</div>

All I need to do is to plot a simple stacked chart (possibly also normalised). I would like to start from these simple data: a = \[1,1,1,1.5,2,3\] b = \[0.5,0.6,0.4,0.3,0.3,0.2\] c = \[2,1.8,2.2,3.3,2.5,1.8\] sNames = \["a","…

---

## [ParameterizedFunctions.jl @ode\_def programmatically generate model](https://discourse.julialang.org/t/parameterizedfunctions-jl-ode-def-programmatically-generate-model/37733)

<div class="topic-metadata">

**Author:** [@MFairley](https://discourse.julialang.org/u/MFairley)\
**Replies:** 3\
**Last updated:** [April 20, 2020, 7:30pm UTC](https://discourse.julialang.org/t/parameterizedfunctions-jl-ode-def-programmatically-generate-model/37733 "2020-04-20T19:30:41Z")

</div>

Is there a way to pass variables into @ode\_def that would be treated as constants in the ODE problem? For example, something like function create\_model\_def(male) h = male ? 2.0 : 7.0 f = @ode\_def begin …

---

## [VS Code replace REPL with jupyter qtconsole](https://discourse.julialang.org/t/vs-code-replace-repl-with-jupyter-qtconsole/37862)

<div class="topic-metadata">

**Author:** [@Oto\_Brzobohaty](https://discourse.julialang.org/u/Oto_Brzobohaty)\
**Replies:** 3\
**Last updated:** [April 20, 2020, 5:37pm UTC](https://discourse.julialang.org/t/vs-code-replace-repl-with-jupyter-qtconsole/37862 "2020-04-20T17:37:59Z")

</div>

I really love Julia extension in VS Code at the same time I love the Jupyter console with inlined plots. Is there any chance to replace the default REPL with Jupyter console?

---

## [Interact +JuMP + Plotly with PWA](https://discourse.julialang.org/t/interact-jump-plotly-with-pwa/37912)

<div class="topic-metadata">

**Author:** [@AmburoseSekar](https://discourse.julialang.org/u/AmburoseSekar)\
**Replies:** 0\
**Last updated:** [April 20, 2020, 5:01pm UTC](https://discourse.julialang.org/t/interact-jump-plotly-with-pwa/37912 "2020-04-20T17:01:56Z")

</div>

With the help of Interact.jl & JuMP.jl, I wrote a little bit of code that has proven WebApp and useful for teaching/Industrial people use Dashboard like app. I hope you all can make use of it as well! Fully Written in J…

---

## [What is the Julia equivalent of np.fromfunction?](https://discourse.julialang.org/t/what-is-the-julia-equivalent-of-np-fromfunction/37908)

<div class="topic-metadata">

**Author:** [@rhezab](https://discourse.julialang.org/u/rhezab)\
**Replies:** 4\
**Last updated:** [April 20, 2020, 4:44pm UTC](https://discourse.julialang.org/t/what-is-the-julia-equivalent-of-np-fromfunction/37908 "2020-04-20T16:44:08Z")

</div>

Link to np.fromfunction documentation I would like to fill an array with values as a function of its indices.

---

## [Plots.jl set figure size for LaTeX publications](https://discourse.julialang.org/t/plots-jl-set-figure-size-for-latex-publications/36960)

<div class="topic-metadata">

**Author:** [@jamblejoe](https://discourse.julialang.org/u/jamblejoe)\
**Replies:** 17\
**Last updated:** [April 20, 2020, 4:43pm UTC](https://discourse.julialang.org/t/plots-jl-set-figure-size-for-latex-publications/36960 "2020-04-20T16:43:42Z")

</div>

Hi, I want to use Plots.jl to make figures for a publication. I want the width of the figure to be exactly 246.0 points (pt). The format should be pdf. I want to do this, so I can import the pdf figure into LaTeX later …

---

## [ERROR: MethodError: no method matching \*(::Array{Float32,2}, ::Array{Float32,4})](https://discourse.julialang.org/t/error-methoderror-no-method-matching-array-float32-2-array-float32-4/37906)

<div class="topic-metadata">

**Author:** [@B0001](https://discourse.julialang.org/u/B0001)\
**Replies:** 0\
**Last updated:** [April 20, 2020, 3:38pm UTC](https://discourse.julialang.org/t/error-methoderror-no-method-matching-array-float32-2-array-float32-4/37906 "2020-04-20T15:38:10Z")

</div>

I receive the above error when running the following on Julia 1.4.0 and 1.4.1: using Flux x = rand(Float32, 2, 2, 256, 10) Dense(256, 2)(x)

---

## [New introductory(ish) Julia class with materials available](https://discourse.julialang.org/t/new-introductory-ish-julia-class-with-materials-available/30256)

<div class="topic-metadata">

**Author:** [@dpsanders](https://discourse.julialang.org/u/dpsanders)\
**Replies:** 12\
**Last updated:** [April 20, 2020, 3:22pm UTC](https://discourse.julialang.org/t/new-introductory-ish-julia-class-with-materials-available/30256 "2020-04-20T15:22:47Z")

</div>

Together with Alan Edelman, we have just started teaching a new half-semester introductory class on “Computational Thinking” using Julia at MIT (course number 6.S083). It is during the second half of the semester, as an…

---

## [How to specify an NFA using Automa.jl?](https://discourse.julialang.org/t/how-to-specify-an-nfa-using-automa-jl/37904)

<div class="topic-metadata">

**Author:** [@lesshaste](https://discourse.julialang.org/u/lesshaste)\
**Replies:** 0\
**Last updated:** [April 20, 2020, 3:03pm UTC](https://discourse.julialang.org/t/how-to-specify-an-nfa-using-automa-jl/37904 "2020-04-20T15:03:07Z")

</div>

I would like to convert NFAs to DFAs using the function nfa2dfa from Automa.jl. However I can’t see in the docs how to specify an NFA. Here is a toy example NFA. Automaton("nondet",2,"abcd",\[ \[ \[ 1 \], \[ 2 \] \], \[ \[ 2 \]…

---

## [Connecting RShiny to a running instance of Julia](https://discourse.julialang.org/t/connecting-rshiny-to-a-running-instance-of-julia/37869)

<div class="topic-metadata">

**Author:** [@affans](https://discourse.julialang.org/u/affans)\
**Replies:** 4\
**Last updated:** [April 20, 2020, 3:03pm UTC](https://discourse.julialang.org/t/connecting-rshiny-to-a-running-instance-of-julia/37869 "2020-04-20T15:03:35Z")

</div>

I have a simulation model in Julia that has the following workflow using SimModel addprocs(SlurmManager(512)) @everywhere using SimModel run\_simulation(params) # function uses pmap to launch work() over 500 processors…

---

## [The Julia Language will \*apply\* for Google's Season of Docs - Call For Projects](https://discourse.julialang.org/t/the-julia-language-will-apply-for-googles-season-of-docs-call-for-projects/37903)

<div class="topic-metadata">

**Author:** [@logankilpatrick](https://discourse.julialang.org/u/logankilpatrick)\
**Replies:** 0\
**Last updated:** [April 20, 2020, 2:32pm UTC](https://discourse.julialang.org/t/the-julia-language-will-apply-for-googles-season-of-docs-call-for-projects/37903 "2020-04-20T14:32:55Z")

</div>

Hey all, The Julia Language will be applying this year for the annual Google Season of Docs. GSoD is an opportunity for aspiring Technical Writers to work with Open Source organizations on projects to improve documentat…

---

## [How to use hook to clip a gradient?](https://discourse.julialang.org/t/how-to-use-hook-to-clip-a-gradient/37896)

<div class="topic-metadata">

**Author:** [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)\
**Replies:** 4\
**Last updated:** [April 20, 2020, 2:17pm UTC](https://discourse.julialang.org/t/how-to-use-hook-to-clip-a-gradient/37896 "2020-04-20T14:17:03Z")

</div>

I’m trying to train a neural network using gradient clipping. I’m trying to understand how the hook function works. Let’s define a model and a clip function using Zygote, LinearAlgebra clip(g) = g./norm(g) a = 2; b = 1…

---

## [Efficiently remove diagonal from Array](https://discourse.julialang.org/t/efficiently-remove-diagonal-from-array/37893)

<div class="topic-metadata">

**Author:** [@Sajmon](https://discourse.julialang.org/u/Sajmon)\
**Replies:** 9\
**Last updated:** [April 20, 2020, 1:56pm UTC](https://discourse.julialang.org/t/efficiently-remove-diagonal-from-array/37893 "2020-04-20T13:56:05Z")

</div>

I’m trying to remove the diagonal from a two-dimensional square Array. I have come up with the code below but it’s not very efficient (e.g., on a 1000 x 1000 matrix, it allocates 75MiB and takes about 65ms on my machine)…

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

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