# Latest

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

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

**Page:** 1540

---

## [Track memory usage](https://discourse.julialang.org/t/track-memory-usage/52158)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 14\
**Last updated:** [December 23, 2020, 2:29pm UTC](https://discourse.julialang.org/t/track-memory-usage/52158 "2020-12-23T14:29:28Z")

</div>

Is there a package/function that I can use to see, track, log, and/or diagnose the memory usage of variables? I’m serving a website with JSServe and WGLMakie, and after a few hours of usage I get OutOfMemory errors. My …

---

## [Find number of digits in a non-integer number?](https://discourse.julialang.org/t/find-number-of-digits-in-a-non-integer-number/37445)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 15\
**Last updated:** [December 23, 2020, 8:13am UTC](https://discourse.julialang.org/t/find-number-of-digits-in-a-non-integer-number/37445 "2020-12-23T08:13:16Z")

</div>

Hello! Say I have four numbers; 1.0 0.5 0.05 0.065 I want to know how far I have to go before I hit the first non-zero value. So in this case; For 1 I would not have to move, so I expect to get output, 0 For 0.5 I wo…

---

## [Why does every module contain a link to Main in the REPL?](https://discourse.julialang.org/t/why-does-every-module-contain-a-link-to-main-in-the-repl/52274)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 1\
**Last updated:** [December 23, 2020, 1:51pm UTC](https://discourse.julialang.org/t/why-does-every-module-contain-a-link-to-main-in-the-repl/52274 "2020-12-23T13:51:36Z")

</div>

julia\> module foo end Main.foo julia\> foo.Main Main julia\> foo.Main.foo.Main.foo === foo true julia\> x = 4 4 julia\> Main.x 4 julia\> foo.Main.x 4 Not quite sure why foo contains Main?

---

## [Difference between "using x" vs "using .x" or "using Main.x"](https://discourse.julialang.org/t/difference-between-using-x-vs-using-x-or-using-main-x/52269)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 3\
**Last updated:** [December 23, 2020, 1:13pm UTC](https://discourse.julialang.org/t/difference-between-using-x-vs-using-x-or-using-main-x/52269 "2020-12-23T13:13:50Z")

</div>

Got curious about this behaviour: \] add DataFrames # if needed using .DataFrames # not ok using Main.DataFrames # not ok using DataFrames # ok using .DataFrames # now ok using Main.DataFrames # now ok…

---

## [Work with us at the Machine Learning ⇌ Science Colaboratory (Tübingen, Germany)](https://discourse.julialang.org/t/work-with-us-at-the-machine-learning-science-colaboratory-tubingen-germany/51106)

<div class="topic-metadata">

**Author:** [@alvorithm](https://discourse.julialang.org/u/alvorithm)\
**Replies:** 1\
**Last updated:** [December 23, 2020, 12:05pm UTC](https://discourse.julialang.org/t/work-with-us-at-the-machine-learning-science-colaboratory-tubingen-germany/51106 "2020-12-23T12:05:41Z")

</div>

The mlcolab is, for me, a dream come true. We talk to researchers from all disciplines, (cognitive science, plant biology, computational linguistics, environmental engineering, paleoclimatology, quantum physics, history…

---

## [Push! function changes original array](https://discourse.julialang.org/t/push-function-changes-original-array/52270)

<div class="topic-metadata">

**Author:** [@Jaime](https://discourse.julialang.org/u/Jaime)\
**Replies:** 1\
**Last updated:** [December 23, 2020, 11:45am UTC](https://discourse.julialang.org/t/push-function-changes-original-array/52270 "2020-12-23T11:45:05Z")

</div>

function foo(name, package) println( package, "#1 foo pack") newpackage=copy(package) println( newpackage, "#1 foo newpack") push!(newpackage\[1\].second, name) println( package, "#2 foo pack") …

---

## [UniftulRecipes and LaTeXStrings](https://discourse.julialang.org/t/uniftulrecipes-and-latexstrings/52247)

<div class="topic-metadata">

**Author:** [@mocalvao](https://discourse.julialang.org/u/mocalvao)\
**Replies:** 3\
**Last updated:** [December 23, 2020, 11:44am UTC](https://discourse.julialang.org/t/uniftulrecipes-and-latexstrings/52247 "2020-12-23T11:44:05Z")

</div>

Hi Is there a way to use simultaneously UnitfulRecipes and LaTeXStrings? Somewhat like (adapted from UniftulRecipes’ first example: using Unitful, UnitfulRecipes, Plots, LaTeXStrings const a = 1u"m/s^2" v(t) = a \* t x(…

---

## [Function with a single method acting on Union{T1, T2} or another function with two methods, for T1 and T2?](https://discourse.julialang.org/t/function-with-a-single-method-acting-on-union-t1-t2-or-another-function-with-two-methods-for-t1-and-t2/52132)

<div class="topic-metadata">

**Author:** [@mocalvao](https://discourse.julialang.org/u/mocalvao)\
**Replies:** 7\
**Last updated:** [December 23, 2020, 11:26am UTC](https://discourse.julialang.org/t/function-with-a-single-method-acting-on-union-t1-t2-or-another-function-with-two-methods-for-t1-and-t2/52132 "2020-12-23T11:26:24Z")

</div>

I have the following code: struct Square{T\<:Real} width::T = 1 end struct Rectangle{T\<:Real} width::T = 1 height::T = 2 end Quadrilateral = Union{Square, Rectangle} function area1(q::Quadrilateral) if…

---

## [GeoStats.jl Survey 2020](https://discourse.julialang.org/t/geostats-jl-survey-2020/52267)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 0\
**Last updated:** [December 23, 2020, 10:57am UTC](https://discourse.julialang.org/t/geostats-jl-survey-2020/52267 "2020-12-23T10:57:43Z")

</div>

Are you using GeoStats.jl in your work? Please consider this quick survey: https://forms.gle/a5tHHQwc9RudkMzcA We will use the results to better plan our efforts next year. Thank you and happy new year!

---

## [Simple numerical differentiation](https://discourse.julialang.org/t/simple-numerical-differentiation/52254)

<div class="topic-metadata">

**Author:** [@ishihama](https://discourse.julialang.org/u/ishihama)\
**Replies:** 5\
**Last updated:** [December 23, 2020, 10:26am UTC](https://discourse.julialang.org/t/simple-numerical-differentiation/52254 "2020-12-23T10:26:10Z")

</div>

Hello there, I am wondering how to implement numerical differentiation in Julia simply. My MWE looks like, using ForwardDiff p = \[1, 2, 3\] f(x::Vector) = p\[1\] .+ p\[2\] .\* x .+ p\[3\] .\* x .^ 2 x=1:10 g = x -\> ForwardDiff.g…

---

## [Access elements in an array that are not contiguous](https://discourse.julialang.org/t/access-elements-in-an-array-that-are-not-contiguous/52262)

<div class="topic-metadata">

**Author:** [@marouane](https://discourse.julialang.org/u/marouane)\
**Replies:** 2\
**Last updated:** [December 23, 2020, 8:07am UTC](https://discourse.julialang.org/t/access-elements-in-an-array-that-are-not-contiguous/52262 "2020-12-23T08:07:30Z")

</div>

i have some array like this x=\[2, 1, 1, 0, 1, 0, 1, 0\] and i want to show only the first two elements and the last two elements of the array but when i do this x\[1:2 & 7:8\] it shows me this : 4-element Array{Int64,1}: …

---

## [Makie.jl precompilation: how to launch MakieSys.so?](https://discourse.julialang.org/t/makie-jl-precompilation-how-to-launch-makiesys-so/46116)

<div class="topic-metadata">

**Author:** [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Replies:** 7\
**Last updated:** [December 23, 2020, 6:30am UTC](https://discourse.julialang.org/t/makie-jl-precompilation-how-to-launch-makiesys-so/46116 "2020-12-23T06:30:33Z")

</div>

Followed Makie.jl precompilation instructions and managed to create a system image file: MakieSys.so (275 MB). However, do not know how to launch Julia with recommended julia -J ./MakieSys.so command line instruction. So…

---

## [Plotting using ImplicitEquations](https://discourse.julialang.org/t/plotting-using-implicitequations/52253)

<div class="topic-metadata">

**Author:** [@bhaveshshrimali](https://discourse.julialang.org/u/bhaveshshrimali)\
**Replies:** 4\
**Last updated:** [December 23, 2020, 6:00am UTC](https://discourse.julialang.org/t/plotting-using-implicitequations/52253 "2020-12-23T06:00:04Z")

</div>

\[Updated Code\] Hi everyone, I was trying to use ImplicitEquations.jl to graph some inequalities but I’m not using it properly I guess. Here is a minimal example that I am trying to plot Code using Plots, LaTeXStrings …

---

## [Using Transformers.jl for time series classification?](https://discourse.julialang.org/t/using-transformers-jl-for-time-series-classification/50509)

<div class="topic-metadata">

**Author:** [@lorrp1](https://discourse.julialang.org/u/lorrp1)\
**Replies:** 10\
**Last updated:** [December 23, 2020, 5:07am UTC](https://discourse.julialang.org/t/using-transformers-jl-for-time-series-classification/50509 "2020-12-23T05:07:00Z")

</div>

Hello, has anyone tried using Transformers.jl for time series classification? is it possible? @chengchingwen

---

## [Promote\_type issues for nested Dual structures](https://discourse.julialang.org/t/promote-type-issues-for-nested-dual-structures/52255)

<div class="topic-metadata">

**Author:** [@cgeoga](https://discourse.julialang.org/u/cgeoga)\
**Replies:** 0\
**Last updated:** [December 23, 2020, 3:09am UTC](https://discourse.julialang.org/t/promote-type-issues-for-nested-dual-structures/52255 "2020-12-23T03:09:26Z")

</div>

Hey all— I’m trying to write some manually specialized derivatives for a function so that they will play nicely with ForwardDiff, and I’m coming into some issues with second derivatives (no surprises with first derivati…

---

## [My Julia function never runs](https://discourse.julialang.org/t/my-julia-function-never-runs/52248)

<div class="topic-metadata">

**Author:** [@stla](https://discourse.julialang.org/u/stla)\
**Replies:** 7\
**Last updated:** [December 23, 2020, 2:21am UTC](https://discourse.julialang.org/t/my-julia-function-never-runs/52248 "2020-12-23T02:21:51Z")

</div>

Hello, I’m currently working on this package. When I try to run the main function nothing happens. julia\> y=\[0,0,1,1,1\] julia\> X = \[1 -2; 1 -1; 1 0; 1 1; 1 2\] julia\> fidSampleLR(y, X, 5) There’s a println at the firs…

---

## [Is it possible to solve "convex" neural network using \`Convex.jl\`?](https://discourse.julialang.org/t/is-it-possible-to-solve-convex-neural-network-using-convex-jl/52219)

<div class="topic-metadata">

**Author:** [@iHany](https://discourse.julialang.org/u/iHany)\
**Replies:** 5\
**Last updated:** [December 23, 2020, 2:09am UTC](https://discourse.julialang.org/t/is-it-possible-to-solve-convex-neural-network-using-convex-jl/52219 "2020-12-23T02:09:43Z")

</div>

Hi, I’m trying to solve a convex optimisation. More specifically, I build a neural network NN(x, y), which is convex in argument y. Such neural network can be constructed as suggested in Input Convex Neural Networks. S…

---

## [New github authentication](https://discourse.julialang.org/t/new-github-authentication/52234)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 7\
**Last updated:** [December 23, 2020, 1:31am UTC](https://discourse.julialang.org/t/new-github-authentication/52234 "2020-12-23T01:31:38Z")

</div>

I am receiving emails from github warning me that password access will be disabled. Following the docs links they send me, it seems that I have to generate a “token” and use that as a password from now on. That is a lon…

---

## [\[RFC\] PowerAnalysis.jl](https://discourse.julialang.org/t/rfc-poweranalysis-jl/52241)

<div class="topic-metadata">

**Author:** [@kevbonham](https://discourse.julialang.org/u/kevbonham)\
**Replies:** 4\
**Last updated:** [December 23, 2020, 1:26am UTC](https://discourse.julialang.org/t/rfc-poweranalysis-jl/52241 "2020-12-23T01:26:49Z")

</div>

I recently stumbled on a package from @johnmyleswhite circa julia v0.3 that had some functionality I needed, though it hadn’t been updated for a while. It was a fairly simple code base, and I was able to get it working o…

---

## [Migrating simple Poisson/Gamma model from Pymc3](https://discourse.julialang.org/t/migrating-simple-poisson-gamma-model-from-pymc3/52243)

<div class="topic-metadata">

**Author:** [@Lucca](https://discourse.julialang.org/u/Lucca)\
**Replies:** 3\
**Last updated:** [December 22, 2020, 8:07pm UTC](https://discourse.julialang.org/t/migrating-simple-poisson-gamma-model-from-pymc3/52243 "2020-12-22T20:07:33Z")

</div>

Hello! Following this Pymc3 notebook, I have been trying to migrate some of the models to Turing. The Estimating a rate from Poisson data: an idealized example example is a simple bayesian model with a Gamma prior for …

---

## [Implementing sparse Gaussian process model with Turing and Stheno](https://discourse.julialang.org/t/implementing-sparse-gaussian-process-model-with-turing-and-stheno/46886)

<div class="topic-metadata">

**Author:** [@ElOceanografo](https://discourse.julialang.org/u/ElOceanografo)\
**Replies:** 15\
**Last updated:** [December 23, 2020, 12:09am UTC](https://discourse.julialang.org/t/implementing-sparse-gaussian-process-model-with-turing-and-stheno/46886 "2020-12-23T00:09:19Z")

</div>

I’ve built a Turing model for some non-Gaussian data which contains a latent Gaussian process for spatial autocorrelation. I’ve run it on a small simulated dataset to confirm that it works. Now I want to run it on my r…

---

## [DifferentialEquations: ┌ Warning: IDAGetDky failed with error code](https://discourse.julialang.org/t/differentialequations-warning-idagetdky-failed-with-error-code/52195)

<div class="topic-metadata">

**Author:** [@JuhaHeiskala](https://discourse.julialang.org/u/JuhaHeiskala)\
**Replies:** 10\
**Last updated:** [December 22, 2020, 11:30pm UTC](https://discourse.julialang.org/t/differentialequations-warning-idagetdky-failed-with-error-code/52195 "2020-12-22T23:30:40Z")

</div>

I tried a test case from Octave ode15i tests and get the error: \[IDAS ERROR\] IDAGetDky Illegal value for k. ┌ Warning: IDAGetDky failed with error code = │ flag = -25 └ @ Sundials ~/.julia/dev/Sundials/src/simpl…

---

## [Testing distance of fitted spline curve with a constant curve](https://discourse.julialang.org/t/testing-distance-of-fitted-spline-curve-with-a-constant-curve/52225)

<div class="topic-metadata">

**Author:** [@weera](https://discourse.julialang.org/u/weera)\
**Replies:** 6\
**Last updated:** [December 22, 2020, 7:44pm UTC](https://discourse.julialang.org/t/testing-distance-of-fitted-spline-curve-with-a-constant-curve/52225 "2020-12-22T19:44:31Z")

</div>

I am using SmoothingSplines.jl package to fit a spline curve to a time series. What I need is to test the fitted curve with a prior constant curve. (I need to know how like an how close two curves are) Is there any packa…

---

## [Efficiently looping over structs in Julia](https://discourse.julialang.org/t/efficiently-looping-over-structs-in-julia/52217)

<div class="topic-metadata">

**Author:** [@manuka](https://discourse.julialang.org/u/manuka)\
**Replies:** 4\
**Last updated:** [December 22, 2020, 7:43pm UTC](https://discourse.julialang.org/t/efficiently-looping-over-structs-in-julia/52217 "2020-12-22T19:43:06Z")

</div>

Hello, I have a dire question with regards to memory allocation of structs. I have posted it in Stackoverflow; please answer it in Stackoverflow: https://stackoverflow.com/q/65403410/14869451 Many thanks.

---

## [Arange in Julia](https://discourse.julialang.org/t/arange-in-julia/52239)

<div class="topic-metadata">

**Author:** [@Arega\_Getaneh](https://discourse.julialang.org/u/Arega_Getaneh)\
**Replies:** 5\
**Last updated:** [December 22, 2020, 7:39pm UTC](https://discourse.julialang.org/t/arange-in-julia/52239 "2020-12-22T19:39:48Z")

</div>

What function is used as arange in Julia ? For example, if I want to manage the frequency of xticks in my plots. In Python it works like:xticks(arange(0, length(l\_ticks)+1, 1)). Thanks in advance!

---

## [Array concatenation results in type inconsistency](https://discourse.julialang.org/t/array-concatenation-results-in-type-inconsistency/52237)

<div class="topic-metadata">

**Author:** [@a-ill](https://discourse.julialang.org/u/a-ill)\
**Replies:** 8\
**Last updated:** [December 22, 2020, 7:24pm UTC](https://discourse.julialang.org/t/array-concatenation-results-in-type-inconsistency/52237 "2020-12-22T19:24:10Z")

</div>

Here is an example. function test\_func() array1 = rand(Float64,10,10) array2 = rand(Float64,10,10) out = cat(array1,array2,dims=1) return out end @code\_warntype test\_func() Variables #self#::Core.Comp…

---

## [QuantumClifford.jl for efficient simulation of Clifford circuits](https://discourse.julialang.org/t/quantumclifford-jl-for-efficient-simulation-of-clifford-circuits/52236)

<div class="topic-metadata">

**Author:** [@Krastanov](https://discourse.julialang.org/u/Krastanov)\
**Replies:** 1\
**Last updated:** [December 22, 2020, 6:52pm UTC](https://discourse.julialang.org/t/quantumclifford-jl-for-efficient-simulation-of-clifford-circuits/52236 "2020-12-22T18:52:40Z")

</div>

This is a crosspost of the announcement of QuantumClifford.jl in the community thread. You can read there for more details of a small package with efficient allocation free algorithms for the simulation of circuits with …

---

## [Example of CDDLib usage: H-representation and V-representation](https://discourse.julialang.org/t/example-of-cddlib-usage-h-representation-and-v-representation/51980)

<div class="topic-metadata">

**Author:** [@stla](https://discourse.julialang.org/u/stla)\
**Replies:** 2\
**Last updated:** [December 22, 2020, 6:15pm UTC](https://discourse.julialang.org/t/example-of-cddlib-usage-h-representation-and-v-representation/51980 "2020-12-22T18:15:14Z")

</div>

Hello, I’m trying to use CDDLib but I’m lost. Given a set of inequalities represented as a matrix and a vector, how to get the H-representation of the corresponding polyhedron? Then, how to get its V-representation, an…

---

## [QuantumClifford.jl for efficient classical simulation of a subset of quantum circuits (allocation free, Monte Carlo, and symbolic algorithms)](https://discourse.julialang.org/t/quantumclifford-jl-for-efficient-classical-simulation-of-a-subset-of-quantum-circuits-allocation-free-monte-carlo-and-symbolic-algorithms/52235)

<div class="topic-metadata">

**Author:** [@Krastanov](https://discourse.julialang.org/u/Krastanov)\
**Replies:** 0\
**Last updated:** [December 22, 2020, 5:28pm UTC](https://discourse.julialang.org/t/quantumclifford-jl-for-efficient-classical-simulation-of-a-subset-of-quantum-circuits-allocation-free-monte-carlo-and-symbolic-algorithms/52235 "2020-12-22T17:28:39Z")

</div>

Clifford circuits, a subset of quantum circuits can be simulated efficiently with the tableaux formalism (a.k.a. stabilizer formalism, a.k.a. destabilizer formalism, a.k.a. Heisenberg representation). QuantumClifford.jl …

---

## [Compile - debug vscode-julia](https://discourse.julialang.org/t/compile-debug-vscode-julia/52233)

<div class="topic-metadata">

**Author:** [@Steven\_Varga](https://discourse.julialang.org/u/Steven_Varga)\
**Replies:** 0\
**Last updated:** [December 22, 2020, 5:09pm UTC](https://discourse.julialang.org/t/compile-debug-vscode-julia/52233 "2020-12-22T17:09:48Z")

</div>

Great tool! – Where can I find documentation on how to compile and debug vscode-julia tool? I am having problems with intel MKL compiled julia v1.5.x and would like to dig down to locate or possibly fix the problem. Whi…

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

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