# Latest

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

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

**Page:** 1573

---

## [Const FileData = AbstractVector{UInt8}](https://discourse.julialang.org/t/const-filedata-abstractvector-uint8/50147)

<div class="topic-metadata">

**Author:** [@JuergenD](https://discourse.julialang.org/u/JuergenD)\
**Replies:** 7\
**Last updated:** [November 16, 2020, 7:47am UTC](https://discourse.julialang.org/t/const-filedata-abstractvector-uint8/50147 "2020-11-16T07:47:43Z")

</div>

Hi, I thought const FileData = AbstractVector{UInt8} it is just an alias, but afaik it is not. buf = obj.buf # buf is defined as ::FileData while start \< size ... fn(@view buf\[start:stop\]) ... end The ver…

---

## [Read gzipped protobuf file](https://discourse.julialang.org/t/read-gzipped-protobuf-file/50215)

<div class="topic-metadata">

**Author:** [@unis](https://discourse.julialang.org/u/unis)\
**Replies:** 1\
**Last updated:** [November 16, 2020, 7:22am UTC](https://discourse.julialang.org/t/read-gzipped-protobuf-file/50215 "2020-11-16T07:22:54Z")

</div>

I have a “protobuf reader”, generated using protoc, proto/coordinate\_push.jl, using which I’d like to import a gzipped file. This file contains a list of frames, each containing object coordinates. The corresponding Pyt…

---

## [Plots... \`xrot\` stopped working?](https://discourse.julialang.org/t/plots-xrot-stopped-working/46503)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 3\
**Last updated:** [November 16, 2020, 7:19am UTC](https://discourse.julialang.org/t/plots-xrot-stopped-working/46503 "2020-11-16T07:19:03Z")

</div>

In min June, I used keyword xrot to rotate the xticks in Plots with PyPlot backend: Today, the xrot keyword doesn’t seem to work any more: Has the keyword been removed/changed?

---

## [Julia 1.5.1 for Raspian 32 bit (Rasperry Pi)](https://discourse.julialang.org/t/julia-1-5-1-for-raspian-32-bit-rasperry-pi/46969)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 4\
**Last updated:** [November 16, 2020, 1:05am UTC](https://discourse.julialang.org/t/julia-1-5-1-for-raspian-32-bit-rasperry-pi/46969 "2020-11-16T01:05:44Z")

</div>

Hello, The last version of Julia for Raspian 32 bit is 1.3.1 . Why are there no newer versions? How can I build a version for Raspian 32 bit myself? Uwe

---

## [Is there a way to do elementwise function argument?](https://discourse.julialang.org/t/is-there-a-way-to-do-elementwise-function-argument/50178)

<div class="topic-metadata">

**Author:** [@minetest2048](https://discourse.julialang.org/u/minetest2048)\
**Replies:** 5\
**Last updated:** [November 15, 2020, 11:46pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-do-elementwise-function-argument/50178 "2020-11-15T23:46:24Z")

</div>

For example I have a array \[4,5,6,7\] and I want to clamp the first element to 1, second element to 2, third element to 3 and fourth element to 4. Can I do something like clamp.(\[4,5,6,7\],\[0,0,0,0\],\[1,2,3,4\]) and somehow …

---

## [\[PSA\] GADM.jl: A julia package providing maps and spatial data for all countries and their sub-divisions](https://discourse.julialang.org/t/psa-gadm-jl-a-julia-package-providing-maps-and-spatial-data-for-all-countries-and-their-sub-divisions/50203)

<div class="topic-metadata">

**Author:** [@yeesian](https://discourse.julialang.org/u/yeesian)\
**Replies:** 0\
**Last updated:** [November 15, 2020, 11:19pm UTC](https://discourse.julialang.org/t/psa-gadm-jl-a-julia-package-providing-maps-and-spatial-data-for-all-countries-and-their-sub-divisions/50203 "2020-11-15T23:19:09Z")

</div>

(Reposting from the #geo channel in Slack) Hi everyone, just wanted to help announce that https://github.com/JuliaGeo/GADM.jl has been released; it is developed by @zerefwayne under https://fellowship.mlh.io/. The packa…

---

## [JuMP: defining objective function uses matrix multiplication](https://discourse.julialang.org/t/jump-defining-objective-function-uses-matrix-multiplication/50169)

<div class="topic-metadata">

**Author:** [@kausban](https://discourse.julialang.org/u/kausban)\
**Replies:** 4\
**Last updated:** [November 15, 2020, 10:52pm UTC](https://discourse.julialang.org/t/jump-defining-objective-function-uses-matrix-multiplication/50169 "2020-11-15T22:52:24Z")

</div>

Hi I am trying to recreate a relatively simple optimization function that I have working with python using (casadi + ipopt). I am having some trouble figuring out how I can describe the objective function since it invol…

---

## [Sorting names. Surprise](https://discourse.julialang.org/t/sorting-names-surprise/50198)

<div class="topic-metadata">

**Author:** [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Replies:** 7\
**Last updated:** [November 15, 2020, 10:09pm UTC](https://discourse.julialang.org/t/sorting-names-surprise/50198 "2020-11-15T22:09:55Z")

</div>

What I’m I missing here? This is wrong. julia\> sort(\["Vila Flor", "Vila da Flor"\]) 2-element Vector{String}: "Vila Flor" "Vila da Flor" correct output should be "Vila da Flor" "Vila Flor"

---

## [Study of robust optimization](https://discourse.julialang.org/t/study-of-robust-optimization/50062)

<div class="topic-metadata">

**Author:** [@RaquelSantos](https://discourse.julialang.org/u/RaquelSantos)\
**Replies:** 0\
**Last updated:** [November 12, 2020, 6:35pm UTC](https://discourse.julialang.org/t/study-of-robust-optimization/50062 "2020-11-12T18:35:55Z")

</div>

I am studying about robust optimization models in Julia, I found some good examples but they are still not clear to me. Could someone help me by putting a simple example on the reformulation method and on the cut plan m…

---

## [How to make a 3d sphere in Gaston USING THE SET MAPPING SPHERICAL OPTION?](https://discourse.julialang.org/t/how-to-make-a-3d-sphere-in-gaston-using-the-set-mapping-spherical-option/48848)

<div class="topic-metadata">

**Author:** [@ChetanVardhan](https://discourse.julialang.org/u/ChetanVardhan)\
**Replies:** 9\
**Last updated:** [November 15, 2020, 8:02pm UTC](https://discourse.julialang.org/t/how-to-make-a-3d-sphere-in-gaston-using-the-set-mapping-spherical-option/48848 "2020-11-15T20:02:45Z")

</div>

set mapping spherical can be enabled using, surf(x,y,z, Axes(mapping=“spherical”))

---

## [Basic introduction to ssh-agent, libGit2 in the context of Pkg](https://discourse.julialang.org/t/basic-introduction-to-ssh-agent-libgit2-in-the-context-of-pkg/50113)

<div class="topic-metadata">

**Author:** [@mkarikom](https://discourse.julialang.org/u/mkarikom)\
**Replies:** 2\
**Last updated:** [November 15, 2020, 12:50am UTC](https://discourse.julialang.org/t/basic-introduction-to-ssh-agent-libgit2-in-the-context-of-pkg/50113 "2020-11-15T00:50:49Z")

</div>

This thread (and this, and this, and this) discuss a situation where something called “ssh-agent” is involved in preventing Pkg.add() from repeatedly requesting to override the private key location (when the existing one…

---

## [Put an underscore before all digits in a string](https://discourse.julialang.org/t/put-an-underscore-before-all-digits-in-a-string/50195)

<div class="topic-metadata">

**Author:** [@fusion809](https://discourse.julialang.org/u/fusion809)\
**Replies:** 1\
**Last updated:** [November 15, 2020, 6:13pm UTC](https://discourse.julialang.org/t/put-an-underscore-before-all-digits-in-a-string/50195 "2020-11-15T18:13:05Z")

</div>

I’ve tried reading these docs Introducing Julia/Strings and characters - Wikibooks, open books for an open world and these docs Strings · The Julia Language and I’ve tried several things, such as: replace("x1", r"\\d+" =\>…

---

## [Julia PyPlot: how to assign multiple colors to legend](https://discourse.julialang.org/t/julia-pyplot-how-to-assign-multiple-colors-to-legend/50177)

<div class="topic-metadata">

**Author:** [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Replies:** 2\
**Last updated:** [November 15, 2020, 5:00pm UTC](https://discourse.julialang.org/t/julia-pyplot-how-to-assign-multiple-colors-to-legend/50177 "2020-11-15T17:00:55Z")

</div>

Hello, I am assigning the color of a plot drawn with PyPlot manually, I need to assign the same color to the legend. How can I control the color parameter? I am using the following but it gives me an error: legend(\["A…

---

## [Write to a particular line in a file](https://discourse.julialang.org/t/write-to-a-particular-line-in-a-file/50179)

<div class="topic-metadata">

**Author:** [@fusion809](https://discourse.julialang.org/u/fusion809)\
**Replies:** 4\
**Last updated:** [November 15, 2020, 4:39pm UTC](https://discourse.julialang.org/t/write-to-a-particular-line-in-a-file/50179 "2020-11-15T16:39:47Z")

</div>

Is there a native Julia command to write to a particular line of a file? I know how to open a file, namely using open, but it seems like the options are to overwrite the entire file (with the “w” and write commands/optio…

---

## [Retrieve a unique stable ID number from an Arduino](https://discourse.julialang.org/t/retrieve-a-unique-stable-id-number-from-an-arduino/50185)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 2\
**Last updated:** [November 15, 2020, 3:46pm UTC](https://discourse.julialang.org/t/retrieve-a-unique-stable-id-number-from-an-arduino/50185 "2020-11-15T15:46:08Z")

</div>

I’m using LibSerialPort.jl to communicate with an Arduino. I have 5 Arduinos connected at the same time, and I’d like to have a robust way of identifying which is which (regardless or restarts or switching the cables). R…

---

## [Can be visualized clustering with the heatmap()?](https://discourse.julialang.org/t/can-be-visualized-clustering-with-the-heatmap/49903)

<div class="topic-metadata">

**Author:** [@HerAdri](https://discourse.julialang.org/u/HerAdri)\
**Replies:** 8\
**Last updated:** [November 15, 2020, 2:48pm UTC](https://discourse.julialang.org/t/can-be-visualized-clustering-with-the-heatmap/49903 "2020-11-15T14:48:12Z")

</div>

With this code I get the desired heatmap. using Plots dataMatrix=rand(40,10) heatmap(dataMatrix,levels=10,colorbar=false) But I would like to achieve the image of the heatmap with cluster, as shown in the figure: H…

---

## [Confused by different behavior of assignments of Arrays and Numbers](https://discourse.julialang.org/t/confused-by-different-behavior-of-assignments-of-arrays-and-numbers/50182)

<div class="topic-metadata">

**Author:** [@aachener](https://discourse.julialang.org/u/aachener)\
**Replies:** 2\
**Last updated:** [November 15, 2020, 1:27pm UTC](https://discourse.julialang.org/t/confused-by-different-behavior-of-assignments-of-arrays-and-numbers/50182 "2020-11-15T13:27:24Z")

</div>

Hello, everyone, This is rudimentary, but I’am confused about Julia’s different “=” behaviors for Numbers and Arrays. To my understanding, when we assign a variable to an object, we set the variable referred to the mem…

---

## [Conditional Logit MLP in Flux](https://discourse.julialang.org/t/conditional-logit-mlp-in-flux/50140)

<div class="topic-metadata">

**Author:** [@compleat](https://discourse.julialang.org/u/compleat)\
**Replies:** 4\
**Last updated:** [November 15, 2020, 1:03pm UTC](https://discourse.julialang.org/t/conditional-logit-mlp-in-flux/50140 "2020-11-15T13:03:56Z")

</div>

I have been trying for awhile to get Conditional Logistic Regression (mathematically equivalent to Cox Proportional Hazards model) working with MLP’s in Flux, and have found a way, though it is clumsy. I am wondering i…

---

## [Cannot compute gradient/apply back method to solve function](https://discourse.julialang.org/t/cannot-compute-gradient-apply-back-method-to-solve-function/50082)

<div class="topic-metadata">

**Author:** [@TomCif](https://discourse.julialang.org/u/TomCif)\
**Replies:** 3\
**Last updated:** [November 15, 2020, 12:07pm UTC](https://discourse.julialang.org/t/cannot-compute-gradient-apply-back-method-to-solve-function/50082 "2020-11-15T12:07:54Z")

</div>

Hi, I’m facing an issue which avoids me to train my model using sciml\_train. I have the following training data: model = Normal(5., 0.1) raw\_data = rand(model, (1, 100)) x = rand(model, (1; 100)) u0 = \[x; 0\] I have…

---

## [Struct Parameterized by One Dimension of StaticArray Matrix Members](https://discourse.julialang.org/t/struct-parameterized-by-one-dimension-of-staticarray-matrix-members/50115)

<div class="topic-metadata">

**Author:** [@tawheeler](https://discourse.julialang.org/u/tawheeler)\
**Replies:** 9\
**Last updated:** [November 15, 2020, 9:38am UTC](https://discourse.julialang.org/t/struct-parameterized-by-one-dimension-of-staticarray-matrix-members/50115 "2020-11-15T09:38:51Z")

</div>

I would like to preallocate some static arrays for use with DifferentialEquations.jl. My problem uses a lot of matrices that are 3 x N, where N is not known ahead of time. I would like to use StaticArrays.jl and do somet…

---

## [How do I debug this in diffeqflux?](https://discourse.julialang.org/t/how-do-i-debug-this-in-diffeqflux/49845)

<div class="topic-metadata">

**Author:** [@Allan\_Baker](https://discourse.julialang.org/u/Allan_Baker)\
**Replies:** 38\
**Last updated:** [November 15, 2020, 3:08am UTC](https://discourse.julialang.org/t/how-do-i-debug-this-in-diffeqflux/49845 "2020-11-15T03:08:05Z")

</div>

This is my first attempt at using diffeq. I just don’t get much help from the stacktrace. I’m trying to train a neural network that is inside a differential equation like a reinforcement learning problem. I get a war…

---

## [Optim.jl : ParticleSwarm Multithreading at the function level](https://discourse.julialang.org/t/optim-jl-particleswarm-multithreading-at-the-function-level/50117)

<div class="topic-metadata">

**Author:** [@lrnv](https://discourse.julialang.org/u/lrnv)\
**Replies:** 9\
**Last updated:** [November 14, 2020, 9:04pm UTC](https://discourse.julialang.org/t/optim-jl-particleswarm-multithreading-at-the-function-level/50117 "2020-11-14T21:04:16Z")

</div>

Hi, I’m using the PSO algorithm in Optim.jl to minimise a certain loss function, which is a positive multinomial of very high degree (over a constraint domain, a product of several simplexes), and the optimisation is do…

---

## [Adding more HTML code to an Interact.jl app](https://discourse.julialang.org/t/adding-more-html-code-to-an-interact-jl-app/50160)

<div class="topic-metadata">

**Author:** [@Jojo\_Dad](https://discourse.julialang.org/u/Jojo_Dad)\
**Replies:** 0\
**Last updated:** [November 14, 2020, 8:45pm UTC](https://discourse.julialang.org/t/adding-more-html-code-to-an-interact-jl-app/50160 "2020-11-14T20:45:46Z")

</div>

I have created a simple Interact.jl browser-based app: using Mux, WebIO, Interact, Plots; function app(req) @manipulate for omega=0.1:0.2:3 x=0:0.01:2\*π; y=sin.(omega\*x); plot(x,y); end; end webio\_s…

---

## [MPI not working with PackageCompiler?](https://discourse.julialang.org/t/mpi-not-working-with-packagecompiler/50159)

<div class="topic-metadata">

**Author:** [@kirklong](https://discourse.julialang.org/u/kirklong)\
**Replies:** 0\
**Last updated:** [November 14, 2020, 8:21pm UTC](https://discourse.julialang.org/t/mpi-not-working-with-packagecompiler/50159 "2020-11-14T20:21:31Z")

</div>

I’ve been recently playing with the MPI wrappers for Julia (MPI.jl) – yesterday I built a dumb test problem in both C and Julia and was comparing performance, and Julia is pretty close to C which is impressive! I thoug…

---

## [DiffEq: Flux.train crashes mid-training and requests larger maxiter](https://discourse.julialang.org/t/diffeq-flux-train-crashes-mid-training-and-requests-larger-maxiter/50154)

<div class="topic-metadata">

**Author:** [@Gregor](https://discourse.julialang.org/u/Gregor)\
**Replies:** 3\
**Last updated:** [November 14, 2020, 7:16pm UTC](https://discourse.julialang.org/t/diffeq-flux-train-crashes-mid-training-and-requests-larger-maxiter/50154 "2020-11-14T19:16:14Z")

</div>

Hello everyone, I’m trying to optimize the parameters in a nonlinear differential equation towards some known parameters using the ADAMs optimizer (benchmarking different optimizers for later usage). For some initial co…

---

## [Julia PyPlot: how to use multiple linestyles](https://discourse.julialang.org/t/julia-pyplot-how-to-use-multiple-linestyles/50151)

<div class="topic-metadata">

**Author:** [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Replies:** 1\
**Last updated:** [November 14, 2020, 6:19pm UTC](https://discourse.julialang.org/t/julia-pyplot-how-to-use-multiple-linestyles/50151 "2020-11-14T18:19:31Z")

</div>

Hello, I am not quite into pyplot and I could not find a good tutorial (there is pyplot, but only for python). I am trying to plot some results and I would like to use different linestyles. But I get an error: myPlot …

---

## [Help with using ModellingToolkit.jl for evolutionary analysis](https://discourse.julialang.org/t/help-with-using-modellingtoolkit-jl-for-evolutionary-analysis/45943)

<div class="topic-metadata">

**Author:** [@SanAlphaTau](https://discourse.julialang.org/u/SanAlphaTau)\
**Replies:** 7\
**Last updated:** [November 14, 2020, 5:25pm UTC](https://discourse.julialang.org/t/help-with-using-modellingtoolkit-jl-for-evolutionary-analysis/45943 "2020-11-14T17:25:15Z")

</div>

Spawned from earlier question here: SymPy vs Sympy.jl and/or symengine.jl Hello all. I am working on a converting a model written in python using sympy into julia. I posted a previous thread on packages I should use but…

---

## [Builtin argmin is slower than manual](https://discourse.julialang.org/t/builtin-argmin-is-slower-than-manual/50127)

<div class="topic-metadata">

**Author:** [@endremborza](https://discourse.julialang.org/u/endremborza)\
**Replies:** 13\
**Last updated:** [November 14, 2020, 3:57pm UTC](https://discourse.julialang.org/t/builtin-argmin-is-slower-than-manual/50127 "2020-11-14T15:57:27Z")

</div>

I don’t understand how this is possible. I tried it many times, targmin always wins, and by quite a significant margin (1.5.2) using BenchmarkTools function targmin(a) m = Inf ind = 0 for i in 1:length(a) …

---

## [Strange MaxIters (numeric instability?) occured when solving certain SDE](https://discourse.julialang.org/t/strange-maxiters-numeric-instability-occured-when-solving-certain-sde/49392)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 10\
**Last updated:** [November 14, 2020, 3:50pm UTC](https://discourse.julialang.org/t/strange-maxiters-numeric-instability-occured-when-solving-certain-sde/49392 "2020-11-14T15:50:06Z")

</div>

I’ve been solving this equation for a lot of different parameters, but suddenly I am getting occasional ┌ Warning: Interrupted. Larger maxiters is needed. └ @ DiffEqBase /home/torkelloman/.julia/packages/DiffEqBase/V7P1…

---

## [Think Julia Exercise 10.1](https://discourse.julialang.org/t/think-julia-exercise-10-1/50098)

<div class="topic-metadata">

**Author:** [@AKL](https://discourse.julialang.org/u/AKL)\
**Replies:** 36\
**Last updated:** [November 14, 2020, 2:39pm UTC](https://discourse.julialang.org/t/think-julia-exercise-10-1/50098 "2020-11-14T14:39:19Z")

</div>

Hey, I am fairly new to Julia and coding. Thus, i still struggle on a lot of things in Julia. I am trying to solve the exercise 10.1 and would like some help on this, at least where to start. \*Write a function called n…

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

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