# Latest

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

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

**Page:** 678

---

## [Using ntuple() in generated function](https://discourse.julialang.org/t/using-ntuple-in-generated-function/100020)

<div class="topic-metadata">

**Author:** [@user664303](https://discourse.julialang.org/u/user664303)\
**Replies:** 5\
**Last updated:** [June 8, 2023, 12:48am UTC](https://discourse.julialang.org/t/using-ntuple-in-generated-function/100020 "2023-06-08T00:48:47Z")

</div>

I have found that using ntuple in generated functions produces better code (faster, and with fewer allocations), than constructing the tuple expression manually. Presumably the code that ntuple generates is more inferabl…

---

## [Performance of Matrix{T} vs Vector{Vector{T}}](https://discourse.julialang.org/t/performance-of-matrix-t-vs-vector-vector-t/99978)

<div class="topic-metadata">

**Author:** [@daviyan5](https://discourse.julialang.org/u/daviyan5)\
**Replies:** 14\
**Last updated:** [June 8, 2023, 12:37am UTC](https://discourse.julialang.org/t/performance-of-matrix-t-vs-vector-vector-t/99978 "2023-06-08T00:37:19Z")

</div>

I come from a background in Python and C++ and I’m currently working on a project in Julia for performance comparisons. My task is to re-implement a scheme from Python in Julia and perform an performance analysis. In thi…

---

## [When should I choose a struct, mutable struct, Dict, named tuple or DataFrame?](https://discourse.julialang.org/t/when-should-i-choose-a-struct-mutable-struct-dict-named-tuple-or-dataframe/60366)

<div class="topic-metadata">

**Author:** [@davidwallis](https://discourse.julialang.org/u/davidwallis)\
**Replies:** 17\
**Last updated:** [August 27, 2021, 10:58pm UTC](https://discourse.julialang.org/t/when-should-i-choose-a-struct-mutable-struct-dict-named-tuple-or-dataframe/60366 "2021-08-27T22:58:52Z")

</div>

When should I use a struct, mutable struct, Dict, named tuple or DataFrame in Julia? Mutability and performance must be factors in deciding which data type to use. But when should I use each type?

---

## [Have a matrix solution from affine operator](https://discourse.julialang.org/t/have-a-matrix-solution-from-affine-operator/100026)

<div class="topic-metadata">

**Author:** [@mary](https://discourse.julialang.org/u/mary)\
**Replies:** 0\
**Last updated:** [June 8, 2023, 12:14am UTC](https://discourse.julialang.org/t/have-a-matrix-solution-from-affine-operator/100026 "2023-06-08T00:14:11Z")

</div>

Hi, I am solving a linear elasticity problem using affine and solve and the output of this function is single field function. I need the matrix form of the solution to do some calculation on it. can you tell me how can …

---

## [Optimal column to row major conversion](https://discourse.julialang.org/t/optimal-column-to-row-major-conversion/99989)

<div class="topic-metadata">

**Author:** [@xgdgsc](https://discourse.julialang.org/u/xgdgsc)\
**Replies:** 7\
**Last updated:** [June 7, 2023, 11:10pm UTC](https://discourse.julialang.org/t/optimal-column-to-row-major-conversion/99989 "2023-06-07T23:10:56Z")

</div>

When converting column major to row major array. When the array dimension become large. It can be tricky to implement fast conversion. Tricks like ENH: Improve performance for copying/relayout of large data · Issue #2165…

---

## [Speed-up graphical lasso code](https://discourse.julialang.org/t/speed-up-graphical-lasso-code/100024)

<div class="topic-metadata">

**Author:** [@mleprovost](https://discourse.julialang.org/u/mleprovost)\
**Replies:** 0\
**Last updated:** [June 7, 2023, 10:09pm UTC](https://discourse.julialang.org/t/speed-up-graphical-lasso-code/100024 "2023-06-07T22:09:53Z")

</div>

Hello, I would like to get you feedback to accelerate my routine glasso for graphical lasso computation (the code follows Friedman et al. 2007 https://arxiv.org/pdf/0708.3517.pdf) where S is the sample covariance matr…

---

## [Is there a Julia macro that emulates SAS data step?](https://discourse.julialang.org/t/is-there-a-julia-macro-that-emulates-sas-data-step/100023)

<div class="topic-metadata">

**Author:** [@mwsohn](https://discourse.julialang.org/u/mwsohn)\
**Replies:** 0\
**Last updated:** [June 7, 2023, 10:02pm UTC](https://discourse.julialang.org/t/is-there-a-julia-macro-that-emulates-sas-data-step/100023 "2023-06-07T22:02:45Z")

</div>

I am wondering whether there is a macro that emulates a SAS data step. Or more specifically a macro that automatically runs through all rows in a DataFrame such that a symbol indicates a column in a DataFrame (as in a @w…

---

## [Avoiding unnecessary engagement in pointless arguments](https://discourse.julialang.org/t/avoiding-unnecessary-engagement-in-pointless-arguments/99973)

<div class="topic-metadata">

**Author:** [@Mason](https://discourse.julialang.org/u/Mason)\
**Replies:** 10\
**Last updated:** [June 7, 2023, 8:22pm UTC](https://discourse.julialang.org/t/avoiding-unnecessary-engagement-in-pointless-arguments/99973 "2023-06-07T20:22:41Z")

</div>

It’s an essentially unavoidable fact that people will come to this forum and make confident statements or demands that reasonable people who are experienced in the language strongly disagree with. These people will somet…

---

## [Write a plot recipe that uses other recipes to generate data for several plots](https://discourse.julialang.org/t/write-a-plot-recipe-that-uses-other-recipes-to-generate-data-for-several-plots/100015)

<div class="topic-metadata">

**Author:** [@claud10c](https://discourse.julialang.org/u/claud10c)\
**Replies:** 2\
**Last updated:** [June 7, 2023, 6:47pm UTC](https://discourse.julialang.org/t/write-a-plot-recipe-that-uses-other-recipes-to-generate-data-for-several-plots/100015 "2023-06-07T18:47:43Z")

</div>

I have the following code (here is a minimal working example) in Julia: using Plots using LazySets gr() struct Data pos::Matrix{Float64} # Positions in an Euclidean plane snodes::Vector{Vector{Int64}} # Set of …

---

## [Extra space for specific legend entries](https://discourse.julialang.org/t/extra-space-for-specific-legend-entries/100014)

<div class="topic-metadata">

**Author:** [@ellocco](https://discourse.julialang.org/u/ellocco)\
**Replies:** 0\
**Last updated:** [June 7, 2023, 5:58pm UTC](https://discourse.julialang.org/t/extra-space-for-specific-legend-entries/100014 "2023-06-07T17:58:49Z")

</div>

PlotlyJS: Is there a trick to add extra space between two legend entries? E.g. a large character at the end of the line with white color.

---

## [Plotting Probability Distribution of Data](https://discourse.julialang.org/t/plotting-probability-distribution-of-data/99976)

<div class="topic-metadata">

**Author:** [@optimist](https://discourse.julialang.org/u/optimist)\
**Replies:** 3\
**Last updated:** [June 7, 2023, 5:45pm UTC](https://discourse.julialang.org/t/plotting-probability-distribution-of-data/99976 "2023-06-07T17:45:26Z")

</div>

I am trying to produce a plot of probability distribution function of some data which is a result of simulations. Using density function from StatPlots is showing some weird y-axis numbers. I would expect it to be rangin…

---

## [GPU specifications -- what's the best GPU choice for diffeqGPUs?](https://discourse.julialang.org/t/gpu-specifications-whats-the-best-gpu-choice-for-diffeqgpus/99945)

<div class="topic-metadata">

**Author:** [@Allan\_Baker](https://discourse.julialang.org/u/Allan_Baker)\
**Replies:** 9\
**Last updated:** [June 7, 2023, 5:24pm UTC](https://discourse.julialang.org/t/gpu-specifications-whats-the-best-gpu-choice-for-diffeqgpus/99945 "2023-06-07T17:24:58Z")

</div>

I’m looking out specifying a cluster for our IT guys. I’m not a GPU guru and am not up to date on all of the choices. I see there are a lot of options and some GPUs are more optimized for machine learning, etc. I’d li…

---

## [AppleAccelerate.jl v0.4.0](https://discourse.julialang.org/t/appleaccelerate-jl-v0-4-0/99351)

<div class="topic-metadata">

**Author:** [@viralbshah](https://discourse.julialang.org/u/viralbshah)\
**Replies:** 7\
**Last updated:** [June 7, 2023, 5:07pm UTC](https://discourse.julialang.org/t/appleaccelerate-jl-v0-4-0/99351 "2023-06-07T17:07:12Z")

</div>

Hello all, For the longest time, we haven’t been able to leverage the BLAS and LAPACK in Apple’s Accelerate largely because it was LP64 only and carried a really old version of LAPACK. This didn’t matter much on Intel m…

---

## [How to get all combinations from multiple input arrays?](https://discourse.julialang.org/t/how-to-get-all-combinations-from-multiple-input-arrays/100010)

<div class="topic-metadata">

**Author:** [@ejmeitz](https://discourse.julialang.org/u/ejmeitz)\
**Replies:** 3\
**Last updated:** [June 7, 2023, 3:49pm UTC](https://discourse.julialang.org/t/how-to-get-all-combinations-from-multiple-input-arrays/100010 "2023-06-07T15:49:25Z")

</div>

Hello, Say I have three input arrays like the ones below (could be arbitrary amount) and I want to generate all possible combinations of values with one entry from each array. The existing functions in Combinatorics.jl …

---

## [JuliaUserGroupMunich: 101 on Python-Julia Julia-Python interaction](https://discourse.julialang.org/t/juliausergroupmunich-101-on-python-julia-julia-python-interaction/99385)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 4\
**Last updated:** [June 7, 2023, 3:32pm UTC](https://discourse.julialang.org/t/juliausergroupmunich-101-on-python-julia-julia-python-interaction/99385 "2023-06-07T15:32:22Z")

</div>

Join us on :spiral\_calendar: Monday 5. June 2023 :clock630: 18:30 CEST organized via meetup Fall in love with Julia: Accelerating Python ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Using Julia from Python or Python from Julia. On…

---

## [Problem with simple "echo" client/server](https://discourse.julialang.org/t/problem-with-simple-echo-client-server/100009)

<div class="topic-metadata">

**Author:** [@frylock](https://discourse.julialang.org/u/frylock)\
**Replies:** 2\
**Last updated:** [June 7, 2023, 3:18pm UTC](https://discourse.julialang.org/t/problem-with-simple-echo-client-server/100009 "2023-06-07T15:18:11Z")

</div>

Ok - this is not multithreaded or anything, just a simple “echo” server and client (just baby steps - trying to understand simple before I move on from there). I start the server first, then the client in a different she…

---

## [How does \`--heap\_size\_hint\` relate to improvements for \`Sys.total\_memory()\`?](https://discourse.julialang.org/t/how-does-heap-size-hint-relate-to-improvements-for-sys-total-memory/100006)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 0\
**Last updated:** [June 7, 2023, 2:46pm UTC](https://discourse.julialang.org/t/how-does-heap-size-hint-relate-to-improvements-for-sys-total-memory/100006 "2023-06-07T14:46:27Z")

</div>

Hi there, I am looking to make Julia run smoothly on a kubernetes pod. There seem to be two things which somehow improve stability: Expose constrained memory limits and have the GC use them by maleadt · Pull Request …

---

## [Help simplify this code? JuMP constraints](https://discourse.julialang.org/t/help-simplify-this-code-jump-constraints/100003)

<div class="topic-metadata">

**Author:** [@TheHardew](https://discourse.julialang.org/u/TheHardew)\
**Replies:** 0\
**Last updated:** [June 7, 2023, 1:51pm UTC](https://discourse.julialang.org/t/help-simplify-this-code-jump-constraints/100003 "2023-06-07T13:51:46Z")

</div>

for i in 1:Y, j in 1:X s = sum(x\[max(1, i - 1):min(Y, i + 1), max(1, j - 1):min(X, j + 1)\]) s -= x\[i, j\] @constraint(model, 2a\[i, j\] \<= s) @constraint(model, 5a\[i, j\] \<= 8 - s) @constraint(model, 4b\[i, j\] \<= s) @c…

---

## [BinaryBuilder do not find my binary outputs](https://discourse.julialang.org/t/binarybuilder-do-not-find-my-binary-outputs/99995)

<div class="topic-metadata">

**Author:** [@Diego\_Javier\_Zea](https://discourse.julialang.org/u/Diego_Javier_Zea)\
**Replies:** 1\
**Last updated:** [June 7, 2023, 11:05am UTC](https://discourse.julialang.org/t/binarybuilder-do-not-find-my-binary-outputs/99995 "2023-06-07T11:05:57Z")

</div>

Hi! It’s the first time I am trying to get a JLL package. I ran the wizard, and everything went well locally. However, the Yggddrasil PR is failing as it looks like it cannot find the binary products. Am I doing somethi…

---

## [Animated graph using Makie not working with node\_size or arrow\_size](https://discourse.julialang.org/t/animated-graph-using-makie-not-working-with-node-size-or-arrow-size/99997)

<div class="topic-metadata">

**Author:** [@Richard](https://discourse.julialang.org/u/Richard)\
**Replies:** 0\
**Last updated:** [June 7, 2023, 12:11pm UTC](https://discourse.julialang.org/t/animated-graph-using-makie-not-working-with-node-size-or-arrow-size/99997 "2023-06-07T12:11:11Z")

</div>

Hi I’m taking first steps with Makie, trying to produce an animated network graph. There are three nodes and I want the edge width, arrow size and node size to vary according to supplied matrices. The static graph wor…

---

## [Is this a ternary (?) operator bug?](https://discourse.julialang.org/t/is-this-a-ternary-operator-bug/99998)

<div class="topic-metadata">

**Author:** [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Replies:** 4\
**Last updated:** [June 7, 2023, 1:03pm UTC](https://discourse.julialang.org/t/is-this-a-ternary-operator-bug/99998 "2023-06-07T13:03:30Z")

</div>

julia\> function foo(a,b) a \*= "+1"; b \*= "+2"; return a,b end julia\> function baz() a="";b=""; (true) ? a,b = foo("","") : nothing; println(a,b) end ERROR: syntax: colon expected in "?" expression Stacktrace: \[1\] to…

---

## [Can I use if statements in ParameterisedFunctions.jl? Is there a work around?](https://discourse.julialang.org/t/can-i-use-if-statements-in-parameterisedfunctions-jl-is-there-a-work-around/79347)

<div class="topic-metadata">

**Author:** [@BinaryBot](https://discourse.julialang.org/u/BinaryBot)\
**Replies:** 3\
**Last updated:** [June 7, 2023, 12:57pm UTC](https://discourse.julialang.org/t/can-i-use-if-statements-in-parameterisedfunctions-jl-is-there-a-work-around/79347 "2023-06-07T12:57:32Z")

</div>

I am trying to check weather my Differential Equation implemented using DifferentialEquation.jl matches the results obtained in Matlab. I learnt I could do this by implementing the same differential equation using MATLAB…

---

## [Faster/performant interpolation of very big arrays](https://discourse.julialang.org/t/faster-performant-interpolation-of-very-big-arrays/99996)

<div class="topic-metadata">

**Author:** [@eirikeb](https://discourse.julialang.org/u/eirikeb)\
**Replies:** 0\
**Last updated:** [June 7, 2023, 11:49am UTC](https://discourse.julialang.org/t/faster-performant-interpolation-of-very-big-arrays/99996 "2023-06-07T11:49:34Z")

</div>

I have two separate problems relating to interpolation of some dimensions of relatively big arrays. Creating interpolations objects using \`Interpolations.jl’ is a little slow and uses a lot of memory when you create a …

---

## [Bug in AlphaStableDistributions?](https://discourse.julialang.org/t/bug-in-alphastabledistributions/99868)

<div class="topic-metadata">

**Author:** [@chrhum](https://discourse.julialang.org/u/chrhum)\
**Replies:** 6\
**Last updated:** [June 7, 2023, 10:00am UTC](https://discourse.julialang.org/t/bug-in-alphastabledistributions/99868 "2023-06-07T10:00:09Z")

</div>

I could not reconcile the output of a classical sampling algorithm for the Gumbel Copula when using AlphaStableDistributions.jl. I wonder if there is a bug in its simulation algorithm or if I have overseen something? A …

---

## [Julia as a bridge between windows and raspberry pi](https://discourse.julialang.org/t/julia-as-a-bridge-between-windows-and-raspberry-pi/99748)

<div class="topic-metadata">

**Author:** [@RDuarte](https://discourse.julialang.org/u/RDuarte)\
**Replies:** 34\
**Last updated:** [June 7, 2023, 9:50am UTC](https://discourse.julialang.org/t/julia-as-a-bridge-between-windows-and-raspberry-pi/99748 "2023-06-07T09:50:04Z")

</div>

Hello everyone, I’m trying to create project that runs in raspberry pi and windows and I want that Julia works as a bridge between both platforms. I will try to explain. I run Julia in my raspberry pi in order to proc…

---

## [Paper on Julia portiential for HEP](https://discourse.julialang.org/t/paper-on-julia-portiential-for-hep/99994)

<div class="topic-metadata">

**Author:** [@grasph](https://discourse.julialang.org/u/grasph)\
**Replies:** 0\
**Last updated:** [June 7, 2023, 9:36am UTC](https://discourse.julialang.org/t/paper-on-julia-portiential-for-hep/99994 "2023-06-07T09:36:14Z")

</div>

Please note, this announcement on the release of the preprint of an important paper: Julia potential for high energy physics computing. Questions and follow-up can be done here.

---

## [How to plot 3d data while using a gradient color depending on the "time" of the point?](https://discourse.julialang.org/t/how-to-plot-3d-data-while-using-a-gradient-color-depending-on-the-time-of-the-point/99988)

<div class="topic-metadata">

**Author:** [@ultrapoci](https://discourse.julialang.org/u/ultrapoci)\
**Replies:** 2\
**Last updated:** [June 7, 2023, 7:47am UTC](https://discourse.julialang.org/t/how-to-plot-3d-data-while-using-a-gradient-color-depending-on-the-time-of-the-point/99988 "2023-06-07T07:47:25Z")

</div>

Sorry for the confusing title, I’m not really sure how to summarize it. Basically, I have a list of 3D points which are order according the time these points were taken. In a sense, you can think of these as 4D points, w…

---

## [How to correctly write package extension code?](https://discourse.julialang.org/t/how-to-correctly-write-package-extension-code/99980)

<div class="topic-metadata">

**Author:** [@singularitti](https://discourse.julialang.org/u/singularitti)\
**Replies:** 6\
**Last updated:** [June 7, 2023, 6:31am UTC](https://discourse.julialang.org/t/how-to-correctly-write-package-extension-code/99980 "2023-06-07T06:31:50Z")

</div>

For example, I have a main package called NeuralNetworks, and an extension called MNIST. Now I want to load MNIST if package MLDatasets.jl is already loaded. I wrote the following code in NeuralNetworks: function loadd…

---

## [LanguageServer vs package environment](https://discourse.julialang.org/t/languageserver-vs-package-environment/99984)

<div class="topic-metadata">

**Author:** [@Ralph\_Smith](https://discourse.julialang.org/u/Ralph_Smith)\
**Replies:** 0\
**Last updated:** [June 7, 2023, 3:39am UTC](https://discourse.julialang.org/t/languageserver-vs-package-environment/99984 "2023-06-07T03:39:16Z")

</div>

Several people have mentioned problems with “missing references” in LanguageServer (LS) contexts (e.g. VSCode, eglot, lsp-mode; users of other tools please chime in). I’m finding it annoying enough to start a conversatio…

---

## [Translating from torch to Flux](https://discourse.julialang.org/t/translating-from-torch-to-flux/99847)

<div class="topic-metadata">

**Author:** [@isentropic](https://discourse.julialang.org/u/isentropic)\
**Replies:** 2\
**Last updated:** [June 7, 2023, 2:22am UTC](https://discourse.julialang.org/t/translating-from-torch-to-flux/99847 "2023-06-07T02:22:14Z")

</div>

(cross post from zulip) I’m a recent ML and flux learner currently trying to learn and translate GitHub - karpathy/makemore: An autoregressive character-level language model for making more things to Flux. I finished tr…

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

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