# Latest

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

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

**Page:** 984

---

## [Composite image of multiple channels](https://discourse.julialang.org/t/composite-image-of-multiple-channels/84066)

<div class="topic-metadata">

**Author:** [@thompsonmj](https://discourse.julialang.org/u/thompsonmj)\
**Replies:** 12\
**Last updated:** [July 13, 2022, 7:39am UTC](https://discourse.julialang.org/t/composite-image-of-multiple-channels/84066 "2022-07-13T07:39:02Z")

</div>

I have 3 images, each a separate channel of the same sample. c1 = rand(100,100) c2 = rand(100,100) c3 = rand(100,100) I’d like to make a custom color gradient for each channel: using Plots pal = palette(:batlow,3) gra…

---

## [A julia function to stack two arrays of size (m, n), to get one of size (2, m, n)](https://discourse.julialang.org/t/a-julia-function-to-stack-two-arrays-of-size-m-n-to-get-one-of-size-2-m-n/49520)

<div class="topic-metadata">

**Author:** [@empet](https://discourse.julialang.org/u/empet)\
**Replies:** 22\
**Last updated:** [July 13, 2022, 6:40am UTC](https://discourse.julialang.org/t/a-julia-function-to-stack-two-arrays-of-size-m-n-to-get-one-of-size-2-m-n/49520 "2022-07-13T06:40:40Z")

</div>

I want to stack two arrays of size (m, n) to get an array of size (2, m, n), respectively (m, n, 2). With numpy.stack, np.stack((x,y)) returns an array of size (2, m, n) while np.stack((x,y), axis=-1)- an array of …

---

## [Unconstrained optimization problem?](https://discourse.julialang.org/t/unconstrained-optimization-problem/84140)

<div class="topic-metadata">

**Author:** [@ivzktch99](https://discourse.julialang.org/u/ivzktch99)\
**Replies:** 5\
**Last updated:** [July 13, 2022, 6:43am UTC](https://discourse.julialang.org/t/unconstrained-optimization-problem/84140 "2022-07-13T06:43:11Z")

</div>

I have a control problem that requires (in addition to other linear constraints) finding optimal coefficients M (n \\times n matrix) and a nth dimensional vector b such that \\det(I + xub^T - xM) \\geq 0 for all x \\in \\ma…

---

## [Using Turing for MCMC estimation](https://discourse.julialang.org/t/using-turing-for-mcmc-estimation/84137)

<div class="topic-metadata">

**Author:** [@Jian\_ZUO](https://discourse.julialang.org/u/Jian_ZUO)\
**Replies:** 4\
**Last updated:** [July 13, 2022, 6:30am UTC](https://discourse.julialang.org/t/using-turing-for-mcmc-estimation/84137 "2022-07-13T06:30:38Z")

</div>

Hi, I am new to Turing PPL. I have a random variable X which is Gamma distributed, i.e., X ~Ga(α, β). And the scale β parameter of X is also obeys a Gamma law, namely, β ~ Ga(α0, β0). Then I want to infer the above par…

---

## [How to write idiomatic (non-OOP) Julia version of OOP design pattern?](https://discourse.julialang.org/t/how-to-write-idiomatic-non-oop-julia-version-of-oop-design-pattern/83548)

<div class="topic-metadata">

**Author:** [@merlin](https://discourse.julialang.org/u/merlin)\
**Replies:** 8\
**Last updated:** [July 13, 2022, 5:30am UTC](https://discourse.julialang.org/t/how-to-write-idiomatic-non-oop-julia-version-of-oop-design-pattern/83548 "2022-07-13T05:30:41Z")

</div>

I learned a lot about Object Oriented Programming from this blog article from 2020 about “Gang of Four” design patterns. I should say that I learned about OOP long ago via a Java book but as a data professional I have ne…

---

## [Taking the derivative of a scalar loss, that involves a gradient inside, errors on GPU only](https://discourse.julialang.org/t/taking-the-derivative-of-a-scalar-loss-that-involves-a-gradient-inside-errors-on-gpu-only/80275)

<div class="topic-metadata">

**Author:** [@AlexLewandowski](https://discourse.julialang.org/u/AlexLewandowski)\
**Replies:** 7\
**Last updated:** [July 13, 2022, 5:11am UTC](https://discourse.julialang.org/t/taking-the-derivative-of-a-scalar-loss-that-involves-a-gradient-inside-errors-on-gpu-only/80275 "2022-07-13T05:11:38Z")

</div>

I am working on a meta-learning project and experimenting with MAML. I am able to get a first-order approximation fine, as it can be implemented without differentiating through gradient descent. When doing “full” MAML, I…

---

## [How to Install all Packages in a Project into the General Julia Manifest](https://discourse.julialang.org/t/how-to-install-all-packages-in-a-project-into-the-general-julia-manifest/84143)

<div class="topic-metadata">

**Author:** [@tawheeler](https://discourse.julialang.org/u/tawheeler)\
**Replies:** 3\
**Last updated:** [July 13, 2022, 3:17am UTC](https://discourse.julialang.org/t/how-to-install-all-packages-in-a-project-into-the-general-julia-manifest/84143 "2022-07-13T03:17:11Z")

</div>

I have a bunch of packages that I would like my general julia environment to have. To achieve this I have created Manifest and Project files with the necessary packages and dependencies. How would I go about installing …

---

## [How to diagnose a terminal crash?](https://discourse.julialang.org/t/how-to-diagnose-a-terminal-crash/78128)

<div class="topic-metadata">

**Author:** [@SortofDamocles](https://discourse.julialang.org/u/SortofDamocles)\
**Replies:** 21\
**Last updated:** [July 13, 2022, 2:50am UTC](https://discourse.julialang.org/t/how-to-diagnose-a-terminal-crash/78128 "2022-07-13T02:50:08Z")

</div>

I am getting unpredictable and non-reproducible terminal crashes in Julia 1.7, both within VSCode and also from the command line using PowerShell on Windows 11, and I don’t know how to diagnose the root issue. I’m sorry …

---

## [How to index array at multiple locations](https://discourse.julialang.org/t/how-to-index-array-at-multiple-locations/84142)

<div class="topic-metadata">

**Author:** [@v715](https://discourse.julialang.org/u/v715)\
**Replies:** 2\
**Last updated:** [July 13, 2022, 2:17am UTC](https://discourse.julialang.org/t/how-to-index-array-at-multiple-locations/84142 "2022-07-13T02:17:52Z")

</div>

Say I have a n-by-n array and I want to index at a bunch of places If I was in numpy, I would do something like A\[\[1,1\], \[2, 5\], \[92, 2\], \[4, 10\] But this doesn’t work in Julia. Is there a way to do this??

---

## [PlotlyJS interactive image of 3D plot](https://discourse.julialang.org/t/plotlyjs-interactive-image-of-3d-plot/84117)

<div class="topic-metadata">

**Author:** [@Adam\_Davis](https://discourse.julialang.org/u/Adam_Davis)\
**Replies:** 6\
**Last updated:** [July 13, 2022, 12:05am UTC](https://discourse.julialang.org/t/plotlyjs-interactive-image-of-3d-plot/84117 "2022-07-13T00:05:23Z")

</div>

I have a 3D plot made using PlotlyJS.jl. This is done using Jupyter notebooks. When the plot is saved to a png it is only saved as a snapshot of the position of the plot at the time of saving. What is the best way to …

---

## [How to implement adaptive parameters for ODE solvers](https://discourse.julialang.org/t/how-to-implement-adaptive-parameters-for-ode-solvers/84129)

<div class="topic-metadata">

**Author:** [@timb](https://discourse.julialang.org/u/timb)\
**Replies:** 2\
**Last updated:** [July 12, 2022, 11:32pm UTC](https://discourse.julialang.org/t/how-to-implement-adaptive-parameters-for-ode-solvers/84129 "2022-07-12T23:32:54Z")

</div>

I would like to create parameters that change with time t. In the classic SIR model below for example, I would like to have a beta that changes: say there are two betas and a dummy variable that indicates when to use wh…

---

## [Can existing packages for image registration align huge images, e.g. Hubble with the new James Webb images (150 MP)?](https://discourse.julialang.org/t/can-existing-packages-for-image-registration-align-huge-images-e-g-hubble-with-the-new-james-webb-images-150-mp/84118)

<div class="topic-metadata">

**Author:** [@NiclasMattsson](https://discourse.julialang.org/u/NiclasMattsson)\
**Replies:** 3\
**Last updated:** [July 12, 2022, 10:25pm UTC](https://discourse.julialang.org/t/can-existing-packages-for-image-registration-align-huge-images-e-g-hubble-with-the-new-james-webb-images-150-mp/84118 "2022-07-12T22:25:43Z")

</div>

Like many others I’m drooling over the new images from the JWST, e.g. this one: https://webbtelescope.org/contents/media/images/2022/034/01G7DA5ADA2WDSK1JJPQ0PTG4A So I thought it would be fun to try to align it with o…

---

## [Interest in a Seattle Metro Area Meetup for JuliaCon 2022?](https://discourse.julialang.org/t/interest-in-a-seattle-metro-area-meetup-for-juliacon-2022/84034)

<div class="topic-metadata">

**Author:** [@calebwin](https://discourse.julialang.org/u/calebwin)\
**Replies:** 1\
**Last updated:** [July 12, 2022, 9:16pm UTC](https://discourse.julialang.org/t/interest-in-a-seattle-metro-area-meetup-for-juliacon-2022/84034 "2022-07-12T21:16:19Z")

</div>

I’m based in Bellevue, WA and was wondering whether there are people from around here who are interested in a meetup for JuliaCon 2022. I have some ideas about time and location but right now I’m just trying to gauge int…

---

## [Unwanted allocations when updating type field](https://discourse.julialang.org/t/unwanted-allocations-when-updating-type-field/84122)

<div class="topic-metadata">

**Author:** [@WDM-Computation](https://discourse.julialang.org/u/WDM-Computation)\
**Replies:** 5\
**Last updated:** [July 12, 2022, 8:55pm UTC](https://discourse.julialang.org/t/unwanted-allocations-when-updating-type-field/84122 "2022-07-12T20:55:30Z")

</div>

Hello! Physics PhD student here using Julia for a research project. I have a question regarding what seems to be unnecessary extra memory allocations in my program. I am using a custom type along the lines of abstract…

---

## [Current status of point cloud processing in Julia?](https://discourse.julialang.org/t/current-status-of-point-cloud-processing-in-julia/84119)

<div class="topic-metadata">

**Author:** [@EricChameroy](https://discourse.julialang.org/u/EricChameroy)\
**Replies:** 1\
**Last updated:** [July 12, 2022, 8:00pm UTC](https://discourse.julialang.org/t/current-status-of-point-cloud-processing-in-julia/84119 "2022-07-12T20:00:12Z")

</div>

I’m working with foot impressions in the form of point cloud data and would like to know if there is anyway to work with this data in Julia? One thing I’d like to do with this data is generate 2D contour plots. Many of …

---

## [GeneralizedLinearMixedModel no method matching \_ranef\_refs](https://discourse.julialang.org/t/generalizedlinearmixedmodel-no-method-matching-ranef-refs/82859)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 5\
**Last updated:** [June 26, 2022, 5:44pm UTC](https://discourse.julialang.org/t/generalizedlinearmixedmodel-no-method-matching-ranef-refs/82859 "2022-06-26T17:44:53Z")

</div>

How can I fix this error? form = @formula(y ~ (1 | a \* b \* c)) n = 1000 df = DataFrame( y=rand(Bool, n), a=CategoricalArray(rand('a':'z', n)), b=CategoricalArray(rand('a':'z', n)), c=CategoricalArray(…

---

## [Error message when using AoG/Makie with "yscale=log10", for my particular data](https://discourse.julialang.org/t/error-message-when-using-aog-makie-with-yscale-log10-for-my-particular-data/82206)

<div class="topic-metadata">

**Author:** [@martinmestre](https://discourse.julialang.org/u/martinmestre)\
**Replies:** 14\
**Last updated:** [July 12, 2022, 7:43pm UTC](https://discourse.julialang.org/t/error-message-when-using-aog-makie-with-yscale-log10-for-my-particular-data/82206 "2022-07-12T19:43:16Z")

</div>

Hello all, when running the following piece of code, I obtain an error. I have found out that it is due to the fact of using yscale=log10. If I use yscale=log there is no problem. In the x coordinate I have no problem. …

---

## [Find last section header with Gumbo.jl](https://discourse.julialang.org/t/find-last-section-header-with-gumbo-jl/84120)

<div class="topic-metadata">

**Author:** [@cadojo](https://discourse.julialang.org/u/cadojo)\
**Replies:** 0\
**Last updated:** [July 12, 2022, 6:44pm UTC](https://discourse.julialang.org/t/find-last-section-header-with-gumbo-jl/84120 "2022-07-12T18:44:01Z")

</div>

I’m working on wrapping a specific REST API with a Julia package. I am downloading and parsing the HTML of the API’s documentation page to generate the in-Julia API. Specifically, I’m looking at each of the tables on the…

---

## [Change x axis from integer-scale to pi-scale](https://discourse.julialang.org/t/change-x-axis-from-integer-scale-to-pi-scale/84106)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 1\
**Last updated:** [July 12, 2022, 6:00pm UTC](https://discourse.julialang.org/t/change-x-axis-from-integer-scale-to-pi-scale/84106 "2022-07-12T18:00:49Z")

</div>

I want to know what is the general (can be used for backend Plotly,GR,Makie,PlotlyJS) / easiest way to change the scale from standard integer: -5,-4,…,0,1,2,… to pi-scale: -π/2. -π/4, 0,…,π/4,π/2,π,3π/2,2π this is my …

---

## [Nondimensionalization of population dynamics ODE models but not pharmacokinetics ODE models](https://discourse.julialang.org/t/nondimensionalization-of-population-dynamics-ode-models-but-not-pharmacokinetics-ode-models/83722)

<div class="topic-metadata">

**Author:** [@00krishna](https://discourse.julialang.org/u/00krishna)\
**Replies:** 2\
**Last updated:** [July 12, 2022, 3:31pm UTC](https://discourse.julialang.org/t/nondimensionalization-of-population-dynamics-ode-models-but-not-pharmacokinetics-ode-models/83722 "2022-07-12T15:31:17Z")

</div>

Hey folks, just a question based on curiosity. Although I am still relatively new to differential equations modelling, I do notice some of the variations in the methods and discourse in different fields. One such apparen…

---

## [Question regarding how replace! works:](https://discourse.julialang.org/t/question-regarding-how-replace-works/84109)

<div class="topic-metadata">

**Author:** [@Juan\_Mac\_Donagh](https://discourse.julialang.org/u/Juan_Mac_Donagh)\
**Replies:** 3\
**Last updated:** [July 12, 2022, 3:25pm UTC](https://discourse.julialang.org/t/question-regarding-how-replace-works/84109 "2022-07-12T15:25:17Z")

</div>

Hi all, I am having some issues using replace! in my DataFrame. I get the following error when trying to change some strings in a column, so when I create a boxplot they are better labeled: ArgumentError: string too lar…

---

## [Plotting marks with more one character in Gaston](https://discourse.julialang.org/t/plotting-marks-with-more-one-character-in-gaston/84107)

<div class="topic-metadata">

**Author:** [@angeloaliano1](https://discourse.julialang.org/u/angeloaliano1)\
**Replies:** 3\
**Last updated:** [July 12, 2022, 3:22pm UTC](https://discourse.julialang.org/t/plotting-marks-with-more-one-character-in-gaston/84107 "2022-07-12T15:22:13Z")

</div>

Dear all, I have the following code to plot several points and marks beside it: using Gaston n=15 L=rand(1:100,n,2) L=\[L 1:n\] scatter(\[L\[1,1\]\], \[L\[1,2\]\],linewidth="3", pointtype="fsquare", plotstyle="linespoints",line…

---

## [Complete package removal](https://discourse.julialang.org/t/complete-package-removal/84100)

<div class="topic-metadata">

**Author:** [@Jakub\_Mitura](https://discourse.julialang.org/u/Jakub_Mitura)\
**Replies:** 2\
**Last updated:** [July 12, 2022, 2:15pm UTC](https://discourse.julialang.org/t/complete-package-removal/84100 "2022-07-12T14:15:48Z")

</div>

Hello how to remove the package with its artifacts on Ubuntu - I have a package using Conda.jl and after removing and reinstalling I have still old python dependencies - so some artifacts need to be still present - How t…

---

## [For Loop optimisation in Julia](https://discourse.julialang.org/t/for-loop-optimisation-in-julia/84104)

<div class="topic-metadata">

**Author:** [@lir](https://discourse.julialang.org/u/lir)\
**Replies:** 1\
**Last updated:** [July 12, 2022, 1:40pm UTC](https://discourse.julialang.org/t/for-loop-optimisation-in-julia/84104 "2022-07-12T13:40:00Z")

</div>

I am familiarizing myself with programming languages. Came across a video “Go vs BUN and Node speed test” Tried to perform the speed comparison betwen Node.js, Bun and Julia. For some reason For Loop i…

---

## [Maximum likelihood optimization problem through Optim.jl](https://discourse.julialang.org/t/maximum-likelihood-optimization-problem-through-optim-jl/84096)

<div class="topic-metadata">

**Author:** [@Jian\_ZUO](https://discourse.julialang.org/u/Jian_ZUO)\
**Replies:** 14\
**Last updated:** [July 12, 2022, 1:11pm UTC](https://discourse.julialang.org/t/maximum-likelihood-optimization-problem-through-optim-jl/84096 "2022-07-12T13:11:50Z")

</div>

Hi, I am trying to solve a likelihood function in Optim as follows: I have some increments which are gamma-distributed (Ga(a\*t, β)): det\_x = \[0.0175, 0.0055, 0.0059\] # increments det\_t = \[185, 163, 167\] # correspondi…

---

## [Vector as exponent with the Euler's number basis](https://discourse.julialang.org/t/vector-as-exponent-with-the-eulers-number-basis/84074)

<div class="topic-metadata">

**Author:** [@tapyu](https://discourse.julialang.org/u/tapyu)\
**Replies:** 3\
**Last updated:** [July 12, 2022, 1:07pm UTC](https://discourse.julialang.org/t/vector-as-exponent-with-the-eulers-number-basis/84074 "2022-07-12T13:07:51Z")

</div>

That is a very basic question. In Matlab, we can pass a vector for the exp function and it returns a vector with the exponential results. In Julia, I can’t do that since exp does not allow a vector as input. Plus, I ca…

---

## [Extending STDLIB’s Markdown](https://discourse.julialang.org/t/extending-stdlib-s-markdown/84079)

<div class="topic-metadata">

**Author:** [@cadojo](https://discourse.julialang.org/u/cadojo)\
**Replies:** 1\
**Last updated:** [July 12, 2022, 10:24am UTC](https://discourse.julialang.org/t/extending-stdlib-s-markdown/84079 "2022-07-12T10:24:19Z")

</div>

I understand that Markdown.jl has been moved into stdlib: What is the standard Markdown implementation for Julia? I’d like to extend this Markdown syntax with MyST Markdown functionality. The Julia documentation states …

---

## [How does the compiler know not to constant-fold methods like rand?](https://discourse.julialang.org/t/how-does-the-compiler-know-not-to-constant-fold-methods-like-rand/84092)

<div class="topic-metadata">

**Author:** [@Benny](https://discourse.julialang.org/u/Benny)\
**Replies:** 2\
**Last updated:** [July 12, 2022, 10:15am UTC](https://discourse.julialang.org/t/how-does-the-compiler-know-not-to-constant-fold-methods-like-rand/84092 "2022-07-12T10:15:53Z")

</div>

It seems like for the most part, the compiler tries very hard to compute constant expressions at compile-time, though I’ve seen it give up on loops. But there are situations where it sensibly doesn’t even try, like rand(…

---

## [Performance of weighed graphs](https://discourse.julialang.org/t/performance-of-weighed-graphs/83661)

<div class="topic-metadata">

**Author:** [@Jirka\_Fink](https://discourse.julialang.org/u/Jirka_Fink)\
**Replies:** 9\
**Last updated:** [July 12, 2022, 9:02am UTC](https://discourse.julialang.org/t/performance-of-weighed-graphs/83661 "2022-07-12T09:02:38Z")

</div>

I work on combinarotial optimization, so I am looking data structures storing weighed graph. At https://juliagraphs.org/, I found SimpleWeightedGraphs, MetaGraphs, MetaGraphsNext. However, neither of them seems to me t…

---

## [Custom StaticArray matrix type constructors from sub-arrays of a larger matrix type](https://discourse.julialang.org/t/custom-staticarray-matrix-type-constructors-from-sub-arrays-of-a-larger-matrix-type/83974)

<div class="topic-metadata">

**Author:** [@mfiano](https://discourse.julialang.org/u/mfiano)\
**Replies:** 5\
**Last updated:** [July 12, 2022, 8:23am UTC](https://discourse.julialang.org/t/custom-staticarray-matrix-type-constructors-from-sub-arrays-of-a-larger-matrix-type/83974 "2022-07-12T08:23:07Z")

</div>

I have a Matrix2 and Matrix3 type derived from StaticArrays.FieldMatrix: (Practice) julia\> x = Matrix2(1, 2, 3, 4) 2×2 Matrix2{Int64} with indices SOneTo(2)×SOneTo(2): 1 3 2 4 (Practice) julia\> y = Matrix3(1, 2, 3,…

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

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