# Latest

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

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

**Page:** 541

---

## [Perplexing behavior when computing the matmul smoke test on GPU in Julia](https://discourse.julialang.org/t/perplexing-behavior-when-computing-the-matmul-smoke-test-on-gpu-in-julia/106994)

<div class="topic-metadata">

**Author:** [@Aakhash\_Sundaresan](https://discourse.julialang.org/u/Aakhash_Sundaresan)\
**Replies:** 5\
**Last updated:** [December 3, 2023, 3:33am UTC](https://discourse.julialang.org/t/perplexing-behavior-when-computing-the-matmul-smoke-test-on-gpu-in-julia/106994 "2023-12-03T03:33:51Z")

</div>

@avikpal , @ChrisRackauckas Why is that when I compute the matmul smoke test for the first time and time it, it takes long time than the CPU computation, and also the allocations are huge. When I again try to compute …

---

## [Does this output look like SCIP has fallen into an infinite loop?](https://discourse.julialang.org/t/does-this-output-look-like-scip-has-fallen-into-an-infinite-loop/107061)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 1\
**Last updated:** [December 2, 2023, 11:21pm UTC](https://discourse.julialang.org/t/does-this-output-look-like-scip-has-fallen-into-an-infinite-loop/107061 "2023-12-02T23:21:13Z")

</div>

I’m using SCIP.jl, and the SCIP solver seems like it maybe enters an infinite loop, judging by the output it’s producing: 897s|591200 |476649 |685013 | 1.2 | 3574M | 241 |1212 | 651 | 390 | 213k| 1 | 1 | 21 | 0…

---

## [This month in Julia world - 2023-11](https://discourse.julialang.org/t/this-month-in-julia-world-2023-11/107058)

<div class="topic-metadata">

**Author:** [@Krastanov](https://discourse.julialang.org/u/Krastanov)\
**Replies:** 2\
**Last updated:** [December 2, 2023, 10:40pm UTC](https://discourse.julialang.org/t/this-month-in-julia-world-2023-11/107058 "2023-12-02T22:40:18Z")

</div>

A monthly newsletter, mostly on julia internals, digestible for casual observers. A biased, incomplete, editorialized list of what I found interesting this month, with contributions from the community. “Internals” Fora …

---

## [Fortran calling convention when passing an array with unknown size](https://discourse.julialang.org/t/fortran-calling-convention-when-passing-an-array-with-unknown-size/107057)

<div class="topic-metadata">

**Author:** [@wujinq](https://discourse.julialang.org/u/wujinq)\
**Replies:** 2\
**Last updated:** [December 2, 2023, 10:26pm UTC](https://discourse.julialang.org/t/fortran-calling-convention-when-passing-an-array-with-unknown-size/107057 "2023-12-02T22:26:59Z")

</div>

In modern Fortran when an array is passed to a subroutine, we don’t really need to specify its size: the size can be read from size(arr). So the follows function my\_length(arr) real(8), intent(in), dimensio…

---

## [Incrementing package version number between releases](https://discourse.julialang.org/t/incrementing-package-version-number-between-releases/106966)

<div class="topic-metadata">

**Author:** [@airpmb](https://discourse.julialang.org/u/airpmb)\
**Replies:** 10\
**Last updated:** [December 2, 2023, 8:18pm UTC](https://discourse.julialang.org/t/incrementing-package-version-number-between-releases/106966 "2023-12-02T20:18:11Z")

</div>

Is there an established best practice for when to bump the version number between releases? Say I just released 1.0.0 and that’s what’s in the HEAD of main in Project.toml. Now I start a branch to develop some feature. I…

---

## [How to do Multithreading the right way?](https://discourse.julialang.org/t/how-to-do-multithreading-the-right-way/107044)

<div class="topic-metadata">

**Author:** [@Melancholic\_Octopus](https://discourse.julialang.org/u/Melancholic_Octopus)\
**Replies:** 1\
**Last updated:** [December 2, 2023, 5:51pm UTC](https://discourse.julialang.org/t/how-to-do-multithreading-the-right-way/107044 "2023-12-02T17:51:25Z")

</div>

Hi, I was trying to learn how to do multi-threading in julia, but everywhere i found just how not to do it I need to perform multiple searches in a recursive data structure, and i wanted to try parallelize it. Given it…

---

## [A small "API" I made for ModelingToolkit/MoL, need feedback on the general API structure](https://discourse.julialang.org/t/a-small-api-i-made-for-modelingtoolkit-mol-need-feedback-on-the-general-api-structure/107039)

<div class="topic-metadata">

**Author:** [@Qfl3x](https://discourse.julialang.org/u/Qfl3x)\
**Replies:** 4\
**Last updated:** [December 2, 2023, 2:28pm UTC](https://discourse.julialang.org/t/a-small-api-i-made-for-modelingtoolkit-mol-need-feedback-on-the-general-api-structure/107039 "2023-12-02T14:28:03Z")

</div>

Essentially the API is “functional”, where parameterized functions are defined which give the variables, parameters, equations…etc of the model. The goal is to have a nice easy way to do experiments that involve changi…

---

## [Performance difference depending on order of comparison in loop](https://discourse.julialang.org/t/performance-difference-depending-on-order-of-comparison-in-loop/107040)

<div class="topic-metadata">

**Author:** [@wheeheee](https://discourse.julialang.org/u/wheeheee)\
**Replies:** 3\
**Last updated:** [December 2, 2023, 1:05pm UTC](https://discourse.julialang.org/t/performance-difference-depending-on-order-of-comparison-in-loop/107040 "2023-12-02T13:05:14Z")

</div>

Unexpectedly, the following function has very different performance depending on the argument order of two matrices, which should be equivalent function f2(x, y; init=0) total = init for i in eachindex(x, y) …

---

## [Time to find the best solution in a mixed-integer linear programming model with JuMP](https://discourse.julialang.org/t/time-to-find-the-best-solution-in-a-mixed-integer-linear-programming-model-with-jump/106985)

<div class="topic-metadata">

**Author:** [@baprata](https://discourse.julialang.org/u/baprata)\
**Replies:** 2\
**Last updated:** [December 2, 2023, 10:28am UTC](https://discourse.julialang.org/t/time-to-find-the-best-solution-in-a-mixed-integer-linear-programming-model-with-jump/106985 "2023-12-02T10:28:53Z")

</div>

I am solving a mixed-integer linear programming model with JuMP and CPLEX. How could I measure the time required to find the best solution? Sometimes, the global optimal solution is found, but the solver continues the s…

---

## [Can't get gpu recognized: AMDGPU.functional(:MIOpen) returns false](https://discourse.julialang.org/t/cant-get-gpu-recognized-amdgpu-functional-miopen-returns-false/107032)

<div class="topic-metadata">

**Author:** [@Tetrakai](https://discourse.julialang.org/u/Tetrakai)\
**Replies:** 3\
**Last updated:** [December 2, 2023, 4:46am UTC](https://discourse.julialang.org/t/cant-get-gpu-recognized-amdgpu-functional-miopen-returns-false/107032 "2023-12-02T04:46:02Z")

</div>

I got the FastAI example from the readme running on cpu, so now tried to move to gpu after installing ROCm 5.7.1. It still reverted to CPU: fitonecycle!(learner, 1) ┌ Info: The GPU function is being called but the GPU i…

---

## [Can rand generate random vectors with custom type entries?](https://discourse.julialang.org/t/can-rand-generate-random-vectors-with-custom-type-entries/107028)

<div class="topic-metadata">

**Author:** [@matthias314](https://discourse.julialang.org/u/matthias314)\
**Replies:** 5\
**Last updated:** [December 2, 2023, 4:41am UTC](https://discourse.julialang.org/t/can-rand-generate-random-vectors-with-custom-type-entries/107028 "2023-12-02T04:41:09Z")

</div>

I’m trying to understand how to implement rand for custom types. After looking at the documentation, I’ve come up with the following: using Random struct A{T} x::T end Random.rand(rng::AbstractRNG, ::Type{A{T}}) w…

---

## [The ‘where’ keyword](https://discourse.julialang.org/t/the-where-keyword/107030)

<div class="topic-metadata">

**Author:** [@jiang\_ming\_zhang](https://discourse.julialang.org/u/jiang_ming_zhang)\
**Replies:** 3\
**Last updated:** [December 2, 2023, 3:18am UTC](https://discourse.julialang.org/t/the-where-keyword/107030 "2023-12-02T03:18:18Z")

</div>

function dimension(::BoseFS{N,M}) where {N,M} return binomial(BigInt(N + M - 1), BigInt(N)) end what does the ‘where’ keyword mean? I tend to interprete it like the english clause, but I cannot make sense of it

---

## [How to save the output from Pkg.status() as a string variable?](https://discourse.julialang.org/t/how-to-save-the-output-from-pkg-status-as-a-string-variable/107027)

<div class="topic-metadata">

**Author:** [@yhchang96](https://discourse.julialang.org/u/yhchang96)\
**Replies:** 5\
**Last updated:** [December 2, 2023, 1:41am UTC](https://discourse.julialang.org/t/how-to-save-the-output-from-pkg-status-as-a-string-variable/107027 "2023-12-02T01:41:40Z")

</div>

If I do something like version = Pkg.status(), then version is nothing. How do I save the output from Pkg.status() to a string variable? All I need is just the package name with the version number in a human readable fo…

---

## [Problems saving/opening ODESolution from SciML with JLD2](https://discourse.julialang.org/t/problems-saving-opening-odesolution-from-sciml-with-jld2/106958)

<div class="topic-metadata">

**Author:** [@yhchang96](https://discourse.julialang.org/u/yhchang96)\
**Replies:** 12\
**Last updated:** [December 2, 2023, 12:49am UTC](https://discourse.julialang.org/t/problems-saving-opening-odesolution-from-sciml-with-jld2/106958 "2023-12-02T00:49:40Z")

</div>

I define a custom struct to hold the parameters for the coupled ODEs I’m solving with OrdinaryDiffEq.jl, which typically stores various numbers and arrays (1D or 2D), as well as vectors of dualcache vectors in par.dualca…

---

## [Functions as a struct Field](https://discourse.julialang.org/t/functions-as-a-struct-field/107013)

<div class="topic-metadata">

**Author:** [@Chong\_Wang](https://discourse.julialang.org/u/Chong_Wang)\
**Replies:** 11\
**Last updated:** [December 2, 2023, 12:09am UTC](https://discourse.julialang.org/t/functions-as-a-struct-field/107013 "2023-12-02T00:09:01Z")

</div>

I am aware of some related discussion (Have a function field in a structure, using another field in the structure and Alternative to function as field in struct), but the discussion there is insufficient for my case. The…

---

## [An old question: how do I output a vector of UInt8 in binary?](https://discourse.julialang.org/t/an-old-question-how-do-i-output-a-vector-of-uint8-in-binary/107016)

<div class="topic-metadata">

**Author:** [@rmfritz](https://discourse.julialang.org/u/rmfritz)\
**Replies:** 3\
**Last updated:** [December 1, 2023, 10:18pm UTC](https://discourse.julialang.org/t/an-old-question-how-do-i-output-a-vector-of-uint8-in-binary/107016 "2023-12-01T22:18:15Z")

</div>

So far, I am writing the bytes individually. That seems inefficient. Are there better alternatives, perhaps converting the vector to a byte string?

---

## [LinearAlgebra.gemv! vs BLAS.gemv!](https://discourse.julialang.org/t/linearalgebra-gemv-vs-blas-gemv/107017)

<div class="topic-metadata">

**Author:** [@jacob-roth](https://discourse.julialang.org/u/jacob-roth)\
**Replies:** 3\
**Last updated:** [December 1, 2023, 10:11pm UTC](https://discourse.julialang.org/t/linearalgebra-gemv-vs-blas-gemv/107017 "2023-12-01T22:11:50Z")

</div>

I am trying to understand what julia uses in a call to mul! in the following example: using LinearAlgebra m,n = 10,5; A = randn(m,n); x = randn(n); Ax = zeros(m); @code\_lowered mul!(Ax, A, x, true, false) @code\_lowered …

---

## [Binary latent variable for occupancy modelling using Turing](https://discourse.julialang.org/t/binary-latent-variable-for-occupancy-modelling-using-turing/106090)

<div class="topic-metadata">

**Author:** [@VLucet](https://discourse.julialang.org/u/VLucet)\
**Replies:** 4\
**Last updated:** [December 1, 2023, 10:08pm UTC](https://discourse.julialang.org/t/binary-latent-variable-for-occupancy-modelling-using-turing/106090 "2023-12-01T22:08:45Z")

</div>

I am trying to implement a simple species occupancy model, which makes use of a latent binary variable. I’ve tried to get inspiration from this repository, but got confused by the approach and tried to start from even si…

---

## [Difference between \`for ... end\` and \`\[... for ...\]\`?](https://discourse.julialang.org/t/difference-between-for-end-and-for/106965)

<div class="topic-metadata">

**Author:** [@nabla](https://discourse.julialang.org/u/nabla)\
**Replies:** 6\
**Last updated:** [December 1, 2023, 9:12pm UTC](https://discourse.julialang.org/t/difference-between-for-end-and-for/106965 "2023-12-01T21:12:28Z")

</div>

I encounter a very strange bug when calling an external library (say a function foo) with the two syntaxes in the title: julia\> data = Any\[\]; for \_=1:10000 push!(data,foo()) end # OK julia\> data = \[foo() for \_=1:10000\] …

---

## [Docstring for existing functions](https://discourse.julialang.org/t/docstring-for-existing-functions/107019)

<div class="topic-metadata">

**Author:** [@MarDiehl](https://discourse.julialang.org/u/MarDiehl)\
**Replies:** 1\
**Last updated:** [December 1, 2023, 9:12pm UTC](https://discourse.julialang.org/t/docstring-for-existing-functions/107019 "2023-12-01T21:12:12Z")

</div>

I have a function that is called view but does not provide a view on an array. Unfortunately, the help on this function starts with the documentation of the build-in view and only adds my docstring later. Since the gene…

---

## [Help with Project Euler #2: undef inits, printing, multiplication by juxtaposition, and more](https://discourse.julialang.org/t/help-with-project-euler-2-undef-inits-printing-multiplication-by-juxtaposition-and-more/106930)

<div class="topic-metadata">

**Author:** [@chandra](https://discourse.julialang.org/u/chandra)\
**Replies:** 22\
**Last updated:** [December 1, 2023, 8:06pm UTC](https://discourse.julialang.org/t/help-with-project-euler-2-undef-inits-printing-multiplication-by-juxtaposition-and-more/106930 "2023-12-01T20:06:57Z")

</div>

A = \[0, 1, undef\] A\[3\] = 1 println(A) In the above script, is there any way to suppress the Any appearing in front of the array values in (square) brackets of array A?

---

## [Gradient to jacobian in type stable way with ForwardDiff](https://discourse.julialang.org/t/gradient-to-jacobian-in-type-stable-way-with-forwarddiff/107015)

<div class="topic-metadata">

**Author:** [@JonasWickman](https://discourse.julialang.org/u/JonasWickman)\
**Replies:** 0\
**Last updated:** [December 1, 2023, 8:01pm UTC](https://discourse.julialang.org/t/gradient-to-jacobian-in-type-stable-way-with-forwarddiff/107015 "2023-12-01T20:01:19Z")

</div>

I have a function f(x,y) where x and y are both vectors, and I would like to calculate the matrix of mixed partials. The following works but is not type stable using ForwardDiff f(x,y) = sum(x)\*sum(y) x0 = \[1.0, 2.0, 3.…

---

## [Comparison to numpyro](https://discourse.julialang.org/t/comparison-to-numpyro/106495)

<div class="topic-metadata">

**Author:** [@spragud2](https://discourse.julialang.org/u/spragud2)\
**Replies:** 9\
**Last updated:** [December 1, 2023, 7:42pm UTC](https://discourse.julialang.org/t/comparison-to-numpyro/106495 "2023-12-01T19:42:53Z")

</div>

Curious if anyone else has tried comparing Turing with Numpyro? I am working with a dataset of about N = 5,000 and fitting a bayesian MLP on top of a fine-tuned language model which I am viewing as a fixed feature extrac…

---

## [Avoiding small strings and using IOBuffer](https://discourse.julialang.org/t/avoiding-small-strings-and-using-iobuffer/106980)

<div class="topic-metadata">

**Author:** [@grahamas](https://discourse.julialang.org/u/grahamas)\
**Replies:** 7\
**Last updated:** [December 1, 2023, 7:06pm UTC](https://discourse.julialang.org/t/avoiding-small-strings-and-using-iobuffer/106980 "2023-12-01T19:06:23Z")

</div>

Recently I’ve been using this bit of code to basically conditionally concatenate a bunch of lines in a file: buf = IOBuffer() open("input.txt", "r") do f for line in readlines(f) if line\[1\] != "#" …

---

## [Notify not working when triggered by a button](https://discourse.julialang.org/t/notify-not-working-when-triggered-by-a-button/107010)

<div class="topic-metadata">

**Author:** [@Larbino1](https://discourse.julialang.org/u/Larbino1)\
**Replies:** 0\
**Last updated:** [December 1, 2023, 5:55pm UTC](https://discourse.julialang.org/t/notify-not-working-when-triggered-by-a-button/107010 "2023-12-01T17:55:09Z")

</div>

My code for updating a heatmap is not working when triggered by a button. I have tried to boil things down to a minimum working example. The expected behaviour is that at each evaluation of the cost function, one pixel …

---

## [PrettyTables.jl breaks on non-breaking release](https://discourse.julialang.org/t/prettytables-jl-breaks-on-non-breaking-release/106990)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 7\
**Last updated:** [December 1, 2023, 5:50pm UTC](https://discourse.julialang.org/t/prettytables-jl-breaks-on-non-breaking-release/106990 "2023-12-01T17:50:19Z")

</div>

Hello, I use PrettyTables.jl to print the contents of a struct to the REPL. Sometime between 2.0 and 2.3.1 it stopped working. Here is an example showing it works with 2.0: Code using SequentialSamplingModels dist = …

---

## [Override or change opacity of a given RGBA color?](https://discourse.julialang.org/t/override-or-change-opacity-of-a-given-rgba-color/106880)

<div class="topic-metadata">

**Author:** [@ryofurue](https://discourse.julialang.org/u/ryofurue)\
**Replies:** 4\
**Last updated:** [December 1, 2023, 5:05pm UTC](https://discourse.julialang.org/t/override-or-change-opacity-of-a-given-rgba-color/106880 "2023-12-01T17:05:24Z")

</div>

I’ve seen a construct like (:red, 0.3) to control the color and opacity separately. What I’d like to achieve here is to change the opacity of a given RGBA color. What’s the idiomatic way? At the end of this message, I …

---

## [Failed to precompile OpenCL in julia V1.9, for GPU programming, AMD Radeon graphics](https://discourse.julialang.org/t/failed-to-precompile-opencl-in-julia-v1-9-for-gpu-programming-amd-radeon-graphics/106695)

<div class="topic-metadata">

**Author:** [@Beatha\_Shilongo](https://discourse.julialang.org/u/Beatha_Shilongo)\
**Replies:** 13\
**Last updated:** [December 1, 2023, 4:58pm UTC](https://discourse.julialang.org/t/failed-to-precompile-opencl-in-julia-v1-9-for-gpu-programming-amd-radeon-graphics/106695 "2023-12-01T16:58:55Z")

</div>

Hello. Anyone to kindly assist. Am trying to instal OpenCL library in julia but getting a precompile OpenCL error. Any suggestions on getting this library to work. Below is the error am getting: Failed to precompile O…

---

## [VARMA and VARMAX time series models](https://discourse.julialang.org/t/varma-and-varmax-time-series-models/107003)

<div class="topic-metadata">

**Author:** [@Helectus](https://discourse.julialang.org/u/Helectus)\
**Replies:** 1\
**Last updated:** [December 1, 2023, 4:53pm UTC](https://discourse.julialang.org/t/varma-and-varmax-time-series-models/107003 "2023-12-01T16:53:03Z")

</div>

Is there a VARMA or VARMAX model in any package? Would it be worth it for me to develop a wrapper for pythons implementations? Maybe it has been done before and i cant find it?

---

## [Performance of streaming \`mean\`](https://discourse.julialang.org/t/performance-of-streaming-mean/106999)

<div class="topic-metadata">

**Author:** [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Replies:** 4\
**Last updated:** [December 1, 2023, 3:49pm UTC](https://discourse.julialang.org/t/performance-of-streaming-mean/106999 "2023-12-01T15:49:25Z")

</div>

Here’s a basic streaming mean function (called avg for convenience): function avg(itr) a = zero(eltype(x)) for (i, x) in enumerate(itr) a += (x - a) / i end return a end Why does it allocate so …

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

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