# Latest

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

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

**Page:** 430

---

## [Guidelines on syntax checking for macros](https://discourse.julialang.org/t/guidelines-on-syntax-checking-for-macros/113258)

<div class="topic-metadata">

**Author:** [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Replies:** 1\
**Last updated:** [April 20, 2024, 4:51am UTC](https://discourse.julialang.org/t/guidelines-on-syntax-checking-for-macros/113258 "2024-04-20T04:51:25Z")

</div>

Currently I’m developing a few macros that behave a bit like language keywords (there is no public non-macro interface). I’ve been leaning towards aggressively checking the syntax/expressions that the user provides and t…

---

## [How to define some predefined values to some part of the domain in gridap](https://discourse.julialang.org/t/how-to-define-some-predefined-values-to-some-part-of-the-domain-in-gridap/113254)

<div class="topic-metadata">

**Author:** [@mary](https://discourse.julialang.org/u/mary)\
**Replies:** 0\
**Last updated:** [April 19, 2024, 9:38pm UTC](https://discourse.julialang.org/t/how-to-define-some-predefined-values-to-some-part-of-the-domain-in-gridap/113254 "2024-04-19T21:38:56Z")

</div>

Hi, I have a domain and I want to solve the pde to get the displacement and phase field. meanwhile I want to set the value of phase field in 3 surfaces near the supports and load line as 1 (s=1) I wrote this in julia u…

---

## [How to construct a matrix of gradients depending on nodal locations in gridap](https://discourse.julialang.org/t/how-to-construct-a-matrix-of-gradients-depending-on-nodal-locations-in-gridap/113255)

<div class="topic-metadata">

**Author:** [@mary](https://discourse.julialang.org/u/mary)\
**Replies:** 0\
**Last updated:** [April 19, 2024, 9:52pm UTC](https://discourse.julialang.org/t/how-to-construct-a-matrix-of-gradients-depending-on-nodal-locations-in-gridap/113255 "2024-04-19T21:52:55Z")

</div>

Hi, I want to calculate the gradients of residuals(displacement) with respect to another vector. based on mathematical calculations, as residuals are a vector this gradient should be a matrix. This matrix should has val…

---

## [Tick direction in Makie](https://discourse.julialang.org/t/tick-direction-in-makie/74856)

<div class="topic-metadata">

**Author:** [@garrek](https://discourse.julialang.org/u/garrek)\
**Replies:** 7\
**Last updated:** [April 19, 2024, 10:00pm UTC](https://discourse.julialang.org/t/tick-direction-in-makie/74856 "2024-04-19T22:00:03Z")

</div>

Is there a way to change the tick direction? The default is that ticks are outside the axes. I would like them to be inside, but I cannot seem to find anything about this in the documentation.

---

## [Copulas.jl + Turing.jl - numerical stability?](https://discourse.julialang.org/t/copulas-jl-turing-jl-numerical-stability/113243)

<div class="topic-metadata">

**Author:** [@Domenic\_Di\_Francesco](https://discourse.julialang.org/u/Domenic_Di_Francesco)\
**Replies:** 6\
**Last updated:** [April 19, 2024, 9:44pm UTC](https://discourse.julialang.org/t/copulas-jl-turing-jl-numerical-stability/113243 "2024-04-19T21:44:09Z")

</div>

Hi all, I am a big fan of both libraries, but when I try to include copulas in probabilistic (Turing) models, I often get errors related to quantities being out of bounds. I have included a simple example below. The be…

---

## [How to test that bounds checks are happening](https://discourse.julialang.org/t/how-to-test-that-bounds-checks-are-happening/90585)

<div class="topic-metadata">

**Author:** [@Lilith](https://discourse.julialang.org/u/Lilith)\
**Replies:** 11\
**Last updated:** [April 19, 2024, 9:42pm UTC](https://discourse.julialang.org/t/how-to-test-that-bounds-checks-are-happening/90585 "2024-04-19T21:42:08Z")

</div>

When running CI, --check-bounds=yes is passed to julia as a startup option. How can I test to make sure I’m not misusing @inbounds? In this example, my bounds checking is broken, but the test still passes: x@X ~ % juli…

---

## [Printing specific unicode character in otf file using MathTeXEngine](https://discourse.julialang.org/t/printing-specific-unicode-character-in-otf-file-using-mathtexengine/113252)

<div class="topic-metadata">

**Author:** [@maxee](https://discourse.julialang.org/u/maxee)\
**Replies:** 1\
**Last updated:** [April 19, 2024, 8:59pm UTC](https://discourse.julialang.org/t/printing-specific-unicode-character-in-otf-file-using-mathtexengine/113252 "2024-04-19T20:59:46Z")

</div>

When using MathTeXEngine within Makie, I need to put a specific font for N in the graph. I am using \\mathcal{N} within LaTeX, and would like an N which looks similar. I cannot change the font for the LaTeX font. The mat…

---

## [Julia plots: Labels in scientific notation as in default font](https://discourse.julialang.org/t/julia-plots-labels-in-scientific-notation-as-in-default-font/113231)

<div class="topic-metadata">

**Author:** [@james](https://discourse.julialang.org/u/james)\
**Replies:** 2\
**Last updated:** [April 19, 2024, 5:27pm UTC](https://discourse.julialang.org/t/julia-plots-labels-in-scientific-notation-as-in-default-font/113231 "2024-04-19T17:27:32Z")

</div>

I have a log log plot and want to change the x-axis labels manually as in the code below. Hence, I need to use powers of 10 – however, the only ways I come up with gives different fonts than the default: Note that bo…

---

## [Stripping parameter from parametric types](https://discourse.julialang.org/t/stripping-parameter-from-parametric-types/8293)

<div class="topic-metadata">

**Author:** [@braydenware](https://discourse.julialang.org/u/braydenware)\
**Replies:** 18\
**Last updated:** [April 19, 2024, 6:13pm UTC](https://discourse.julialang.org/t/stripping-parameter-from-parametric-types/8293 "2024-04-19T18:13:42Z")

</div>

I have writing code that maniuplates containers of arrays of custom types with several parameters, e.g. SomeArrayType{T, G1, G2, N} \<: AbstractArray{T, N}, where the last parameter in SomeArrayType is always the array r…

---

## [Writing a simple macro for pretty differentiation](https://discourse.julialang.org/t/writing-a-simple-macro-for-pretty-differentiation/113247)

<div class="topic-metadata">

**Author:** [@Bizzi](https://discourse.julialang.org/u/Bizzi)\
**Replies:** 1\
**Last updated:** [April 19, 2024, 4:21pm UTC](https://discourse.julialang.org/t/writing-a-simple-macro-for-pretty-differentiation/113247 "2024-04-19T16:21:14Z")

</div>

Trying to write my first macro and I’m surprised at just how hard it really is. My goal is simple. I would like to be able to write something like the following @∂(t)f(t,x,y) and have it mean AD.derivative(z -\> f(z,…

---

## [Plot legend with multiple columns](https://discourse.julialang.org/t/plot-legend-with-multiple-columns/29195)

<div class="topic-metadata">

**Author:** [@aurelio-amerio](https://discourse.julialang.org/u/aurelio-amerio)\
**Replies:** 8\
**Last updated:** [April 19, 2024, 3:10pm UTC](https://discourse.julialang.org/t/plot-legend-with-multiple-columns/29195 "2024-04-19T15:10:12Z")

</div>

Hello, is there a way to split the labels in the legend in two columns using Plots.jl? I know how to do it using PyPlot (just use legend(ncol=2)) but I would like to avoid using python, if possible. Thank you very much…

---

## [Indices of intersection of two arrays](https://discourse.julialang.org/t/indices-of-intersection-of-two-arrays/23043)

<div class="topic-metadata">

**Author:** [@wonderboy3489](https://discourse.julialang.org/u/wonderboy3489)\
**Replies:** 25\
**Last updated:** [April 19, 2024, 2:09pm UTC](https://discourse.julialang.org/t/indices-of-intersection-of-two-arrays/23043 "2024-04-19T14:09:41Z")

</div>

Suppose I have two arrays: a = \[2, 4, 6, 7, 10, 11\] b = \[6, 7, 10, 11, 13, 15, 17, 19, 21, 23\] How do I get the indices of values in b that are in a and vice versa? I know intersection() returns the values, but I’m aft…

---

## [Unable to add any packages](https://discourse.julialang.org/t/unable-to-add-any-packages/113147)

<div class="topic-metadata">

**Author:** [@Sharara](https://discourse.julialang.org/u/Sharara)\
**Replies:** 4\
**Last updated:** [April 19, 2024, 2:09pm UTC](https://discourse.julialang.org/t/unable-to-add-any-packages/113147 "2024-04-19T14:09:03Z")

</div>

Dear all I have a problem with Julia, I had to stop working on my project in Julia for a while, The last time (around 2 weeks ago, everything worked well) but yesterday when I got back to my work and opened Julia, I …

---

## [How is \`deepcopy\` so clever regarding aliasing and self-reference?](https://discourse.julialang.org/t/how-is-deepcopy-so-clever-regarding-aliasing-and-self-reference/113235)

<div class="topic-metadata">

**Author:** [@iago-lito](https://discourse.julialang.org/u/iago-lito)\
**Replies:** 4\
**Last updated:** [April 19, 2024, 1:43pm UTC](https://discourse.julialang.org/t/how-is-deepcopy-so-clever-regarding-aliasing-and-self-reference/113235 "2024-04-19T13:43:10Z")

</div>

I find this behaviour very fortunate, but also black magic: a = \[5\] u = \[a, a, a\] v = deepcopy(u) v\[1\]\[1\] = 8 v # \[\[8\], \[8\], \[8\]\] # My naive 'deepcopy' would have produced \[\[8\], \[5\], \[5\]\] instead. I expected deepcopy …

---

## [Define a C++ struct/class in Julia for interop?](https://discourse.julialang.org/t/define-a-c-struct-class-in-julia-for-interop/112766)

<div class="topic-metadata">

**Author:** [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Replies:** 11\
**Last updated:** [April 19, 2024, 1:07pm UTC](https://discourse.julialang.org/t/define-a-c-struct-class-in-julia-for-interop/112766 "2024-04-19T13:07:22Z")

</div>

To efficiently call C or C++ libraries without an additional overhead of dereferencing pointers, you need to define a Julia struct with the same memory layout as the the struct/class in C or C++. For C, Clang.jl and CBin…

---

## [Best practices (for package code), e.g. no "using"](https://discourse.julialang.org/t/best-practices-for-package-code-e-g-no-using/113233)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 1\
**Last updated:** [April 19, 2024, 12:54pm UTC](https://discourse.julialang.org/t/best-practices-for-package-code-e-g-no-using/113233 "2024-04-19T12:54:14Z")

</div>

E.g. using is “considered harmful” for package code. There’s disagreement on recommending against it in the Julia docs, but it can for sure go into some style-guide, and maybe is already there. eval should neither be use…

---

## [Best performance for initialising a variable number of matrices/vectors within a Crank-Nicolson scheme](https://discourse.julialang.org/t/best-performance-for-initialising-a-variable-number-of-matrices-vectors-within-a-crank-nicolson-scheme/113083)

<div class="topic-metadata">

**Author:** [@lhcgeneva](https://discourse.julialang.org/u/lhcgeneva)\
**Replies:** 4\
**Last updated:** [April 19, 2024, 6:56am UTC](https://discourse.julialang.org/t/best-performance-for-initialising-a-variable-number-of-matrices-vectors-within-a-crank-nicolson-scheme/113083 "2024-04-19T06:56:05Z")

</div>

I’m solving a diffusion problem of several connected domains. I use a Crank-Nicolson scheme on each domain, and at every time step I connect the domains by some matching conditions at the boundary. To do the Crank-Nicols…

---

## [How to correctly pick the index of heatmap cell?](https://discourse.julialang.org/t/how-to-correctly-pick-the-index-of-heatmap-cell/113230)

<div class="topic-metadata">

**Author:** [@vladdez](https://discourse.julialang.org/u/vladdez)\
**Replies:** 2\
**Last updated:** [April 19, 2024, 11:28am UTC](https://discourse.julialang.org/t/how-to-correctly-pick-the-index-of-heatmap-cell/113230 "2024-04-19T11:28:16Z")

</div>

My goal is to click the cell in heatmap and got its index. Currently it is implemented the following way on(events(f).mousebutton, priority = 2) do event if event.button == Mouse.left && event.action == Mouse…

---

## [Strange Makie Observable updating behavior within recipe](https://discourse.julialang.org/t/strange-makie-observable-updating-behavior-within-recipe/113225)

<div class="topic-metadata">

**Author:** [@BambOoxX](https://discourse.julialang.org/u/BambOoxX)\
**Replies:** 4\
**Last updated:** [April 19, 2024, 11:25am UTC](https://discourse.julialang.org/t/strange-makie-observable-updating-behavior-within-recipe/113225 "2024-04-19T11:25:24Z")

</div>

Hello all, I’m currently facing a strange error while using a custom recipe. This error only showed up with recent versions of Makie, but I could not find the source. Here is the problem, for meshscatters, Makie has onl…

---

## [Is there a result type library?](https://discourse.julialang.org/t/is-there-a-result-type-library/113224)

<div class="topic-metadata">

**Author:** [@minetest2048](https://discourse.julialang.org/u/minetest2048)\
**Replies:** 2\
**Last updated:** [April 19, 2024, 11:21am UTC](https://discourse.julialang.org/t/is-there-a-result-type-library/113224 "2024-04-19T11:21:02Z")

</div>

I really missed my Result type from Rust, so I’ve keep writing this on my libraries using SumTypes.jl: using SumTypes @sum\_type Result{A, B} begin Ok{A}(::A) Err{B}(::B) end #Some functions to work with result…

---

## [Convenient creation of an OffsetArray?](https://discourse.julialang.org/t/convenient-creation-of-an-offsetarray/113047)

<div class="topic-metadata">

**Author:** [@ryofurue](https://discourse.julialang.org/u/ryofurue)\
**Replies:** 5\
**Last updated:** [April 19, 2024, 11:01am UTC](https://discourse.julialang.org/t/convenient-creation-of-an-offsetarray/113047 "2024-04-19T11:01:04Z")

</div>

I’ve been using OffsetArrays and is a bit frustrated with its cumbersome creation: # xax\[0:imax\], zax\[0:kmax\] are OffsetArrays. # I want to create an OffsetArray \[0:imax, 0:kmax\] oa = OffsetArray(Array{Float64,2}(undef,…

---

## [Aqua: "Unbound type parameters detected" for parametric structures](https://discourse.julialang.org/t/aqua-unbound-type-parameters-detected-for-parametric-structures/112962)

<div class="topic-metadata">

**Author:** [@Alexander-Barth](https://discourse.julialang.org/u/Alexander-Barth)\
**Replies:** 4\
**Last updated:** [April 19, 2024, 8:33am UTC](https://discourse.julialang.org/t/aqua-unbound-type-parameters-detected-for-parametric-structures/112962 "2024-04-19T08:33:31Z")

</div>

Aqua.jl complains about the following code for the structure StructBad with the error Unbound type parameters detected. Is this a real problem in the code or a false positive of Aqua? The structures StructOK2 and Struc…

---

## [Makie does not accept Vector{DataTime} types？](https://discourse.julialang.org/t/makie-does-not-accept-vector-datatime-types/113218)

<div class="topic-metadata">

**Author:** [@dk-zen](https://discourse.julialang.org/u/dk-zen)\
**Replies:** 3\
**Last updated:** [April 19, 2024, 7:44am UTC](https://discourse.julialang.org/t/makie-does-not-accept-vector-datatime-types/113218 "2024-04-19T07:44:53Z")

</div>

Why doesn’t Makie accept DataTime type, DataTime type is often used. julia\> typeof(e) Vector{Float64} (alias for Array{Float64, 1}) julia\> typeof(time) Vector{DateTime} (alias for Array{DateTime, 1}) julia\> lines(time…

---

## [Julia Error: InitError when trying to use Plots in Python via JuliaCall](https://discourse.julialang.org/t/julia-error-initerror-when-trying-to-use-plots-in-python-via-juliacall/112425)

<div class="topic-metadata">

**Author:** [@fumikobayashi](https://discourse.julialang.org/u/fumikobayashi)\
**Replies:** 2\
**Last updated:** [April 19, 2024, 7:38am UTC](https://discourse.julialang.org/t/julia-error-initerror-when-trying-to-use-plots-in-python-via-juliacall/112425 "2024-04-19T07:38:04Z")

</div>

Hello, I am trying to use the Julia package Plots.jl in Python3.11 via the JuliaCall package on Ubuntu 22.04.4 LTS. (Actually, I try to use another package that is developing a local community but I’m suspecting Plots.j…

---

## [Julia as a universal platform for statistical software development](https://discourse.julialang.org/t/julia-as-a-universal-platform-for-statistical-software-development/113017)

<div class="topic-metadata">

**Author:** [@droodman](https://discourse.julialang.org/u/droodman)\
**Replies:** 14\
**Last updated:** [April 19, 2024, 7:23am UTC](https://discourse.julialang.org/t/julia-as-a-universal-platform-for-statistical-software-development/113017 "2024-04-19T07:23:07Z")

</div>

I just posted a paper presenting a vision of using Julia as a universal back end for statistical software development. Do things once in Julia–optimize, maintain, add features–then call from R or Python or Matlab or Stat…

---

## [Package update fails when downloading registries, 502 bad gateway](https://discourse.julialang.org/t/package-update-fails-when-downloading-registries-502-bad-gateway/113220)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 0\
**Last updated:** [April 19, 2024, 6:28am UTC](https://discourse.julialang.org/t/package-update-fails-when-downloading-registries-502-bad-gateway/113220 "2024-04-19T06:28:38Z")

</div>

https://pkg.julialang.org/registries redirects to https://eu-central.pkg.julialang.org/registries which results in HTTP error 502 “bad gateway”. EDIT: works now

---

## [Unable to create parallel package](https://discourse.julialang.org/t/unable-to-create-parallel-package/113207)

<div class="topic-metadata">

**Author:** [@jafagervik](https://discourse.julialang.org/u/jafagervik)\
**Replies:** 1\
**Last updated:** [April 19, 2024, 5:52am UTC](https://discourse.julialang.org/t/unable-to-create-parallel-package/113207 "2024-04-19T05:52:55Z")

</div>

Hi, I’m trying to make a package in which I use Distributed.jl a bit. Lets call it Intro.jl, and I have two files in src directory. Intro.jl contains this code: module Intro using Distributed export mad, meap include…

---

## [How to configurate bound checks at statup?](https://discourse.julialang.org/t/how-to-configurate-bound-checks-at-statup/39248)

<div class="topic-metadata">

**Author:** [@JosephPollacco](https://discourse.julialang.org/u/JosephPollacco)\
**Replies:** 4\
**Last updated:** [April 18, 2024, 11:26pm UTC](https://discourse.julialang.org/t/how-to-configurate-bound-checks-at-statup/39248 "2024-04-18T23:26:58Z")

</div>

For well tested code it will be nice to have an option at the startup which disables the check bounds. According to the book JULIA HIGH PERFORMACE this is possible with the following option: -checks-bounds=no Neverthel…

---

## [Integrating Julia into a python poetry project](https://discourse.julialang.org/t/integrating-julia-into-a-python-poetry-project/113086)

<div class="topic-metadata">

**Author:** [@ezalys](https://discourse.julialang.org/u/ezalys)\
**Replies:** 11\
**Last updated:** [April 18, 2024, 9:50pm UTC](https://discourse.julialang.org/t/integrating-julia-into-a-python-poetry-project/113086 "2024-04-18T21:50:53Z")

</div>

I have an existing python poetry project that I want to integrate some Julia stuff into. I noticed that there exists a conda-forge package for Julia, but there’s no osx-arm64 build for it, which is a problem for me. Are…

---

## [RFC: ClusteringAPI.jl](https://discourse.julialang.org/t/rfc-clusteringapi-jl/112258)

<div class="topic-metadata">

**Author:** [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Replies:** 27\
**Last updated:** [April 18, 2024, 9:11pm UTC](https://discourse.julialang.org/t/rfc-clusteringapi-jl/112258 "2024-04-18T21:11:54Z")

</div>

Hi all, this could go either in statistics, data, or machine learning domains, please share. Alright, so I was trying to test various different clustering algorithms to see which one best clusters my data. In doing so,…

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

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