# Latest

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

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

**Page:** 753

---

## [Remove redundant folders in a filepath](https://discourse.julialang.org/t/remove-redundant-folders-in-a-filepath/96154)

<div class="topic-metadata">

**Author:** [@Dale\_James\_Black](https://discourse.julialang.org/u/Dale_James_Black)\
**Replies:** 1\
**Last updated:** [March 16, 2023, 2:56am UTC](https://discourse.julialang.org/t/remove-redundant-folders-in-a-filepath/96154 "2023-03-16T02:56:09Z")

</div>

Is there a way to remove redundant folders in a file path? Given a file system like ├── folder1 │ ├── subfolder1 │ │ ├── /images1/redundant1/redundant2/file.txt │ │ ├── /images2/redundant1/redundant2/file.…

---

## [Sort array based on another array?](https://discourse.julialang.org/t/sort-array-based-on-another-array/26854)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 14\
**Last updated:** [March 16, 2023, 2:42am UTC](https://discourse.julialang.org/t/sort-array-based-on-another-array/26854 "2023-03-16T02:42:43Z")

</div>

Hello I am post-processing some particle simulation data and for an example I would get the following two arrays: Rhop\_vec\[50\] 125749-element Array{Float32,1}: 1007.7992 1014.8219 1011.84064 1019.48114 1011.2265 …

---

## [Broadcast raising a matrix to a specific power](https://discourse.julialang.org/t/broadcast-raising-a-matrix-to-a-specific-power/96159)

<div class="topic-metadata">

**Author:** [@Justin\_Booth](https://discourse.julialang.org/u/Justin_Booth)\
**Replies:** 2\
**Last updated:** [March 16, 2023, 1:17am UTC](https://discourse.julialang.org/t/broadcast-raising-a-matrix-to-a-specific-power/96159 "2023-03-16T01:17:31Z")

</div>

Hi, new to Julia here. I’m trying to model the accumulation of mutations in a population using a Markov chain, I’ve got a transition matrix and an initial state vector, basically what I want to do is raise the transition…

---

## [Reverse view of an array](https://discourse.julialang.org/t/reverse-view-of-an-array/9657)

<div class="topic-metadata">

**Author:** [@kevin.squire](https://discourse.julialang.org/u/kevin.squire)\
**Replies:** 8\
**Last updated:** [March 16, 2023, 12:12am UTC](https://discourse.julialang.org/t/reverse-view-of-an-array/9657 "2023-03-16T00:12:03Z")

</div>

While reviewing a recent pull request in Images.jl, I ran across this line: cum\_pmf\_sq\_2 = reverse!(cumsum(reverse!(prob\_mass\_function\_sq))) Using reverse! is better than reverse here, but writing out the loops man…

---

## [Estimating parameters of ODEs leads to instability](https://discourse.julialang.org/t/estimating-parameters-of-odes-leads-to-instability/96149)

<div class="topic-metadata">

**Author:** [@stepanoslejsek](https://discourse.julialang.org/u/stepanoslejsek)\
**Replies:** 1\
**Last updated:** [March 15, 2023, 11:34pm UTC](https://discourse.julialang.org/t/estimating-parameters-of-odes-leads-to-instability/96149 "2023-03-15T23:34:31Z")

</div>

I have a system of ODEs in a form of: Dt(θ) ~ θ̇ Dt(θ̇) ~ a₁ \* θ̇ + a₂ \* sin(ψ) + a₃ \* ψ̇ + a₄ \* u(t) Dt(ψ) ~ ψ̇ Dt(ψ̇) ~ a₅ \* θ̇ + a₆ \* sin(ψ) + a₇ \* ψ̇ + a₈ \* u(t) where a₁,…,a₈ are parameters to be estimated…

---

## [How to think about indices and cartesian coordinates?](https://discourse.julialang.org/t/how-to-think-about-indices-and-cartesian-coordinates/95972)

<div class="topic-metadata">

**Author:** [@isaque](https://discourse.julialang.org/u/isaque)\
**Replies:** 5\
**Last updated:** [March 15, 2023, 9:27pm UTC](https://discourse.julialang.org/t/how-to-think-about-indices-and-cartesian-coordinates/95972 "2023-03-15T21:27:33Z")

</div>

Hello everyone! I am new to Julia and I am writing a simple simulation that uses a cartesian grid and numerical derivatives. I would like to confirm if my thinking is correct. I start by defining simple grids for X, Y …

---

## [Does \[noblock\] override previous blocking comments in a registrator PR?](https://discourse.julialang.org/t/does-noblock-override-previous-blocking-comments-in-a-registrator-pr/96151)

<div class="topic-metadata">

**Author:** [@mkarikom](https://discourse.julialang.org/u/mkarikom)\
**Replies:** 1\
**Last updated:** [March 15, 2023, 9:21pm UTC](https://discourse.julialang.org/t/does-noblock-override-previous-blocking-comments-in-a-registrator-pr/96151 "2023-03-15T21:21:51Z")

</div>

Just want to confirm that that auto merging will still happen if a comment like this: this looks shady... Is followed by a comment like this: \[noblock\] let's auto merge anyway

---

## [How can I see what parameters are making my code erroring when broadcasting a function call?](https://discourse.julialang.org/t/how-can-i-see-what-parameters-are-making-my-code-erroring-when-broadcasting-a-function-call/96130)

<div class="topic-metadata">

**Author:** [@bertulli](https://discourse.julialang.org/u/bertulli)\
**Replies:** 3\
**Last updated:** [March 15, 2023, 8:59pm UTC](https://discourse.julialang.org/t/how-can-i-see-what-parameters-are-making-my-code-erroring-when-broadcasting-a-function-call/96130 "2023-03-15T20:59:04Z")

</div>

Hi all! I have a function that raises a MethodError when broadcasted to a large vector of Strings. The error simply says julia\> df\_model\_measure\_master\[!, dest\_source\_eq\_sym\] = has\_dest\_source\_eq.(df\_model\_measure\_mast…

---

## [Trying to use FileFormats with JuMP](https://discourse.julialang.org/t/trying-to-use-fileformats-with-jump/96144)

<div class="topic-metadata">

**Author:** [@shakedregev](https://discourse.julialang.org/u/shakedregev)\
**Replies:** 1\
**Last updated:** [March 15, 2023, 7:35pm UTC](https://discourse.julialang.org/t/trying-to-use-fileformats-with-jump/96144 "2023-03-15T19:35:17Z")

</div>

Following the example here, I’m trying to use JuMP to write a model to a file. src = JuMP.Model(Clarabel.Optimizer) filename = "my\_model.lp" dest = FileFormats.Model(filename = filename) MOI.copy\_to(dest, src) MOI.write…

---

## [Installing Mosek Error for JuMP](https://discourse.julialang.org/t/installing-mosek-error-for-jump/96083)

<div class="topic-metadata">

**Author:** [@A\_M](https://discourse.julialang.org/u/A_M)\
**Replies:** 15\
**Last updated:** [March 15, 2023, 6:35pm UTC](https://discourse.julialang.org/t/installing-mosek-error-for-jump/96083 "2023-03-15T18:35:51Z")

</div>

I used to use something like this to build a docker, but suddenly I started getting this error FROM ubuntu:18.04 as base RUN apt-get -y update; apt-get -y install curl ENV JULIA\_PATH /julia ENV PATH "$JULIA\_PATH/bin:$PA…

---

## [Relocability problems about Requires.jl](https://discourse.julialang.org/t/relocability-problems-about-requires-jl/96110)

<div class="topic-metadata">

**Author:** [@jsjie](https://discourse.julialang.org/u/jsjie)\
**Replies:** 5\
**Last updated:** [March 15, 2023, 5:30pm UTC](https://discourse.julialang.org/t/relocability-problems-about-requires-jl/96110 "2023-03-15T17:30:46Z")

</div>

I compiled my package, which depends on HDF5.jl. I compiled it in docker and then use the compiled executable directly in the host machine. It generally works fine, but there is a warning: ┌ Warning: Error requiring \`MP…

---

## [Creating Regular Grids with Triangulate.jl and Extendable Grids](https://discourse.julialang.org/t/creating-regular-grids-with-triangulate-jl-and-extendable-grids/96124)

<div class="topic-metadata">

**Author:** [@mm-crj](https://discourse.julialang.org/u/mm-crj)\
**Replies:** 10\
**Last updated:** [March 15, 2023, 4:26pm UTC](https://discourse.julialang.org/t/creating-regular-grids-with-triangulate-jl-and-extendable-grids/96124 "2023-03-15T16:26:25Z")

</div>

I am trying to solve a PDE system on an unstructured mesh. I currently use the Triangulate.jl to create the mesh and then use OrdinaryDiffEq.jl to solve the system of ODEs, one for each cell of the mesh. Now I am interes…

---

## [Allocations for abstract field of struct](https://discourse.julialang.org/t/allocations-for-abstract-field-of-struct/96088)

<div class="topic-metadata">

**Author:** [@sstroemer](https://discourse.julialang.org/u/sstroemer)\
**Replies:** 8\
**Last updated:** [March 15, 2023, 3:02pm UTC](https://discourse.julialang.org/t/allocations-for-abstract-field-of-struct/96088 "2023-03-15T15:02:24Z")

</div>

Considering the following struct definition for \_MyTest1: using BenchmarkTools abstract type \_AbstractReference end struct \_TestStringReference \<: \_AbstractReference val::String end struct \_TestIntReference \<: \_A…

---

## [Allocation when applying in place multiplication to matrix of SVector](https://discourse.julialang.org/t/allocation-when-applying-in-place-multiplication-to-matrix-of-svector/96074)

<div class="topic-metadata">

**Author:** [@yiminlin](https://discourse.julialang.org/u/yiminlin)\
**Replies:** 2\
**Last updated:** [March 15, 2023, 2:51pm UTC](https://discourse.julialang.org/t/allocation-when-applying-in-place-multiplication-to-matrix-of-svector/96074 "2023-03-15T14:51:56Z")

</div>

I am trying to apply in-place matrix multiplication to a matrix of SVector. However, there are 3 allocations if I apply mul! directly. If I apply the multiplication over each column, the allocations disappear. Here is th…

---

## [Tutorial GenieFrameworks.jl](https://discourse.julialang.org/t/tutorial-genieframeworks-jl/90274)

<div class="topic-metadata">

**Author:** [@candidaorelmex](https://discourse.julialang.org/u/candidaorelmex)\
**Replies:** 1\
**Last updated:** [March 15, 2023, 2:39pm UTC](https://discourse.julialang.org/t/tutorial-genieframeworks-jl/90274 "2023-03-15T14:39:46Z")

</div>

Hi everyone, I’ve been using Julia for data analysis for a while now and I’ve always fancied creating streamlit-like data applications with Genie.jl. I’ve always found Genie complicated to use in comparison with streaml…

---

## [Saving a model built with Transformers.jl](https://discourse.julialang.org/t/saving-a-model-built-with-transformers-jl/96132)

<div class="topic-metadata">

**Author:** [@gemuesi](https://discourse.julialang.org/u/gemuesi)\
**Replies:** 6\
**Last updated:** [March 15, 2023, 1:48pm UTC](https://discourse.julialang.org/t/saving-a-model-built-with-transformers-jl/96132 "2023-03-15T13:48:28Z")

</div>

Hi there, I am pretty new to anything related to this topic in general, but I found Flux to be quite accessible and wanted to have a look at the Transformers.jl package as well. I’ve been playing around with the copy ta…

---

## [LLVM code changes if code is wrapped in function](https://discourse.julialang.org/t/llvm-code-changes-if-code-is-wrapped-in-function/96107)

<div class="topic-metadata">

**Author:** [@amansawhney](https://discourse.julialang.org/u/amansawhney)\
**Replies:** 2\
**Last updated:** [March 15, 2023, 1:35pm UTC](https://discourse.julialang.org/t/llvm-code-changes-if-code-is-wrapped-in-function/96107 "2023-03-15T13:35:55Z")

</div>

Hi! I am looking to use SIMD to speed up some operations on strings. I noticed that when I wrap my code in a function it seems that julia doesn’t use the vector instructions. I am using SIMD.jl for my simd functions. He…

---

## [How can I "flag" that I mutated a field in a struct such as a vector](https://discourse.julialang.org/t/how-can-i-flag-that-i-mutated-a-field-in-a-struct-such-as-a-vector/96099)

<div class="topic-metadata">

**Author:** [@kylebeggs](https://discourse.julialang.org/u/kylebeggs)\
**Replies:** 2\
**Last updated:** [March 15, 2023, 1:05pm UTC](https://discourse.julialang.org/t/how-can-i-flag-that-i-mutated-a-field-in-a-struct-such-as-a-vector/96099 "2023-03-15T13:05:23Z")

</div>

Suppose I have a struct where I am mutating one of the fields (say it is a Vector) like struct A x::Vector end a = A(\[1, 2\]) a.x\[1\] = 0 and I want to have some sort of flag to indicate whether I have mutated a.x. …

---

## [Defining Set Operations / Group Operations](https://discourse.julialang.org/t/defining-set-operations-group-operations/96060)

<div class="topic-metadata">

**Author:** [@Sunshine](https://discourse.julialang.org/u/Sunshine)\
**Replies:** 5\
**Last updated:** [March 14, 2023, 5:39pm UTC](https://discourse.julialang.org/t/defining-set-operations-group-operations/96060 "2023-03-14T17:39:32Z")

</div>

Hey All, I’m exploring coding concepts from Group theory. There’s a lot of questions I can ask here so I wanted to put them into one place and see if anyone can support me in finding the answers. If I construct a Set…

---

## [Graphemes vs chars](https://discourse.julialang.org/t/graphemes-vs-chars/96118)

<div class="topic-metadata">

**Author:** [@tim.holy](https://discourse.julialang.org/u/tim.holy)\
**Replies:** 8\
**Last updated:** [March 15, 2023, 12:07pm UTC](https://discourse.julialang.org/t/graphemes-vs-chars/96118 "2023-03-15T12:07:18Z")

</div>

Cthulhu has an internal TextWidthLimiter\<:IO which allows you to print text, attempting (but not always succeeding) in limiting output to a certain number of characters. I’m considering splitting it out into its own pack…

---

## [Ternary plots](https://discourse.julialang.org/t/ternary-plots/60867)

<div class="topic-metadata">

**Author:** [@Dan.phi](https://discourse.julialang.org/u/Dan.phi)\
**Replies:** 5\
**Last updated:** [March 15, 2023, 12:18pm UTC](https://discourse.julialang.org/t/ternary-plots/60867 "2023-03-15T12:18:17Z")

</div>

I am looking to replicate the figure below (from Wikipedia on the Dirichlet distribution). Is there any way to do this currently in Julia (the vertical color scale is not that important)?

---

## [Add package, but the following error was reported, how to solve it, thank you](https://discourse.julialang.org/t/add-package-but-the-following-error-was-reported-how-to-solve-it-thank-you/96112)

<div class="topic-metadata">

**Author:** [@Yanjj1](https://discourse.julialang.org/u/Yanjj1)\
**Replies:** 2\
**Last updated:** [March 15, 2023, 11:52am UTC](https://discourse.julialang.org/t/add-package-but-the-following-error-was-reported-how-to-solve-it-thank-you/96112 "2023-03-15T11:52:38Z")

</div>

(@v1.7) pkg\> add GLM Updating registry at ~/.julia/registries/General ERROR: GitError(Code:ENOTFOUND, Class:Repository, could not find repository from ‘/public/user/.julia/registries/General’) Stacktrace: \[1\] macro e…

---

## [Pandas vs Julia cheat sheet - equivalents](https://discourse.julialang.org/t/pandas-vs-julia-cheat-sheet-equivalents/96117)

<div class="topic-metadata">

**Author:** [@Johny\_K](https://discourse.julialang.org/u/Johny_K)\
**Replies:** 3\
**Last updated:** [March 15, 2023, 10:53am UTC](https://discourse.julialang.org/t/pandas-vs-julia-cheat-sheet-equivalents/96117 "2023-03-15T10:53:37Z")

</div>

Hey there, We’ve created new cheat sheet for comparison of the most used commands in DS: Julia and Pandas. You can find it here: Cheat sheet is based on my limited experience with Julia and research. Next We plan t…

---

## [Pkg.add("ImageView") fails on Win 32 bit system for V1.6 V1.8 V1.9](https://discourse.julialang.org/t/pkg-add-imageview-fails-on-win-32-bit-system-for-v1-6-v1-8-v1-9/96035)

<div class="topic-metadata">

**Author:** [@g4734e](https://discourse.julialang.org/u/g4734e)\
**Replies:** 14\
**Last updated:** [March 15, 2023, 10:46am UTC](https://discourse.julialang.org/t/pkg-add-imageview-fails-on-win-32-bit-system-for-v1-6-v1-8-v1-9/96035 "2023-03-15T10:46:28Z")

</div>

Other packages work FileIO,ImageIO but ImageView 2 items left over

---

## [Clarification on Hard Scope within functions and function arguments](https://discourse.julialang.org/t/clarification-on-hard-scope-within-functions-and-function-arguments/96044)

<div class="topic-metadata">

**Author:** [@phantom](https://discourse.julialang.org/u/phantom)\
**Replies:** 4\
**Last updated:** [March 15, 2023, 10:01am UTC](https://discourse.julialang.org/t/clarification-on-hard-scope-within-functions-and-function-arguments/96044 "2023-03-15T10:01:32Z")

</div>

I’m sure I am missing something simple here so I apologize in advance. But I am a little confused as to why this first assignment works. using Dates julia\> function currentmin(minute = minute(now())) min…

---

## [Continuous precompile?](https://discourse.julialang.org/t/continuous-precompile/96111)

<div class="topic-metadata">

**Author:** [@marius311](https://discourse.julialang.org/u/marius311)\
**Replies:** 0\
**Last updated:** [March 15, 2023, 9:04am UTC](https://discourse.julialang.org/t/continuous-precompile/96111 "2023-03-15T09:04:21Z")

</div>

With the new native code caching in 1.9, has anyone thought to make a tool which basically just runs in the background watching your project and triggers a background precompile anytime a file changes (killing any previo…

---

## [Shorten time to create\_app() using PackageCompiler](https://discourse.julialang.org/t/shorten-time-to-create-app-using-packagecompiler/95274)

<div class="topic-metadata">

**Author:** [@Pablo](https://discourse.julialang.org/u/Pablo)\
**Replies:** 6\
**Last updated:** [March 15, 2023, 8:41am UTC](https://discourse.julialang.org/t/shorten-time-to-create-app-using-packagecompiler/95274 "2023-03-15T08:41:22Z")

</div>

Is there any way to reduce the time it takes to create a julia app with package compiler? I have found the filter\_stdlibs=true arg in the PackageCompiler docs, but I wonder if there’s anything else I can do

---

## [Nested sampling for Bayesian parameter estimation in Julia](https://discourse.julialang.org/t/nested-sampling-for-bayesian-parameter-estimation-in-julia/96105)

<div class="topic-metadata">

**Author:** [@tomkimpson](https://discourse.julialang.org/u/tomkimpson)\
**Replies:** 0\
**Last updated:** [March 15, 2023, 4:32am UTC](https://discourse.julialang.org/t/nested-sampling-for-bayesian-parameter-estimation-in-julia/96105 "2023-03-15T04:32:33Z")

</div>

It is a common problem to want to infer parameters (Bayesian) given some data, a set of priors on those parameters, and a (parameterised) model. In the past, coming from Python, I have used tools such as Bilby, a Python…

---

## [Is it always safe to “re-use” an iterator/generator?](https://discourse.julialang.org/t/is-it-always-safe-to-re-use-an-iterator-generator/95697)

<div class="topic-metadata">

**Author:** [@lmtzx9h4qqnt](https://discourse.julialang.org/u/lmtzx9h4qqnt)\
**Replies:** 8\
**Last updated:** [March 15, 2023, 2:21am UTC](https://discourse.julialang.org/t/is-it-always-safe-to-re-use-an-iterator-generator/95697 "2023-03-15T02:21:05Z")

</div>

The way iterators work in Python, there is the following (potentially surprising) behavior: \>\>\> l = \[1, 2, 3\] \>\>\> g = (x for x in l) \>\>\> list(g) \[1, 2, 3\] \>\>\> list(g) \[\] That is, iterators are “used up” during the iter…

---

## [Slow model construction in JuMP](https://discourse.julialang.org/t/slow-model-construction-in-jump/95455)

<div class="topic-metadata">

**Author:** [@jacob-roth](https://discourse.julialang.org/u/jacob-roth)\
**Replies:** 14\
**Last updated:** [March 14, 2023, 10:28pm UTC](https://discourse.julialang.org/t/slow-model-construction-in-jump/95455 "2023-03-14T22:28:03Z")

</div>

I find that when I am modeling a problem in JuMP, the model construction takes a long time. My first thought was that maybe I am writing inefficient code, and I was wondering: if there might be any quick fixes to my Ju…

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

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