# Latest

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

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

**Page:** 867

---

## [Surrogate creation from discrete data](https://discourse.julialang.org/t/surrogate-creation-from-discrete-data/90074)

<div class="topic-metadata">

**Author:** [@davide445](https://discourse.julialang.org/u/davide445)\
**Replies:** 4\
**Last updated:** [November 12, 2022, 9:41pm UTC](https://discourse.julialang.org/t/surrogate-creation-from-discrete-data/90074 "2022-11-12T21:41:08Z")

</div>

My final goal is being able to generate a surrogate of a physics simulation, I started generating from this kind of simulation tables of positions, velocities and forces for three vertex in the volumetric m…

---

## [What do I like about Julia?](https://discourse.julialang.org/t/what-do-i-like-about-julia/89831)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 28\
**Last updated:** [November 12, 2022, 9:19pm UTC](https://discourse.julialang.org/t/what-do-i-like-about-julia/89831 "2022-11-12T21:19:15Z")

</div>

I was recently attempting to formulate a concise list of the things that I liked about Julia. This is what I came up with so far: automated and practically invisible build system (no more configuration files, make file…

---

## [Macro question (create variables)](https://discourse.julialang.org/t/macro-question-create-variables/90160)

<div class="topic-metadata">

**Author:** [@Eben60](https://discourse.julialang.org/u/Eben60)\
**Replies:** 4\
**Last updated:** [November 12, 2022, 9:09pm UTC](https://discourse.julialang.org/t/macro-question-create-variables/90160 "2022-11-12T21:09:44Z")

</div>

Wanted: a macro @moo a b which is in effect equivalent to a = foo("a") b = foo("b") and actually I got it: foo(x) = "$x-$x" macro moo(args...) for x in args xs = string(x) @eval eval(Meta.parse…

---

## [DimensionMismatch("tried to assign 15-element array to 1×5 destination")](https://discourse.julialang.org/t/dimensionmismatch-tried-to-assign-15-element-array-to-1x5-destination/90167)

<div class="topic-metadata">

**Author:** [@Eric.O](https://discourse.julialang.org/u/Eric.O)\
**Replies:** 4\
**Last updated:** [November 12, 2022, 8:16pm UTC](https://discourse.julialang.org/t/dimensionmismatch-tried-to-assign-15-element-array-to-1x5-destination/90167 "2022-11-12T20:16:33Z")

</div>

I keep struggling to correct this error in my code “DimensionMismatch(“tried to assign 15-element array to 1×5 destination”)”. I kindly need help to correct this code to get it running correctly please. Thank you. My cod…

---

## [How to rewrite a jax model with stacked parameters](https://discourse.julialang.org/t/how-to-rewrite-a-jax-model-with-stacked-parameters/90150)

<div class="topic-metadata">

**Author:** [@Frankiewaang](https://discourse.julialang.org/u/Frankiewaang)\
**Replies:** 6\
**Last updated:** [November 12, 2022, 8:15pm UTC](https://discourse.julialang.org/t/how-to-rewrite-a-jax-model-with-stacked-parameters/90150 "2022-11-12T20:15:48Z")

</div>

Hi, I have been using Julia for a while but new to the Julia ML ecosystem. I want to rewrite a lease square monte carlo model with neural nets using Lux or Flux. Here is the main code from python’s jax, basically it wou…

---

## [Unreasonable slow speed in numerical integration](https://discourse.julialang.org/t/unreasonable-slow-speed-in-numerical-integration/89910)

<div class="topic-metadata">

**Author:** [@swish47](https://discourse.julialang.org/u/swish47)\
**Replies:** 16\
**Last updated:** [November 12, 2022, 7:15pm UTC](https://discourse.julialang.org/t/unreasonable-slow-speed-in-numerical-integration/89910 "2022-11-12T19:15:45Z")

</div>

I hope to compute an intergration of a function with intergration inside, however the efficiency is extremely slow. using HCubature,QuadGK,NumericalIntegration spinonenergy(kx::Float64,ky::Float64)::Float64=2\*(cos(kx)+c…

---

## [Weird Module Error](https://discourse.julialang.org/t/weird-module-error/90144)

<div class="topic-metadata">

**Author:** [@Elzair](https://discourse.julialang.org/u/Elzair)\
**Replies:** 1\
**Last updated:** [November 12, 2022, 7:07pm UTC](https://discourse.julialang.org/t/weird-module-error/90144 "2022-11-12T19:07:36Z")

</div>

I just developed a Package for Julia https://github.com/Elzair/merchantjl. First I just created one module in the main file and just include()d all code under it. Merchant.jl module Merchant include("worldinfo.jl") # .…

---

## [Constrained Priors and Bijectors](https://discourse.julialang.org/t/constrained-priors-and-bijectors/90141)

<div class="topic-metadata">

**Author:** [@marcobonici](https://discourse.julialang.org/u/marcobonici)\
**Replies:** 7\
**Last updated:** [November 12, 2022, 7:07pm UTC](https://discourse.julialang.org/t/constrained-priors-and-bijectors/90141 "2022-11-12T19:07:21Z")

</div>

Hi to everybody! I have been using AdvancedHMC NUTS implementation and I am quite satisfied with the result I am obtaining. The model I am trying to study is quite simple logℓ(θ) = logpdf(MvNormal(data, mycov), theory…

---

## [GPUDirect?](https://discourse.julialang.org/t/gpudirect/46424)

<div class="topic-metadata">

**Author:** [@Raf](https://discourse.julialang.org/u/Raf)\
**Replies:** 4\
**Last updated:** [November 12, 2022, 5:21pm UTC](https://discourse.julialang.org/t/gpudirect/46424 "2022-11-12T17:21:22Z")

</div>

Has anyone experimented with direct transfer using nvidias GPUDirect? It would be great to have a direct HDF5 to GPU pipeline.

---

## [Setting fish shell environment variables correctly for julia shell](https://discourse.julialang.org/t/setting-fish-shell-environment-variables-correctly-for-julia-shell/90158)

<div class="topic-metadata">

**Author:** [@floswald](https://discourse.julialang.org/u/floswald)\
**Replies:** 2\
**Last updated:** [November 12, 2022, 5:01pm UTC](https://discourse.julialang.org/t/setting-fish-shell-environment-variables-correctly-for-julia-shell/90158 "2022-11-12T17:01:39Z")

</div>

I need to come back to an old question. I am unable to see my system ENV variables in the julia shell. I set the env vars in fish with set -U key value like so: floswald@PTL11077 ~\> set -U JULIA\_VAR howdie floswald@PTL…

---

## [How to use type parameter variables across multiple parametric types](https://discourse.julialang.org/t/how-to-use-type-parameter-variables-across-multiple-parametric-types/90162)

<div class="topic-metadata">

**Author:** [@christophE](https://discourse.julialang.org/u/christophE)\
**Replies:** 10\
**Last updated:** [November 12, 2022, 4:45pm UTC](https://discourse.julialang.org/t/how-to-use-type-parameter-variables-across-multiple-parametric-types/90162 "2022-11-12T16:45:33Z")

</div>

Hello Julia folk, I am testing something very simple, a dot product, and I want to ensure, it gets two arrays (or vectors) of the same length. This attempt does not work: function dot\_product{N::UInt64}(vec1::Array{Flo…

---

## [How to plot multiple interval notations with plots layout in Julia?](https://discourse.julialang.org/t/how-to-plot-multiple-interval-notations-with-plots-layout-in-julia/90166)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 0\
**Last updated:** [November 12, 2022, 3:57pm UTC](https://discourse.julialang.org/t/how-to-plot-multiple-interval-notations-with-plots-layout-in-julia/90166 "2022-11-12T15:57:27Z")

</div>

Hi all, I have this code to plot interval notation: using Plots, LaTeXStrings, Plots.PlotMeasures f(x) = 0.1 plot(\[0.3,0.9\],\[0,0\],arrow=true,color=:black,linewidth=2, xticks=false, yticks=false, ylims=(0,1), showaxis=…

---

## [Is there a way to see the maximum working memory of my code?](https://discourse.julialang.org/t/is-there-a-way-to-see-the-maximum-working-memory-of-my-code/76024)

<div class="topic-metadata">

**Author:** [@StevenWhitaker](https://discourse.julialang.org/u/StevenWhitaker)\
**Replies:** 2\
**Last updated:** [November 12, 2022, 2:58pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-see-the-maximum-working-memory-of-my-code/76024 "2022-11-12T14:58:06Z")

</div>

@time gives the total memory allocation of a piece of code, but because of garbage collection I can have code that allocates much more memory than my system has RAM. Is there a way to see the maximum working memory of a …

---

## [How to draw tangent line for my second plot with MTH229?](https://discourse.julialang.org/t/how-to-draw-tangent-line-for-my-second-plot-with-mth229/90159)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 2\
**Last updated:** [November 12, 2022, 2:43pm UTC](https://discourse.julialang.org/t/how-to-draw-tangent-line-for-my-second-plot-with-mth229/90159 "2022-11-12T14:43:13Z")

</div>

Hi all, I want to plot tangent lines to my second plot below (the g(x) function), but I do not know how. I am using tangent function from MTH229 package. Here is my code: using Plots, LaTeXStrings, MTH229 gr() f(x) =…

---

## [Bar Chart with error bars plots](https://discourse.julialang.org/t/bar-chart-with-error-bars-plots/90155)

<div class="topic-metadata">

**Author:** [@indymnv](https://discourse.julialang.org/u/indymnv)\
**Replies:** 2\
**Last updated:** [November 12, 2022, 10:24am UTC](https://discourse.julialang.org/t/bar-chart-with-error-bars-plots/90155 "2022-11-12T10:24:10Z")

</div>

If i have a dataset as follow: df = DataFrame( group = \["A", "B", "C"\], total = \[7.7, 4.6, 5.1\], std\_error = \[0.04, 0.05, 0.06\] ) How can I create a Barplot with error bars, using plots and statplots? Simil…

---

## [How to produce nice boxplots](https://discourse.julialang.org/t/how-to-produce-nice-boxplots/9345)

<div class="topic-metadata">

**Author:** [@burfel](https://discourse.julialang.org/u/burfel)\
**Replies:** 12\
**Last updated:** [November 12, 2022, 10:03am UTC](https://discourse.julialang.org/t/how-to-produce-nice-boxplots/9345 "2022-11-12T10:03:56Z")

</div>

Does anyone know how to produce nice boxplots out of a dataframe of this form? │ Row │ Smarcc1 │ Socs3 │ Sox1 │ Sox2 │ Stat3 │ T │ Tbx3 │ Tcf7l1 │ ├─────┼─────────┼─────────┼──────┼─────────┼─────────┼─────…

---

## [How to rename the registered package?](https://discourse.julialang.org/t/how-to-rename-the-registered-package/90147)

<div class="topic-metadata">

**Author:** [@iHany](https://discourse.julialang.org/u/iHany)\
**Replies:** 3\
**Last updated:** [November 12, 2022, 8:50am UTC](https://discourse.julialang.org/t/how-to-rename-the-registered-package/90147 "2022-11-12T08:50:17Z")

</div>

Hi, I was following this instruction to rename the registered package. In my case, I wanna rename ParametrisedConvexApproximators.jl to ParameterizedConvexApproximators.jl. I renamed on Github, renamed files, and made a…

---

## [Creating Cheatsheets](https://discourse.julialang.org/t/creating-cheatsheets/90079)

<div class="topic-metadata">

**Author:** [@Alex\_Tantos](https://discourse.julialang.org/u/Alex_Tantos)\
**Replies:** 12\
**Last updated:** [November 12, 2022, 7:55am UTC](https://discourse.julialang.org/t/creating-cheatsheets/90079 "2022-11-12T07:55:37Z")

</div>

Hi. I was thinking of preparing a cheatsheet for string manipulation in Julia for my CL class. However, I have no idea how to write one following the usual cheatsheet format we all know and love. Does anybody know of a …

---

## [Help with CI not running](https://discourse.julialang.org/t/help-with-ci-not-running/90152)

<div class="topic-metadata">

**Author:** [@Lilith](https://discourse.julialang.org/u/Lilith)\
**Replies:** 2\
**Last updated:** [November 12, 2022, 7:02am UTC](https://discourse.julialang.org/t/help-with-ci-not-running/90152 "2022-11-12T07:02:07Z")

</div>

When I started testing a package on Julia version 1, CI stopped running, with no apparent error message. Does anybody know what is going on here?

---

## [Julia 1.9 feature freeze: October 10, 2022](https://discourse.julialang.org/t/julia-1-9-feature-freeze-october-10-2022/87606)

<div class="topic-metadata">

**Author:** [@dilumaluthge](https://discourse.julialang.org/u/dilumaluthge)\
**Replies:** 8\
**Last updated:** [November 12, 2022, 4:42am UTC](https://discourse.julialang.org/t/julia-1-9-feature-freeze-october-10-2022/87606 "2022-11-12T04:42:40Z")

</div>

We’ve set the feature freeze for Julia 1.9 to Monday, October 10, 2022. If there are any feature PRs you’d like to get into Julia 1.9, they’ll need to be merged prior to that date.

---

## [When to return NaN vs throw an Error?](https://discourse.julialang.org/t/when-to-return-nan-vs-throw-an-error/89587)

<div class="topic-metadata">

**Author:** [@Alec\_Loudenback](https://discourse.julialang.org/u/Alec_Loudenback)\
**Replies:** 17\
**Last updated:** [November 12, 2022, 4:23am UTC](https://discourse.julialang.org/t/when-to-return-nan-vs-throw-an-error/89587 "2022-11-12T04:23:12Z")

</div>

I have a function with a suggested PR to throw an error if the result would return a NaN. I am very much appreciative of someone opening a PR but I was looking for advice on the approach. I am unsure if it is better pac…

---

## [Struct in my package cannot be called correctly](https://discourse.julialang.org/t/struct-in-my-package-cannot-be-called-correctly/90145)

<div class="topic-metadata">

**Author:** [@XuJingye2022](https://discourse.julialang.org/u/XuJingye2022)\
**Replies:** 4\
**Last updated:** [November 12, 2022, 4:10am UTC](https://discourse.julialang.org/t/struct-in-my-package-cannot-be-called-correctly/90145 "2022-11-12T04:10:26Z")

</div>

My package structure: module DoubleRFs export ParDBRF struct ParDBRF # params of double rf # ===== To be prepared ===== v1::Float64 r::Float64 ϕs::Float64 ϕ2s::Float64 h1::Int64 h::Int64 …

---

## [Makie - How to set custom x and y tick values in a Makie heatmap](https://discourse.julialang.org/t/makie-how-to-set-custom-x-and-y-tick-values-in-a-makie-heatmap/81397)

<div class="topic-metadata">

**Author:** [@Brinkhuis](https://discourse.julialang.org/u/Brinkhuis)\
**Replies:** 2\
**Last updated:** [May 21, 2022, 7:06am UTC](https://discourse.julialang.org/t/makie-how-to-set-custom-x-and-y-tick-values-in-a-makie-heatmap/81397 "2022-05-21T07:06:30Z")

</div>

I want to make a heatmap in Julia using Makie (CairoMakie) with custom x and y tick values on the axes, like this one from Seaborn. Any suggestions on how to modify the figure to het the months January to December on th…

---

## [Freeing up the threads for multi-threading](https://discourse.julialang.org/t/freeing-up-the-threads-for-multi-threading/90097)

<div class="topic-metadata">

**Author:** [@Phuntsho](https://discourse.julialang.org/u/Phuntsho)\
**Replies:** 12\
**Last updated:** [November 11, 2022, 11:14pm UTC](https://discourse.julialang.org/t/freeing-up-the-threads-for-multi-threading/90097 "2022-11-11T23:14:51Z")

</div>

I use IJulia for interactive programming. I usually start with julia\> ENV\["JULIA\_NUM\_THREADS"\]=60 julia\> using IJulia julia\> notebook() From there I get a Jupyter environment where I can run programs like those given h…

---

## [Issues encountered teaching classes with Julia for the first time](https://discourse.julialang.org/t/issues-encountered-teaching-classes-with-julia-for-the-first-time/56553)

<div class="topic-metadata">

**Author:** [@compleat](https://discourse.julialang.org/u/compleat)\
**Replies:** 140\
**Last updated:** [November 11, 2022, 11:00pm UTC](https://discourse.julialang.org/t/issues-encountered-teaching-classes-with-julia-for-the-first-time/56553 "2022-11-11T23:00:22Z")

</div>

This semester, for the first time, I have assigned Julia as a required language in my Data Science classes, alongside R. While I am not a beginner to Julia, I am posting this here because I am a novice at trying to use …

---

## [Fast tile search](https://discourse.julialang.org/t/fast-tile-search/89821)

<div class="topic-metadata">

**Author:** [@00shiv](https://discourse.julialang.org/u/00shiv)\
**Replies:** 6\
**Last updated:** [November 11, 2022, 10:56pm UTC](https://discourse.julialang.org/t/fast-tile-search/89821 "2022-11-11T22:56:49Z")

</div>

The following code (using Tullio.jl): @tullio dists\[u,v,n\] := abs( query\[i, j, ch\] - images\[u+i-1, v+j-1, ch, n\] ) is very fast on my AVX512 capable 4-core CPU. I would like to run this even faster on my CUDA capable …

---

## [Plotting single points on an anonymous function](https://discourse.julialang.org/t/plotting-single-points-on-an-anonymous-function/90126)

<div class="topic-metadata">

**Author:** [@comical\_intersection](https://discourse.julialang.org/u/comical_intersection)\
**Replies:** 5\
**Last updated:** [November 11, 2022, 9:55pm UTC](https://discourse.julialang.org/t/plotting-single-points-on-an-anonymous-function/90126 "2022-11-11T21:55:22Z")

</div>

I have a function which depends on a single variable x and a variable l. I plot these functions for different integer variables of l like so: plot!(fig, x-\>f(x, l=3)) so in general: plot!(fig, x-\>f(x, l=i)) However …

---

## [Software Memory Safety](https://discourse.julialang.org/t/software-memory-safety/90132)

<div class="topic-metadata">

**Author:** [@Soldalma](https://discourse.julialang.org/u/Soldalma)\
**Replies:** 1\
**Last updated:** [November 11, 2022, 9:40pm UTC](https://discourse.julialang.org/t/software-memory-safety/90132 "2022-11-11T21:40:26Z")

</div>

“The National Security Agency (NSA) published guidance today to help software developers and operators prevent and mitigate software memory safety issues, which account for a large portion of exploitable vulnerabilities.…

---

## [ANN: CBOOCall](https://discourse.julialang.org/t/ann-cboocall/81420)

<div class="topic-metadata">

**Author:** [@jlapeyre](https://discourse.julialang.org/u/jlapeyre)\
**Replies:** 3\
**Last updated:** [November 11, 2022, 7:29pm UTC](https://discourse.julialang.org/t/ann-cboocall/81420 "2022-11-11T19:29:53Z")

</div>

From the README of CBOOCall.jl: split(",", "a,b,c") is not really the right way to do it. split only works with strings, so it should be a class method. We should be able to do ",".split("a,b,c"). There’s even a mnem…

---

## [Efficient calculation of Mahalanobis distance](https://discourse.julialang.org/t/efficient-calculation-of-mahalanobis-distance/90121)

<div class="topic-metadata">

**Author:** [@mleprovost](https://discourse.julialang.org/u/mleprovost)\
**Replies:** 5\
**Last updated:** [November 11, 2022, 7:18pm UTC](https://discourse.julialang.org/t/efficient-calculation-of-mahalanobis-distance/90121 "2022-11-11T19:18:57Z")

</div>

Hello, I would like to compute the following Mahalanobis distance for M samples \\{ x^i \\} with x^i \\in \\mathbb{R}^n d(x^i) = (x^i - \\mu)^\\top \\Sigma^{-1} (x^i - \\mu) where we don’t know \\Sigma but we only know a “squar…

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

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