# Latest

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

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

**Page:** 1527

---

## [Nonlinear fit with Flux](https://discourse.julialang.org/t/nonlinear-fit-with-flux/53075)

<div class="topic-metadata">

**Author:** [@edwinb-ai](https://discourse.julialang.org/u/edwinb-ai)\
**Replies:** 2\
**Last updated:** [January 10, 2021, 4:10am UTC](https://discourse.julialang.org/t/nonlinear-fit-with-flux/53075 "2021-01-10T04:10:43Z")

</div>

using Flux using Flux.Losses: mse using Flux.Data: DataLoader using Plots using Random gr() nonlinear(x) = sin(x) + sin(2 \* x) + 0.1f0 \* randn() function get\_data() points = 1000 xvals = collect(Float32, range…

---

## [ANN LegibleLambdas.jl](https://discourse.julialang.org/t/ann-legiblelambdas-jl/21199)

<div class="topic-metadata">

**Author:** [@Mason](https://discourse.julialang.org/u/Mason)\
**Replies:** 8\
**Last updated:** [January 10, 2021, 3:38am UTC](https://discourse.julialang.org/t/ann-legiblelambdas-jl/21199 "2021-01-10T03:38:38Z")

</div>

LegibleLambas.jl is a package for making anonymous functions whose names are their expressions, ie. julia\> f = @λ(x -\> x + 1) (x -\> x + 1) julia\> f(1.0) 2.0 The primary use-case I see for this functionality is for fun…

---

## [Seemingly innoculus change causes code to run 4 times slower](https://discourse.julialang.org/t/seemingly-innoculus-change-causes-code-to-run-4-times-slower/53074)

<div class="topic-metadata">

**Author:** [@Mark\_Williams](https://discourse.julialang.org/u/Mark_Williams)\
**Replies:** 10\
**Last updated:** [January 9, 2021, 9:44pm UTC](https://discourse.julialang.org/t/seemingly-innoculus-change-causes-code-to-run-4-times-slower/53074 "2021-01-09T21:44:56Z")

</div>

I have a simple script that solves an economic model. It solves my problem quickly but isn’t very readable. On making a small change to the code (to improve readability), essentially defining the simple function rhs(i,j…

---

## [Jupyter to Pluto converter](https://discourse.julialang.org/t/jupyter-to-pluto-converter/53085)

<div class="topic-metadata">

**Author:** [@Rojesh](https://discourse.julialang.org/u/Rojesh)\
**Replies:** 1\
**Last updated:** [January 9, 2021, 8:31pm UTC](https://discourse.julialang.org/t/jupyter-to-pluto-converter/53085 "2021-01-09T20:31:30Z")

</div>

I wanted to convert jupyter notebook to pluto notebook and reverse way as well. Couldn’t find other solution. Are there any existing tool for this ? So I tried to write a small script. It worked for me but there are st…

---

## [Count of Julia Users](https://discourse.julialang.org/t/count-of-julia-users/47389)

<div class="topic-metadata">

**Author:** [@julia.user.buet](https://discourse.julialang.org/u/julia.user.buet)\
**Replies:** 2\
**Last updated:** [January 9, 2021, 8:14pm UTC](https://discourse.julialang.org/t/count-of-julia-users/47389 "2021-01-09T20:14:10Z")

</div>

I am interested to know how many developers use Julia. Where can I find this information?

---

## [Sample row from array](https://discourse.julialang.org/t/sample-row-from-array/53087)

<div class="topic-metadata">

**Author:** [@ZettEff](https://discourse.julialang.org/u/ZettEff)\
**Replies:** 4\
**Last updated:** [January 9, 2021, 6:24pm UTC](https://discourse.julialang.org/t/sample-row-from-array/53087 "2021-01-09T18:24:41Z")

</div>

How do I sample from a two dimensional array by row? Is there a julia specific way and/or build-in function to do this? I am only able to sample elements using StatsBase m = \[1 2 3; 4 5 6; 7 8 9\] sample(m,3) So I mu…

---

## [Stability of arithmetic expressions in Julia](https://discourse.julialang.org/t/stability-of-arithmetic-expressions-in-julia/53084)

<div class="topic-metadata">

**Author:** [@gideonsimpson](https://discourse.julialang.org/u/gideonsimpson)\
**Replies:** 2\
**Last updated:** [January 9, 2021, 5:55pm UTC](https://discourse.julialang.org/t/stability-of-arithmetic-expressions-in-julia/53084 "2021-01-09T17:55:17Z")

</div>

I was thinking about numerical stability (with respect to floating point) of polynomial evaluation, and I had the following question: if I naively write a polynomial (or other) expression in Julia, is it evaluated in a w…

---

## [LaTeX in README.md file of a repo](https://discourse.julialang.org/t/latex-in-readme-md-file-of-a-repo/53073)

<div class="topic-metadata">

**Author:** [@Gregstrq](https://discourse.julialang.org/u/Gregstrq)\
**Replies:** 2\
**Last updated:** [January 9, 2021, 12:58pm UTC](https://discourse.julialang.org/t/latex-in-readme-md-file-of-a-repo/53073 "2021-01-09T12:58:38Z")

</div>

Is it possible to use LaTeX rendering in README.md file of a repo? I have tried to add some LaTeX commands in double backticks to README.MD, however, it looks like they are note recognized.

---

## [Design of N dimensional structure for Particle](https://discourse.julialang.org/t/design-of-n-dimensional-structure-for-particle/53033)

<div class="topic-metadata">

**Author:** [@ykkan](https://discourse.julialang.org/u/ykkan)\
**Replies:** 4\
**Last updated:** [January 9, 2021, 10:21am UTC](https://discourse.julialang.org/t/design-of-n-dimensional-structure-for-particle/53033 "2021-01-09T10:21:19Z")

</div>

Hello Everyone, I have a structure storing the position and velocity for a bunch of particles in N dimension space and functions for updating the position and velocity of particles: struct Particles{N,T} pos::Vector{…

---

## [Possible issue with \`unique\` when overloading \`isequal\`](https://discourse.julialang.org/t/possible-issue-with-unique-when-overloading-isequal/53079)

<div class="topic-metadata">

**Author:** [@maltezfaria](https://discourse.julialang.org/u/maltezfaria)\
**Replies:** 2\
**Last updated:** [January 9, 2021, 10:19am UTC](https://discourse.julialang.org/t/possible-issue-with-unique-when-overloading-isequal/53079 "2021-01-09T10:19:04Z")

</div>

I am trying to understand why calling unique in the following example returns a vector containing two elements which are equal as per isequal: struct Tag tag::Int end Base.:(==)(t1::Tag,t2::Tag) = abs(t1.tag) == ab…

---

## [Is package from dependencies avialable for using](https://discourse.julialang.org/t/is-package-from-dependencies-avialable-for-using/53078)

<div class="topic-metadata">

**Author:** [@akalinin](https://discourse.julialang.org/u/akalinin)\
**Replies:** 3\
**Last updated:** [January 9, 2021, 8:42am UTC](https://discourse.julialang.org/t/is-package-from-dependencies-avialable-for-using/53078 "2021-01-09T08:42:36Z")

</div>

Could you please help me to understand the Packages dependencies using. For example, I installed the GLMakie package: Updating \`C:\\Users\\aleck\\.julia\\environments\\v1.5\\Project.toml\` \[e9467ef8\] + GLMakie v0.1.23 Updati…

---

## [What exactly does \`ENV\["LINES"\]\` control?](https://discourse.julialang.org/t/what-exactly-does-env-lines-control/53053)

<div class="topic-metadata">

**Author:** [@Michael\_Barmann](https://discourse.julialang.org/u/Michael_Barmann)\
**Replies:** 5\
**Last updated:** [January 9, 2021, 8:28am UTC](https://discourse.julialang.org/t/what-exactly-does-env-lines-control/53053 "2021-01-09T08:28:17Z")

</div>

I’m interested in adjusting the number of DataFrame rows which are automatically displayed in the REPL, and according to some posts I’ve read on SO, it seems that changing the value of ENV\["LINES"\] is one way to do this.…

---

## [Way to store what is normally printed in the REPL to a string or file?](https://discourse.julialang.org/t/way-to-store-what-is-normally-printed-in-the-repl-to-a-string-or-file/53068)

<div class="topic-metadata">

**Author:** [@Benny](https://discourse.julialang.org/u/Benny)\
**Replies:** 2\
**Last updated:** [January 9, 2021, 8:24am UTC](https://discourse.julialang.org/t/way-to-store-what-is-normally-printed-in-the-repl-to-a-string-or-file/53068 "2021-01-09T08:24:35Z")

</div>

I specifically want to store the outputs of @code\_warntype to a string or file so I can read through it later, but I’m also interested in doing something similar for any expression that prints to the REPL.

---

## [Reading in non-consecutive columns using XLSX.gettable?](https://discourse.julialang.org/t/reading-in-non-consecutive-columns-using-xlsx-gettable/53060)

<div class="topic-metadata">

**Author:** [@Michael\_Barmann](https://discourse.julialang.org/u/Michael_Barmann)\
**Replies:** 1\
**Last updated:** [January 9, 2021, 8:17am UTC](https://discourse.julialang.org/t/reading-in-non-consecutive-columns-using-xlsx-gettable/53060 "2021-01-09T08:17:47Z")

</div>

Is there a way to read in a selection of non-consecutive columns of Excel data using XLSX.gettable? I’ve read the documentation here Tutorial-XLSX.jl , but it’s not clear whether it’s possible to do this. For example, d…

---

## [Cuda cg + ilu?](https://discourse.julialang.org/t/cuda-cg-ilu/53069)

<div class="topic-metadata">

**Author:** [@Omega-xyZac](https://discourse.julialang.org/u/Omega-xyZac)\
**Replies:** 4\
**Last updated:** [January 9, 2021, 12:38am UTC](https://discourse.julialang.org/t/cuda-cg-ilu/53069 "2021-01-09T00:38:24Z")

</div>

Hi all, I’m looking to use a GPU CG method with an ILU preconditioner. I’m currently using a CPU CG method through IterativeSolvers and ILU through IncompleteLU.jl . The CG method from IterativeSolvers is easily extende…

---

## [Plotting a line histogram](https://discourse.julialang.org/t/plotting-a-line-histogram/38728)

<div class="topic-metadata">

**Author:** [@sijo](https://discourse.julialang.org/u/sijo)\
**Replies:** 9\
**Last updated:** [January 9, 2021, 12:09am UTC](https://discourse.julialang.org/t/plotting-a-line-histogram/38728 "2021-01-09T00:09:05Z")

</div>

Hi, I’m trying to plot an approximation of a probability density function (as a line plot) from a list of samples. Is this supported by Plots.jl? There is the :stephist series type, but it makes steps rather than a line…

---

## [Anybody had Julia runnig on VMWare ESXi directly?](https://discourse.julialang.org/t/anybody-had-julia-runnig-on-vmware-esxi-directly/53022)

<div class="topic-metadata">

**Author:** [@Zhong\_Pan](https://discourse.julialang.org/u/Zhong_Pan)\
**Replies:** 2\
**Last updated:** [January 8, 2021, 9:36pm UTC](https://discourse.julialang.org/t/anybody-had-julia-runnig-on-vmware-esxi-directly/53022 "2021-01-08T21:36:46Z")

</div>

This is probably a long shot… But has anybody succeeded in running Julia directly on VMWare ESXi (i.e. as against to running Julia on a VM that runs on ESXi)? I tried the Linux version of Julia on ESXi 6.5 and it crashe…

---

## [Idiomatic way to specify exclusive range?](https://discourse.julialang.org/t/idiomatic-way-to-specify-exclusive-range/53024)

<div class="topic-metadata">

**Author:** [@Stephen\_Vavasis](https://discourse.julialang.org/u/Stephen_Vavasis)\
**Replies:** 5\
**Last updated:** [January 8, 2021, 8:14pm UTC](https://discourse.julialang.org/t/idiomatic-way-to-specify-exclusive-range/53024 "2021-01-08T20:14:03Z")

</div>

The idiomatic way to specify a range from a to b inclusive is a:b. Is there an standard operator or idiom to express the range a to b in which b itself is excluded (something like range() in Python)? I’m planning to ma…

---

## [Sections of strings or arrays and concrete types](https://discourse.julialang.org/t/sections-of-strings-or-arrays-and-concrete-types/53041)

<div class="topic-metadata">

**Author:** [@tlienart](https://discourse.julialang.org/u/tlienart)\
**Replies:** 9\
**Last updated:** [January 8, 2021, 8:42pm UTC](https://discourse.julialang.org/t/sections-of-strings-or-arrays-and-concrete-types/53041 "2021-01-08T20:42:12Z")

</div>

I’m starting to wade into the wonderful world of SnoopCompile and the many insights it gives (and realising along the way that my understanding of types, inference etc, is shallow to say the least). One thing I got from …

---

## [Gradient of Neural Network wrapper can't be taken](https://discourse.julialang.org/t/gradient-of-neural-network-wrapper-cant-be-taken/53061)

<div class="topic-metadata">

**Author:** [@Sunny](https://discourse.julialang.org/u/Sunny)\
**Replies:** 0\
**Last updated:** [January 8, 2021, 8:12pm UTC](https://discourse.julialang.org/t/gradient-of-neural-network-wrapper-cant-be-taken/53061 "2021-01-08T20:12:34Z")

</div>

I use the following wrapper for neural network nn = Chain(Dense(2, 64, relu), Dense(64, 1)) function wrapper\_nn(state) q, q\_t = state dfdx(x,x\_t) = ForwardDiff.derivative(x -\> nn(\[x, x\_t\]), x) #qtt = nn(\[q, …

---

## [How to fit a normal approximation to data in Julia](https://discourse.julialang.org/t/how-to-fit-a-normal-approximation-to-data-in-julia/35045)

<div class="topic-metadata">

**Author:** [@lesshaste](https://discourse.julialang.org/u/lesshaste)\
**Replies:** 21\
**Last updated:** [January 8, 2021, 7:32pm UTC](https://discourse.julialang.org/t/how-to-fit-a-normal-approximation-to-data-in-julia/35045 "2021-01-08T19:32:19Z")

</div>

I have an unnormalized array of counts for a probability mass function (derived from sampling from the true function). The array should be indexed from 0. 12 is the number of times a 0 occurred in the sample. 199 is th…

---

## [Error using LazySets.plot3d](https://discourse.julialang.org/t/error-using-lazysets-plot3d/52994)

<div class="topic-metadata">

**Author:** [@adropintheriver](https://discourse.julialang.org/u/adropintheriver)\
**Replies:** 3\
**Last updated:** [January 8, 2021, 6:52pm UTC](https://discourse.julialang.org/t/error-using-lazysets-plot3d/52994 "2021-01-08T18:52:14Z")

</div>

I even did Pkg.update() to ensure i have the latest versions, but still get t using LazySets, Makie, Polyhedra LazySets.plot3d(10. \* rand(Hyperrectangle, dim=3)) MethodError: no method matching iterate(::Polyhedra.Mesh…

---

## [Formatting plots with Makie](https://discourse.julialang.org/t/formatting-plots-with-makie/53034)

<div class="topic-metadata">

**Author:** [@pb866](https://discourse.julialang.org/u/pb866)\
**Replies:** 11\
**Last updated:** [January 8, 2021, 6:34pm UTC](https://discourse.julialang.org/t/formatting-plots-with-makie/53034 "2021-01-08T18:34:46Z")

</div>

With this announcement of a Makie update, I finally pushed myself to try it out and must say, I really love it. Both, the plotting script and the output look beautiful and, finally, I am ready to move away from PyPlot, w…

---

## [Data Structures for 3D mesh](https://discourse.julialang.org/t/data-structures-for-3d-mesh/53051)

<div class="topic-metadata">

**Author:** [@akalinin](https://discourse.julialang.org/u/akalinin)\
**Replies:** 2\
**Last updated:** [January 8, 2021, 6:10pm UTC](https://discourse.julialang.org/t/data-structures-for-3d-mesh/53051 "2021-01-08T18:10:19Z")

</div>

I want to plot 3D triangular mesh in Julia. “JuliaPlots/Makie.jl” package looks good for this purposes and I visited the “JuliaPlots/MakieGallery.jl/blob/master/examples/examples3d.jl” for some examples. And probably the…

---

## [Eigenvalue calculation differs between Julia and MATLAB](https://discourse.julialang.org/t/eigenvalue-calculation-differs-between-julia-and-matlab/31185)

<div class="topic-metadata">

**Author:** [@ElectronicTeaCup](https://discourse.julialang.org/u/ElectronicTeaCup)\
**Replies:** 25\
**Last updated:** [January 8, 2021, 5:16pm UTC](https://discourse.julialang.org/t/eigenvalue-calculation-differs-between-julia-and-matlab/31185 "2021-01-08T17:16:24Z")

</div>

I am determining the eigenvectors of some matrices, however, the result appears a little different between Julia and MATLAB. I’m porting some code onto Julia and want the exact output as I would see in MATLAB/OCTAVE. Any…

---

## [Comparison of math symbol support in monospace fonts](https://discourse.julialang.org/t/comparison-of-math-symbol-support-in-monospace-fonts/53054)

<div class="topic-metadata">

**Author:** [@sijo](https://discourse.julialang.org/u/sijo)\
**Replies:** 0\
**Last updated:** [January 8, 2021, 5:29pm UTC](https://discourse.julialang.org/t/comparison-of-math-symbol-support-in-monospace-fonts/53054 "2021-01-08T17:29:18Z")

</div>

I finally made the script I promised to compare how different monospace fonts support math symbols. Here’s the result: https://mono-math.netlify.app/ This new comparator doesn’t use fallback fonts, so you can see what’…

---

## [Closure strange behaviour](https://discourse.julialang.org/t/closure-strange-behaviour/53052)

<div class="topic-metadata">

**Author:** [@claudio20497](https://discourse.julialang.org/u/claudio20497)\
**Replies:** 1\
**Last updated:** [January 8, 2021, 4:59pm UTC](https://discourse.julialang.org/t/closure-strange-behaviour/53052 "2021-01-08T16:59:56Z")

</div>

Hello, I’m experiencing the following unexpected behaviour. Imagine you have a function like: function select\_function(p) if p == "a" function a() println("a") end …

---

## [Slow performance for \`rand(ComplexF64, ...)\`](https://discourse.julialang.org/t/slow-performance-for-rand-complexf64/53032)

<div class="topic-metadata">

**Author:** [@DNF](https://discourse.julialang.org/u/DNF)\
**Replies:** 5\
**Last updated:** [January 8, 2021, 4:12pm UTC](https://discourse.julialang.org/t/slow-performance-for-rand-complexf64/53032 "2021-01-08T16:12:48Z")

</div>

I was quite surprised to see this performance difference: julia\> using BenchmarkTools julia\> N = 1000; julia\> @btime complex.(rand($N, $N), rand($N, $N)); 4.852 ms (6 allocations: 30.52 MiB) julia\> @btime rand(Comp…

---

## [Derivative with respect to specified element of a vector](https://discourse.julialang.org/t/derivative-with-respect-to-specified-element-of-a-vector/53045)

<div class="topic-metadata">

**Author:** [@Sunny](https://discourse.julialang.org/u/Sunny)\
**Replies:** 2\
**Last updated:** [January 8, 2021, 3:34pm UTC](https://discourse.julialang.org/t/derivative-with-respect-to-specified-element-of-a-vector/53045 "2021-01-08T15:34:58Z")

</div>

For example, I have the following function function test\_fun(state) x, y = state # 2 values \[x\*y^2\] end state = \[2,3\] test\_fun(state) I’d like to find the mixed derivative \\frac{d^2f}{dxdy} for vector case. I…

---

## [Converting a PyObject to a Julia struct](https://discourse.julialang.org/t/converting-a-pyobject-to-a-julia-struct/53001)

<div class="topic-metadata">

**Author:** [@chkwon](https://discourse.julialang.org/u/chkwon)\
**Replies:** 8\
**Last updated:** [January 8, 2021, 2:50pm UTC](https://discourse.julialang.org/t/converting-a-pyobject-to-a-julia-struct/53001 "2021-01-08T14:50:22Z")

</div>

I’m trying to call Julia from Python vi PyJulia. In Julia, I have a struct like mutable struct Person age :: Int weight :: Float64 end function add\_age!(p::Person) p.age += 1 end using PyCall py\_add\_age = pyfu…

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

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