# Latest

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

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

**Page:** 880

---

## [Saving multiple MLJ machine to a single file?](https://discourse.julialang.org/t/saving-multiple-mlj-machine-to-a-single-file/89269)

<div class="topic-metadata">

**Author:** [@xgdgsc](https://discourse.julialang.org/u/xgdgsc)\
**Replies:** 5\
**Last updated:** [October 31, 2022, 1:25am UTC](https://discourse.julialang.org/t/saving-multiple-mlj-machine-to-a-single-file/89269 "2022-10-31T01:25:58Z")

</div>

Is it possible to save/load multiple trained MLJ machine to a single file to ease file management? Using JLD2 seems to generate a huge file (40GB using JLD2 compared to 40MB when using MLJ.save).

---

## [What is the performance penalty for using MVector and MMatrix vs SVector and SMatrix](https://discourse.julialang.org/t/what-is-the-performance-penalty-for-using-mvector-and-mmatrix-vs-svector-and-smatrix/89490)

<div class="topic-metadata">

**Author:** [@prittjam](https://discourse.julialang.org/u/prittjam)\
**Replies:** 2\
**Last updated:** [October 30, 2022, 10:24pm UTC](https://discourse.julialang.org/t/what-is-the-performance-penalty-for-using-mvector-and-mmatrix-vs-svector-and-smatrix/89490 "2022-10-30T22:24:53Z")

</div>

How do the two data types store data underneath? As a more general question, when is an SVector or SMatrix allocated on the stack? Are MVector and MMatrix ever constructed on the stack?

---

## [Differentiate Fortran90 code that implements a Boundary element method](https://discourse.julialang.org/t/differentiate-fortran90-code-that-implements-a-boundary-element-method/89524)

<div class="topic-metadata">

**Author:** [@KapilKhanal](https://discourse.julialang.org/u/KapilKhanal)\
**Replies:** 2\
**Last updated:** [October 30, 2022, 9:11pm UTC](https://discourse.julialang.org/t/differentiate-fortran90-code-that-implements-a-boundary-element-method/89524 "2022-10-30T21:11:32Z")

</div>

I have a fortran90 BEM code that I need to calculate the adjoints of. I am very new to this ecosystem but saw some advice on using Enzyme to do so. Has anyone done similar for the BEM code before? Any help/pointers is a…

---

## [Use mapbox to place images with PlotlyJS](https://discourse.julialang.org/t/use-mapbox-to-place-images-with-plotlyjs/86758)

<div class="topic-metadata">

**Author:** [@lgo](https://discourse.julialang.org/u/lgo)\
**Replies:** 6\
**Last updated:** [October 30, 2022, 8:23pm UTC](https://discourse.julialang.org/t/use-mapbox-to-place-images-with-plotlyjs/86758 "2022-10-30T20:23:59Z")

</div>

I want to create a map with PlotlyJS that includes lines and grouped/stacked bar charts. I’ve asked on stackoverflow how to achieve this in general and got a solution that deploys mapboxes. Now I’m trying to convert this…

---

## [Method of struct](https://discourse.julialang.org/t/method-of-struct/89458)

<div class="topic-metadata">

**Author:** [@duan](https://discourse.julialang.org/u/duan)\
**Replies:** 27\
**Last updated:** [October 30, 2022, 7:53pm UTC](https://discourse.julialang.org/t/method-of-struct/89458 "2022-10-30T19:53:06Z")

</div>

I’ve being using Julia for less than a year, and I appreciate how multi-dispatch makes codes efficient. Meanwhile, I also miss the methods that come with Python or C++ classes. I know that a method obj.func(...) in Pytho…

---

## [JuMP optimization](https://discourse.julialang.org/t/jump-optimization/89528)

<div class="topic-metadata">

**Author:** [@Muhammad\_Nadeem](https://discourse.julialang.org/u/Muhammad_Nadeem)\
**Replies:** 2\
**Last updated:** [October 30, 2022, 7:25pm UTC](https://discourse.julialang.org/t/jump-optimization/89528 "2022-10-30T19:25:36Z")

</div>

Hello all, I am trying to solve an optimization problem in JUMP, however it is giving me some weird error (at least to me :slight\_smile: ), please see my code below using JuMP using HiGHS Q = \[1 0; 0 1.0\] A = zero…

---

## [GBODE solver: is it relevant?](https://discourse.julialang.org/t/gbode-solver-is-it-relevant/89496)

<div class="topic-metadata">

**Author:** [@nrontsis](https://discourse.julialang.org/u/nrontsis)\
**Replies:** 7\
**Last updated:** [October 30, 2022, 7:18pm UTC](https://discourse.julialang.org/t/gbode-solver-is-it-relevant/89496 "2022-10-30T19:18:47Z")

</div>

Going through OpenModelica’s user guide I stumbled upon one of its default integration methods: GBODE. I was surprised to not find a Julia implementation/port of it e.g. available via DifferentialEquations.jl. I wonder…

---

## [Plots borking on SentinelArrays produced by CSV.read](https://discourse.julialang.org/t/plots-borking-on-sentinelarrays-produced-by-csv-read/89505)

<div class="topic-metadata">

**Author:** [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Replies:** 8\
**Last updated:** [October 30, 2022, 6:42pm UTC](https://discourse.julialang.org/t/plots-borking-on-sentinelarrays-produced-by-csv-read/89505 "2022-10-30T18:42:48Z")

</div>

using CSV, DataFrames, DataFramesMeta, Downloads, StatsPlots Downloads.download("https://data.cdc.gov/api/views/g653-rqe2/rows.csv?accessType=DOWNLOAD","NWSSSarsCov2WastewaterConc.csv") Downloads.download("https://dat…

---

## [How to ensure function is type-stable and allocation-free](https://discourse.julialang.org/t/how-to-ensure-function-is-type-stable-and-allocation-free/89509)

<div class="topic-metadata">

**Author:** [@Max\_A](https://discourse.julialang.org/u/Max_A)\
**Replies:** 2\
**Last updated:** [October 30, 2022, 5:58pm UTC](https://discourse.julialang.org/t/how-to-ensure-function-is-type-stable-and-allocation-free/89509 "2022-10-30T17:58:24Z")

</div>

I am writing a function and I’m trying to ensure that it is type-stable and allocation-free. I am using the @code\_warntype to ensure type-stability and @btime to determine memory allocation. Here is my code: # we assum…

---

## [Help debugging differential equation](https://discourse.julialang.org/t/help-debugging-differential-equation/89271)

<div class="topic-metadata">

**Author:** [@Ge0rges](https://discourse.julialang.org/u/Ge0rges)\
**Replies:** 6\
**Last updated:** [October 30, 2022, 5:45pm UTC](https://discourse.julialang.org/t/help-debugging-differential-equation/89271 "2022-10-30T17:45:56Z")

</div>

Hello all, I have a set of relatively simple differential equations modeling growth of bacteria as a function of available substrates. Unfortunately, my model fails to be solved in one particular case, and I cannot figu…

---

## [Logger local variable context](https://discourse.julialang.org/t/logger-local-variable-context/87828)

<div class="topic-metadata">

**Author:** [@efficiencynuts](https://discourse.julialang.org/u/efficiencynuts)\
**Replies:** 4\
**Last updated:** [October 30, 2022, 5:40pm UTC](https://discourse.julialang.org/t/logger-local-variable-context/87828 "2022-10-30T17:40:12Z")

</div>

I want to have a custom logger that will log certain local variables if available. I can’t seem to make the logger see the local variables. Normally I could do: @info gs\_tester to get an output like Info: gs\_tester="…

---

## [Normalizing DataFrame column by group](https://discourse.julialang.org/t/normalizing-dataframe-column-by-group/89226)

<div class="topic-metadata">

**Author:** [@jbr](https://discourse.julialang.org/u/jbr)\
**Replies:** 5\
**Last updated:** [October 30, 2022, 2:47pm UTC](https://discourse.julialang.org/t/normalizing-dataframe-column-by-group/89226 "2022-10-30T14:47:35Z")

</div>

I’ve been going through some of the DataFrames documentation and I feel I haven’t fully grokked the split-apply-combine strategy. Concretely, what I’d like to do is: group a DataFrame by one column Normalize the data c…

---

## [Arrays to vector conversion](https://discourse.julialang.org/t/arrays-to-vector-conversion/89513)

<div class="topic-metadata">

**Author:** [@Muhammad\_Nadeem](https://discourse.julialang.org/u/Muhammad_Nadeem)\
**Replies:** 5\
**Last updated:** [October 30, 2022, 12:14pm UTC](https://discourse.julialang.org/t/arrays-to-vector-conversion/89513 "2022-10-30T12:14:27Z")

</div>

Hello all, I am trying to write a function where i have to compare two quantities, the simplified representation of the problem where i am stuck is as I get these type of two quantities as follows: a = \[\[9\], \[8\]\] b = …

---

## [DifferentialEquations hangs when partitioning state vector](https://discourse.julialang.org/t/differentialequations-hangs-when-partitioning-state-vector/89455)

<div class="topic-metadata">

**Author:** [@DorianC](https://discourse.julialang.org/u/DorianC)\
**Replies:** 3\
**Last updated:** [October 30, 2022, 1:29pm UTC](https://discourse.julialang.org/t/differentialequations-hangs-when-partitioning-state-vector/89455 "2022-10-30T13:29:43Z")

</div>

I have enjoyed using ArrayPartitions to segregate information such as differential vs algebraic states when running DifferentialEquations. It worked great for what I used: one partition. Now I am trying to segregate the…

---

## [Reduce compilation time by avoiding specialization](https://discourse.julialang.org/t/reduce-compilation-time-by-avoiding-specialization/89493)

<div class="topic-metadata">

**Author:** [@dfdx](https://discourse.julialang.org/u/dfdx)\
**Replies:** 4\
**Last updated:** [October 30, 2022, 12:36pm UTC](https://discourse.julialang.org/t/reduce-compilation-time-by-avoiding-specialization/89493 "2022-10-30T12:36:35Z")

</div>

I’m trying to speed up function tracing in Umlaut.jl. According to the profiler, about 30% of time is spent in a generic function mkcall(), which records the call, does some argument transformation and then simply invoke…

---

## [Julia matrix-multiplication performance](https://discourse.julialang.org/t/julia-matrix-multiplication-performance/55175)

<div class="topic-metadata">

**Author:** [@evanfields](https://discourse.julialang.org/u/evanfields)\
**Replies:** 20\
**Last updated:** [October 30, 2022, 12:02pm UTC](https://discourse.julialang.org/t/julia-matrix-multiplication-performance/55175 "2022-10-30T12:02:57Z")

</div>

Julia’s built in matrix multiplication seems to be much faster than this LoopVectorization snippet? julia\> r1 = rand(1000, 1000); r2 = rand(1000, 1000); c = zeros(1000, 1000); julia\> @belapsed $c .= $r1 \* $r2 0.0257447 …

---

## [Muladd! (useful?)](https://discourse.julialang.org/t/muladd-useful/89517)

<div class="topic-metadata">

**Author:** [@photor](https://discourse.julialang.org/u/photor)\
**Replies:** 1\
**Last updated:** [October 30, 2022, 7:57am UTC](https://discourse.julialang.org/t/muladd-useful/89517 "2022-10-30T07:57:00Z")

</div>

Hi, I know there is the muladd function, but it seems there isn’t an in-place version muladd! of it?

---

## [Failed to precompile packages](https://discourse.julialang.org/t/failed-to-precompile-packages/89362)

<div class="topic-metadata">

**Author:** [@David\_F](https://discourse.julialang.org/u/David_F)\
**Replies:** 2\
**Last updated:** [October 30, 2022, 6:45am UTC](https://discourse.julialang.org/t/failed-to-precompile-packages/89362 "2022-10-30T06:45:43Z")

</div>

I’m trying to run the example code for solving the heat equation with MethodofLines.jl https://docs.sciml.ai/MethodOfLines/stable/tutorials/heat/ But when I run the julia, I get the following errors: 4 dependencies …

---

## [Notification when cell is re-run by the user?](https://discourse.julialang.org/t/notification-when-cell-is-re-run-by-the-user/89414)

<div class="topic-metadata">

**Author:** [@ssfrr](https://discourse.julialang.org/u/ssfrr)\
**Replies:** 3\
**Last updated:** [October 30, 2022, 2:11am UTC](https://discourse.julialang.org/t/notification-when-cell-is-re-run-by-the-user/89414 "2022-10-30T02:11:19Z")

</div>

I’m playing around a bit with Pluto and web-audio. Right now I’m just creating an oscillator with the frequency controlled by a slider. The code I have to do this is: htl""" \<script id="osctest"\> const div = this == nul…

---

## [Using @eval in a function](https://discourse.julialang.org/t/using-eval-in-a-function/89488)

<div class="topic-metadata">

**Author:** [@vitaminace33](https://discourse.julialang.org/u/vitaminace33)\
**Replies:** 17\
**Last updated:** [October 29, 2022, 10:40pm UTC](https://discourse.julialang.org/t/using-eval-in-a-function/89488 "2022-10-29T22:40:23Z")

</div>

Hi! I am trying to extend the methods of a collection of functions programmatically with no partial success. foo(x::Real) = x for f in (:foo,) @eval ($f)(x::Complex) = x' end function fun() foo(x::Real) = x …

---

## [Non linear Second Order DE in ModelingToolkit.jl](https://discourse.julialang.org/t/non-linear-second-order-de-in-modelingtoolkit-jl/89501)

<div class="topic-metadata">

**Author:** [@Sh\_166](https://discourse.julialang.org/u/Sh_166)\
**Replies:** 3\
**Last updated:** [October 29, 2022, 7:28pm UTC](https://discourse.julialang.org/t/non-linear-second-order-de-in-modelingtoolkit-jl/89501 "2022-10-29T19:28:23Z")

</div>

Hi, I am new to Julia and am trying to tackle a non linear 2nd order coupled DE. The differential equations are given below. In particular I am having trouble with the first term on the RHS of the last equation (the …

---

## [Using Symbolics and Flux](https://discourse.julialang.org/t/using-symbolics-and-flux/89498)

<div class="topic-metadata">

**Author:** [@Max\_Beez](https://discourse.julialang.org/u/Max_Beez)\
**Replies:** 4\
**Last updated:** [October 29, 2022, 7:02pm UTC](https://discourse.julialang.org/t/using-symbolics-and-flux/89498 "2022-10-29T19:02:42Z")

</div>

Let’s say I have something along the lines of using Symbolics, Flux @variables x,y function f() \[x^2y^3 ; x+y^2\] end grad\_f(x,y) = Flux.gradient(transpose(f())\*f(), x,y) display(grad\_f(x,y)) The following error…

---

## [How to draw a phase portrait of a system of differential equations](https://discourse.julialang.org/t/how-to-draw-a-phase-portrait-of-a-system-of-differential-equations/89492)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 5\
**Last updated:** [October 29, 2022, 6:50pm UTC](https://discourse.julialang.org/t/how-to-draw-a-phase-portrait-of-a-system-of-differential-equations/89492 "2022-10-29T18:50:22Z")

</div>

Hi all, I have this uncoupled linear system \\dot{x}\_{1} = -x\_{1} \\dot{x}\_{2} = 2x\_{2} the system can be written in matrix form as \\dot{x} = Ax with A = \[-1 \\ 0; 0 \\ 2\] the general solution are: x\_{1} (t) = c\_{1} …

---

## [How to Plot the Direction Field and Integral Curves Correctly with Plots](https://discourse.julialang.org/t/how-to-plot-the-direction-field-and-integral-curves-correctly-with-plots/89184)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 8\
**Last updated:** [October 29, 2022, 6:30pm UTC](https://discourse.julialang.org/t/how-to-plot-the-direction-field-and-integral-curves-correctly-with-plots/89184 "2022-10-29T18:30:40Z")

</div>

Hi all, I have found a code in this discourse and modify it to solve the separable equation of: \\frac{dy}{dx} = \\frac{x^{2}}{1 - y^{2}} with separable equations, we obtain the equation for the integral curve is: -x^{…

---

## [@fastmath does not work in @tullio and exp](https://discourse.julialang.org/t/fastmath-does-not-work-in-tullio-and-exp/89448)

<div class="topic-metadata">

**Author:** [@zxm403089989](https://discourse.julialang.org/u/zxm403089989)\
**Replies:** 14\
**Last updated:** [October 29, 2022, 6:17pm UTC](https://discourse.julialang.org/t/fastmath-does-not-work-in-tullio-and-exp/89448 "2022-10-29T18:17:08Z")

</div>

As the title, when I want to make a list acted by exp, the system throw this mistake: start rt=rand(100); @inbounds @fastmath @tullio et\[n\] := exp(rt\[n\]) UndefVarError: exp\_fast not defined Stacktrace: \[1\] 𝒜𝒸𝓉! @…

---

## [How to Compute Analytical Derivative and Integral of trigonometric functions using Symbolic.jl and DiffRules.jl](https://discourse.julialang.org/t/how-to-compute-analytical-derivative-and-integral-of-trigonometric-functions-using-symbolic-jl-and-diffrules-jl/89480)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 3\
**Last updated:** [October 29, 2022, 5:56pm UTC](https://discourse.julialang.org/t/how-to-compute-analytical-derivative-and-integral-of-trigonometric-functions-using-symbolic-jl-and-diffrules-jl/89480 "2022-10-29T17:56:55Z")

</div>

Hi all, I have this equation y = \\frac{1}{e^{\\frac{t}{2}}} \\left\[ \\int\_{t\_{0}}^{t} e^{\\frac{s}{2}} (10 + 5 \\ sin(2s)) \\ ds + c \\right\] \\\\ I want to ask how to solve this with Symbolics.jl and DiffRules.jl (even if t…

---

## [Can't seem to get Optimization.jl to converge to solution in Monte Carlo simulation but the objective function seems to work okay otherwise](https://discourse.julialang.org/t/cant-seem-to-get-optimization-jl-to-converge-to-solution-in-monte-carlo-simulation-but-the-objective-function-seems-to-work-okay-otherwise/88764)

<div class="topic-metadata">

**Author:** [@sumant28](https://discourse.julialang.org/u/sumant28)\
**Replies:** 9\
**Last updated:** [October 29, 2022, 5:00pm UTC](https://discourse.julialang.org/t/cant-seem-to-get-optimization-jl-to-converge-to-solution-in-monte-carlo-simulation-but-the-objective-function-seems-to-work-okay-otherwise/88764 "2022-10-29T17:00:12Z")

</div>

A basic binary logic works fine using Optimization, OptimizationOptimJL, OptimizationBBO, OptimizationMOI, ForwardDiff, ModelingToolkit, Random function SimulateBinaryLogit(x, Beta) N = size(x, 1) J = size(Beta, 1)…

---

## [Coercing Data Type of Large Matrix](https://discourse.julialang.org/t/coercing-data-type-of-large-matrix/89494)

<div class="topic-metadata">

**Author:** [@nosewitz](https://discourse.julialang.org/u/nosewitz)\
**Replies:** 0\
**Last updated:** [October 29, 2022, 4:02pm UTC](https://discourse.julialang.org/t/coercing-data-type-of-large-matrix/89494 "2022-10-29T16:02:00Z")

</div>

I have a sparse matrix with dimensions 800 x 100,000 filled solely with binary data (1 or 0), when loading it into a table with MLJ, their type is determined to be count data. I am able to change it into the OrderedFacto…

---

## [Buffer to store data vectors](https://discourse.julialang.org/t/buffer-to-store-data-vectors/89377)

<div class="topic-metadata">

**Author:** [@andrey2185](https://discourse.julialang.org/u/andrey2185)\
**Replies:** 13\
**Last updated:** [October 29, 2022, 2:19pm UTC](https://discourse.julialang.org/t/buffer-to-store-data-vectors/89377 "2022-10-29T14:19:02Z")

</div>

Hello, I need a buffer to store data vectors. A pre-allocated vector as a buffer needs to be defragmented. A vector dictionary is 30-60 times slower than a vector due to memory allocation and needs a crutch to check th…

---

## [Real time animations with Makie in Pluto](https://discourse.julialang.org/t/real-time-animations-with-makie-in-pluto/63684)

<div class="topic-metadata">

**Author:** [@GHRALIMA](https://discourse.julialang.org/u/GHRALIMA)\
**Replies:** 9\
**Last updated:** [October 29, 2022, 2:11pm UTC](https://discourse.julialang.org/t/real-time-animations-with-makie-in-pluto/63684 "2022-10-29T14:11:51Z")

</div>

Is there any way to create a real time animation using Makie in Pluto Notebooks? What I’m doing right now is creating the animation and recording it as video file, then inside the same Pluto cell, I load the file using …

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

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