# Latest

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

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

**Page:** 380

---

## [Fitting Potentials into \`ModelingToolkit\` Types](https://discourse.julialang.org/t/fitting-potentials-into-modelingtoolkit-types/105213)

<div class="topic-metadata">

**Author:** [@cadojo](https://discourse.julialang.org/u/cadojo)\
**Replies:** 7\
**Last updated:** [June 23, 2024, 6:55am UTC](https://discourse.julialang.org/t/fitting-potentials-into-modelingtoolkit-types/105213 "2024-06-23T06:55:31Z")

</div>

I’m writing a package that will be a library of common galactic dynamics potential models, e.g. the harmonic oscillator potential. The equation for this potential is \\Phi = \\frac{1}{2} \\omega^2 x^2. I want to write this …

---

## [New CUDA.jl version breaks previously working Base functions?](https://discourse.julialang.org/t/new-cuda-jl-version-breaks-previously-working-base-functions/116102)

<div class="topic-metadata">

**Author:** [@pxshen](https://discourse.julialang.org/u/pxshen)\
**Replies:** 4\
**Last updated:** [June 23, 2024, 1:58am UTC](https://discourse.julialang.org/t/new-cuda-jl-version-breaks-previously-working-base-functions/116102 "2024-06-23T01:58:27Z")

</div>

New CUDA.jl version circa v5 seems to break many functions that previously worked with CuArrav. eg a = \[1 2; 3 4\] |\> cu diff(a; dims=1) now raises LLVM IR error. Why is this?

---

## [Why can't I set the \`initial\_value\` to a matrix value when using \`SDDP.jl\`?](https://discourse.julialang.org/t/why-cant-i-set-the-initial-value-to-a-matrix-value-when-using-sddp-jl/116086)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 2\
**Last updated:** [June 23, 2024, 1:44am UTC](https://discourse.julialang.org/t/why-cant-i-set-the-initial-value-to-a-matrix-value-when-using-sddp-jl/116086 "2024-06-23T01:44:25Z")

</div>

In the hydro-thermal scheduling example, if I define a matrix type state variable, I will not be able to set a matrix initial value to it: using SDDP graph = SDDP.LinearGraph(3) function subproblem\_builder(subproblem:…

---

## [CUDA: unsupported dynamic function invocation for closure](https://discourse.julialang.org/t/cuda-unsupported-dynamic-function-invocation-for-closure/115981)

<div class="topic-metadata">

**Author:** [@wsshin](https://discourse.julialang.org/u/wsshin)\
**Replies:** 3\
**Last updated:** [June 23, 2024, 12:07am UTC](https://discourse.julialang.org/t/cuda-unsupported-dynamic-function-invocation-for-closure/115981 "2024-06-23T00:07:37Z")

</div>

I have a function f that takes a scalar parameter and a vector. It works well for CuVector: xs = CuVector{Float64}(rand(10)) f.(param, xs) # works well However, if I create a closure out of f such that it holds param,…

---

## [Repurposing memory fragments of a large arrays](https://discourse.julialang.org/t/repurposing-memory-fragments-of-a-large-arrays/116090)

<div class="topic-metadata">

**Author:** [@RainerHeintzmann](https://discourse.julialang.org/u/RainerHeintzmann)\
**Replies:** 9\
**Last updated:** [June 22, 2024, 9:46pm UTC](https://discourse.julialang.org/t/repurposing-memory-fragments-of-a-large-arrays/116090 "2024-06-22T21:46:11Z")

</div>

I have some code, which allocates a larger array, which I store in a named tuple along with other pre-allocated arrays. To save memory, I would like to re-purpose this array tmp\_cpx to “host” two smaller arrays, since th…

---

## [Is write(filename, some\_string) discouraged?](https://discourse.julialang.org/t/is-write-filename-some-string-discouraged/115982)

<div class="topic-metadata">

**Author:** [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Replies:** 4\
**Last updated:** [June 22, 2024, 10:52pm UTC](https://discourse.julialang.org/t/is-write-filename-some-string-discouraged/115982 "2024-06-22T22:52:01Z")

</div>

In the I/O section of the current Julia manual, the only documented write method is write(io::IO, x), on this webpage: https://docs.julialang.org/en/v1/base/io-network/#Base.write If I type ?write the the REPL, I can s…

---

## ["Instability detected. Aborting" when increasing the dimension of an ODE system](https://discourse.julialang.org/t/instability-detected-aborting-when-increasing-the-dimension-of-an-ode-system/115800)

<div class="topic-metadata">

**Author:** [@PierreQuevreux](https://discourse.julialang.org/u/PierreQuevreux)\
**Replies:** 14\
**Last updated:** [June 22, 2024, 10:46pm UTC](https://discourse.julialang.org/t/instability-detected-aborting-when-increasing-the-dimension-of-an-ode-system/115800 "2024-06-22T22:46:26Z")

</div>

Hello, I am modelling soil bacteria degrading substrates with a spatially explicit model (i.e. a grid with one colony of bacteria in each grid cell). I have 15 equations to describe dynamics in each grid cell and I firs…

---

## [How to use Gurobi 11 in Julia launched by Anaconda?](https://discourse.julialang.org/t/how-to-use-gurobi-11-in-julia-launched-by-anaconda/111271)

<div class="topic-metadata">

**Author:** [@rzhao](https://discourse.julialang.org/u/rzhao)\
**Replies:** 9\
**Last updated:** [June 22, 2024, 10:39pm UTC](https://discourse.julialang.org/t/how-to-use-gurobi-11-in-julia-launched-by-anaconda/111271 "2024-06-22T22:39:11Z")

</div>

I have updated my Julia to 1.10.2 indeed, and the version of Gurobi.jl is 1.2.1, all packages are newly installed for Julia 1.10.2. I have also downloaded the newest Gurobi 11 and updated the licence which support Gurob…

---

## [SCIP: Error: no BLAS/LAPACK library loaded!](https://discourse.julialang.org/t/scip-error-no-blas-lapack-library-loaded/115818)

<div class="topic-metadata">

**Author:** [@Stuart\_Rogers](https://discourse.julialang.org/u/Stuart_Rogers)\
**Replies:** 11\
**Last updated:** [June 22, 2024, 10:18pm UTC](https://discourse.julialang.org/t/scip-error-no-blas-lapack-library-loaded/115818 "2024-06-22T22:18:01Z")

</div>

I am getting that error repeatedly printed out when I try to solve a JuMP model with SCIP. I updated Julia to v1.10.4 yesterday using juliaup, and that error didn’t occur before the update. The error also doesn’t occur f…

---

## [Cannot update Bonmin\_jll](https://discourse.julialang.org/t/cannot-update-bonmin-jll/116099)

<div class="topic-metadata">

**Author:** [@Stuart\_Rogers](https://discourse.julialang.org/u/Stuart_Rogers)\
**Replies:** 1\
**Last updated:** [June 22, 2024, 10:17pm UTC](https://discourse.julialang.org/t/cannot-update-bonmin-jll/116099 "2024-06-22T22:17:35Z")

</div>

I cannot update to the latest verson of Bonmin\_jll. (@v1.10) pkg\> update Bonmin\_jll Updating registry at \`~/.julia/registries/General.toml\` No Changes to \`~/.julia/environments/v1.10/Project.toml\` No Changes to …

---

## [ROMS.jl different error launching .in with romsS vs romsG](https://discourse.julialang.org/t/roms-jl-different-error-launching-in-with-romss-vs-romsg/115966)

<div class="topic-metadata">

**Author:** [@Unai\_Ganzedo](https://discourse.julialang.org/u/Unai_Ganzedo)\
**Replies:** 1\
**Last updated:** [June 22, 2024, 9:49pm UTC](https://discourse.julialang.org/t/roms-jl-different-error-launching-in-with-romss-vs-romsg/115966 "2024-06-22T21:49:44Z")

</div>

Hi; I have launched the lingurean example with romeS and with romsG and the questions are: Because it shows me different errors The solution to any of them to finish the example. Thank you Unai romsS: GET\_STATE\_NF…

---

## [How to find out if precompilation during Pkg.add was successful?](https://discourse.julialang.org/t/how-to-find-out-if-precompilation-during-pkg-add-was-successful/116104)

<div class="topic-metadata">

**Author:** [@matthias314](https://discourse.julialang.org/u/matthias314)\
**Replies:** 2\
**Last updated:** [June 22, 2024, 9:38pm UTC](https://discourse.julialang.org/t/how-to-find-out-if-precompilation-during-pkg-add-was-successful/116104 "2024-06-22T21:38:56Z")

</div>

Assume some Julia code adds a package pkg via Pkg.add(pkg). How can subsequent code determine if the package precompiled successfully?

---

## [Parametric type (new struct) whose parameter is a constant of a specific type?](https://discourse.julialang.org/t/parametric-type-new-struct-whose-parameter-is-a-constant-of-a-specific-type/116049)

<div class="topic-metadata">

**Author:** [@Leo\_I](https://discourse.julialang.org/u/Leo_I)\
**Replies:** 4\
**Last updated:** [June 22, 2024, 9:06pm UTC](https://discourse.julialang.org/t/parametric-type-new-struct-whose-parameter-is-a-constant-of-a-specific-type/116049 "2024-06-22T21:06:15Z")

</div>

I wish to create an efficient type for integers modulo m. Yes, I do realize there are several existing ones out there, but I wish to have my own, and perhaps squeeze a bit more performance out of it. I’ve already achiev…

---

## [MemViews.jl - practical, simple, low-level views into Memory](https://discourse.julialang.org/t/memviews-jl-practical-simple-low-level-views-into-memory/116043)

<div class="topic-metadata">

**Author:** [@jakobnissen](https://discourse.julialang.org/u/jakobnissen)\
**Replies:** 5\
**Last updated:** [June 22, 2024, 5:32pm UTC](https://discourse.julialang.org/t/memviews-jl-practical-simple-low-level-views-into-memory/116043 "2024-06-22T17:32:35Z")

</div>

ANN: MemViews.jl - low-level view into Memory{T} MemViews.jl is a small package that introduces two new types: MemView is a view into Memory{T} MemKind(T::Type) is a trait signalling if T can be represented as memory. …

---

## [Error while simulating electrostatic problem for a multi-dielectric system using Gridap](https://discourse.julialang.org/t/error-while-simulating-electrostatic-problem-for-a-multi-dielectric-system-using-gridap/116044)

<div class="topic-metadata">

**Author:** [@balaji\_sriram](https://discourse.julialang.org/u/balaji_sriram)\
**Replies:** 5\
**Last updated:** [June 22, 2024, 5:27pm UTC](https://discourse.julialang.org/t/error-while-simulating-electrostatic-problem-for-a-multi-dielectric-system-using-gridap/116044 "2024-06-22T17:27:00Z")

</div>

I am trying to solve an electrostatic poissons equation with 2 different materials. I am trying to compute the electric potential for a sphere (ϵr= 10) embedded inside a box (ϵr= 1). I am getting the below error at th…

---

## [Wave of spam today](https://discourse.julialang.org/t/wave-of-spam-today/116082)

<div class="topic-metadata">

**Author:** [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Replies:** 0\
**Last updated:** [June 22, 2024, 1:42pm UTC](https://discourse.julialang.org/t/wave-of-spam-today/116082 "2024-06-22T13:42:55Z")

</div>

For some reason we’re getting a lot of spam today so here’s a reminder: the best thing you can do against that is keep flagging inappropriate posts and their replies. If they get enough flags, spammers are silenced autom…

---

## [\[ANN\] CricketNetRunRateRodeo: Cricket vector math and net run rate in Pluto](https://discourse.julialang.org/t/ann-cricketnetrunraterodeo-cricket-vector-math-and-net-run-rate-in-pluto/116087)

<div class="topic-metadata">

**Author:** [@martin.auer](https://discourse.julialang.org/u/martin.auer)\
**Replies:** 0\
**Last updated:** [June 22, 2024, 2:58pm UTC](https://discourse.julialang.org/t/ann-cricketnetrunraterodeo-cricket-vector-math-and-net-run-rate-in-pluto/116087 "2024-06-22T14:58:09Z")

</div>

Cricket is a fabulous sport (or unknown; depends where your parents made you). Its famous net run rate (NRR), used as tie-breaker in group stages, is not always easy to reason about. CricketNetRunRateRodeo.jl tries to …

---

## [Makie.jl v0.16.1 - How to manually set limits for 3D LScene?](https://discourse.julialang.org/t/makie-jl-v0-16-1-how-to-manually-set-limits-for-3d-lscene/74651)

<div class="topic-metadata">

**Author:** [@jshahbazi](https://discourse.julialang.org/u/jshahbazi)\
**Replies:** 4\
**Last updated:** [June 22, 2024, 2:20pm UTC](https://discourse.julialang.org/t/makie-jl-v0-16-1-how-to-manually-set-limits-for-3d-lscene/74651 "2024-06-22T14:20:11Z")

</div>

In v0.15.x, I could manually set the limits for a 3D LScene via xlims!(lscene.scene, (0, 10)), but in v0.16 that ability is no longer available. It seems to involve using an Axis3, but I’m not sure how to combine an Axi…

---

## [Compare ifft in Matlab with Julia for complex input](https://discourse.julialang.org/t/compare-ifft-in-matlab-with-julia-for-complex-input/116002)

<div class="topic-metadata">

**Author:** [@Jake](https://discourse.julialang.org/u/Jake)\
**Replies:** 3\
**Last updated:** [June 22, 2024, 1:45pm UTC](https://discourse.julialang.org/t/compare-ifft-in-matlab-with-julia-for-complex-input/116002 "2024-06-22T13:45:18Z")

</div>

My use case is frequency demodulation using the method of Coats and Randall, with the link being one of many from a web search. They use the Hilbert transform for this purpose. When I use ifft in MATLAB on a complex ve…

---

## [Correctly dispatching on a variable number of 2-tuples with mixed types](https://discourse.julialang.org/t/correctly-dispatching-on-a-variable-number-of-2-tuples-with-mixed-types/115974)

<div class="topic-metadata">

**Author:** [@alonsoC1s](https://discourse.julialang.org/u/alonsoC1s)\
**Replies:** 4\
**Last updated:** [June 22, 2024, 11:52am UTC](https://discourse.julialang.org/t/correctly-dispatching-on-a-variable-number-of-2-tuples-with-mixed-types/115974 "2024-06-22T11:52:40Z")

</div>

I am currently trying to come up with a function signature that would let me take an arbitrary number of 2-tuples where the types of the elements are not necessarily the same. I know that with the signature function f(d…

---

## [How to solve the problem of Plots.jl precompilation failure?](https://discourse.julialang.org/t/how-to-solve-the-problem-of-plots-jl-precompilation-failure/115964)

<div class="topic-metadata">

**Author:** [@dk-zen](https://discourse.julialang.org/u/dk-zen)\
**Replies:** 7\
**Last updated:** [June 22, 2024, 10:59am UTC](https://discourse.julialang.org/t/how-to-solve-the-problem-of-plots-jl-precompilation-failure/115964 "2024-06-22T10:59:13Z")

</div>

Previously, the Plots package worked fine. Don’t know what happened, running code today reported an error. How to solve this problem? Reinstall julia? \[ Info: Precompiling Plots \[91a5bcdd-55d7-5caf-9e0b-520d859cae80\] De…

---

## [Turing.jl how to estimate param given a likelihood function](https://discourse.julialang.org/t/turing-jl-how-to-estimate-param-given-a-likelihood-function/115996)

<div class="topic-metadata">

**Author:** [@isaque](https://discourse.julialang.org/u/isaque)\
**Replies:** 1\
**Last updated:** [June 22, 2024, 7:25am UTC](https://discourse.julialang.org/t/turing-jl-how-to-estimate-param-given-a-likelihood-function/115996 "2024-06-22T07:25:03Z")

</div>

I have a cost function \\chi^2(p) \\sim \\sum\_i^{N\_\\text{im}} \[\\beta\_i(p) - \\langle \\beta(p)\\rangle\]^2 and associated likelihood \\mathscr{L}(p) \\sim e^{-\\chi^2/2}. Given a parameter p, the set of \\beta are calculated from…

---

## [Mapping to mixtures of Int64 & Float64](https://discourse.julialang.org/t/mapping-to-mixtures-of-int64-float64/115961)

<div class="topic-metadata">

**Author:** [@GHTaarn](https://discourse.julialang.org/u/GHTaarn)\
**Replies:** 9\
**Last updated:** [June 22, 2024, 7:20am UTC](https://discourse.julialang.org/t/mapping-to-mixtures-of-int64-float64/115961 "2024-06-22T07:20:40Z")

</div>

I have a function that can produce either Int64 or Float64 and I would like to map it to an array to be summed: f(s) = parse(rand(\[Float64, Int64\]), s) a = rand(string.('0':'9'), rand(\[0,1,5\])) map(f, a) |\> sum If a is…

---

## [Converting Vector to Tuple seems not optimal](https://discourse.julialang.org/t/converting-vector-to-tuple-seems-not-optimal/115989)

<div class="topic-metadata">

**Author:** [@miguelborrero](https://discourse.julialang.org/u/miguelborrero)\
**Replies:** 11\
**Last updated:** [June 22, 2024, 7:01am UTC](https://discourse.julialang.org/t/converting-vector-to-tuple-seems-not-optimal/115989 "2024-06-22T07:01:31Z")

</div>

Hi there, I am working on improving the memory allocation performance of my code and in learning about how to do so I came across the fact that tuples are much cheaper to store that vectors. For this reason I was trying…

---

## [PyCall @pyimport from scipy.stats import norm](https://discourse.julialang.org/t/pycall-pyimport-from-scipy-stats-import-norm/116009)

<div class="topic-metadata">

**Author:** [@VinodV](https://discourse.julialang.org/u/VinodV)\
**Replies:** 7\
**Last updated:** [June 22, 2024, 5:32am UTC](https://discourse.julialang.org/t/pycall-pyimport-from-scipy-stats-import-norm/116009 "2024-06-22T05:32:22Z")

</div>

using PyCall @pyimport from scipy.stats import norm Giving error: ERROR: LoadError: ArgumentError: usage @pyimport module \[as name\] Stacktrace: \[1\] pyimport\_name(name::Symbol, optional\_varname::Tuple{Expr, Expr}) …

---

## [Preconditioner for Block PSD linear system](https://discourse.julialang.org/t/preconditioner-for-block-psd-linear-system/114519)

<div class="topic-metadata">

**Author:** [@mleprovost](https://discourse.julialang.org/u/mleprovost)\
**Replies:** 2\
**Last updated:** [June 22, 2024, 5:17am UTC](https://discourse.julialang.org/t/preconditioner-for-block-psd-linear-system/114519 "2024-06-22T05:17:07Z")

</div>

Hello, I am interested in solving the linear system M x = b with an iterative method, where M is positive definite (PD) with the following block structure: M = \\begin{bmatrix} \\Sigma\_a & 0\\\\ 0 & \\Sigma\_b \\end{bmatrix…

---

## [Julia editor that flags anomalous code?](https://discourse.julialang.org/t/julia-editor-that-flags-anomalous-code/116001)

<div class="topic-metadata">

**Author:** [@Stephen\_Vavasis](https://discourse.julialang.org/u/Stephen_Vavasis)\
**Replies:** 0\
**Last updated:** [June 22, 2024, 1:04am UTC](https://discourse.julialang.org/t/julia-editor-that-flags-anomalous-code/116001 "2024-06-22T01:04:39Z")

</div>

Consider the following code, which contains two anomalies: function t1(n) x = n x = 5 for i = 1 : x for i = 1 : x println("i = ", i) end end end The anomalies are: the first …

---

## [Plotting HEALPix map onto mollweide projection with GeoMakie](https://discourse.julialang.org/t/plotting-healpix-map-onto-mollweide-projection-with-geomakie/115805)

<div class="topic-metadata">

**Author:** [@AtomsForHire](https://discourse.julialang.org/u/AtomsForHire)\
**Replies:** 6\
**Last updated:** [June 22, 2024, 12:59am UTC](https://discourse.julialang.org/t/plotting-healpix-map-onto-mollweide-projection-with-geomakie/115805 "2024-06-22T00:59:19Z")

</div>

Hi, I am trying to create a figure like this: https://www.researchgate.net/publication/353085441/figure/fig1/AS:1043304233848839@1625754521890/All-sky-map-showing-the-best-fit-positions-and-90-containment-regions-approxi…

---

## [GeoMakie meshimage colormap not applying and ticks overlapping](https://discourse.julialang.org/t/geomakie-meshimage-colormap-not-applying-and-ticks-overlapping/115903)

<div class="topic-metadata">

**Author:** [@AtomsForHire](https://discourse.julialang.org/u/AtomsForHire)\
**Replies:** 3\
**Last updated:** [June 22, 2024, 12:48am UTC](https://discourse.julialang.org/t/geomakie-meshimage-colormap-not-applying-and-ticks-overlapping/115903 "2024-06-22T00:48:56Z")

</div>

Hi, this is a continuation of a previous question I’ve had on here. At the moment I have some code like this to produce a mollweide projection image of the whole sky: using Healpix using GeoMakie function main() f…

---

## [Julia Crashes Instantly within VSCode](https://discourse.julialang.org/t/julia-crashes-instantly-within-vscode/115992)

<div class="topic-metadata">

**Author:** [@freeman](https://discourse.julialang.org/u/freeman)\
**Replies:** 4\
**Last updated:** [June 21, 2024, 11:47pm UTC](https://discourse.julialang.org/t/julia-crashes-instantly-within-vscode/115992 "2024-06-21T23:47:49Z")

</div>

My Julia is crashing a lot. I use Julia with VSCode and when these crashes happen, the repl window just closes itself so fast that I can’t read it. Is there somewhere where these messages are stored? Otherwise, how would…

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

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