# Latest

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

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

**Page:** 594

---

## [Is array/vector handling this hard?](https://discourse.julialang.org/t/is-array-vector-handling-this-hard/104035)

<div class="topic-metadata">

**Author:** [@voroskoi](https://discourse.julialang.org/u/voroskoi)\
**Replies:** 14\
**Last updated:** [September 20, 2023, 4:57pm UTC](https://discourse.julialang.org/t/is-array-vector-handling-this-hard/104035 "2023-09-20T16:57:51Z")

</div>

Hi, I just started learning Julia and I try to solve some basic ML tasks. It is quite common to generate a vector of indices for the training data and I would like to generate the complement. For example I have a Vecto…

---

## [Instabilities on a simple dataset when training a NODE on it](https://discourse.julialang.org/t/instabilities-on-a-simple-dataset-when-training-a-node-on-it/103916)

<div class="topic-metadata">

**Author:** [@jarroyoe](https://discourse.julialang.org/u/jarroyoe)\
**Replies:** 5\
**Last updated:** [September 20, 2023, 4:50pm UTC](https://discourse.julialang.org/t/instabilities-on-a-simple-dataset-when-training-a-node-on-it/103916 "2023-09-20T16:50:28Z")

</div>

I have an extremely simple dataset that for some reason keeps outputing instabilities when trying to train a NODE algorithm on it, no matter how low the tolerance is set or what solver I choose. I train it twice, once wi…

---

## [How to write type stable code with branches, where one branch calls a complicated function?](https://discourse.julialang.org/t/how-to-write-type-stable-code-with-branches-where-one-branch-calls-a-complicated-function/102958)

<div class="topic-metadata">

**Author:** [@tictaccat](https://discourse.julialang.org/u/tictaccat)\
**Replies:** 14\
**Last updated:** [September 20, 2023, 4:04pm UTC](https://discourse.julialang.org/t/how-to-write-type-stable-code-with-branches-where-one-branch-calls-a-complicated-function/102958 "2023-09-20T16:04:05Z")

</div>

I’m having a hard time writing a type-stable function where one branch calls a complicated function and another one doesn’t. Here’s a minified example: using Distributions function f(μ::Real, σ::Real, a::Real) if i…

---

## [How to best parallelize matrix operations?](https://discourse.julialang.org/t/how-to-best-parallelize-matrix-operations/103895)

<div class="topic-metadata">

**Author:** [@mihalybaci](https://discourse.julialang.org/u/mihalybaci)\
**Replies:** 1\
**Last updated:** [September 20, 2023, 3:57pm UTC](https://discourse.julialang.org/t/how-to-best-parallelize-matrix-operations/103895 "2023-09-20T15:57:28Z")

</div>

I need to do some operations on 3-dimensional matrices and would like to explore getting some speed ups with parallelization. I have a version working using map and @spawn as suggestetd here, and I get the right values, …

---

## [Saving and loading architectures with multiple blocks](https://discourse.julialang.org/t/saving-and-loading-architectures-with-multiple-blocks/104030)

<div class="topic-metadata">

**Author:** [@tom-plaa](https://discourse.julialang.org/u/tom-plaa)\
**Replies:** 3\
**Last updated:** [September 20, 2023, 3:49pm UTC](https://discourse.julialang.org/t/saving-and-loading-architectures-with-multiple-blocks/104030 "2023-09-20T15:49:25Z")

</div>

Hi! I’m working on a project where another person has been trying out different architectures in Flux.jl for a given problem, and the one that turned out to be the best one is giving us problems when saving and loading …

---

## [DataFrame Filtering](https://discourse.julialang.org/t/dataframe-filtering/104066)

<div class="topic-metadata">

**Author:** [@Sahil\_Khan](https://discourse.julialang.org/u/Sahil_Khan)\
**Replies:** 10\
**Last updated:** [September 20, 2023, 3:25pm UTC](https://discourse.julialang.org/t/dataframe-filtering/104066 "2023-09-20T15:25:43Z")

</div>

In following example I want to filter few things specific from both column at same time. I can get end result that I showed below by filtering separately and then I can combine to get end DataFrame but it doesn’t feel ri…

---

## [Matplotlib rcParams in module \_\_init\_\_() function segfault on M1](https://discourse.julialang.org/t/matplotlib-rcparams-in-module-init-function-segfault-on-m1/103314)

<div class="topic-metadata">

**Author:** [@hsgg](https://discourse.julialang.org/u/hsgg)\
**Replies:** 5\
**Last updated:** [September 20, 2023, 2:04pm UTC](https://discourse.julialang.org/t/matplotlib-rcparams-in-module-init-function-segfault-on-m1/103314 "2023-09-20T14:04:38Z")

</div>

Hi, I am converting a package from PyCall.jl to PythonCall.jl. (I am planning on calling Julia from Python in the future, and I want to test whether to use PythonCall/JuliaCall or PyCall/pyjulia. PythonCall/JuliaCall app…

---

## [Programmatically creating parameters in ModelingToolkit.jl leads to unexpected outcome](https://discourse.julialang.org/t/programmatically-creating-parameters-in-modelingtoolkit-jl-leads-to-unexpected-outcome/104063)

<div class="topic-metadata">

**Author:** [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Replies:** 5\
**Last updated:** [September 20, 2023, 2:03pm UTC](https://discourse.julialang.org/t/programmatically-creating-parameters-in-modelingtoolkit-jl-leads-to-unexpected-outcome/104063 "2023-09-20T14:03:06Z")

</div>

I am trying to create programmatically a parameter (with @parameter) with ModelingToolkit.jl. While I am succeeding, the outcome is not exactly what I wish for. Here are the two examples: @variables t # indep…

---

## [Angular Momentum Commutators In Symbolics.jl](https://discourse.julialang.org/t/angular-momentum-commutators-in-symbolics-jl/103493)

<div class="topic-metadata">

**Author:** [@wes648](https://discourse.julialang.org/u/wes648)\
**Replies:** 2\
**Last updated:** [September 20, 2023, 1:21pm UTC](https://discourse.julialang.org/t/angular-momentum-commutators-in-symbolics-jl/103493 "2023-09-20T13:21:59Z")

</div>

Could I get some help defining the angular momentum commutators symbolicaly in Julia? I’ve tried using SymbolicUtils @acrules to define Nx\*Ny - Ny\*Nx =\> im\*Nz but then when I run Nx\*Ny - Ny\*Nx it returns zero. I also tr…

---

## [How can I make code linter free?](https://discourse.julialang.org/t/how-can-i-make-code-linter-free/104061)

<div class="topic-metadata">

**Author:** [@Sahil\_Khan](https://discourse.julialang.org/u/Sahil_Khan)\
**Replies:** 1\
**Last updated:** [September 20, 2023, 12:49pm UTC](https://discourse.julialang.org/t/how-can-i-make-code-linter-free/104061 "2023-09-20T12:49:36Z")

</div>

Here is an example where I get linter but I don’t understand what can be possible cause. Code is running fine, everything seems okay. Upon checking it says possible method call errors.

---

## [Plots doesn't work after vscode 1.82.2 update](https://discourse.julialang.org/t/plots-doesnt-work-after-vscode-1-82-2-update/104056)

<div class="topic-metadata">

**Author:** [@rmsmsgood](https://discourse.julialang.org/u/rmsmsgood)\
**Replies:** 3\
**Last updated:** [September 20, 2023, 12:41pm UTC](https://discourse.julialang.org/t/plots-doesnt-work-after-vscode-1-82-2-update/104056 "2023-09-20T12:41:19Z")

</div>

Issue Julia Plots doesn’t work suddenly. It seems to be vscode 1.82.2 update (I did 2 hours ago). Any help? Error message Error loading webview: Error: Could not register service worker: InvalidStateError: Failed …

---

## [Very different performance on M1 mac, native vs rosetta](https://discourse.julialang.org/t/very-different-performance-on-m1-mac-native-vs-rosetta/66845)

<div class="topic-metadata">

**Author:** [@gbaraldi](https://discourse.julialang.org/u/gbaraldi)\
**Replies:** 14\
**Last updated:** [September 20, 2023, 12:29pm UTC](https://discourse.julialang.org/t/very-different-performance-on-m1-mac-native-vs-rosetta/66845 "2023-09-20T12:29:00Z")

</div>

I was trying the argmin vs minimum benchark that was being discussed and found that the native arm julia is almost 5x slower than running in rosetta. Is the arm codegen that much worse or is that a bug with the M1 specif…

---

## [Best way to include local module (with struct) in Pluto](https://discourse.julialang.org/t/best-way-to-include-local-module-with-struct-in-pluto/104044)

<div class="topic-metadata">

**Author:** [@luke-pikaart](https://discourse.julialang.org/u/luke-pikaart)\
**Replies:** 3\
**Last updated:** [September 20, 2023, 12:25pm UTC](https://discourse.julialang.org/t/best-way-to-include-local-module-with-struct-in-pluto/104044 "2023-09-20T12:25:01Z")

</div>

I am trying use Pluto with a local module. I have a module like: foo.jl module foo export foobar struct foobar A:Int end end I think the recommended way to do this is: notebook1.jl include("foo.jl"…

---

## [Julia is surprisingly slow for some simple iteration](https://discourse.julialang.org/t/julia-is-surprisingly-slow-for-some-simple-iteration/104053)

<div class="topic-metadata">

**Author:** [@baizhan](https://discourse.julialang.org/u/baizhan)\
**Replies:** 7\
**Last updated:** [September 20, 2023, 12:16pm UTC](https://discourse.julialang.org/t/julia-is-surprisingly-slow-for-some-simple-iteration/104053 "2023-09-20T12:16:24Z")

</div>

I am running the following code: N=6144 # some not-so-small number B=rand(N,N) y=rand(N) By=zeros(N) @time for i=1:N By\[i\]=0.0 for j=1:N By\[i\] += B\[i,j\]\*y\[i\] end end on my laptop, the above iteration takes a…

---

## [Proper way to define macros that declare functions?](https://discourse.julialang.org/t/proper-way-to-define-macros-that-declare-functions/104058)

<div class="topic-metadata">

**Author:** [@Vincent\_Picaud](https://discourse.julialang.org/u/Vincent_Picaud)\
**Replies:** 4\
**Last updated:** [September 20, 2023, 11:18am UTC](https://discourse.julialang.org/t/proper-way-to-define-macros-that-declare-functions/104058 "2023-09-20T11:18:53Z")

</div>

I define a create\_foo macro that declares a function foo. I want to be able to declare foo functions in the module where the macro is defined. This part is OK as this minimal example shows: module Foo macro cr…

---

## [\`tstop\` error with Piecewise Deterministic Markov Processes](https://discourse.julialang.org/t/tstop-error-with-piecewise-deterministic-markov-processes/104031)

<div class="topic-metadata">

**Author:** [@cdawg](https://discourse.julialang.org/u/cdawg)\
**Replies:** 7\
**Last updated:** [September 20, 2023, 11:10am UTC](https://discourse.julialang.org/t/tstop-error-with-piecewise-deterministic-markov-processes/104031 "2023-09-20T11:10:53Z")

</div>

I’m asking for help for an annoying, (ironically) non-deterministic error when I solve Jumpy-ODE’s (i.e. “Piecewise Deterministic Markov Processes”). It tends to start happening as I increase the number of processes and …

---

## [Avoiding intermediate vector allocations in matrix to scalar computations](https://discourse.julialang.org/t/avoiding-intermediate-vector-allocations-in-matrix-to-scalar-computations/104021)

<div class="topic-metadata">

**Author:** [@user664303](https://discourse.julialang.org/u/user664303)\
**Replies:** 6\
**Last updated:** [September 20, 2023, 9:48am UTC](https://discourse.julialang.org/t/avoiding-intermediate-vector-allocations-in-matrix-to-scalar-computations/104021 "2023-09-20T09:48:16Z")

</div>

I recently noticed that the computation of a scalar from vector' \* matrix \* vector is allocating memory. This isn’t hugely surprising - the output of the first multiplication is a vector. However, the allocation can easi…

---

## [GUI + Makie](https://discourse.julialang.org/t/gui-makie/102668)

<div class="topic-metadata">

**Author:** [@marianoarnaiz](https://discourse.julialang.org/u/marianoarnaiz)\
**Replies:** 6\
**Last updated:** [September 20, 2023, 8:23am UTC](https://discourse.julialang.org/t/gui-makie/102668 "2023-09-20T08:23:28Z")

</div>

Hi every one. I have build a nice set of functions for my work to process some data. Most of the processing is done by this functions but there is a lot of plotting involve. I would like to merge all the plotting (Don…

---

## [Does SCIP.jl use PaPILO for presolve by default?](https://discourse.julialang.org/t/does-scip-jl-use-papilo-for-presolve-by-default/104046)

<div class="topic-metadata">

**Author:** [@convexhull](https://discourse.julialang.org/u/convexhull)\
**Replies:** 3\
**Last updated:** [September 20, 2023, 6:20am UTC](https://discourse.julialang.org/t/does-scip-jl-use-papilo-for-presolve-by-default/104046 "2023-09-20T06:20:40Z")

</div>

I’m using SCIP and JuMP to solve a MILP and I’m interested in using PaPILO to see if it can help to strengthen my formulation. I’ve never used PaPILO before. SCIP’s solve output shows a presolve step, but I’m unsure wha…

---

## [Calculating Rate of change by year for each sector](https://discourse.julialang.org/t/calculating-rate-of-change-by-year-for-each-sector/104048)

<div class="topic-metadata">

**Author:** [@nnguyengiatan](https://discourse.julialang.org/u/nnguyengiatan)\
**Replies:** 1\
**Last updated:** [September 20, 2023, 4:26am UTC](https://discourse.julialang.org/t/calculating-rate-of-change-by-year-for-each-sector/104048 "2023-09-20T04:26:00Z")

</div>

Hi all, I have dataframes as follow: Row │ year sector roa │ Int64 String Float64 ─────┼───────────────────────────────────────── 1 │ 2017 Construction …

---

## [Kaleido Startup Failed due to Pipes](https://discourse.julialang.org/t/kaleido-startup-failed-due-to-pipes/103550)

<div class="topic-metadata">

**Author:** [@mrufsvold](https://discourse.julialang.org/u/mrufsvold)\
**Replies:** 1\
**Last updated:** [September 20, 2023, 2:33am UTC](https://discourse.julialang.org/t/kaleido-startup-failed-due-to-pipes/103550 "2023-09-20T02:33:33Z")

</div>

I opened this issue But I’m wondering if anyone here might have a clue as to what is going on. I installed PlotlyKaleido.jl and ran the PlotlyKaleido.start() which yielded: ERROR: Kaleido startup failed. Stacktrace:…

---

## [Docker Task Error (SIGINT)](https://discourse.julialang.org/t/docker-task-error-sigint/104036)

<div class="topic-metadata">

**Author:** [@mrufsvold](https://discourse.julialang.org/u/mrufsvold)\
**Replies:** 5\
**Last updated:** [September 20, 2023, 1:59am UTC](https://discourse.julialang.org/t/docker-task-error-sigint/104036 "2023-09-20T01:59:10Z")

</div>

I’m trying to run some code in a Docker container on AWS. It works locally, but fails with a cryptic error once in the Cloud. I can’t find a MWE because the stack trace really doesn’t give me much information to go off o…

---

## [Interpret Main.foreach but keep Base.foreach as compiled](https://discourse.julialang.org/t/interpret-main-foreach-but-keep-base-foreach-as-compiled/104000)

<div class="topic-metadata">

**Author:** [@mariusd](https://discourse.julialang.org/u/mariusd)\
**Replies:** 2\
**Last updated:** [September 19, 2023, 11:11pm UTC](https://discourse.julialang.org/t/interpret-main-foreach-but-keep-base-foreach-as-compiled/104000 "2023-09-19T23:11:37Z")

</div>

I’m currently debugging the Tracker.jl package, and see this line https://github.com/FluxML/Tracker.jl/blob/master/src/back.jl#L38C6-L38C6. foreach calls the back method and because foreach is compiled, I cannot debug th…

---

## [\[ANN\] GraphNets.jl - Simple, blazing fast, message-passing graph neural network](https://discourse.julialang.org/t/ann-graphnets-jl-simple-blazing-fast-message-passing-graph-neural-network/96773)

<div class="topic-metadata">

**Author:** [@JuliaMLTools](https://discourse.julialang.org/u/JuliaMLTools)\
**Replies:** 11\
**Last updated:** [September 19, 2023, 10:29pm UTC](https://discourse.julialang.org/t/ann-graphnets-jl-simple-blazing-fast-message-passing-graph-neural-network/96773 "2023-09-19T22:29:03Z")

</div>

Hello all! Excited to release a new package: GraphNets.jl is a Julia implementation of DeepMind’s Graph Nets and an implementation of the paper Relational inductive biases, deep learning, and graph networks. This You…

---

## [Idea for shortening stacktraces](https://discourse.julialang.org/t/idea-for-shortening-stacktraces/103994)

<div class="topic-metadata">

**Author:** [@jules](https://discourse.julialang.org/u/jules)\
**Replies:** 5\
**Last updated:** [September 19, 2023, 9:36pm UTC](https://discourse.julialang.org/t/idea-for-shortening-stacktraces/103994 "2023-09-19T21:36:16Z")

</div>

There are already approaches for shortening stack traces in external packages, but I’ve been wanting something a little less based on others’ heuristics and more on my own knowledge about the functions I write. So the i…

---

## [How to Maintain Cookies and Sessions Across Multiple Requests Using HTTP.jl?](https://discourse.julialang.org/t/how-to-maintain-cookies-and-sessions-across-multiple-requests-using-http-jl/104004)

<div class="topic-metadata">

**Author:** [@Thiago-Simoes](https://discourse.julialang.org/u/Thiago-Simoes)\
**Replies:** 1\
**Last updated:** [September 19, 2023, 9:31pm UTC](https://discourse.julialang.org/t/how-to-maintain-cookies-and-sessions-across-multiple-requests-using-http-jl/104004 "2023-09-19T21:31:21Z")

</div>

I’m working on a project in Julia and I’m using the HTTP.jl package for handling HTTP requests. I’m wondering how I can create a connection and make multiple requests while maintaining cookies and session data. Specifica…

---

## [Solving multiple similar problems in JuMP](https://discourse.julialang.org/t/solving-multiple-similar-problems-in-jump/103980)

<div class="topic-metadata">

**Author:** [@Three](https://discourse.julialang.org/u/Three)\
**Replies:** 8\
**Last updated:** [September 19, 2023, 9:13pm UTC](https://discourse.julialang.org/t/solving-multiple-similar-problems-in-jump/103980 "2023-09-19T21:13:33Z")

</div>

Hello, I’m interested in using JuMP to solve series of (all nonlinear) problems with identical constraints but different objectives. Is it possible to speed this up over the naive approach of just defining each problem …

---

## [\[ANN\] ComplexValues, ComplexRegions, and ComplexPlots](https://discourse.julialang.org/t/ann-complexvalues-complexregions-and-complexplots/103556)

<div class="topic-metadata">

**Author:** [@tobydriscoll](https://discourse.julialang.org/u/tobydriscoll)\
**Replies:** 5\
**Last updated:** [September 19, 2023, 7:44pm UTC](https://discourse.julialang.org/t/ann-complexvalues-complexregions-and-complexplots/103556 "2023-09-19T19:44:00Z")

</div>

I’m pleased to announce updates to two packages and a new third one for working in the complex plane: ComplexValues (update), which defines polar and spherical representations of complex numbers; ComplexRegions (update…

---

## ["Not a rational" constant?](https://discourse.julialang.org/t/not-a-rational-constant/104039)

<div class="topic-metadata">

**Author:** [@wherrera](https://discourse.julialang.org/u/wherrera)\
**Replies:** 5\
**Last updated:** [September 19, 2023, 7:23pm UTC](https://discourse.julialang.org/t/not-a-rational-constant/104039 "2023-09-19T19:23:00Z")

</div>

In porting some C code I came across a value called NaR, which was defined as Not a Rational (when returned due to error from a function returning a rational). In terms of type consistency, is there a rational in Julia …

---

## [Quitting a loop by pressing 'q'](https://discourse.julialang.org/t/quitting-a-loop-by-pressing-q/104028)

<div class="topic-metadata">

**Author:** [@Dan](https://discourse.julialang.org/u/Dan)\
**Replies:** 11\
**Last updated:** [September 19, 2023, 5:50pm UTC](https://discourse.julialang.org/t/quitting-a-loop-by-pressing-q/104028 "2023-09-19T17:50:37Z")

</div>

I’ve got a long (possibly infinite) loop. For illustration: function dosomething() for i=1:100 println("doing something $i") sleep(1) end end dosomething() Suppose I want to quit the loop early…

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

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