# Latest

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

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

**Page:** 1367

---

## [Improving performance in solving SDEProblem](https://discourse.julialang.org/t/improving-performance-in-solving-sdeproblem/62396)

<div class="topic-metadata">

**Author:** [@Frazze](https://discourse.julialang.org/u/Frazze)\
**Replies:** 8\
**Last updated:** [June 9, 2021, 9:00am UTC](https://discourse.julialang.org/t/improving-performance-in-solving-sdeproblem/62396 "2021-06-09T09:00:56Z")

</div>

Hi everyone, I’m studying part of the 2D Swift Hohenberg model with an additive noise term, but I’m really new to the SDEProblems so I don’t know if my way to build the model is the best way to solve it. I’ve take a lo…

---

## [Local expr with local variables - aka metaprogramming C++](https://discourse.julialang.org/t/local-expr-with-local-variables-aka-metaprogramming-c/62501)

<div class="topic-metadata">

**Author:** [@sapo](https://discourse.julialang.org/u/sapo)\
**Replies:** 18\
**Last updated:** [June 9, 2021, 8:32am UTC](https://discourse.julialang.org/t/local-expr-with-local-variables-aka-metaprogramming-c/62501 "2021-06-09T08:32:31Z")

</div>

Hi all, I am trying to use a C++ library by creating C++ code dynamically (i.e. meta-programming C++). I’m using Cxx package for this. In Cxx there’s a macro-string named icxx\_str which basically wraps the code inside …

---

## [ForwarDiff of a function depending on a mask vector](https://discourse.julialang.org/t/forwardiff-of-a-function-depending-on-a-mask-vector/62527)

<div class="topic-metadata">

**Author:** [@lorenzo.a.ricciardi](https://discourse.julialang.org/u/lorenzo.a.ricciardi)\
**Replies:** 12\
**Last updated:** [June 9, 2021, 8:08am UTC](https://discourse.julialang.org/t/forwardiff-of-a-function-depending-on-a-mask-vector/62527 "2021-06-09T08:08:30Z")

</div>

Hi all, this is my first post here! I’m still very new to Julia and I’m enjoying a lot learning about it. I have a simple question for which I couldn’t find an answer, I hope it wasn’t posted already somewhere else. I…

---

## [Nanmean for 3d array](https://discourse.julialang.org/t/nanmean-for-3d-array/62569)

<div class="topic-metadata">

**Author:** [@kongdd](https://discourse.julialang.org/u/kongdd)\
**Replies:** 3\
**Last updated:** [June 9, 2021, 7:22am UTC](https://discourse.julialang.org/t/nanmean-for-3d-array/62569 "2021-06-09T07:22:26Z")

</div>

Does julia have the nanmean function for 3d array, just like what in MATLAB (Not recommended) Mean, ignoring NaN values - MATLAB nanmean?

---

## [How to add MyPkg to local registry?](https://discourse.julialang.org/t/how-to-add-mypkg-to-local-registry/62183)

<div class="topic-metadata">

**Author:** [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Replies:** 6\
**Last updated:** [June 9, 2021, 7:09am UTC](https://discourse.julialang.org/t/how-to-add-mypkg-to-local-registry/62183 "2021-06-09T07:09:18Z")

</div>

Hi all, I work behind company walls and develop in Julia. I’m creating custom packages and want to register them locally. How would that work? Thanks!

---

## [\`\<=\` does not desugar correctly with custom struct](https://discourse.julialang.org/t/does-not-desugar-correctly-with-custom-struct/62570)

<div class="topic-metadata">

**Author:** [@Samuel\_Ainsworth](https://discourse.julialang.org/u/Samuel_Ainsworth)\
**Replies:** 4\
**Last updated:** [June 9, 2021, 5:18am UTC](https://discourse.julialang.org/t/does-not-desugar-correctly-with-custom-struct/62570 "2021-06-09T05:18:51Z")

</div>

So I have a bit of code: struct Foo val::Float64 end @show 0.0 \<= Foo(0.0) but then MethodError: no method matching isless(::Float64, ::Foo). Oh right, I forgot to define isless: struct Foo val::Float64 end functi…

---

## [How come Flux.jl's network parameters go to NaN?](https://discourse.julialang.org/t/how-come-flux-jls-network-parameters-go-to-nan/16439)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 10\
**Last updated:** [June 9, 2021, 3:25am UTC](https://discourse.julialang.org/t/how-come-flux-jls-network-parameters-go-to-nan/16439 "2021-06-09T03:25:27Z")

</div>

I am trying to train a neural and the code is quite large and I can’t seem to find a way to reproduce an MWE at the moment. But basically Flux.train!(loss, res\_vec, opt) gives an error of Loss is NaN and when I check the…

---

## [Macro for checking predicates](https://discourse.julialang.org/t/macro-for-checking-predicates/62603)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 0\
**Last updated:** [June 9, 2021, 2:47am UTC](https://discourse.julialang.org/t/macro-for-checking-predicates/62603 "2021-06-09T02:47:12Z")

</div>

Is there a macro that behaves like @assert, showing the contents on failure, but isn’t disabled by optimization, so it can be used for validation? It seems like it would be useful in a lot of cases but I can’t find a p…

---

## [Axes breaks in Gadfly or VegaLite](https://discourse.julialang.org/t/axes-breaks-in-gadfly-or-vegalite/62599)

<div class="topic-metadata">

**Author:** [@fnbillimoria](https://discourse.julialang.org/u/fnbillimoria)\
**Replies:** 0\
**Last updated:** [June 9, 2021, 2:05am UTC](https://discourse.julialang.org/t/axes-breaks-in-gadfly-or-vegalite/62599 "2021-06-09T02:05:30Z")

</div>

Are there ways to create a break in axes in the Gadfly or VegaLite packages?

---

## ["LoadError: InitError: Evaluation into the closed module \`GR\` breaks incremental compilation..."](https://discourse.julialang.org/t/loaderror-initerror-evaluation-into-the-closed-module-gr-breaks-incremental-compilation/53637)

<div class="topic-metadata">

**Author:** [@Michael\_Barmann](https://discourse.julialang.org/u/Michael_Barmann)\
**Replies:** 12\
**Last updated:** [June 8, 2021, 9:30pm UTC](https://discourse.julialang.org/t/loaderror-initerror-evaluation-into-the-closed-module-gr-breaks-incremental-compilation/53637 "2021-06-08T21:30:24Z")

</div>

I installed Plots with the gr() back end several weeks ago, and it had been working fine up until today. I shutdown the kernel yesterday evening after I was done working on my Jupyter notebook, and when I restarted it to…

---

## [Oddly rotated labels using GLMakie](https://discourse.julialang.org/t/oddly-rotated-labels-using-glmakie/62394)

<div class="topic-metadata">

**Author:** [@danielmatz](https://discourse.julialang.org/u/danielmatz)\
**Replies:** 9\
**Last updated:** [June 8, 2021, 9:16pm UTC](https://discourse.julialang.org/t/oddly-rotated-labels-using-glmakie/62394 "2021-06-08T21:16:14Z")

</div>

When I create a plot with GLMakie, the labels are all rotated in an odd way. Here’s the legend of a plot I tried to make recently: It’s the same for all of the axis labels, too. What’s weird is that this plot was wor…

---

## [Not always the syntax a.b calls getfield(a, :b)?](https://discourse.julialang.org/t/not-always-the-syntax-a-b-calls-getfield-a-b/62549)

<div class="topic-metadata">

**Author:** [@rocco\_sprmnt21](https://discourse.julialang.org/u/rocco_sprmnt21)\
**Replies:** 6\
**Last updated:** [June 8, 2021, 8:20pm UTC](https://discourse.julialang.org/t/not-always-the-syntax-a-b-calls-getfield-a-b/62549 "2021-06-08T20:20:13Z")

</div>

Perhaps it is not a question strictly pertinent to the context of dataframes, but it arose from me thinking about a problem posed here in the data section of slack forum I tried to use the syntax k.rownumber instead of …

---

## [What is the best way to wrap C double pointers into a Julia \`Matrix\`?](https://discourse.julialang.org/t/what-is-the-best-way-to-wrap-c-double-pointers-into-a-julia-matrix/62472)

<div class="topic-metadata">

**Author:** [@sapo](https://discourse.julialang.org/u/sapo)\
**Replies:** 3\
**Last updated:** [June 8, 2021, 7:38pm UTC](https://discourse.julialang.org/t/what-is-the-best-way-to-wrap-c-double-pointers-into-a-julia-matrix/62472 "2021-06-08T19:38:01Z")

</div>

Take this code which represents a matrix in C. int\*\* mat = (int\*\*) malloc(rows \* sizeof(int\*)) for (int index=0;index\<row;++index) { mat\[index\] = (int\*) malloc(cols \* sizeof(int)); } What is the best way to wrap m…

---

## [Is there a Julia package that can decompose a time series data into trend, seasonality and random?](https://discourse.julialang.org/t/is-there-a-julia-package-that-can-decompose-a-time-series-data-into-trend-seasonality-and-random/9518)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 25\
**Last updated:** [June 8, 2021, 6:18pm UTC](https://discourse.julialang.org/t/is-there-a-julia-package-that-can-decompose-a-time-series-data-into-trend-seasonality-and-random/9518 "2021-06-08T18:18:32Z")

</div>

I was trying to do some time series analysis. In R, there is a decompose function that can decompose a time series into trend, seasonality, and random noise. Is there an equivalent in Julia?

---

## [Plots/GR + png() results in "Too many open files"](https://discourse.julialang.org/t/plots-gr-png-results-in-too-many-open-files/48998)

<div class="topic-metadata">

**Author:** [@ErikE](https://discourse.julialang.org/u/ErikE)\
**Replies:** 15\
**Last updated:** [June 8, 2021, 5:42pm UTC](https://discourse.julialang.org/t/plots-gr-png-results-in-too-many-open-files/48998 "2021-06-08T17:42:11Z")

</div>

Hello! I have a piece of Julia code where I generate (a lot of) scatter plots with the scatter function from Plots (with the GR backend), and save the plots to PNGs, using the png(filename) function (to later turn them …

---

## [Memory trouble with @distributed](https://discourse.julialang.org/t/memory-trouble-with-distributed/62553)

<div class="topic-metadata">

**Author:** [@thomas.frederikse](https://discourse.julialang.org/u/thomas.frederikse)\
**Replies:** 4\
**Last updated:** [June 8, 2021, 5:13pm UTC](https://discourse.julialang.org/t/memory-trouble-with-distributed/62553 "2021-06-08T17:13:56Z")

</div>

I’m trying to parallelize a piece of code using Distributed, but it’s slowly eating up all my memory. Here’s an example: using Distributed using SharedArrays if nprocs() == 1 addprocs(4) end function main() for…

---

## [Why the variable is not modified inside a function with suffix "!"](https://discourse.julialang.org/t/why-the-variable-is-not-modified-inside-a-function-with-suffix/62581)

<div class="topic-metadata">

**Author:** [@LaurentVidal95](https://discourse.julialang.org/u/LaurentVidal95)\
**Replies:** 9\
**Last updated:** [June 8, 2021, 4:37pm UTC](https://discourse.julialang.org/t/why-the-variable-is-not-modified-inside-a-function-with-suffix/62581 "2021-06-08T16:37:09Z")

</div>

Dear Julia community, I am trying to use the “!” prefix in order to modify a variable inside a function and have made this little test: function test\_copy!(a,b) a = b println("a in function: $a") end a = 0.0; b …

---

## [DifferentialEquations.jl saving data without redundant calculation of control inputs](https://discourse.julialang.org/t/differentialequations-jl-saving-data-without-redundant-calculation-of-control-inputs/62559)

<div class="topic-metadata">

**Author:** [@iHany](https://discourse.julialang.org/u/iHany)\
**Replies:** 5\
**Last updated:** [June 8, 2021, 3:55pm UTC](https://discourse.julialang.org/t/differentialequations-jl-saving-data-without-redundant-calculation-of-control-inputs/62559 "2021-06-08T15:55:46Z")

</div>

I’m trying to save some data, which is also calculated within given ODE. For example, with a linear system, I usually write a function A = Matrix(I, n, n) B = Matrix(I, n, m) function dynamics!(dx, x, p, t; u) dx .…

---

## [Exponential smoothing](https://discourse.julialang.org/t/exponential-smoothing/41020)

<div class="topic-metadata">

**Author:** [@sbacelar](https://discourse.julialang.org/u/sbacelar)\
**Replies:** 9\
**Last updated:** [June 8, 2021, 2:11pm UTC](https://discourse.julialang.org/t/exponential-smoothing/41020 "2021-06-08T14:11:36Z")

</div>

Is there any package in Julia to do exponential smoothing?

---

## [Request for JuliaCon Wikipedia Page](https://discourse.julialang.org/t/request-for-juliacon-wikipedia-page/62582)

<div class="topic-metadata">

**Author:** [@logankilpatrick](https://discourse.julialang.org/u/logankilpatrick)\
**Replies:** 0\
**Last updated:** [June 8, 2021, 1:55pm UTC](https://discourse.julialang.org/t/request-for-juliacon-wikipedia-page/62582 "2021-06-08T13:55:43Z")

</div>

Hey folks, given the scale and popularity of JuliaCon, I think it makes sense to create a Wikipedia page for it. I am happy to do this but have less experience in this domain so if there are other folks more active on wi…

---

## [Beginning a project to automatically convert scripts to "Package style"](https://discourse.julialang.org/t/beginning-a-project-to-automatically-convert-scripts-to-package-style/62558)

<div class="topic-metadata">

**Author:** [@emsal](https://discourse.julialang.org/u/emsal)\
**Replies:** 3\
**Last updated:** [June 8, 2021, 12:49pm UTC](https://discourse.julialang.org/t/beginning-a-project-to-automatically-convert-scripts-to-package-style/62558 "2021-06-08T12:49:54Z")

</div>

heya, I’ve done a small little script that parses all the using expressions in a path (directory or file) and adds the packages them to your directory’s Project.toml using Pkg.add : GitHub - emsal0/PackageStyle.jl: Turn …

---

## [How to Use ModelingToolkit.jl Tearing Parallelism](https://discourse.julialang.org/t/how-to-use-modelingtoolkit-jl-tearing-parallelism/62576)

<div class="topic-metadata">

**Author:** [@Brad\_Carman](https://discourse.julialang.org/u/Brad_Carman)\
**Replies:** 3\
**Last updated:** [June 8, 2021, 1:29pm UTC](https://discourse.julialang.org/t/how-to-use-modelingtoolkit-jl-tearing-parallelism/62576 "2021-06-08T13:29:20Z")

</div>

In the documentation for ModelingToolkit.jl - Exposing More Parallelism By Tearing Algebraic Equations in ODESystems I read you can construct the ODEProblem / ODAEProblem and set parallel\_form to use the exposed parall…

---

## [Question on Julia Source and Doc Pages](https://discourse.julialang.org/t/question-on-julia-source-and-doc-pages/62577)

<div class="topic-metadata">

**Author:** [@TI36XPro](https://discourse.julialang.org/u/TI36XPro)\
**Replies:** 2\
**Last updated:** [June 8, 2021, 1:27pm UTC](https://discourse.julialang.org/t/question-on-julia-source-and-doc-pages/62577 "2021-06-08T13:27:28Z")

</div>

Looking at the Julia documentation - you can click on “source” and it will take you to a file on github that shows how it is actually written. You can also see that all the documentation/text describing the source is jus…

---

## [\`@code\_typed (-2 \<= 1 \<= 2)\` fails](https://discourse.julialang.org/t/code-typed-2-1-2-fails/62561)

<div class="topic-metadata">

**Author:** [@Samuel\_Ainsworth](https://discourse.julialang.org/u/Samuel_Ainsworth)\
**Replies:** 3\
**Last updated:** [June 8, 2021, 1:01pm UTC](https://discourse.julialang.org/t/code-typed-2-1-2-fails/62561 "2021-06-08T13:01:15Z")

</div>

I’m stumped by this: julia\> -2 \<= 1 \<= 2 true julia\> @code\_typed (-2 \<= 1 \<= 2) ERROR: expression is not a function call, or is too complex for @code\_typed to analyze; break it down to simpler parts if possible. In som…

---

## [Broadcasting in CUDA kernels](https://discourse.julialang.org/t/broadcasting-in-cuda-kernels/62521)

<div class="topic-metadata">

**Author:** [@fedoroff](https://discourse.julialang.org/u/fedoroff)\
**Replies:** 7\
**Last updated:** [June 8, 2021, 12:58pm UTC](https://discourse.julialang.org/t/broadcasting-in-cuda-kernels/62521 "2021-06-08T12:58:44Z")

</div>

Hello, In the following example code there are two kernels, kernel1 and kernel2, which do exactly the same, but kernel1 uses broadcasting and, as a result, causes an error. Is it an expected behaviour? Is it possible to…

---

## [Creating an Accounting Program in Julia, for Pluto](https://discourse.julialang.org/t/creating-an-accounting-program-in-julia-for-pluto/62227)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 75\
**Last updated:** [June 8, 2021, 12:22pm UTC](https://discourse.julialang.org/t/creating-an-accounting-program-in-julia-for-pluto/62227 "2021-06-08T12:22:36Z")

</div>

I keep going in circles, do I use a macro, or do I use a function? How do I a get this as a dataframe and this as a dataframe with one line of code. These examples are from different sources, but the ledger(b…

---

## [Annual Stack Overflow Developer Survey is Live!](https://discourse.julialang.org/t/annual-stack-overflow-developer-survey-is-live/62573)

<div class="topic-metadata">

**Author:** [@logankilpatrick](https://discourse.julialang.org/u/logankilpatrick)\
**Replies:** 0\
**Last updated:** [June 8, 2021, 11:30am UTC](https://discourse.julialang.org/t/annual-stack-overflow-developer-survey-is-live/62573 "2021-06-08T11:30:27Z")

</div>

Hey folks, The Stack overflow 2021 survey is live right now: The 2021 Developer Survey is now open! - Stack Overflow Blog please take a few minutes to participate if you can and make sure to mark if you have used Julia …

---

## [What Python Creator Guido van Rossum Thinks of Rust, Go, Julia, and TypeScript](https://discourse.julialang.org/t/what-python-creator-guido-van-rossum-thinks-of-rust-go-julia-and-typescript/61689)

<div class="topic-metadata">

**Author:** [@paulmelis](https://discourse.julialang.org/u/paulmelis)\
**Replies:** 88\
**Last updated:** [June 8, 2021, 10:55am UTC](https://discourse.julialang.org/t/what-python-creator-guido-van-rossum-thinks-of-rust-go-julia-and-typescript/61689 "2021-06-08T10:55:16Z")

</div>

Relevant quotes from the slashdot summary (couldn’t easily find the time point for this in the video): Go and Julia: "I still think that Go is a very interesting language too. Of all the new languages, Go is probably…

---

## [Control over sampling when plotting functions](https://discourse.julialang.org/t/control-over-sampling-when-plotting-functions/62565)

<div class="topic-metadata">

**Author:** [@owiecc](https://discourse.julialang.org/u/owiecc)\
**Replies:** 2\
**Last updated:** [June 8, 2021, 10:15am UTC](https://discourse.julialang.org/t/control-over-sampling-when-plotting-functions/62565 "2021-06-08T10:15:26Z")

</div>

Plotting functions in Julia is quite easy and works super nice for smooth functions. However, for more complex functions (switched), some points get lost. f(x) = 0.6 \> mod(x,1) \> 0.5 ? 1 : 0 plot(f, xlims=(0,10)) Is…

---

## ["Variable not used"- Problem for open()...do...io function](https://discourse.julialang.org/t/variable-not-used-problem-for-open-do-io-function/62563)

<div class="topic-metadata">

**Author:** [@hardy](https://discourse.julialang.org/u/hardy)\
**Replies:** 2\
**Last updated:** [June 8, 2021, 10:13am UTC](https://discourse.julialang.org/t/variable-not-used-problem-for-open-do-io-function/62563 "2021-06-08T10:13:20Z")

</div>

I want to read some variable values from a .tsv file like this: # --------------------------------------------- function readfile(svname) algrtm="unknown" rbc="unknown" # read used algorithm and right b…

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

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