# Latest

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

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

**Page:** 619

---

## [Multithreading for nested for loops](https://discourse.julialang.org/t/multithreading-for-nested-for-loops/102807)

<div class="topic-metadata">

**Author:** [@Rick](https://discourse.julialang.org/u/Rick)\
**Replies:** 13\
**Last updated:** [August 16, 2023, 10:35pm UTC](https://discourse.julialang.org/t/multithreading-for-nested-for-loops/102807 "2023-08-16T22:35:45Z")

</div>

Hi everyone, I am trying to understand the performance of @threads for nested for-loops. Suppose I have three layer of loops, and I have access to 100 threads for my computation. Each calculation depends on the specifi…

---

## [Is there a way to speed up this code?](https://discourse.julialang.org/t/is-there-a-way-to-speed-up-this-code/102878)

<div class="topic-metadata">

**Author:** [@Luis\_Manuel\_Espinoza](https://discourse.julialang.org/u/Luis_Manuel_Espinoza)\
**Replies:** 4\
**Last updated:** [August 16, 2023, 10:09pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-speed-up-this-code/102878 "2023-08-16T22:09:02Z")

</div>

function open\_xyz\_file(path::AbstractString) file = open(path) num\_atoms = parse(Int, readline(file)) comment = readline(file) symbols = Vector{String}(undef, num\_atoms) coords = zeros(num\_atoms,3) for i in 1:num\_a…

---

## [Computing value and first & second derivatives of a scalar function with scalar input, using ForwardDiff](https://discourse.julialang.org/t/computing-value-and-first-second-derivatives-of-a-scalar-function-with-scalar-input-using-forwarddiff/102866)

<div class="topic-metadata">

**Author:** [@user664303](https://discourse.julialang.org/u/user664303)\
**Replies:** 6\
**Last updated:** [August 16, 2023, 10:04pm UTC](https://discourse.julialang.org/t/computing-value-and-first-second-derivatives-of-a-scalar-function-with-scalar-input-using-forwarddiff/102866 "2023-08-16T22:04:33Z")

</div>

I cannot find, either in the documentation of ForwardDiff, or on the web more widely, any information on how to compute the second derivative of a scalar function with a scalar input. How can I do this? (Given a function…

---

## [Running Code Everytime (Plots.jl) Package is Loaded?](https://discourse.julialang.org/t/running-code-everytime-plots-jl-package-is-loaded/102880)

<div class="topic-metadata">

**Author:** [@leespen1](https://discourse.julialang.org/u/leespen1)\
**Replies:** 2\
**Last updated:** [August 16, 2023, 10:00pm UTC](https://discourse.julialang.org/t/running-code-everytime-plots-jl-package-is-loaded/102880 "2023-08-16T22:00:58Z")

</div>

I find that for certain packages there are things I do everytime I am using the package. For example, in Plots.jl I usually set the default linewidth to 2 via using Plots default(linewidth=2) Is there some way to set …

---

## [ConfusionMatrix display in VSCode when there are ~ 16 categories](https://discourse.julialang.org/t/confusionmatrix-display-in-vscode-when-there-are-16-categories/102763)

<div class="topic-metadata">

**Author:** [@roeya](https://discourse.julialang.org/u/roeya)\
**Replies:** 3\
**Last updated:** [August 16, 2023, 9:34pm UTC](https://discourse.julialang.org/t/confusionmatrix-display-in-vscode-when-there-are-16-categories/102763 "2023-08-16T21:34:16Z")

</div>

When trying to display small confusion matrix for example for 4 categories classifier I get: ┌───────────────────────────────────────────────────────┐ │ Ground Truth …

---

## [ArviZ v0.10: exploratory analysis of Bayesian models, now all in Julia](https://discourse.julialang.org/t/arviz-v0-10-exploratory-analysis-of-bayesian-models-now-all-in-julia/102654)

<div class="topic-metadata">

**Author:** [@sethaxen](https://discourse.julialang.org/u/sethaxen)\
**Replies:** 2\
**Last updated:** [August 16, 2023, 9:12pm UTC](https://discourse.julialang.org/t/arviz-v0-10-exploratory-analysis-of-bayesian-models-now-all-in-julia/102654 "2023-08-16T21:12:13Z")

</div>

ArviZ provides stats, diagnostics, and plots for exploratory analysis of Bayesian models. ArviZ.jl started out as a PyCall wrapper of the Python ArviZ package, with utilities to work with Julia probabilistic programming …

---

## [How to pass a mutable struct to CUDA kernel argument](https://discourse.julialang.org/t/how-to-pass-a-mutable-struct-to-cuda-kernel-argument/102804)

<div class="topic-metadata">

**Author:** [@huiyuxie](https://discourse.julialang.org/u/huiyuxie)\
**Replies:** 3\
**Last updated:** [August 16, 2023, 8:39pm UTC](https://discourse.julialang.org/t/how-to-pass-a-mutable-struct-to-cuda-kernel-argument/102804 "2023-08-16T20:39:03Z")

</div>

Hi all! I’m exploring ways to pass a mutable struct as an argument to a CUDA kernel. For example, # Define a custom struct here mutable struct MyStruct field1::Float32 field2::Float32 field3::Float32 ...…

---

## [First steps with Weave.jl: looking for learning resources](https://discourse.julialang.org/t/first-steps-with-weave-jl-looking-for-learning-resources/102836)

<div class="topic-metadata">

**Author:** [@Hugo](https://discourse.julialang.org/u/Hugo)\
**Replies:** 1\
**Last updated:** [August 16, 2023, 8:20pm UTC](https://discourse.julialang.org/t/first-steps-with-weave-jl-looking-for-learning-resources/102836 "2023-08-16T20:20:28Z")

</div>

After many attempts, I have given up using Quarto with Julia. At the moment, it’s simply not the tool for me. Having said that, I am have decided to give Weave.jl a go. In many aspects, it reminds me of R's Knitr. But I…

---

## [Connecting a simple first-order solver to solve standard form linear program to JuMP](https://discourse.julialang.org/t/connecting-a-simple-first-order-solver-to-solve-standard-form-linear-program-to-jump/95694)

<div class="topic-metadata">

**Author:** [@Shuvomoy\_Das\_Gupta](https://discourse.julialang.org/u/Shuvomoy_Das_Gupta)\
**Replies:** 37\
**Last updated:** [August 16, 2023, 8:14pm UTC](https://discourse.julialang.org/t/connecting-a-simple-first-order-solver-to-solve-standard-form-linear-program-to-jump/95694 "2023-08-16T20:14:48Z")

</div>

Dear All, To demonstrate the usage of first-order algorithms to solve linear programs in a graduate course that I am TAing (MIT 15.084: Nonlinear Optimization, link:https://gitlab.com/vanparys-courses/15.084-sp23) I hav…

---

## [Define a more generic meaning for \`typemin\`/\`typemax\`](https://discourse.julialang.org/t/define-a-more-generic-meaning-for-typemin-typemax/102874)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 9\
**Last updated:** [August 16, 2023, 7:38pm UTC](https://discourse.julialang.org/t/define-a-more-generic-meaning-for-typemin-typemax/102874 "2023-08-16T19:38:32Z")

</div>

typemin(T) says The lowest value representable by the given (real) numeric DataType T. Suppose we want to be more generic than a “(real) numeric” datatype. What should it say then? How about The minimum value repr…

---

## [Julia Event Calendar 📅](https://discourse.julialang.org/t/julia-event-calendar/102870)

<div class="topic-metadata">

**Author:** [@Steven\_Kell](https://discourse.julialang.org/u/Steven_Kell)\
**Replies:** 3\
**Last updated:** [August 16, 2023, 6:56pm UTC](https://discourse.julialang.org/t/julia-event-calendar/102870 "2023-08-16T18:56:52Z")

</div>

The Julia Community has a shared calendar for all upcoming global events. If you are an event organizer, please email us with the details so they can be added to the calendar. The Julia community also has \[local meetups …

---

## [Package for specification of hierarchical statistical models](https://discourse.julialang.org/t/package-for-specification-of-hierarchical-statistical-models/102792)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 1\
**Last updated:** [August 16, 2023, 6:47pm UTC](https://discourse.julialang.org/t/package-for-specification-of-hierarchical-statistical-models/102792 "2023-08-16T18:47:21Z")

</div>

Suppose we are given a set of random variables X\_1, X\_2, \\ldots, X\_n and that we want to specify a statistical model involving these variables. For example, one may be interested in specifying two marginals X\_1 \\sim \\ma…

---

## [Space usage of nested tuples](https://discourse.julialang.org/t/space-usage-of-nested-tuples/102872)

<div class="topic-metadata">

**Author:** [@ilanggear](https://discourse.julialang.org/u/ilanggear)\
**Replies:** 3\
**Last updated:** [August 16, 2023, 6:38pm UTC](https://discourse.julialang.org/t/space-usage-of-nested-tuples/102872 "2023-08-16T18:38:19Z")

</div>

Are vector elements (eg tuples with three fields each) in a structure such as myList = Vector{Tuple{UInt32, UInt16, UInt16}} stored as pointers to tuples, or directly as three UInts? In other words, would myList and myM…

---

## [Saving FFTW plans for future use](https://discourse.julialang.org/t/saving-fftw-plans-for-future-use/102871)

<div class="topic-metadata">

**Author:** [@erny123](https://discourse.julialang.org/u/erny123)\
**Replies:** 2\
**Last updated:** [August 16, 2023, 5:47pm UTC](https://discourse.julialang.org/t/saving-fftw-plans-for-future-use/102871 "2023-08-16T17:47:31Z")

</div>

Is there anyway to save and load FFTW plans? For example: using FFTW sz = 2^13 ar = rand(ComplexF64,(sz,sz)); pthread =FFTW.plan\_fft!(ar,flags=FFTW.MEASURE); inv(pthread); pthreadpatient =FFTW.plan\_fft!(ar,flags=FFTW.…

---

## [Julia CI, how to help](https://discourse.julialang.org/t/julia-ci-how-to-help/102865)

<div class="topic-metadata">

**Author:** [@frylock](https://discourse.julialang.org/u/frylock)\
**Replies:** 3\
**Last updated:** [August 16, 2023, 5:30pm UTC](https://discourse.julialang.org/t/julia-ci-how-to-help/102865 "2023-08-16T17:30:02Z")

</div>

I broke this question out so as to not clutter this thread. In there, @Lilith mentions how new folk can help with Julia’s CI. I have no experience with CI, but would like to learn. The steps detailed, in my poor underst…

---

## [JuliaImages Announcements](https://discourse.julialang.org/t/juliaimages-announcements/102869)

<div class="topic-metadata">

**Author:** [@JuliaImages](https://discourse.julialang.org/u/JuliaImages)\
**Replies:** 1\
**Last updated:** [August 16, 2023, 4:53pm UTC](https://discourse.julialang.org/t/juliaimages-announcements/102869 "2023-08-16T16:53:24Z")

</div>

JuliaImages: Image Processing and Computer Vision in Julia JuliaImages hosts a collection of powerful image processing tools with a range of useful algorithms written in Julia, a modern and expressive high-level pro…

---

## [Performance / Memory differences between constructors of BigInts](https://discourse.julialang.org/t/performance-memory-differences-between-constructors-of-bigints/102863)

<div class="topic-metadata">

**Author:** [@maxasauruswall](https://discourse.julialang.org/u/maxasauruswall)\
**Replies:** 5\
**Last updated:** [August 16, 2023, 4:07pm UTC](https://discourse.julialang.org/t/performance-memory-differences-between-constructors-of-bigints/102863 "2023-08-16T16:07:11Z")

</div>

Hi all, I’m playing around with arbitrary precision integers in a jupyter notebook (Macbook air, Julia v1.10.0-beta1). I noticed a difference between two constructors of BigInts: @btime BigInt(1234567890) # 45.294 ns…

---

## [Arbitrary Precision BesselK (ArbNumerics.jl)](https://discourse.julialang.org/t/arbitrary-precision-besselk-arbnumerics-jl/53343)

<div class="topic-metadata">

**Author:** [@Neutrino155](https://discourse.julialang.org/u/Neutrino155)\
**Replies:** 12\
**Last updated:** [August 16, 2023, 3:58pm UTC](https://discourse.julialang.org/t/arbitrary-precision-besselk-arbnumerics-jl/53343 "2023-08-16T15:58:54Z")

</div>

Hello! I am fairly new to Julia and have been working with ArbNumerics.jl BesselK function as part of evaluating a complicated response function that can be expanded in a series of BesselK functions. The arguments it en…

---

## [How to define a function with argument dependent return](https://discourse.julialang.org/t/how-to-define-a-function-with-argument-dependent-return/102841)

<div class="topic-metadata">

**Author:** [@zxm403089989](https://discourse.julialang.org/u/zxm403089989)\
**Replies:** 7\
**Last updated:** [August 16, 2023, 3:47pm UTC](https://discourse.julialang.org/t/how-to-define-a-function-with-argument-dependent-return/102841 "2023-08-16T15:47:02Z")

</div>

I need to set a function with N dimensional array return. And the parameter N is dependent on the argument. However, Julia cannot recognize this before compile. Here is my approach: function DeltaTensor(total\_dimension:…

---

## [Load a pre-trained Pytorch model in Julia](https://discourse.julialang.org/t/load-a-pre-trained-pytorch-model-in-julia/96932)

<div class="topic-metadata">

**Author:** [@Jian\_ZUO](https://discourse.julialang.org/u/Jian_ZUO)\
**Replies:** 5\
**Last updated:** [August 16, 2023, 3:30pm UTC](https://discourse.julialang.org/t/load-a-pre-trained-pytorch-model-in-julia/96932 "2023-08-16T15:30:15Z")

</div>

Hi all, What are the best practices to load a pre-trained pytorch model in Julia (e.g. Flux.jl)? Thank you!

---

## [How efficient is the automatic differentation and optimization in comparison to PyTorch](https://discourse.julialang.org/t/how-efficient-is-the-automatic-differentation-and-optimization-in-comparison-to-pytorch/102824)

<div class="topic-metadata">

**Author:** [@roflmaostc](https://discourse.julialang.org/u/roflmaostc)\
**Replies:** 6\
**Last updated:** [August 16, 2023, 3:24pm UTC](https://discourse.julialang.org/t/how-efficient-is-the-automatic-differentation-and-optimization-in-comparison-to-pytorch/102824 "2023-08-16T15:24:16Z")

</div>

Hi all, how efficient is the current Julia AD and optimization landscape in comparsion to let’s say PyTorch? Python For example in PyTorch I can do arr1 = arr1.requires\_grad\_(True) arr2 = arr2.requires\_grad\_(True) opt…

---

## [Have slightly modified function compiled without copying code](https://discourse.julialang.org/t/have-slightly-modified-function-compiled-without-copying-code/102864)

<div class="topic-metadata">

**Author:** [@taotree](https://discourse.julialang.org/u/taotree)\
**Replies:** 3\
**Last updated:** [August 16, 2023, 3:11pm UTC](https://discourse.julialang.org/t/have-slightly-modified-function-compiled-without-copying-code/102864 "2023-08-16T15:11:45Z")

</div>

I keep running into cases where I have a function that has a base case, but sometimes I want to call it with an extra parameter so it behaves slightly differently. However, I don’t want to write two functions (lots of du…

---

## [Factorization using lu() and lufact()](https://discourse.julialang.org/t/factorization-using-lu-and-lufact/102860)

<div class="topic-metadata">

**Author:** [@Kritika\_Verma](https://discourse.julialang.org/u/Kritika_Verma)\
**Replies:** 6\
**Last updated:** [August 16, 2023, 3:06pm UTC](https://discourse.julialang.org/t/factorization-using-lu-and-lufact/102860 "2023-08-16T15:06:22Z")

</div>

I was following a tutorial on Youtube and for factorization and they used lu() and lufact(). From what I gather, I don’t have to use a specific package for it. But when I am trying to use to the functions I am getting th…

---

## [PyCall not respecting class inheritance?](https://discourse.julialang.org/t/pycall-not-respecting-class-inheritance/102840)

<div class="topic-metadata">

**Author:** [@hatmatrix](https://discourse.julialang.org/u/hatmatrix)\
**Replies:** 7\
**Last updated:** [August 16, 2023, 2:38pm UTC](https://discourse.julialang.org/t/pycall-not-respecting-class-inheritance/102840 "2023-08-16T14:38:51Z")

</div>

I have a Python package that I’m importing but class inheritance information is lost, so child class methods are not accessible. I can reproduce this problem with this simpler example here that uses PyCall but does not i…

---

## [plotting a histogram in julia with as many bins as values](https://discourse.julialang.org/t/plotting-a-histogram-in-julia-with-as-many-bins-as-values/102861)

<div class="topic-metadata">

**Author:** [@Mark01](https://discourse.julialang.org/u/Mark01)\
**Replies:** 1\
**Last updated:** [August 16, 2023, 2:32pm UTC](https://discourse.julialang.org/t/plotting-a-histogram-in-julia-with-as-many-bins-as-values/102861 "2023-08-16T14:32:24Z")

</div>

How do I make Julia Plots with the Plotly backend give me a histogram with as many integer bins from to max value in the series while displaying all the x-axis tick marks for each bin? using Plots plotly() age = 100\*ran…

---

## [Mann-Whitney U Test vs. simple Bayesian inference](https://discourse.julialang.org/t/mann-whitney-u-test-vs-simple-bayesian-inference/99676)

<div class="topic-metadata">

**Author:** [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Replies:** 2\
**Last updated:** [August 16, 2023, 2:02pm UTC](https://discourse.julialang.org/t/mann-whitney-u-test-vs-simple-bayesian-inference/99676 "2023-08-16T14:02:31Z")

</div>

I’m looking at the Mann-Whitney U test from HypothesisTests.jl, and it is described as follows: Perform a Mann-Whitney U test of the null hypothesis that the probability that an observation drawn from the same populati…

---

## [Generate Input for Tullio](https://discourse.julialang.org/t/generate-input-for-tullio/102859)

<div class="topic-metadata">

**Author:** [@AlexanderNenninger](https://discourse.julialang.org/u/AlexanderNenninger)\
**Replies:** 1\
**Last updated:** [August 16, 2023, 1:27pm UTC](https://discourse.julialang.org/t/generate-input-for-tullio/102859 "2023-08-16T13:27:48Z")

</div>

I’d like to benchmark my own code for working with N-dimensional arrays. As baseline, Tullio seems to be the fastest, significantly faster than sum. Given the setup using BenchmarkTools using Tullio const M = 3 const …

---

## [Autodiff of vector inputs with Enzyme.jl (and possibly Optimization.jl)](https://discourse.julialang.org/t/autodiff-of-vector-inputs-with-enzyme-jl-and-possibly-optimization-jl/101485)

<div class="topic-metadata">

**Author:** [@told](https://discourse.julialang.org/u/told)\
**Replies:** 9\
**Last updated:** [August 16, 2023, 8:54am UTC](https://discourse.julialang.org/t/autodiff-of-vector-inputs-with-enzyme-jl-and-possibly-optimization-jl/101485 "2023-08-16T08:54:03Z")

</div>

So we started a new huge project for which we aim to use Optimization.jl with Enzyme.jl as AD backend. We came up with some early prototypes and plugged that into Optimization.jl, unfortunately not very succesful (It se…

---

## [Bugs on Using CUDA.jl on Jeston AGX Orin Developer Kit](https://discourse.julialang.org/t/bugs-on-using-cuda-jl-on-jeston-agx-orin-developer-kit/102847)

<div class="topic-metadata">

**Author:** [@Sujaio](https://discourse.julialang.org/u/Sujaio)\
**Replies:** 1\
**Last updated:** [August 16, 2023, 7:25am UTC](https://discourse.julialang.org/t/bugs-on-using-cuda-jl-on-jeston-agx-orin-developer-kit/102847 "2023-08-16T07:25:04Z")

</div>

Iv deployed juliaup for Nvidia Orin, when I use different version of julia and test the CUDA, the simple computing of matrix multiplication is out of GPU memory. Is someone using CUDA on Orin?

---

## [GR interactivity in Pluto](https://discourse.julialang.org/t/gr-interactivity-in-pluto/48906)

<div class="topic-metadata">

**Author:** [@Oto\_Brzobohaty](https://discourse.julialang.org/u/Oto_Brzobohaty)\
**Replies:** 14\
**Last updated:** [August 16, 2023, 6:04am UTC](https://discourse.julialang.org/t/gr-interactivity-in-pluto/48906 "2023-08-16T06:04:12Z")

</div>

I have found this post I have downloaded the example notebook pluto\_ex.jl But I got this error UndefVarError: init\_pluto not defined in this cell begin ENV\["GRDISPLAY"\] = "pluto" using GR GR.js.init\_pluto()…

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

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