# Latest

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

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

**Page:** 691

---

## [How to smooth zig-zag?](https://discourse.julialang.org/t/how-to-smooth-zig-zag/98914)

<div class="topic-metadata">

**Author:** [@ellocco](https://discourse.julialang.org/u/ellocco)\
**Replies:** 3\
**Last updated:** [May 24, 2023, 10:13am UTC](https://discourse.julialang.org/t/how-to-smooth-zig-zag/98914 "2023-05-24T10:13:52Z")

</div>

How to smooth a zig-zag-line with only a few points? I have read the following topics here in this forum: smoothing-interpolation-for-tachometer-data smoothing-data-with-dates But I am still struggling with my sort o…

---

## [KernelAbstractions on CPU. Why so slow?](https://discourse.julialang.org/t/kernelabstractions-on-cpu-why-so-slow/99272)

<div class="topic-metadata">

**Author:** [@fedoroff](https://discourse.julialang.org/u/fedoroff)\
**Replies:** 8\
**Last updated:** [May 24, 2023, 9:40am UTC](https://discourse.julialang.org/t/kernelabstractions-on-cpu-why-so-slow/99272 "2023-05-24T09:40:00Z")

</div>

In the following code, launched with a single thread, KernelAbstractions’ function is almost twice slower than a simple broadcasting. Any ideas why? using BenchmarkTools using KernelAbstractions @kernel function mulcab…

---

## [Problem reading parquet file in Julia 1.9.0](https://discourse.julialang.org/t/problem-reading-parquet-file-in-julia-1-9-0/99314)

<div class="topic-metadata">

**Author:** [@MiquellaXMalenia](https://discourse.julialang.org/u/MiquellaXMalenia)\
**Replies:** 0\
**Last updated:** [May 24, 2023, 8:47am UTC](https://discourse.julialang.org/t/problem-reading-parquet-file-in-julia-1-9-0/99314 "2023-05-24T08:47:59Z")

</div>

Hello, Is anyone else experiencing problems reading parquet files in Julia 1.9.0? I was checking how my code performed when upgrading my Julia version from 1.8.4 to 1.9.0, and noticed the first run being extremely slow.…

---

## [Using @logmsg with begin/end blocks](https://discourse.julialang.org/t/using-logmsg-with-begin-end-blocks/99290)

<div class="topic-metadata">

**Author:** [@florian](https://discourse.julialang.org/u/florian)\
**Replies:** 3\
**Last updated:** [May 24, 2023, 7:10am UTC](https://discourse.julialang.org/t/using-logmsg-with-begin-end-blocks/99290 "2023-05-24T07:10:45Z")

</div>

Is it somehow possible to do this: @debug "Results of my calculations: " A=1:100 B=(1:100).\*10 In block form, meaning something like this: @debug begin ## Do some stuff: A = 1:100 B = A .\* 10 ## C…

---

## [Call to write 1.9 extensions (and find pkgs that need those)](https://discourse.julialang.org/t/call-to-write-1-9-extensions-and-find-pkgs-that-need-those/98857)

<div class="topic-metadata">

**Author:** [@longemen3000](https://discourse.julialang.org/u/longemen3000)\
**Replies:** 32\
**Last updated:** [May 24, 2023, 2:13am UTC](https://discourse.julialang.org/t/call-to-write-1-9-extensions-and-find-pkgs-that-need-those/98857 "2023-05-24T02:13:34Z")

</div>

1.9 Extensions are great, we need more of those. They are a great step into the dream of infinite interoperability that is one of my main motivators to use julia. For those reasons, i hereby make a call to extend as much…

---

## [Solving different parts of state vector with different schemes/solvers](https://discourse.julialang.org/t/solving-different-parts-of-state-vector-with-different-schemes-solvers/99305)

<div class="topic-metadata">

**Author:** [@p\_f](https://discourse.julialang.org/u/p_f)\
**Replies:** 1\
**Last updated:** [May 24, 2023, 12:06am UTC](https://discourse.julialang.org/t/solving-different-parts-of-state-vector-with-different-schemes-solvers/99305 "2023-05-24T00:06:20Z")

</div>

Hi all, I hope this question finds you well. I have two state vectors X1 and X2 that comprise my total state X = \[X1; X2\]. X1 evolves according to dX1 = f(X1,X2) and X2 evolves according to dX2 = g(X2) - h(X1,X2,dX1) …

---

## [Colorizing a UInt8 matrix](https://discourse.julialang.org/t/colorizing-a-uint8-matrix/99158)

<div class="topic-metadata">

**Author:** [@mmv](https://discourse.julialang.org/u/mmv)\
**Replies:** 15\
**Last updated:** [May 23, 2023, 11:46pm UTC](https://discourse.julialang.org/t/colorizing-a-uint8-matrix/99158 "2023-05-23T23:46:39Z")

</div>

Hi! I have a UInt8 matrix of 512 lines by 2048 columns where the elements can only take on the values 0x00, 0x01, 0x02, 0x03, 0x04, 0xfd, 0xfe or 0xff. I’d like to visualize this matrix as a color map, ideally in PNG or…

---

## [Inconsistent behaviour using Zygote.Buffer](https://discourse.julialang.org/t/inconsistent-behaviour-using-zygote-buffer/99139)

<div class="topic-metadata">

**Author:** [@keithjlee](https://discourse.julialang.org/u/keithjlee)\
**Replies:** 2\
**Last updated:** [May 23, 2023, 11:45pm UTC](https://discourse.julialang.org/t/inconsistent-behaviour-using-zygote-buffer/99139 "2023-05-23T23:45:22Z")

</div>

I’m working on making a structural analysis code base work smoothly with Automatic Differentiation, specifically Zygote for its generally friendly interface. In short, a major performance bottleneck is the assembly of th…

---

## [Scripting like a Julian](https://discourse.julialang.org/t/scripting-like-a-julian/50707)

<div class="topic-metadata">

**Author:** [@Sukera](https://discourse.julialang.org/u/Sukera)\
**Replies:** 7\
**Last updated:** [May 23, 2023, 11:13pm UTC](https://discourse.julialang.org/t/scripting-like-a-julian/50707 "2023-05-23T23:13:17Z")

</div>

I’ve been talking to a few people and since this topic comes up regularly, I thought I’d write up my workflow for writing “scripts”. I don’t have a standard blog or place to put this, so I thought I’d put it here and tag…

---

## [Invalid Argument Error on 3D Array](https://discourse.julialang.org/t/invalid-argument-error-on-3d-array/99147)

<div class="topic-metadata">

**Author:** [@huiyuxie](https://discourse.julialang.org/u/huiyuxie)\
**Replies:** 4\
**Last updated:** [May 23, 2023, 10:26pm UTC](https://discourse.julialang.org/t/invalid-argument-error-on-3d-array/99147 "2023-05-23T22:26:23Z")

</div>

Hi! I am working on using CUDA.jl to write kernels for 1D, 2D, and 3D arrays. The kernel worked well for 1D and 2D arrays and here is the 2D code. using CUDA function gpu\_add1!(y, x) index\_i = (blockIdx().x - 1) \* blo…

---

## [Issues when using multiple threads through Threads.@threads](https://discourse.julialang.org/t/issues-when-using-multiple-threads-through-threads-threads/98758)

<div class="topic-metadata">

**Author:** [@jianqixi](https://discourse.julialang.org/u/jianqixi)\
**Replies:** 6\
**Last updated:** [May 23, 2023, 9:17pm UTC](https://discourse.julialang.org/t/issues-when-using-multiple-threads-through-threads-threads/98758 "2023-05-23T21:17:32Z")

</div>

I am trying to use multiple threads to speed up my code. But it is very confusing when I use the Threads.@threads in my code. Here is one simple example of the code: Threads.@threads for i in 1:3 hits = Set{Int}() b =…

---

## [Elliptic functions of complex argument](https://discourse.julialang.org/t/elliptic-functions-of-complex-argument/51876)

<div class="topic-metadata">

**Author:** [@Gregstrq](https://discourse.julialang.org/u/Gregstrq)\
**Replies:** 8\
**Last updated:** [May 23, 2023, 8:42pm UTC](https://discourse.julialang.org/t/elliptic-functions-of-complex-argument/51876 "2023-05-23T20:42:52Z")

</div>

Does anyone know a good package where Elliptic functions are implemented for complex values of the argument? May be some C or Fortran package that can be easily called from Julia? I know that there is the package Ellipt…

---

## [Copy of Image](https://discourse.julialang.org/t/copy-of-image/99186)

<div class="topic-metadata">

**Author:** [@SergeantMike67](https://discourse.julialang.org/u/SergeantMike67)\
**Replies:** 3\
**Last updated:** [May 23, 2023, 8:40pm UTC](https://discourse.julialang.org/t/copy-of-image/99186 "2023-05-23T20:40:33Z")

</div>

I want to take an image and convert all colors to white leaving only the black pixels. I wrote the following code using Images pix=“” for pixel in pix

---

## [Why is typeof not type inferable in this case?](https://discourse.julialang.org/t/why-is-typeof-not-type-inferable-in-this-case/99297)

<div class="topic-metadata">

**Author:** [@Larbino1](https://discourse.julialang.org/u/Larbino1)\
**Replies:** 2\
**Last updated:** [May 23, 2023, 7:13pm UTC](https://discourse.julialang.org/t/why-is-typeof-not-type-inferable-in-this-case/99297 "2023-05-23T19:13:43Z")

</div>

I’m messing around with ForwardDiff, trying to write some type stable code, and have found an instance where typeof does not properly infer the type. I’m a bit stuck as to what to try here! I think this particular funct…

---

## [Using CPLEX (solver dependent) callbacks for custom branching strategy in Julia](https://discourse.julialang.org/t/using-cplex-solver-dependent-callbacks-for-custom-branching-strategy-in-julia/99054)

<div class="topic-metadata">

**Author:** [@valdemarsoegaard](https://discourse.julialang.org/u/valdemarsoegaard)\
**Replies:** 6\
**Last updated:** [May 23, 2023, 7:01pm UTC](https://discourse.julialang.org/t/using-cplex-solver-dependent-callbacks-for-custom-branching-strategy-in-julia/99054 "2023-05-23T19:01:18Z")

</div>

Greetings! I am working on my master thesis on a large-scale flow problem, where I have implemented a surrogate model derived from a neural network in the form of a set of mixed integer linear constraints which replaces…

---

## [From Python (or other) "numbers" (days) to Julia's Dates type](https://discourse.julialang.org/t/from-python-or-other-numbers-days-to-julias-dates-type/99269)

<div class="topic-metadata">

**Author:** [@marianoarnaiz](https://discourse.julialang.org/u/marianoarnaiz)\
**Replies:** 3\
**Last updated:** [May 23, 2023, 6:12pm UTC](https://discourse.julialang.org/t/from-python-or-other-numbers-days-to-julias-dates-type/99269 "2023-05-23T18:12:26Z")

</div>

Hi all. A pythonean colleague just send this julian a file full of “python numbers (days)”. I need to change this to julia Dates to plot his data next to mine. The data looks like this: Date in python Ydat…

---

## [Announcing Whisper.jl](https://discourse.julialang.org/t/announcing-whisper-jl/96614)

<div class="topic-metadata">

**Author:** [@avik](https://discourse.julialang.org/u/avik)\
**Replies:** 7\
**Last updated:** [May 23, 2023, 6:10pm UTC](https://discourse.julialang.org/t/announcing-whisper-jl/96614 "2023-05-23T18:10:57Z")

</div>

I’m very pleased to announce the availability of Whisper.jl, a Julia package to perform speech recognition. It uses the Whisper model developed by OpenAI, and runs the inference on the CPU using Georgi Gerganov’s whisper…

---

## [Parallel for nested loop with inner loop first, and then outer loop](https://discourse.julialang.org/t/parallel-for-nested-loop-with-inner-loop-first-and-then-outer-loop/99254)

<div class="topic-metadata">

**Author:** [@jianqixi](https://discourse.julialang.org/u/jianqixi)\
**Replies:** 2\
**Last updated:** [May 23, 2023, 4:04pm UTC](https://discourse.julialang.org/t/parallel-for-nested-loop-with-inner-loop-first-and-then-outer-loop/99254 "2023-05-23T16:04:36Z")

</div>

Hi, I am wondering how could I use @spawn to parallelize the nested loops, and to run the inner loop in parallel first, and then run the outer loop in parallel after that. Thanks

---

## [Turing checkpointing by callbacks](https://discourse.julialang.org/t/turing-checkpointing-by-callbacks/99293)

<div class="topic-metadata">

**Author:** [@astro-kevin](https://discourse.julialang.org/u/astro-kevin)\
**Replies:** 0\
**Last updated:** [May 23, 2023, 3:42pm UTC](https://discourse.julialang.org/t/turing-checkpointing-by-callbacks/99293 "2023-05-23T15:42:28Z")

</div>

How does one save a chain via callbacks in Turing? Right now, I have something like: function checkpoint(rng, model, sampler, sample, state, i; kwargs...) if i % 1000 == 0 serialize("testchainfull$i", chn) …

---

## [First time Running old Code on Julia 1.9](https://discourse.julialang.org/t/first-time-running-old-code-on-julia-1-9/99239)

<div class="topic-metadata">

**Author:** [@loki](https://discourse.julialang.org/u/loki)\
**Replies:** 5\
**Last updated:** [May 23, 2023, 3:41pm UTC](https://discourse.julialang.org/t/first-time-running-old-code-on-julia-1-9/99239 "2023-05-23T15:41:09Z")

</div>

Hello, I was hoping to see all of the improvements made to Julia 1.9 coming from 1.6. I ended up booting up some old code that was written in 1.6 but running the following code ended up throwing some new errors. cd(@\_\_…

---

## [MetaTesting.jl: Who tests the test-suites?](https://discourse.julialang.org/t/metatesting-jl-who-tests-the-test-suites/99273)

<div class="topic-metadata">

**Author:** [@oxinabox](https://discourse.julialang.org/u/oxinabox)\
**Replies:** 6\
**Last updated:** [May 23, 2023, 3:30pm UTC](https://discourse.julialang.org/t/metatesting-jl-who-tests-the-test-suites/99273 "2023-05-23T15:30:31Z")

</div>

A not so rare notion in julia is the idea of a test suite function. That’s some function that you call from your test code which runs a bunch of @test calls to check that an interface has been implemented correctly. C…

---

## [Struggling with lighting on GLMakie Meshes](https://discourse.julialang.org/t/struggling-with-lighting-on-glmakie-meshes/98678)

<div class="topic-metadata">

**Author:** [@Larbino1](https://discourse.julialang.org/u/Larbino1)\
**Replies:** 8\
**Last updated:** [May 23, 2023, 3:20pm UTC](https://discourse.julialang.org/t/struggling-with-lighting-on-glmakie-meshes/98678 "2023-05-23T15:20:48Z")

</div>

Can anyone point me to an up to date resource on lighting meshes in GLMakie? Whatever I try at the moment results in a completely flat color, with no way to percieve depth.

---

## [Workflow Example for creating a new Julia project](https://discourse.julialang.org/t/workflow-example-for-creating-a-new-julia-project/99286)

<div class="topic-metadata">

**Author:** [@johnh](https://discourse.julialang.org/u/johnh)\
**Replies:** 2\
**Last updated:** [May 23, 2023, 3:06pm UTC](https://discourse.julialang.org/t/workflow-example-for-creating-a-new-julia-project/99286 "2023-05-23T15:06:48Z")

</div>

Back along, someone made a reply to one of my posts. This contained a most excellent step by step guide to creating a new Julia project, with how to create a fresh project and manage packages. If anyone remembers this p…

---

## [Simple question about priors in bayesian analysis](https://discourse.julialang.org/t/simple-question-about-priors-in-bayesian-analysis/97255)

<div class="topic-metadata">

**Author:** [@Juan](https://discourse.julialang.org/u/Juan)\
**Replies:** 4\
**Last updated:** [May 23, 2023, 3:00pm UTC](https://discourse.julialang.org/t/simple-question-about-priors-in-bayesian-analysis/97255 "2023-05-23T15:00:12Z")

</div>

Hello. Imagine I want to use a small dataset (from an experiment) to fit a bayesian model. Is it right if I first apply that model to a large dataset (such as the public health service) and use the output as the prior …

---

## [HOF for a function not throwing an error](https://discourse.julialang.org/t/hof-for-a-function-not-throwing-an-error/99277)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 1\
**Last updated:** [May 23, 2023, 2:24pm UTC](https://discourse.julialang.org/t/hof-for-a-function-not-throwing-an-error/99277 "2023-05-23T14:24:56Z")

</div>

Does this have a name, or does it exist in a package? function throws\_no\_errors(f, args...) try f(args...) true catch false end end If not, suggestions for both are welcome.

---

## [pre-allocating array is slow](https://discourse.julialang.org/t/pre-allocating-array-is-slow/99233)

<div class="topic-metadata">

**Author:** [@dazhwu](https://discourse.julialang.org/u/dazhwu)\
**Replies:** 8\
**Last updated:** [May 23, 2023, 2:23pm UTC](https://discourse.julialang.org/t/pre-allocating-array-is-slow/99233 "2023-05-23T14:23:31Z")

</div>

I tried three ways of calculating the first difference of a series. To my disappointment, the 3rd method is 100 times as slow as the other two. So, in such a case, using the first two methods are better? using Benchmark…

---

## [Latexify reverses order of terms](https://discourse.julialang.org/t/latexify-reverses-order-of-terms/99174)

<div class="topic-metadata">

**Author:** [@brombo](https://discourse.julialang.org/u/brombo)\
**Replies:** 3\
**Last updated:** [May 23, 2023, 1:52pm UTC](https://discourse.julialang.org/t/latexify-reverses-order-of-terms/99174 "2023-05-23T13:52:52Z")

</div>

I have been using Julia for about a week and learning by making many many mistakes. I have a symbolic matrix generated using the Symbolics package - Num\[1 0 0; 0 r^2 0; 0 0 (r^2)\*(sin(var"\\\\theta")^2)\] The output of l…

---

## [Colorway / repeat standard colors in subplots](https://discourse.julialang.org/t/colorway-repeat-standard-colors-in-subplots/99282)

<div class="topic-metadata">

**Author:** [@ellocco](https://discourse.julialang.org/u/ellocco)\
**Replies:** 0\
**Last updated:** [May 23, 2023, 1:52pm UTC](https://discourse.julialang.org/t/colorway-repeat-standard-colors-in-subplots/99282 "2023-05-23T13:52:27Z")

</div>

I have two subplots and would like to repeat the same color sequence inside these subplots. One way is to define upfront my own list of colors, another way is to get access to the standard colors of the current color sch…

---

## [Type inference problem with nested keyword calls](https://discourse.julialang.org/t/type-inference-problem-with-nested-keyword-calls/99101)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 10\
**Last updated:** [May 23, 2023, 1:16pm UTC](https://discourse.julialang.org/t/type-inference-problem-with-nested-keyword-calls/99101 "2023-05-23T13:16:23Z")

</div>

In some code for a structural model, I use keywords to pass around arguments, to avoid mistakes. But it causes type inference to fail. Below is an MWE (sorry, could not make it any smaller, I tried many ways but then the…

---

## [Which files or subdirectories in \`~/.julia/\` can I delete?](https://discourse.julialang.org/t/which-files-or-subdirectories-in-julia-can-i-delete/62230)

<div class="topic-metadata">

**Author:** [@biona001](https://discourse.julialang.org/u/biona001)\
**Replies:** 21\
**Last updated:** [May 23, 2023, 12:34pm UTC](https://discourse.julialang.org/t/which-files-or-subdirectories-in-julia-can-i-delete/62230 "2023-05-23T12:34:24Z")

</div>

I am running Julia 1.5.4 on a HPC cluster, which has a strict 200,000 file count per user. ~/.julia consumes \>75% of this quota: $ du -a | cut -d/ -f2 | sort | uniq -c | sort -nr 153692 .julia 19159 .conda 10007 N…

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

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