# Latest

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

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

**Page:** 457

---

## [\`using JuMP\` reports an ERROR](https://discourse.julialang.org/t/using-jump-reports-an-error/111700)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 4\
**Last updated:** [March 17, 2024, 8:16pm UTC](https://discourse.julialang.org/t/using-jump-reports-an-error/111700 "2024-03-17T20:16:34Z")

</div>

It reports an ERROR when I using JuMP (version: JuMP v1.20.0): \[ Info: Precompiling JuMP \[4076af6c-e467-56ae-b986-b466b2749572\] ERROR: LoadError: ArgumentError: Package JuMP does not have SnoopPrecompile in its dependen…

---

## [How to create an user-function?](https://discourse.julialang.org/t/how-to-create-an-user-function/111702)

<div class="topic-metadata">

**Author:** [@Coral](https://discourse.julialang.org/u/Coral)\
**Replies:** 1\
**Last updated:** [March 17, 2024, 8:13pm UTC](https://discourse.julialang.org/t/how-to-create-an-user-function/111702 "2024-03-17T20:13:50Z")

</div>

Hello everyone, I am trying to do a trajectory optimization using Julia. To begin to familiarize myself with the environment I have tried to implement a simpler problem such as maximizing the height of ascent of a rocke…

---

## [ERROR: ArgumentError: Git: Global Git config is missing required value 'user.name'](https://discourse.julialang.org/t/error-argumenterror-git-global-git-config-is-missing-required-value-user-name/79026)

<div class="topic-metadata">

**Author:** [@duselguy](https://discourse.julialang.org/u/duselguy)\
**Replies:** 4\
**Last updated:** [March 17, 2024, 7:45pm UTC](https://discourse.julialang.org/t/error-argumenterror-git-global-git-config-is-missing-required-value-user-name/79026 "2024-03-17T19:45:27Z")

</div>

Hello, trying to create package: julia\> using PkgTemplates julia\> t=Template(;user=“duselguy”) or julia\> t=Template() but receive the same error above. .gitconfig contents: \[github\] user = duselguy \[core\] edito…

---

## [How to sort an array based on another on GPU (CUDA) efficiently?](https://discourse.julialang.org/t/how-to-sort-an-array-based-on-another-on-gpu-cuda-efficiently/111693)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 3\
**Last updated:** [March 17, 2024, 7:44pm UTC](https://discourse.julialang.org/t/how-to-sort-an-array-based-on-another-on-gpu-cuda-efficiently/111693 "2024-03-17T19:44:49Z")

</div>

Hello! I have the following toy-example below: using CUDA using BenchmarkTools function reorder\_vectors!(sorted\_indices, vec1, vec2, vec3) CUDA.sortperm!(sorted\_indices, vec1) vec1 .= vec1\[sorted\_indices\] …

---

## [@cuda max\_registers not registered as a key word argument?](https://discourse.julialang.org/t/cuda-max-registers-not-registered-as-a-key-word-argument/111695)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 2\
**Last updated:** [March 17, 2024, 7:24pm UTC](https://discourse.julialang.org/t/cuda-max-registers-not-registered-as-a-key-word-argument/111695 "2024-03-17T19:24:47Z")

</div>

ERROR: LoadError: ArgumentError: Unsupported keyword argument 'max\_registers' And I am applying it as shown in the documentation: @cuda max\_registers=32 Kind regards

---

## [Fail to precompiling JuMP](https://discourse.julialang.org/t/fail-to-precompiling-jump/111618)

<div class="topic-metadata">

**Author:** [@Kaiming\_Zhang](https://discourse.julialang.org/u/Kaiming_Zhang)\
**Replies:** 3\
**Last updated:** [March 17, 2024, 6:31pm UTC](https://discourse.julialang.org/t/fail-to-precompiling-jump/111618 "2024-03-17T18:31:37Z")

</div>

I’m using these packages: using JuMP, Distributions, MathProgBase, Ipopt, JuMPChance using Gurobi \[ Info: Precompiling JuMP \[4076af6c-e467-56ae-b986-b466b2749572\] ERROR: LoadError: UndefVarError: \`Grisu\` not defined…

---

## [Updating Makie plot based on button action](https://discourse.julialang.org/t/updating-makie-plot-based-on-button-action/111706)

<div class="topic-metadata">

**Author:** [@BambOoxX](https://discourse.julialang.org/u/BambOoxX)\
**Replies:** 6\
**Last updated:** [March 17, 2024, 6:11pm UTC](https://discourse.julialang.org/t/updating-makie-plot-based-on-button-action/111706 "2024-03-17T18:11:23Z")

</div>

I’m currently discovering interactions with on in GLMakie. I’ve tried to make an example where I can start an animation by clicking on a button The animation performed as a loop however, it seems intermediate frames …

---

## [Overlaying contour lines for a specific value](https://discourse.julialang.org/t/overlaying-contour-lines-for-a-specific-value/111729)

<div class="topic-metadata">

**Author:** [@dharmik](https://discourse.julialang.org/u/dharmik)\
**Replies:** 0\
**Last updated:** [March 17, 2024, 5:24pm UTC](https://discourse.julialang.org/t/overlaying-contour-lines-for-a-specific-value/111729 "2024-03-17T17:24:37Z")

</div>

Hi! I created a scatter plot representing a ‘matrix’ of values and coloured it in using heatmap. I want to overlay a contour line on it for a specific value in this matrix but I can’t figure out how – any help would be g…

---

## [MethodError: no method matching getindex(::Float64, ::Colon, ::Int64)](https://discourse.julialang.org/t/methoderror-no-method-matching-getindex-float64-colon-int64/111727)

<div class="topic-metadata">

**Author:** [@raman\_kumar](https://discourse.julialang.org/u/raman_kumar)\
**Replies:** 8\
**Last updated:** [March 17, 2024, 5:03pm UTC](https://discourse.julialang.org/t/methoderror-no-method-matching-getindex-float64-colon-int64/111727 "2024-03-17T17:03:17Z")

</div>

I am getting error when runing code :point\_down: function alfven\_surface(N\_r, N\_theta, theta, v\_r, v\_theta, B\_r, B\_theta, rho, tracer) """ Given poloidal velocity field (vp) and poloidal magnetic field (bp), th…

---

## [Allocations when writing to vectors in struct](https://discourse.julialang.org/t/allocations-when-writing-to-vectors-in-struct/111681)

<div class="topic-metadata">

**Author:** [@mkoculak](https://discourse.julialang.org/u/mkoculak)\
**Replies:** 4\
**Last updated:** [March 17, 2024, 4:07pm UTC](https://discourse.julialang.org/t/allocations-when-writing-to-vectors-in-struct/111681 "2024-03-17T16:07:08Z")

</div>

I am parsing some data from file where one signal is composed or couple UInt8 glued together. I want to separate them into individual signals, so I did the following: mutable struct Status one::Vector{\<:Integer} …

---

## [Abstract - Programming Parallel Computers with Julia](https://discourse.julialang.org/t/abstract-programming-parallel-computers-with-julia/111326)

<div class="topic-metadata">

**Author:** [@benslinux](https://discourse.julialang.org/u/benslinux)\
**Replies:** 1\
**Last updated:** [March 17, 2024, 4:04pm UTC](https://discourse.julialang.org/t/abstract-programming-parallel-computers-with-julia/111326 "2024-03-17T16:04:28Z")

</div>

Came upon this abstract while investigating whether the Julia language had ever been applied in attempting to solve the ‘Three Body Problem’ - though this paper doesn’t address that, it’s interesting in that it really pu…

---

## [Score function Mittag-Leffler pdf](https://discourse.julialang.org/t/score-function-mittag-leffler-pdf/111724)

<div class="topic-metadata">

**Author:** [@aner-sanchez](https://discourse.julialang.org/u/aner-sanchez)\
**Replies:** 0\
**Last updated:** [March 17, 2024, 2:53pm UTC](https://discourse.julialang.org/t/score-function-mittag-leffler-pdf/111724 "2024-03-17T14:53:44Z")

</div>

Good sunday to everyone, I’ve been trying to compute the score function of the Mittag-Leffler distribution given by the pdf f(t;\\alpha,d)=d t^{\\alpha -1}E\_{\\alpha,\\alpha}(-dt^\\alpha);\\quad d,t\>0,\\quad \\alpha\\in(0,1) w…

---

## [Callbacks causing wrong solution mixed ODE and Linear system](https://discourse.julialang.org/t/callbacks-causing-wrong-solution-mixed-ode-and-linear-system/111648)

<div class="topic-metadata">

**Author:** [@Lode](https://discourse.julialang.org/u/Lode)\
**Replies:** 3\
**Last updated:** [March 17, 2024, 12:47pm UTC](https://discourse.julialang.org/t/callbacks-causing-wrong-solution-mixed-ode-and-linear-system/111648 "2024-03-17T12:47:15Z")

</div>

Hello, I am new in Julia and tried to model a system with a discrete stepping feedback controller. The system was modelled using ‘ModelingToolkit’ and thereafter converter to an ‘ODEProblem’. The discrete feedback con…

---

## [\[ANN\] ProcessBasedModelling.jl and ConceptualClimateModels.jl](https://discourse.julialang.org/t/ann-processbasedmodelling-jl-and-conceptualclimatemodels-jl/111556)

<div class="topic-metadata">

**Author:** [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Replies:** 5\
**Last updated:** [March 17, 2024, 11:19am UTC](https://discourse.julialang.org/t/ann-processbasedmodelling-jl-and-conceptualclimatemodels-jl/111556 "2024-03-17T11:19:58Z")

</div>

Hello everyone, I would like to announce here two packages I’ve just released: ProcessBasedModelling.jl ConceptualClimateModels.jl The first is an extension to ModelingToolkit.jl. Its goal is to provide an alternativ…

---

## [Splatting, tuples, vectors](https://discourse.julialang.org/t/splatting-tuples-vectors/111721)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 2\
**Last updated:** [March 17, 2024, 9:30am UTC](https://discourse.julialang.org/t/splatting-tuples-vectors/111721 "2024-03-17T09:30:08Z")

</div>

I have the following MWE: struct PlotX X Y end function test(X, Y...) len=length(Y) println(len) println(typeof(Y)) PlotX(X, Y) end T = 0:0.1:2pi X = sin.(T) Y = cos.(T) p1 = test(T, X, Y); p2 …

---

## [Coming from python this took a while to figure out](https://discourse.julialang.org/t/coming-from-python-this-took-a-while-to-figure-out/111716)

<div class="topic-metadata">

**Author:** [@Fenrir\_Sivar](https://discourse.julialang.org/u/Fenrir_Sivar)\
**Replies:** 3\
**Last updated:** [March 17, 2024, 8:28am UTC](https://discourse.julialang.org/t/coming-from-python-this-took-a-while-to-figure-out/111716 "2024-03-17T08:28:11Z")

</div>

\# throws a non descriptive error prot\_alphabet=\["R","H","K", "D","E", "S","T","N","C","Q", "C","U","G","P", "A","V","I","L","M","F","Y","W"\] using Flux: onehot…

---

## [How to get a tuple's field using a runtime index in a type stable way?](https://discourse.julialang.org/t/how-to-get-a-tuples-field-using-a-runtime-index-in-a-type-stable-way/111629)

<div class="topic-metadata">

**Author:** [@Larbino1](https://discourse.julialang.org/u/Larbino1)\
**Replies:** 24\
**Last updated:** [March 16, 2024, 9:59pm UTC](https://discourse.julialang.org/t/how-to-get-a-tuples-field-using-a-runtime-index-in-a-type-stable-way/111629 "2024-03-16T21:59:14Z")

</div>

Suppose I have a tuple, which contains some data. I want to get one of the fields of the tuple, with an index at runtime, but I know the type of the field the index points to. Is there a way to do this? My best attempt …

---

## [Expressing multivariate repsonse with StatsModels.@formula](https://discourse.julialang.org/t/expressing-multivariate-repsonse-with-statsmodels-formula/111705)

<div class="topic-metadata">

**Author:** [@marcpabst](https://discourse.julialang.org/u/marcpabst)\
**Replies:** 0\
**Last updated:** [March 16, 2024, 7:08pm UTC](https://discourse.julialang.org/t/expressing-multivariate-repsonse-with-statsmodels-formula/111705 "2024-03-16T19:08:03Z")

</div>

Hi all, I’m trying to model a multivariate response variable using GLM.jl (and potentially MixedModels.jl at a later point). I know that there isn’t first-class support for this, but people usually suggest introducing a…

---

## [Why aren't the permutations from sortslices() available?](https://discourse.julialang.org/t/why-arent-the-permutations-from-sortslices-available/99029)

<div class="topic-metadata">

**Author:** [@g2g](https://discourse.julialang.org/u/g2g)\
**Replies:** 1\
**Last updated:** [March 16, 2024, 6:30pm UTC](https://discourse.julialang.org/t/why-arent-the-permutations-from-sortslices-available/99029 "2024-03-16T18:30:05Z")

</div>

I’m writing some data comparison code and it would be helpful if Julia had a sortslicesperm() similar to sortperm() so that a matrix could be sorted (like a vector) by M = rand(0:2, 16, 4); p = sortslicesperm(M, dims=1)…

---

## [Is there a better way to format each individual columns in a dataframe?](https://discourse.julialang.org/t/is-there-a-better-way-to-format-each-individual-columns-in-a-dataframe/111677)

<div class="topic-metadata">

**Author:** [@Philip\_Stuckey](https://discourse.julialang.org/u/Philip_Stuckey)\
**Replies:** 6\
**Last updated:** [March 16, 2024, 5:48pm UTC](https://discourse.julialang.org/t/is-there-a-better-way-to-format-each-individual-columns-in-a-dataframe/111677 "2024-03-16T17:48:20Z")

</div>

I wrote a function to format individual columns of a dataframe and I’m wondering if that’s a good idea or not. Is there a better way to format the columns of a dataframe before printing to markdown? I found the formatte…

---

## [How to re-draw a plot with PyPlot](https://discourse.julialang.org/t/how-to-re-draw-a-plot-with-pyplot/111701)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 1\
**Last updated:** [March 16, 2024, 5:42pm UTC](https://discourse.julialang.org/t/how-to-re-draw-a-plot-with-pyplot/111701 "2024-03-16T17:42:25Z")

</div>

I can create a plot with PyPlot: using PyPlot fig=figure("first") X = 0:0.1:2pi Y = sin.(X) p = plot(X, Y) But after closing the PyPlot window I cannot get it back. I tried: p display(p) show(p) fig display(fig) sho…

---

## [Discussion about DateTime from POSIX timestamp. Was (incorrect assumption): Dates in Windows - error in datetime from posix](https://discourse.julialang.org/t/discussion-about-datetime-from-posix-timestamp-was-incorrect-assumption-dates-in-windows-error-in-datetime-from-posix/111691)

<div class="topic-metadata">

**Author:** [@kodintent](https://discourse.julialang.org/u/kodintent)\
**Replies:** 9\
**Last updated:** [March 16, 2024, 5:21pm UTC](https://discourse.julialang.org/t/discussion-about-datetime-from-posix-timestamp-was-incorrect-assumption-dates-in-windows-error-in-datetime-from-posix/111691 "2024-03-16T17:21:51Z")

</div>

Hi. I didnt copy old known-working code, i did something else. here is how to get the correct value, provided by an answer below. datetime\_utc\_from\_posix = unix2datetime(posix\_int) \[ below is NOT how to get the corre…

---

## [Histogram height](https://discourse.julialang.org/t/histogram-height/111699)

<div class="topic-metadata">

**Author:** [@LoneWolf1304](https://discourse.julialang.org/u/LoneWolf1304)\
**Replies:** 1\
**Last updated:** [March 16, 2024, 4:08pm UTC](https://discourse.julialang.org/t/histogram-height/111699 "2024-03-16T16:08:09Z")

</div>

In python matplotlib, the hist() returns an array containing the bin heights of the histogram. How can I do this in julia? as far as i know, the corresponding histogram() function doesn’t return anything. What is the qui…

---

## [@var\_str fails on an example in its documentation](https://discourse.julialang.org/t/var-str-fails-on-an-example-in-its-documentation/111697)

<div class="topic-metadata">

**Author:** [@dmbates](https://discourse.julialang.org/u/dmbates)\
**Replies:** 2\
**Last updated:** [March 16, 2024, 3:13pm UTC](https://discourse.julialang.org/t/var-str-fails-on-an-example-in-its-documentation/111697 "2024-03-16T15:13:52Z")

</div>

julia\> versioninfo() Julia Version 1.11.0-alpha1 Commit 671de9f5793 (2024-03-01 08:30 UTC) Build Info: Official https://julialang.org/ release Platform Info: OS: macOS (arm64-apple-darwin22.4.0) CPU: 8 × Apple M1 P…

---

## [How are the intellectual property rights of Julia package developers protected?](https://discourse.julialang.org/t/how-are-the-intellectual-property-rights-of-julia-package-developers-protected/111611)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 30\
**Last updated:** [March 16, 2024, 3:03pm UTC](https://discourse.julialang.org/t/how-are-the-intellectual-property-rights-of-julia-package-developers-protected/111611 "2024-03-16T15:03:39Z")

</div>

Though it’s taken for granted, I suddenly became curious: in the world of open-source programming languages such as Julia, how are the intellectual property rights of its package developers protected? For instance, if a…

---

## [How to embed multithreaded Julia in a graphical macOS app](https://discourse.julialang.org/t/how-to-embed-multithreaded-julia-in-a-graphical-macos-app/111637)

<div class="topic-metadata">

**Author:** [@droodman](https://discourse.julialang.org/u/droodman)\
**Replies:** 14\
**Last updated:** [March 16, 2024, 1:52pm UTC](https://discourse.julialang.org/t/how-to-embed-multithreaded-julia-in-a-graphical-macos-app/111637 "2024-03-16T13:52:53Z")

</div>

I wrote a C++ plugin for the statistical software Stata to give it access to Julia. Stata is a GUI program, so in macOS, it is normally not launched from a shell. The problem I have is giving the user the option to launc…

---

## [Allocation-less, perhaps planned, Constant Q transform](https://discourse.julialang.org/t/allocation-less-perhaps-planned-constant-q-transform/111694)

<div class="topic-metadata">

**Author:** [@Benny](https://discourse.julialang.org/u/Benny)\
**Replies:** 1\
**Last updated:** [March 16, 2024, 1:40pm UTC](https://discourse.julialang.org/t/allocation-less-perhaps-planned-constant-q-transform/111694 "2024-03-16T13:40:57Z")

</div>

I’m reading up on FFTs and STFTs again for 1D real data, and eliminating startup work and allocations with rFFT plans looks promising. I’m also interested in spacing the frequency bins logarithmically like how musical pi…

---

## [Understanding the use of \`SDEFunction\`](https://discourse.julialang.org/t/understanding-the-use-of-sdefunction/111559)

<div class="topic-metadata">

**Author:** [@james](https://discourse.julialang.org/u/james)\
**Replies:** 2\
**Last updated:** [March 16, 2024, 12:33pm UTC](https://discourse.julialang.org/t/understanding-the-use-of-sdefunction/111559 "2024-03-16T12:33:38Z")

</div>

I am learning how to work with SDEs in julia and am a bit confused: In the documentation, both of SDEProblem’s constructors take two functions f,g as their first two arguments, where f should be the drift and g the nois…

---

## [PGFPlotsX debugging: where is the tex file?](https://discourse.julialang.org/t/pgfplotsx-debugging-where-is-the-tex-file/111683)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 1\
**Last updated:** [March 16, 2024, 10:10am UTC](https://discourse.julialang.org/t/pgfplotsx-debugging-where-is-the-tex-file/111683 "2024-03-16T10:10:23Z")

</div>

I’m trying to debug this error: Package pgfkeys Error: Choice ‘outer north west’ unknown in choice key ‘/pgfp lots/legend pos’. I am going to ignore this key. I’m not able to find the temporary file with the tex code. …

---

## [Pythonplot, set 2 plots with same color](https://discourse.julialang.org/t/pythonplot-set-2-plots-with-same-color/111692)

<div class="topic-metadata">

**Author:** [@Enlil50](https://discourse.julialang.org/u/Enlil50)\
**Replies:** 1\
**Last updated:** [March 16, 2024, 9:36am UTC](https://discourse.julialang.org/t/pythonplot-set-2-plots-with-same-color/111692 "2024-03-16T09:36:24Z")

</div>

This little program: using PythonPlot x = \[1,2\] y = \[2,3\] fig1 = pyplot.figure() ax1 = fig1.add\_subplot(1, 1, 1) ax1.plot(x,y, '.', markersize=10) ax1.plot(x,y,'-') gives : I want to use what I would have done in…

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

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