# Latest

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

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

**Page:** 356

---

## [Vectorizing a summation](https://discourse.julialang.org/t/vectorizing-a-summation/117435)

<div class="topic-metadata">

**Author:** [@gkeee](https://discourse.julialang.org/u/gkeee)\
**Replies:** 5\
**Last updated:** [July 24, 2024, 7:31pm UTC](https://discourse.julialang.org/t/vectorizing-a-summation/117435 "2024-07-24T19:31:15Z")

</div>

term = 0 for k in 1:N term\_inner = 0 for p in 0:m term\_inner += binomial(m, p) \* c\[k\]^p \*f\[k\]^(m - p) \* integral\_Ik\_recursive(p, γ) end term += exp(im \* 2π \* γ \* (k - 1)) \* term\_inner end I want …

---

## [Trim a vector in place](https://discourse.julialang.org/t/trim-a-vector-in-place/117436)

<div class="topic-metadata">

**Author:** [@Nathan\_Boyer](https://discourse.julialang.org/u/Nathan_Boyer)\
**Replies:** 1\
**Last updated:** [July 24, 2024, 6:15pm UTC](https://discourse.julialang.org/t/trim-a-vector-in-place/117436 "2024-07-24T18:15:13Z")

</div>

I am trying to delete the last n elements from a vector v. Is there a better way? for \_ in 1:n pop!(v) end pop! would not accept a range argument. I try to avoid assuming anything about the indicies after:

---

## [Wrap Julia and my own julia app/package in a conda package](https://discourse.julialang.org/t/wrap-julia-and-my-own-julia-app-package-in-a-conda-package/117426)

<div class="topic-metadata">

**Author:** [@CrisCool](https://discourse.julialang.org/u/CrisCool)\
**Replies:** 2\
**Last updated:** [July 24, 2024, 5:44pm UTC](https://discourse.julialang.org/t/wrap-julia-and-my-own-julia-app-package-in-a-conda-package/117426 "2024-07-24T17:44:18Z")

</div>

Hi there I have developed a Julia app (package) that depends on other Julia packages developed by myself. I need to wrap everything in a conda package, including Julia itself. Any advice on how to do that? thanks

---

## [Error using GLMakie](https://discourse.julialang.org/t/error-using-glmakie/107768)

<div class="topic-metadata">

**Author:** [@Simone\_Gabbriellini](https://discourse.julialang.org/u/Simone_Gabbriellini)\
**Replies:** 15\
**Last updated:** [July 24, 2024, 4:59pm UTC](https://discourse.julialang.org/t/error-using-glmakie/107768 "2024-07-24T16:59:57Z")

</div>

I am trying to run a julia program from an ssh session with X-forwarding (note that xclock correctly opens the clock window in my local Xquartz) I have this configuration on my remote Ubuntu 18.04 box: $ inxi -G Graphi…

---

## [What are the dangers of a possible proliferation of exception types?](https://discourse.julialang.org/t/what-are-the-dangers-of-a-possible-proliferation-of-exception-types/117310)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 7\
**Last updated:** [July 24, 2024, 4:33pm UTC](https://discourse.julialang.org/t/what-are-the-dangers-of-a-possible-proliferation-of-exception-types/117310 "2024-07-24T16:33:52Z")

</div>

I vaguely remember some advice about the necessity of being conservative with the number of different exception types. I can’t remember the rationale or find any on the Web, so I’m asking here. What’s wrong with having m…

---

## [Fix nesting or disable expansion arrow using Documenter.jl](https://discourse.julialang.org/t/fix-nesting-or-disable-expansion-arrow-using-documenter-jl/117424)

<div class="topic-metadata">

**Author:** [@clizbe](https://discourse.julialang.org/u/clizbe)\
**Replies:** 0\
**Last updated:** [July 24, 2024, 3:40pm UTC](https://discourse.julialang.org/t/fix-nesting-or-disable-expansion-arrow-using-documenter-jl/117424 "2024-07-24T15:40:37Z")

</div>

To avoid docs duplication, we’re using @docs; canonical=false to reference a docstring in the How-To section of our documentation. What bothers us is the collapse arrow, which makes this section look different from the …

---

## [How can I round the elements of an array to have digits up to the order of magnitude of the last significant digit in a second array](https://discourse.julialang.org/t/how-can-i-round-the-elements-of-an-array-to-have-digits-up-to-the-order-of-magnitude-of-the-last-significant-digit-in-a-second-array/117378)

<div class="topic-metadata">

**Author:** [@Zotnam](https://discourse.julialang.org/u/Zotnam)\
**Replies:** 13\
**Last updated:** [July 24, 2024, 3:16pm UTC](https://discourse.julialang.org/t/how-can-i-round-the-elements-of-an-array-to-have-digits-up-to-the-order-of-magnitude-of-the-last-significant-digit-in-a-second-array/117378 "2024-07-24T15:16:34Z")

</div>

Hi, i have two arrays of float64: arr\_mean and arr\_stds. i can easily round arr\_stds to 1 or 2 significative digits with round.(arr\_stds, sigdigits=2). My problem is how to round arr\_mean so that each elements after…

---

## [AoG: MethodError: no method matching compute\_axes\_grid(::Layers, ::AlgebraOfGraphics.Scales; axis::Dictionaries.Dictionary{Symbol, Any})](https://discourse.julialang.org/t/aog-methoderror-no-method-matching-compute-axes-grid-layers-algebraofgraphics-scales-axis-dictionaries-dictionary-symbol-any/117415)

<div class="topic-metadata">

**Author:** [@vladdez](https://discourse.julialang.org/u/vladdez)\
**Replies:** 1\
**Last updated:** [July 24, 2024, 2:11pm UTC](https://discourse.julialang.org/t/aog-methoderror-no-method-matching-compute-axes-grid-layers-algebraofgraphics-scales-axis-dictionaries-dictionary-symbol-any/117415 "2024-07-24T14:11:56Z")

</div>

I updated AoG from 0.6 version to 0.7 and all my tests failed with the same error mentioned in a title: ERROR: MethodError: no method matching compute\_axes\_grid(::Layers, ::AlgebraOfGraphics.Scales; axis::Dictionaries.D…

---

## [Automatic Compiler Optimizations and Multithreading](https://discourse.julialang.org/t/automatic-compiler-optimizations-and-multithreading/117321)

<div class="topic-metadata">

**Author:** [@NonDairyNeutrino](https://discourse.julialang.org/u/NonDairyNeutrino)\
**Replies:** 11\
**Last updated:** [July 24, 2024, 1:29pm UTC](https://discourse.julialang.org/t/automatic-compiler-optimizations-and-multithreading/117321 "2024-07-24T13:29:24Z")

</div>

I learned in my HPC class that for languages such as C/C++ and Fortran, invoking automatic compiler optimizations using the (gcc) -On flag could lead to unintended behaviors when compiling multithreaded programs; somethi…

---

## [\[ANN\] TelemetryAnalysis.jl (JuliaCon 2024)](https://discourse.julialang.org/t/ann-telemetryanalysis-jl-juliacon-2024/117417)

<div class="topic-metadata">

**Author:** [@Ronis\_BR](https://discourse.julialang.org/u/Ronis_BR)\
**Replies:** 0\
**Last updated:** [July 24, 2024, 12:36pm UTC](https://discourse.julialang.org/t/ann-telemetryanalysis-jl-juliacon-2024/117417 "2024-07-24T12:36:03Z")

</div>

Hi! In JuliaCon this year, I presented about a package developed at the Brazilian National Institute for Space Research (INPE) that provides an API for analyzing satellite telemetries. Given the amazing feedback, we dec…

---

## [Why I can't convert non-integer float to Int64?](https://discourse.julialang.org/t/why-i-cant-convert-non-integer-float-to-int64/117276)

<div class="topic-metadata">

**Author:** [@Farouk](https://discourse.julialang.org/u/Farouk)\
**Replies:** 6\
**Last updated:** [July 24, 2024, 12:03pm UTC](https://discourse.julialang.org/t/why-i-cant-convert-non-integer-float-to-int64/117276 "2024-07-24T12:03:59Z")

</div>

Hello, I am new to Julia, I worked in the past mostly in Python and a bit with JAVA, C and C++. My question is that in the code below I get InexactError. The conversion works fine with floats with .0 decimal and not with…

---

## [AoG error: "No aesthetic mapping defined ..."](https://discourse.julialang.org/t/aog-error-no-aesthetic-mapping-defined/117398)

<div class="topic-metadata">

**Author:** [@hendri54](https://discourse.julialang.org/u/hendri54)\
**Replies:** 4\
**Last updated:** [July 24, 2024, 11:37am UTC](https://discourse.julialang.org/t/aog-error-no-aesthetic-mapping-defined/117398 "2024-07-24T11:37:35Z")

</div>

I defined a wrapper function around AoG’s visual(BarPlot) with a fair number of options (subplots, sub-figures, etc). This worked fine until I updated to AoG v0.7.2 and CairoMakie v 0.12.5 Now calling the function yield…

---

## [MTK: looping through variables in plot?](https://discourse.julialang.org/t/mtk-looping-through-variables-in-plot/117339)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 6\
**Last updated:** [July 24, 2024, 11:03am UTC](https://discourse.julialang.org/t/mtk-looping-through-variables-in-plot/117339 "2024-07-24T11:03:26Z")

</div>

I’m struggling to figure out how to loop through numbered variables in ModelingToolkit \[MTK\]. As a simple, yet concrete example, consider a model of a telegraph line, which consists in a telegraph line module component …

---

## [Arrow between subplots](https://discourse.julialang.org/t/arrow-between-subplots/117344)

<div class="topic-metadata">

**Author:** [@Sergey\_Novak](https://discourse.julialang.org/u/Sergey_Novak)\
**Replies:** 2\
**Last updated:** [July 24, 2024, 10:56am UTC](https://discourse.julialang.org/t/arrow-between-subplots/117344 "2024-07-24T10:56:27Z")

</div>

Hello, I need to add arrows between the Axis. As an example of my image, which I drawed using GIMP Please help me add them to make it look like in the image above My code and image: using JLD2, CairoMakie, MAT, GLM…

---

## [Compose SDESystems in ModelingToolkit](https://discourse.julialang.org/t/compose-sdesystems-in-modelingtoolkit/117054)

<div class="topic-metadata">

**Author:** [@VincentW](https://discourse.julialang.org/u/VincentW)\
**Replies:** 2\
**Last updated:** [July 24, 2024, 8:54am UTC](https://discourse.julialang.org/t/compose-sdesystems-in-modelingtoolkit/117054 "2024-07-24T08:54:10Z")

</div>

Hey folks, I am trying to build a compartmental model, where some parameters are supposed to follow a SDE. But somehow can’t get the composition right. I build the following example to illustrate the problem. First usi…

---

## [Mysterious type instability (& performance hit) with simple @threads](https://discourse.julialang.org/t/mysterious-type-instability-performance-hit-with-simple-threads/117404)

<div class="topic-metadata">

**Author:** [@barnett567](https://discourse.julialang.org/u/barnett567)\
**Replies:** 2\
**Last updated:** [July 24, 2024, 5:58am UTC](https://discourse.julialang.org/t/mysterious-type-instability-performance-hit-with-simple-threads/117404 "2024-07-24T05:58:02Z")

</div>

Hello all - I’m really confused about the following large performance hit, I believe due to type instability, in a really simple/standard piece of code. It took a while to boil it down to this MWE. It is triggered when a…

---

## [StructuredMesh parabolic equations supported Trixi](https://discourse.julialang.org/t/structuredmesh-parabolic-equations-supported-trixi/117231)

<div class="topic-metadata">

**Author:** [@Kelian\_Renoux](https://discourse.julialang.org/u/Kelian_Renoux)\
**Replies:** 8\
**Last updated:** [July 24, 2024, 7:02am UTC](https://discourse.julialang.org/t/structuredmesh-parabolic-equations-supported-trixi/117231 "2024-07-24T07:02:40Z")

</div>

Hi, i was using Trixi.jl for the Brown and Minion test case and i was trying to use the StructuredMesh function to refine the mesh cells by cells (20x20 to 25x25 and so on) but it seems that the create\_cache\_parabolic fu…

---

## [How to ensure the same global sign convention in row vectors of a matrix (due to many separate eigensolver calls)](https://discourse.julialang.org/t/how-to-ensure-the-same-global-sign-convention-in-row-vectors-of-a-matrix-due-to-many-separate-eigensolver-calls/117406)

<div class="topic-metadata">

**Author:** [@physh](https://discourse.julialang.org/u/physh)\
**Replies:** 2\
**Last updated:** [July 24, 2024, 6:54am UTC](https://discourse.julialang.org/t/how-to-ensure-the-same-global-sign-convention-in-row-vectors-of-a-matrix-due-to-many-separate-eigensolver-calls/117406 "2024-07-24T06:54:36Z")

</div>

Sorry for the title, I struggled to describe my problem concisely. I have a function \\phi(p,Z) which is evaluated on a grid pgrid, Zgrid and available as a matrix phi. My goal is to calculate the second derivative (late…

---

## [Graph label propagation with existing labels](https://discourse.julialang.org/t/graph-label-propagation-with-existing-labels/117395)

<div class="topic-metadata">

**Author:** [@Ken\_Williams](https://discourse.julialang.org/u/Ken_Williams)\
**Replies:** 1\
**Last updated:** [July 24, 2024, 6:36am UTC](https://discourse.julialang.org/t/graph-label-propagation-with-existing-labels/117395 "2024-07-24T06:36:33Z")

</div>

I have a MetaGraph(SimpleGraph(), String, Union{Missing,String}) (see Home · MetaGraphsNext.jl) object where some nodes have a string label and some nodes have the label missing. I would like to propagate existing label…

---

## [CUDA: CUDA driver not found](https://discourse.julialang.org/t/cuda-cuda-driver-not-found/117186)

<div class="topic-metadata">

**Author:** [@engram](https://discourse.julialang.org/u/engram)\
**Replies:** 24\
**Last updated:** [July 24, 2024, 5:08am UTC](https://discourse.julialang.org/t/cuda-cuda-driver-not-found/117186 "2024-07-24T05:08:21Z")

</div>

A few days ago the IT-department of my company added a virtual GPU to my virtual machine which I would like to use in Julia. I use julia 1.10.3 (which I can load as a module through (module load julia/1.10.3) and have a…

---

## [\[Solved\] Problem installing the Gurobi package on a cluster](https://discourse.julialang.org/t/solved-problem-installing-the-gurobi-package-on-a-cluster/117385)

<div class="topic-metadata">

**Author:** [@Alex\_73](https://discourse.julialang.org/u/Alex_73)\
**Replies:** 3\
**Last updated:** [July 24, 2024, 12:51am UTC](https://discourse.julialang.org/t/solved-problem-installing-the-gurobi-package-on-a-cluster/117385 "2024-07-24T00:51:12Z")

</div>

Hello. I’m doing a postgraduate degree and I have access to a cluster that has julia/1.7.3, gurobi/10.0.0 and gurobi/11.0.1. Until now it was running gurobi/10.0.0 perfectly. However, in order to use the most recent ve…

---

## [Neovim treesitter based shell syntax highlighting for command literals](https://discourse.julialang.org/t/neovim-treesitter-based-shell-syntax-highlighting-for-command-literals/117379)

<div class="topic-metadata">

**Author:** [@kdheepak](https://discourse.julialang.org/u/kdheepak)\
**Replies:** 6\
**Last updated:** [July 24, 2024, 12:19am UTC](https://discourse.julialang.org/t/neovim-treesitter-based-shell-syntax-highlighting-for-command-literals/117379 "2024-07-24T00:19:35Z")

</div>

With neovim and treesitter installed, you can set the syntax highlighting for a language inside another language. For example, for command\_literals, you can make the language "bash" and you’ll get syntax highlighting (b…

---

## [Generating finite-difference stencils](https://discourse.julialang.org/t/generating-finite-difference-stencils/85876)

<div class="topic-metadata">

**Author:** [@dorn-gerhard](https://discourse.julialang.org/u/dorn-gerhard)\
**Replies:** 19\
**Last updated:** [July 23, 2024, 10:39pm UTC](https://discourse.julialang.org/t/generating-finite-difference-stencils/85876 "2024-07-23T22:39:44Z")

</div>

Regarding the second suggested approach in the topic title: discrete derivatives (without interpolating data) Is there a Julia package that performs discrete derivatives (e.g. using some higher order stencils) also for …

---

## [Causal modeling in MTK?](https://discourse.julialang.org/t/causal-modeling-in-mtk/117161)

<div class="topic-metadata">

**Author:** [@sdwfrost](https://discourse.julialang.org/u/sdwfrost)\
**Replies:** 10\
**Last updated:** [July 23, 2024, 9:33pm UTC](https://discourse.julialang.org/t/causal-modeling-in-mtk/117161 "2024-07-23T21:33:09Z")

</div>

After seeing @ChrisRackauckas slides from JuliaCon 2024, I found out that (it seems) ModelingToolkit supports causal models, through passing input and outputs around. Is this really possible? I ask because Causal.jl stru…

---

## [Why does Juliaup install the musl version on Linux?](https://discourse.julialang.org/t/why-does-juliaup-install-the-musl-version-on-linux/117388)

<div class="topic-metadata">

**Author:** [@Azureuse](https://discourse.julialang.org/u/Azureuse)\
**Replies:** 7\
**Last updated:** [July 23, 2024, 9:13pm UTC](https://discourse.julialang.org/t/why-does-juliaup-install-the-musl-version-on-linux/117388 "2024-07-23T21:13:38Z")

</div>

It looks like Juliaup now prefers the musl version for Linux: juliaup/deploy/shellscript/juliaup-init.sh at main · JuliaLang/juliaup · GitHub and has done for a while (since 08ad054310bcaaa13d6364d41cdae9b31d391630). T…

---

## [Enzyme not working](https://discourse.julialang.org/t/enzyme-not-working/116214)

<div class="topic-metadata">

**Author:** [@miguelborrero](https://discourse.julialang.org/u/miguelborrero)\
**Replies:** 10\
**Last updated:** [July 23, 2024, 9:07pm UTC](https://discourse.julialang.org/t/enzyme-not-working/116214 "2024-07-23T21:07:18Z")

</div>

Hi there, Opening this issue to see whether I could get some help (@wsmoses ) with making Reverse mode in autodiff work. I made it work on trivial examples, even containing conditional statements but for some reason it …

---

## [TaskTracker.jl: create Gantt charts from markdown todo lists](https://discourse.julialang.org/t/tasktracker-jl-create-gantt-charts-from-markdown-todo-lists/117399)

<div class="topic-metadata">

**Author:** [@Ali\_Vahdati](https://discourse.julialang.org/u/Ali_Vahdati)\
**Replies:** 0\
**Last updated:** [July 23, 2024, 9:00pm UTC](https://discourse.julialang.org/t/tasktracker-jl-create-gantt-charts-from-markdown-todo-lists/117399 "2024-07-23T21:00:15Z")

</div>

I’ve created a small Julia package called TaskTracker.jl that helps with task tracking and visualization. It’s a simple tool that parses markdown files, calculates completion percentages, and generates Gantt charts using…

---

## [Pass vectors by reference using CxxWrap.@safe\_cfunction](https://discourse.julialang.org/t/pass-vectors-by-reference-using-cxxwrap-safe-cfunction/117350)

<div class="topic-metadata">

**Author:** [@afossa](https://discourse.julialang.org/u/afossa)\
**Replies:** 6\
**Last updated:** [July 23, 2024, 7:51pm UTC](https://discourse.julialang.org/t/pass-vectors-by-reference-using-cxxwrap-safe-cfunction/117350 "2024-07-23T19:51:37Z")

</div>

Hello, I have a Julia function like function f(x::AbstractVector{Float64}, y::AbstractVector{Float64}) y\[1\] = 2.0\*x\[1\]; y\[2\] = 2.0\*x\[2\]; return nothing; end; which takes in input two arrays of Float64 and …

---

## [Why assignment operators return the right-hand-side](https://discourse.julialang.org/t/why-assignment-operators-return-the-right-hand-side/109954)

<div class="topic-metadata">

**Author:** [@Mason](https://discourse.julialang.org/u/Mason)\
**Replies:** 18\
**Last updated:** [July 23, 2024, 7:10pm UTC](https://discourse.julialang.org/t/why-assignment-operators-return-the-right-hand-side/109954 "2024-07-23T19:10:36Z")

</div>

This maybe my biggest syntax gripe in julia. I really think that assignment should have returned the value on the left, not the right, and I find it really unfortunate that we chose the right hand side. It makes so man…

---

## [Understanding error "function type in method definition is not a type" for function-like types](https://discourse.julialang.org/t/understanding-error-function-type-in-method-definition-is-not-a-type-for-function-like-types/116105)

<div class="topic-metadata">

**Author:** [@frankwswang](https://discourse.julialang.org/u/frankwswang)\
**Replies:** 9\
**Last updated:** [July 23, 2024, 5:16pm UTC](https://discourse.julialang.org/t/understanding-error-function-type-in-method-definition-is-not-a-type-for-function-like-types/116105 "2024-07-23T17:16:15Z")

</div>

I don’t understand why the second way to construct a method (dispatched by ::Val{2}) is not allowed: julia\> abstract type MyFunc \<: Function end julia\> struct MyF1 \<: MyFunc end julia\> (f::MyFunc)(::Val{1}) = "method …

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

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