# Latest

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

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

**Page:** 315

---

## [Efficiently creating and updating a struct of SVectors](https://discourse.julialang.org/t/efficiently-creating-and-updating-a-struct-of-svectors/119697)

<div class="topic-metadata">

**Author:** [@Tetrakai](https://discourse.julialang.org/u/Tetrakai)\
**Replies:** 10\
**Last updated:** [September 23, 2024, 7:58pm UTC](https://discourse.julialang.org/t/efficiently-creating-and-updating-a-struct-of-svectors/119697 "2024-09-23T19:58:17Z")

</div>

Part A I’m reading some data in from a file then storing it in a struct looking something like this: # "Big" struct of SVectors @with\_kw struct BigStruct{N} A :: SVector{N, Int16} B :: SVector{N, Int16} C :…

---

## [Filling pre-allocated arrays with minimal function allocations](https://discourse.julialang.org/t/filling-pre-allocated-arrays-with-minimal-function-allocations/119720)

<div class="topic-metadata">

**Author:** [@lkeeble](https://discourse.julialang.org/u/lkeeble)\
**Replies:** 3\
**Last updated:** [September 23, 2024, 6:50pm UTC](https://discourse.julialang.org/t/filling-pre-allocated-arrays-with-minimal-function-allocations/119720 "2024-09-23T18:50:58Z")

</div>

Hello. I am writing some in which I take a time series of some coordinates x, y, z and must transform them to another coordinate system via some set of functions X = X(x, y, z), Y = Y(x, y, z) and Z = Z(x, y, z). I would…

---

## [Cholesky Decomposition of a Sparse Symmetric Positive Semidefinite (SPSD) Singular Matrix](https://discourse.julialang.org/t/cholesky-decomposition-of-a-sparse-symmetric-positive-semidefinite-spsd-singular-matrix/119682)

<div class="topic-metadata">

**Author:** [@RoyiAvital](https://discourse.julialang.org/u/RoyiAvital)\
**Replies:** 19\
**Last updated:** [September 23, 2024, 5:31pm UTC](https://discourse.julialang.org/t/cholesky-decomposition-of-a-sparse-symmetric-positive-semidefinite-spsd-singular-matrix/119682 "2024-09-23T17:31:44Z")

</div>

Is there such equivalent for sparse matrix? I don’t see the pivoting option for SparseMatrixCSC. How would you handle a Sparse SPSD matrix? Currently I just use check = false. Probably small shift should help but i…

---

## [Sinc function - and sinc neural networks - and function approximation for the former](https://discourse.julialang.org/t/sinc-function-and-sinc-neural-networks-and-function-approximation-for-the-former/46483)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 20\
**Last updated:** [September 22, 2024, 10:00pm UTC](https://discourse.julialang.org/t/sinc-function-and-sinc-neural-networks-and-function-approximation-for-the-former/46483 "2024-09-22T22:00:30Z")

</div>

First, has anyone reimplemented Sinc neural networks in Julia? Those are for speaker recognition, state-of-the-art I believe, and should similarly help for speech recognition, and other audio work. So far, I’m just look…

---

## [Is it safe to run Revise from multiple threads?](https://discourse.julialang.org/t/is-it-safe-to-run-revise-from-multiple-threads/119743)

<div class="topic-metadata">

**Author:** [@frankier](https://discourse.julialang.org/u/frankier)\
**Replies:** 2\
**Last updated:** [September 23, 2024, 5:26pm UTC](https://discourse.julialang.org/t/is-it-safe-to-run-revise-from-multiple-threads/119743 "2024-09-23T17:26:45Z")

</div>

Is it safe to run Revise from multiple threads? It seems that Revise in typical usage, e.g. a REPL session, will only run in the interactive thread, and then the updated code will end up run in existing threads, assuming…

---

## [Multivariate Student's T distribution?](https://discourse.julialang.org/t/multivariate-students-t-distribution/119676)

<div class="topic-metadata">

**Author:** [@rsenne](https://discourse.julialang.org/u/rsenne)\
**Replies:** 5\
**Last updated:** [September 23, 2024, 4:05pm UTC](https://discourse.julialang.org/t/multivariate-students-t-distribution/119676 "2024-09-23T16:05:47Z")

</div>

Does there exist any active implementations of a multivariate Student’s T distribution? I need one for a model I am implementing but the only information I could find was from a multi year old issue on the Distributions.…

---

## [\`end\` flagged as missing coverage but loop was covered](https://discourse.julialang.org/t/end-flagged-as-missing-coverage-but-loop-was-covered/119754)

<div class="topic-metadata">

**Author:** [@rafaelbailo](https://discourse.julialang.org/u/rafaelbailo)\
**Replies:** 0\
**Last updated:** [September 23, 2024, 3:54pm UTC](https://discourse.julialang.org/t/end-flagged-as-missing-coverage-but-loop-was-covered/119754 "2024-09-23T15:54:56Z")

</div>

I’m looking at the Codecov coverage of MultiPrecisionArrays.jl, and it seems there is and end statement marked as lacking coverage when the code inside the corresponding loop was executed. Is there something truly missin…

---

## [CUDA performing scalar indexing when used along with Distributed](https://discourse.julialang.org/t/cuda-performing-scalar-indexing-when-used-along-with-distributed/119470)

<div class="topic-metadata">

**Author:** [@Paulo\_Refosco](https://discourse.julialang.org/u/Paulo_Refosco)\
**Replies:** 5\
**Last updated:** [September 23, 2024, 3:28pm UTC](https://discourse.julialang.org/t/cuda-performing-scalar-indexing-when-used-along-with-distributed/119470 "2024-09-23T15:28:07Z")

</div>

Hello all! I am running a series of nested functions, some of which using CUDA.jl at high level CuArrays processing (dot products and/or matrix multiplications). When I run it single threaded it works perfectly (even if…

---

## [Struct with Abstract type and jl\_get\_function()](https://discourse.julialang.org/t/struct-with-abstract-type-and-jl-get-function/119751)

<div class="topic-metadata">

**Author:** [@PatriceLebrun](https://discourse.julialang.org/u/PatriceLebrun)\
**Replies:** 0\
**Last updated:** [September 23, 2024, 2:18pm UTC](https://discourse.julialang.org/t/struct-with-abstract-type-and-jl-get-function/119751 "2024-09-23T14:18:59Z")

</div>

Hi, I define struct CDChitsICEDUST{T \<: AbstractFloat} xstarts::Vector{T} ystarts::Vector{T} .... end so I get a wrong value if I do a jl\_get\_function((jl\_module\_t \*) mod, "CDChitsICEDUST{Cf…

---

## [Next\_step! resulting in slightly different results for the same inputs](https://discourse.julialang.org/t/next-step-resulting-in-slightly-different-results-for-the-same-inputs/119683)

<div class="topic-metadata">

**Author:** [@Bart\_van\_de\_Lint](https://discourse.julialang.org/u/Bart_van_de_Lint)\
**Replies:** 13\
**Last updated:** [September 23, 2024, 12:51pm UTC](https://discourse.julialang.org/t/next-step-resulting-in-slightly-different-results-for-the-same-inputs/119683 "2024-09-23T12:51:36Z")

</div>

I am using the following code to initialize an MTK model: dt = 0.05 tspan = (0.0, dt) solver = CVODE\_BDF() integrator = OrdinaryDiffEqCore.init(prob, solver; dt, abstol=0.0006, reltol=0.001, save\_on=false, dtmin=1e-…

---

## [New to packages - updating](https://discourse.julialang.org/t/new-to-packages-updating/119744)

<div class="topic-metadata">

**Author:** [@Lincoln\_Hannah](https://discourse.julialang.org/u/Lincoln_Hannah)\
**Replies:** 1\
**Last updated:** [September 23, 2024, 12:50pm UTC](https://discourse.julialang.org/t/new-to-packages-updating/119744 "2024-09-23T12:50:19Z")

</div>

I created a package with: Pkg\> generate MyPackage Pkg\> develope MyPackage using MyPackage Then added a new function to MyPackage, re-started the kernel and ran using MyPackage. This makes the function visible, but c…

---

## [JuliaLang @ Stanford University](https://discourse.julialang.org/t/julialang-stanford-university/119739)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 2\
**Last updated:** [September 23, 2024, 12:23pm UTC](https://discourse.julialang.org/t/julialang-stanford-university/119739 "2024-09-23T12:23:11Z")

</div>

I will give a GeoStats.jl workshop at Stanford next week from September 30th to October 3rd. If you are on campus and would like to grab a coffee, I am happy to meet and brainstorm collaborations.

---

## [Quaternion to Euler angles](https://discourse.julialang.org/t/quaternion-to-euler-angles/119740)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 4\
**Last updated:** [September 23, 2024, 11:51am UTC](https://discourse.julialang.org/t/quaternion-to-euler-angles/119740 "2024-09-23T11:51:50Z")

</div>

How can I convert a quaternion into Euler angles? Not working: using Rotations q = Float32\[0.51791805, 0.48140272, -0.4814214, -0.5179244\] RotXYZ(q) This fails with a dimension mismatch error. See: Euler Angles · Rot…

---

## [How can I check the running progress or intermediate output of tasks submitted to the cluster?](https://discourse.julialang.org/t/how-can-i-check-the-running-progress-or-intermediate-output-of-tasks-submitted-to-the-cluster/119737)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 1\
**Last updated:** [September 23, 2024, 11:33am UTC](https://discourse.julialang.org/t/how-can-i-check-the-running-progress-or-intermediate-output-of-tasks-submitted-to-the-cluster/119737 "2024-09-23T11:33:12Z")

</div>

My script contains println or other codes to output some progress information to monitor the running progress of the script. After submitting it through SLURM, the script starts running. However, during the execution of …

---

## [Pushing elements into a view](https://discourse.julialang.org/t/pushing-elements-into-a-view/119733)

<div class="topic-metadata">

**Author:** [@fmor](https://discourse.julialang.org/u/fmor)\
**Replies:** 4\
**Last updated:** [September 23, 2024, 9:29am UTC](https://discourse.julialang.org/t/pushing-elements-into-a-view/119733 "2024-09-23T09:29:19Z")

</div>

I’m working on a clustering model, and to compute cluster weights I have to compare the cohesions of the current cluster k to the one of cluster k plus unit j (respectively old (o) and new (n) in the code). To do so I t…

---

## [Cannot download artifacts from a private repo](https://discourse.julialang.org/t/cannot-download-artifacts-from-a-private-repo/119736)

<div class="topic-metadata">

**Author:** [@chkat](https://discourse.julialang.org/u/chkat)\
**Replies:** 0\
**Last updated:** [September 23, 2024, 9:02am UTC](https://discourse.julialang.org/t/cannot-download-artifacts-from-a-private-repo/119736 "2024-09-23T09:02:12Z")

</div>

In my Artifacts.toml file I put the link to the raw file that I want to download from gitlab. But since my project is private I am getting the error: Error: RequestError: HTTP/2 404 while requesting https://\<my link to…

---

## [Worst-case example on how NOT to publish your data](https://discourse.julialang.org/t/worst-case-example-on-how-not-to-publish-your-data/119428)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 11\
**Last updated:** [September 23, 2024, 7:47am UTC](https://discourse.julialang.org/t/worst-case-example-on-how-not-to-publish-your-data/119428 "2024-09-23T07:47:56Z")

</div>

I am a bit angry at the company managing the Electricity Grid of France (RTE). Here you can download, inter alias, the statistics on electricity production by hour and source, arranged in yearly files. What is wrong ? …

---

## [Python mpfr floats to Julia BigFloat / mpfr](https://discourse.julialang.org/t/python-mpfr-floats-to-julia-bigfloat-mpfr/119724)

<div class="topic-metadata">

**Author:** [@thedeyan](https://discourse.julialang.org/u/thedeyan)\
**Replies:** 1\
**Last updated:** [September 23, 2024, 7:06am UTC](https://discourse.julialang.org/t/python-mpfr-floats-to-julia-bigfloat-mpfr/119724 "2024-09-23T07:06:39Z")

</div>

I have a numpy array of type object and filled with gmpy2.mpfr numbers: x = np.empty(3, dtype=object) x\[0\] = mpfr("0.4", 1000) x\[1\] = mpfr("0.6", 1000) x\[2\] = mpfr("0.8", 1000) and I have a function in Julia which oper…

---

## [GPU slower than CPU for simple benchmarks](https://discourse.julialang.org/t/gpu-slower-than-cpu-for-simple-benchmarks/119687)

<div class="topic-metadata">

**Author:** [@billmclean](https://discourse.julialang.org/u/billmclean)\
**Replies:** 7\
**Last updated:** [September 23, 2024, 6:50am UTC](https://discourse.julialang.org/t/gpu-slower-than-cpu-for-simple-benchmarks/119687 "2024-09-23T06:50:09Z")

</div>

I recently updated the CPU on my desktop: julia\> versioninfo() Julia Version 1.10.5 Commit 6f3fdf7b362 (2024-08-27 14:19 UTC) Build Info: Official https://julialang.org/ release Platform Info: OS: Linux (x86\_64-linu…

---

## [Dates.jl - week last week of year/first week of year](https://discourse.julialang.org/t/dates-jl-week-last-week-of-year-first-week-of-year/119703)

<div class="topic-metadata">

**Author:** [@Longblackcoffee](https://discourse.julialang.org/u/Longblackcoffee)\
**Replies:** 5\
**Last updated:** [September 22, 2024, 9:19pm UTC](https://discourse.julialang.org/t/dates-jl-week-last-week-of-year-first-week-of-year/119703 "2024-09-22T21:19:58Z")

</div>

Hi everyone, I have daily level data spanning multiple years, and I want to aggregate it to the weekly level. week(DateTime(2020, 12, 31)) week(DateTime(2021, 01, 01)) I noticed that the week function considers both t…

---

## [MTK... linearization of zero dynamics](https://discourse.julialang.org/t/mtk-linearization-of-zero-dynamics/119546)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 7\
**Last updated:** [September 23, 2024, 4:19am UTC](https://discourse.julialang.org/t/mtk-linearization-of-zero-dynamics/119546 "2024-09-23T04:19:50Z")

</div>

\[What is the trick of hiding/folding/collapsing code blocks?\] Consider the well-known 4-tank model by K.H. Johansson: which has been designed to illustrate multivariable zero dynamics. The system has 2 control inputs…

---

## [Testing parallelization with MPI and Test](https://discourse.julialang.org/t/testing-parallelization-with-mpi-and-test/114040)

<div class="topic-metadata">

**Author:** [@mesonepigreco](https://discourse.julialang.org/u/mesonepigreco)\
**Replies:** 2\
**Last updated:** [September 23, 2024, 4:40am UTC](https://discourse.julialang.org/t/testing-parallelization-with-mpi-and-test/114040 "2024-09-23T04:40:06Z")

</div>

Hello everyone, I am developing a package that implements multiprocessing with MPI.jl for applications in HPC facilities. I have a full test suite for my package, which can be run with the usual “\]” test from the REPL …

---

## [Overloading \`^\`](https://discourse.julialang.org/t/overloading/119723)

<div class="topic-metadata">

**Author:** [@sadish-d](https://discourse.julialang.org/u/sadish-d)\
**Replies:** 2\
**Last updated:** [September 23, 2024, 2:49am UTC](https://discourse.julialang.org/t/overloading/119723 "2024-09-23T02:49:33Z")

</div>

struct S x end Base.:(^)(s::S, p) = S(s.x ^ p) S(1) ^ -2.0 S(1) ^ -2 # ERROR: MethodError: no method matching inv(::S) It looks like you can not completely define ^ for a type, without defining a multiplicative inverse i…

---

## [Optimization program which previously worked is no longer working](https://discourse.julialang.org/t/optimization-program-which-previously-worked-is-no-longer-working/118900)

<div class="topic-metadata">

**Author:** [@tighem](https://discourse.julialang.org/u/tighem)\
**Replies:** 12\
**Last updated:** [September 22, 2024, 10:16pm UTC](https://discourse.julialang.org/t/optimization-program-which-previously-worked-is-no-longer-working/118900 "2024-09-22T22:16:41Z")

</div>

I am running julia version 1.10.5, about a month ago I had written and successfully run a piece of optimization code which uses LBFGS to optimize a system of 218 differential equations dependent on 12 parameters. Returni…

---

## [Conditional MH() proposals fail to accept (simplified question)](https://discourse.julialang.org/t/conditional-mh-proposals-fail-to-accept-simplified-question/119531)

<div class="topic-metadata">

**Author:** [@aws](https://discourse.julialang.org/u/aws)\
**Replies:** 1\
**Last updated:** [September 22, 2024, 9:48pm UTC](https://discourse.julialang.org/t/conditional-mh-proposals-fail-to-accept-simplified-question/119531 "2024-09-22T21:48:48Z")

</div>

Hello, I am attempting to perform Gibbs sampling using a mixture of close formed conditional posteriors and other samplers. Ultimately, I will use this to estimate parameters in a nonlinear model where I can write out t…

---

## [OrdinaryDiffEqDefault get stuck in loop while precompilation](https://discourse.julialang.org/t/ordinarydiffeqdefault-get-stuck-in-loop-while-precompilation/119684)

<div class="topic-metadata">

**Author:** [@kunal](https://discourse.julialang.org/u/kunal)\
**Replies:** 4\
**Last updated:** [September 22, 2024, 9:44pm UTC](https://discourse.julialang.org/t/ordinarydiffeqdefault-get-stuck-in-loop-while-precompilation/119684 "2024-09-22T21:44:59Z")

</div>

After installation of new package the precompilation get stuck with OrdinaryDiffEqDefault. Tried deleting OrdinaryDiffEqDefault dir from ./julia/packages and ./julia/compile Still keeps looping in.

---

## [Problem Installing CUDA\_Runtime](https://discourse.julialang.org/t/problem-installing-cuda-runtime/118966)

<div class="topic-metadata">

**Author:** [@leoherz](https://discourse.julialang.org/u/leoherz)\
**Replies:** 3\
**Last updated:** [September 22, 2024, 9:14pm UTC](https://discourse.julialang.org/t/problem-installing-cuda-runtime/118966 "2024-09-22T21:14:35Z")

</div>

Hey guys, my first time posting in this forum, see please forgive me in advance for any bad practices related to the way I will describe this problem. I am currently trying to install CUDA.jl in my computer, however, I …

---

## [What would be a nice way to call Julia from Python using a different process?](https://discourse.julialang.org/t/what-would-be-a-nice-way-to-call-julia-from-python-using-a-different-process/117183)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 7\
**Last updated:** [September 22, 2024, 9:03pm UTC](https://discourse.julialang.org/t/what-would-be-a-nice-way-to-call-julia-from-python-using-a-different-process/117183 "2024-09-22T21:03:39Z")

</div>

I have a small number of Julia functions that I want to call from Python. We tried PythonCall which works for a toy example, but not when integrated in the full Python program, which might be due to library incompatibili…

---

## [Syntactic sugar for types](https://discourse.julialang.org/t/syntactic-sugar-for-types/119685)

<div class="topic-metadata">

**Author:** [@andrey2185](https://discourse.julialang.org/u/andrey2185)\
**Replies:** 8\
**Last updated:** [September 22, 2024, 6:46pm UTC](https://discourse.julialang.org/t/syntactic-sugar-for-types/119685 "2024-09-22T18:46:30Z")

</div>

Is this the correct code to add syntactic sugar for types? Base.:(|)(X::Type, Y::Type) = Union{X,Y} Base.:(|)(X::TypeVar, Y::Type) = Union{X,Y} Base.:(|)(X::Type, Y::TypeVar) = Union{X,Y} Base.:(|)(X::TypeVar, Y::TypeVa…

---

## [Julian way to write this code](https://discourse.julialang.org/t/julian-way-to-write-this-code/119348)

<div class="topic-metadata">

**Author:** [@gdkrmr](https://discourse.julialang.org/u/gdkrmr)\
**Replies:** 18\
**Last updated:** [September 22, 2024, 6:32pm UTC](https://discourse.julialang.org/t/julian-way-to-write-this-code/119348 "2024-09-22T18:32:22Z")

</div>

Is there a pretty way to write this and have good performance? g1 produces runtime dispatch, g2 produces an allocation and g3 doesn’t look very “Julian” and is also unsafe. function g1(x, y, w) sum(i -\> x\[i\] \* y\[i\] \* …

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

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