# Latest

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

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

**Page:** 597

---

## [Finding the minimizer region of a function](https://discourse.julialang.org/t/finding-the-minimizer-region-of-a-function/103819)

<div class="topic-metadata">

**Author:** [@yosuga](https://discourse.julialang.org/u/yosuga)\
**Replies:** 14\
**Last updated:** [September 17, 2023, 6:45pm UTC](https://discourse.julialang.org/t/finding-the-minimizer-region-of-a-function/103819 "2023-09-17T18:45:26Z")

</div>

As an example, let f be a polynomial, f(z,w) = z + z^-1 + w - w^-1 + 2zw - 5, where z = exp(x\[1\]+iθ\[1\]), w = exp(x\[2\]+iθ\[2\]), x,θ ∈ R^2 Then we can define the Ronkin function as follows. function R(x) function …

---

## [Problem with the scaling of the plot axes in GLMakie](https://discourse.julialang.org/t/problem-with-the-scaling-of-the-plot-axes-in-glmakie/103937)

<div class="topic-metadata">

**Author:** [@Luis\_Manuel\_Espinoza](https://discourse.julialang.org/u/Luis_Manuel_Espinoza)\
**Replies:** 2\
**Last updated:** [September 17, 2023, 6:10pm UTC](https://discourse.julialang.org/t/problem-with-the-scaling-of-the-plot-axes-in-glmakie/103937 "2023-09-17T18:10:02Z")

</div>

I am trying to make a plot in GLMakie but when I try, the “y” axis does not scale correctly and then I only get a straight line when it is not what I want, the Plots package does not have this problem but I am learning t…

---

## [Batched probability distribution specification in Turing similar to Tensorflow Probability](https://discourse.julialang.org/t/batched-probability-distribution-specification-in-turing-similar-to-tensorflow-probability/103953)

<div class="topic-metadata">

**Author:** [@gsood-gaurav](https://discourse.julialang.org/u/gsood-gaurav)\
**Replies:** 0\
**Last updated:** [September 17, 2023, 4:18pm UTC](https://discourse.julialang.org/t/batched-probability-distribution-specification-in-turing-similar-to-tensorflow-probability/103953 "2023-09-17T16:18:38Z")

</div>

In tensorflow probability there is this idea of batch\_shape and event\_shape while declaring a set of distribtuions. What is the equivalent of it in Turing.jl + Distributions.jl For instance if I want to declare a batch …

---

## [Makie: Removing gridlayouts](https://discourse.julialang.org/t/makie-removing-gridlayouts/103935)

<div class="topic-metadata">

**Author:** [@f.ij](https://discourse.julialang.org/u/f.ij)\
**Replies:** 7\
**Last updated:** [September 17, 2023, 3:52pm UTC](https://discourse.julialang.org/t/makie-removing-gridlayouts/103935 "2023-09-17T15:52:37Z")

</div>

I’m wondering if I can remove a GridLayout from a figure. Elements can be easily removed with delete! but this does not work on an entire GridLayout. If I want the layout of a figure programatically by deleting items tha…

---

## [Can expressions containing syntax errors be used in macro calls?](https://discourse.julialang.org/t/can-expressions-containing-syntax-errors-be-used-in-macro-calls/103949)

<div class="topic-metadata">

**Author:** [@Tortar](https://discourse.julialang.org/u/Tortar)\
**Replies:** 2\
**Last updated:** [September 17, 2023, 1:57pm UTC](https://discourse.julialang.org/t/can-expressions-containing-syntax-errors-be-used-in-macro-calls/103949 "2023-09-17T13:57:59Z")

</div>

I’d like to use an expression like this one in a macro call struct A(B) x::Int end which gives a syntax error when called without the macro wrap: julia\> struct A(B) x::Int end ERROR: syntax: inva…

---

## [Date.value doesn't work with missing values](https://discourse.julialang.org/t/date-value-doesnt-work-with-missing-values/103887)

<div class="topic-metadata">

**Author:** [@ddrake](https://discourse.julialang.org/u/ddrake)\
**Replies:** 7\
**Last updated:** [September 17, 2023, 1:48pm UTC](https://discourse.julialang.org/t/date-value-doesnt-work-with-missing-values/103887 "2023-09-17T13:48:59Z")

</div>

I have a dataframe with some Dates in it, and I want a new column or vector with the number of days between those dates. So this works: vcat(\[missing\], \[y - x for (x, y) in zip(df\[:,:date\]\[1:end\], df\[:,:date\]\[2:end\])\]) …

---

## [Similar thing to numpy's einsum in Julia](https://discourse.julialang.org/t/similar-thing-to-numpys-einsum-in-julia/103932)

<div class="topic-metadata">

**Author:** [@jisutich](https://discourse.julialang.org/u/jisutich)\
**Replies:** 6\
**Last updated:** [September 17, 2023, 2:30am UTC](https://discourse.julialang.org/t/similar-thing-to-numpys-einsum-in-julia/103932 "2023-09-17T02:30:11Z")

</div>

Hi, I am thinking about how to achieve something similar to numpy.einsum in Julia. For instance, if I have a tensor T\_{ijk} and a matrix u\_{jj'}, I want to get T'\_{ijk}= u\_{jj'}T\_{ij'k}. Also, I want to do things like H…

---

## [Synchronizing Colors for Functions and Derivatives in Julia Plots using RecipesBase.jl](https://discourse.julialang.org/t/synchronizing-colors-for-functions-and-derivatives-in-julia-plots-using-recipesbase-jl/103939)

<div class="topic-metadata">

**Author:** [@singularitti](https://discourse.julialang.org/u/singularitti)\
**Replies:** 0\
**Last updated:** [September 17, 2023, 1:44am UTC](https://discourse.julialang.org/t/synchronizing-colors-for-functions-and-derivatives-in-julia-plots-using-recipesbase-jl/103939 "2023-09-17T01:44:11Z")

</div>

I’m working with Julia and the Plots.jl package to create subplots of functions and their derivatives, and I want to synchronize the colors between corresponding functions and their derivatives using RecipesBase.jl . Her…

---

## [ChainRules for functions that "destroy their input arguments](https://discourse.julialang.org/t/chainrules-for-functions-that-destroy-their-input-arguments/103857)

<div class="topic-metadata">

**Author:** [@lkdvos](https://discourse.julialang.org/u/lkdvos)\
**Replies:** 1\
**Last updated:** [September 16, 2023, 10:31pm UTC](https://discourse.julialang.org/t/chainrules-for-functions-that-destroy-their-input-arguments/103857 "2023-09-16T22:31:38Z")

</div>

Some functions have the behaviour of using their inputs as workspace, and by doing so their documented behaviour is that they destroy the input. As an example, things like svd! work in such fashion. While in general, mu…

---

## [Does Julia have anything like Measurements.jl for multivariate error propagation?](https://discourse.julialang.org/t/does-julia-have-anything-like-measurements-jl-for-multivariate-error-propagation/103879)

<div class="topic-metadata">

**Author:** [@marius311](https://discourse.julialang.org/u/marius311)\
**Replies:** 8\
**Last updated:** [September 16, 2023, 12:09pm UTC](https://discourse.julialang.org/t/does-julia-have-anything-like-measurements-jl-for-multivariate-error-propagation/103879 "2023-09-16T12:09:54Z")

</div>

Say I have two variables a and b and I know the full 2x2 covariance between them. Is there a Julia package to conveniently propagate Gaussian uncertainy through arbitrary functions of them in the same way that Measuremen…

---

## [Display image as Array{UInt8, 4}: in julia](https://discourse.julialang.org/t/display-image-as-array-uint8-4-in-julia/103924)

<div class="topic-metadata">

**Author:** [@hungpham3112](https://discourse.julialang.org/u/hungpham3112)\
**Replies:** 3\
**Last updated:** [September 16, 2023, 11:03am UTC](https://discourse.julialang.org/t/display-image-as-array-uint8-4-in-julia/103924 "2023-09-16T11:03:25Z")

</div>

I load the dataset from h5 file with HDF5.jl to work with binary classifying problems with neural networks I want to display an image from train\_set\_x 3×64×64×209 Array{UInt8, 4}: Element type of this array is UInt…

---

## [How to design a custom array-like type for physics calculations: balancing functionality and customization?](https://discourse.julialang.org/t/how-to-design-a-custom-array-like-type-for-physics-calculations-balancing-functionality-and-customization/103873)

<div class="topic-metadata">

**Author:** [@singularitti](https://discourse.julialang.org/u/singularitti)\
**Replies:** 2\
**Last updated:** [September 16, 2023, 6:39am UTC](https://discourse.julialang.org/t/how-to-design-a-custom-array-like-type-for-physics-calculations-balancing-functionality-and-customization/103873 "2023-09-16T06:39:03Z")

</div>

I’m working on a project in physics where I need to create custom types that behave like arrays but don’t necessarily inherit from AbstractArray because I want to disable certain default functionalities. These types repr…

---

## [How to use \`@generated\` to eliminate a for loop?](https://discourse.julialang.org/t/how-to-use-generated-to-eliminate-a-for-loop/103915)

<div class="topic-metadata">

**Author:** [@mihalybaci](https://discourse.julialang.org/u/mihalybaci)\
**Replies:** 4\
**Last updated:** [September 16, 2023, 1:56am UTC](https://discourse.julialang.org/t/how-to-use-generated-to-eliminate-a-for-loop/103915 "2023-09-16T01:56:51Z")

</div>

As the title implies, I have some code that either requires hard coding a certain number of operations, or using a for loop to cycle through one of the indices. Performance-wise I have found that hard coding the operatio…

---

## [Print all ellements of a variable-vector in once (broadcasting)](https://discourse.julialang.org/t/print-all-ellements-of-a-variable-vector-in-once-broadcasting/103884)

<div class="topic-metadata">

**Author:** [@Fabian1](https://discourse.julialang.org/u/Fabian1)\
**Replies:** 5\
**Last updated:** [September 15, 2023, 10:58pm UTC](https://discourse.julialang.org/t/print-all-ellements-of-a-variable-vector-in-once-broadcasting/103884 "2023-09-15T22:58:05Z")

</div>

Hi, I’ve just started with Julia, and I would like to print each element of a vector in one time for a variable (see line 37) in my optimization model under JuMP. It is already working for a defined parameter (D, see li…

---

## [Goodbye (and thank you) for now!](https://discourse.julialang.org/t/goodbye-and-thank-you-for-now/103668)

<div class="topic-metadata">

**Author:** [@logankilpatrick](https://discourse.julialang.org/u/logankilpatrick)\
**Replies:** 1\
**Last updated:** [September 15, 2023, 8:29pm UTC](https://discourse.julialang.org/t/goodbye-and-thank-you-for-now/103668 "2023-09-15T20:29:44Z")

</div>

Hey folks! As many might have seen, over the last 6 months I have become progressively less active in the Julia ecosystem given how crazy things have been at OpenAI. A couple of months ago, I let Avik know that I would b…

---

## [\[ANN\] LinearSegmentation.jl: segmented linear regression](https://discourse.julialang.org/t/ann-linearsegmentation-jl-segmented-linear-regression/101248)

<div class="topic-metadata">

**Author:** [@Elmo](https://discourse.julialang.org/u/Elmo)\
**Replies:** 7\
**Last updated:** [September 15, 2023, 7:50pm UTC](https://discourse.julialang.org/t/ann-linearsegmentation-jl-segmented-linear-regression/101248 "2023-09-15T19:50:35Z")

</div>

I have made a small package that does segmented linear regression, i.e. it fits piecewise linear functions to data and automatically identifies the optimal break points, see the readme for more details: LinearSegmentatio…

---

## [Preallocate u and du in DifferentialEquations.jl](https://discourse.julialang.org/t/preallocate-u-and-du-in-differentialequations-jl/103911)

<div class="topic-metadata">

**Author:** [@Dom](https://discourse.julialang.org/u/Dom)\
**Replies:** 8\
**Last updated:** [September 15, 2023, 7:19pm UTC](https://discourse.julialang.org/t/preallocate-u-and-du-in-differentialequations-jl/103911 "2023-09-15T19:19:29Z")

</div>

Hi all, we are currently writing a simulation engine which is a massive ODE with \>\>100k elements and therefore need to be very memory conscious. We need to pre-allocate the u and du vectors and have DifferentialEquatio…

---

## [Question mark sign in Julia Package status](https://discourse.julialang.org/t/question-mark-sign-in-julia-package-status/25798)

<div class="topic-metadata">

**Author:** [@abx](https://discourse.julialang.org/u/abx)\
**Replies:** 8\
**Last updated:** [September 15, 2023, 5:26pm UTC](https://discourse.julialang.org/t/question-mark-sign-in-julia-package-status/25798 "2023-09-15T17:26:08Z")

</div>

Hello, when I check the status of Packages in Julia I see this A few packages are marked with a strange question mark sign. What does it mean and how do I look into it? Thanks

---

## [How to solve 2D PDE for heat conduction with x and y having different length (A rectangle)](https://discourse.julialang.org/t/how-to-solve-2d-pde-for-heat-conduction-with-x-and-y-having-different-length-a-rectangle/103907)

<div class="topic-metadata">

**Author:** [@ShadmanSakief](https://discourse.julialang.org/u/ShadmanSakief)\
**Replies:** 1\
**Last updated:** [September 15, 2023, 5:17pm UTC](https://discourse.julialang.org/t/how-to-solve-2d-pde-for-heat-conduction-with-x-and-y-having-different-length-a-rectangle/103907 "2023-09-15T17:17:05Z")

</div>

using NeuralPDE, Lux, Optimization, OptimizationOptimJL import ModelingToolkit: Interval @parameters x y @variables u(..) Dxx = Differential(x)^2 Dyy = Differential(y)^2 Dx = Differential(x) Dy = Differential(y) 2…

---

## [Getting the upper bound of an objective function (MILP with HiGHS)](https://discourse.julialang.org/t/getting-the-upper-bound-of-an-objective-function-milp-with-highs/103890)

<div class="topic-metadata">

**Author:** [@cf357](https://discourse.julialang.org/u/cf357)\
**Replies:** 4\
**Last updated:** [September 15, 2023, 5:02pm UTC](https://discourse.julialang.org/t/getting-the-upper-bound-of-an-objective-function-milp-with-highs/103890 "2023-09-15T17:02:47Z")

</div>

I’m working on an assignment problem where the solver maximizes @objective(model, Max, sum(B\[u\] for u in U)) where B is a binary vector of entities satisfying some conditions in the assignment plan A\[u, f, t\], which de…

---

## [How to use LoopVectorization.jl?](https://discourse.julialang.org/t/how-to-use-loopvectorization-jl/103858)

<div class="topic-metadata">

**Author:** [@Leo\_I](https://discourse.julialang.org/u/Leo_I)\
**Replies:** 7\
**Last updated:** [September 15, 2023, 3:34pm UTC](https://discourse.julialang.org/t/how-to-use-loopvectorization-jl/103858 "2023-09-15T15:34:05Z")

</div>

I have a question regarding LoopVectorization.jl. I’ve been trying to integrate it into my project but am stuck with some errors. Here is a MWE that reproduces it: function F!(xllp ::Vector{Vector{Int}}, xllw ::Vector{V…

---

## [Error with remake function in ODE Problems](https://discourse.julialang.org/t/error-with-remake-function-in-ode-problems/103902)

<div class="topic-metadata">

**Author:** [@Nick1](https://discourse.julialang.org/u/Nick1)\
**Replies:** 0\
**Last updated:** [September 15, 2023, 3:19pm UTC](https://discourse.julialang.org/t/error-with-remake-function-in-ode-problems/103902 "2023-09-15T15:19:20Z")

</div>

Hi everyone, I am importing an SBML file and try to change the initial condition and remake the problem but I get the following error: ERROR: ArgumentError: This problem does not support symbolic maps with remake, i.e.…

---

## [How to include local module with struct into notebook scope](https://discourse.julialang.org/t/how-to-include-local-module-with-struct-into-notebook-scope/103871)

<div class="topic-metadata">

**Author:** [@luke-pikaart](https://discourse.julialang.org/u/luke-pikaart)\
**Replies:** 0\
**Last updated:** [September 15, 2023, 1:52am UTC](https://discourse.julialang.org/t/how-to-include-local-module-with-struct-into-notebook-scope/103871 "2023-09-15T01:52:26Z")

</div>

I am trying use Pluto with a local module. I have a module like: foo.jl module foo export foobar struct foobar A:Int end end I think the recommended way to do this is: notebook1.jl include("foo.jl"…

---

## [Autocompletion failed in jupyter lab](https://discourse.julialang.org/t/autocompletion-failed-in-jupyter-lab/103839)

<div class="topic-metadata">

**Author:** [@y-iizawa](https://discourse.julialang.org/u/y-iizawa)\
**Replies:** 1\
**Last updated:** [September 15, 2023, 2:59pm UTC](https://discourse.julialang.org/t/autocompletion-failed-in-jupyter-lab/103839 "2023-09-15T14:59:35Z")

</div>

When using julia in jupyter lab. the completion function sometimes does not work. For example, when I press the tab key after \\pi, it is not converted to the Greek letter π, but to a space. Is there a cause for this? j…

---

## [ODE problem error](https://discourse.julialang.org/t/ode-problem-error/103876)

<div class="topic-metadata">

**Author:** [@River\_He](https://discourse.julialang.org/u/River_He)\
**Replies:** 2\
**Last updated:** [September 15, 2023, 2:41pm UTC](https://discourse.julialang.org/t/ode-problem-error/103876 "2023-09-15T14:41:01Z")

</div>

Hello everyone, I’m currently working on solving an ODE problem using Julia, but I’ve run into some issues. Before diving into possible modifications to my model, I’d like to first rule out any potential problems arisin…

---

## [Scoping confusion: MethodError but method is defined](https://discourse.julialang.org/t/scoping-confusion-methoderror-but-method-is-defined/103892)

<div class="topic-metadata">

**Author:** [@cdawg](https://discourse.julialang.org/u/cdawg)\
**Replies:** 4\
**Last updated:** [September 15, 2023, 2:32pm UTC](https://discourse.julialang.org/t/scoping-confusion-methoderror-but-method-is-defined/103892 "2023-09-15T14:32:28Z")

</div>

This kind of error keeps coming up, and I guess I need to figure out what is going on. In the course of using a function from a module which calls mutation\_wait I get a method error ERROR: MethodError: no method matchi…

---

## [Using truncation in MixtureModel](https://discourse.julialang.org/t/using-truncation-in-mixturemodel/103893)

<div class="topic-metadata">

**Author:** [@Sahil\_Khan](https://discourse.julialang.org/u/Sahil_Khan)\
**Replies:** 2\
**Last updated:** [September 15, 2023, 1:59pm UTC](https://discourse.julialang.org/t/using-truncation-in-mixturemodel/103893 "2023-09-15T13:59:56Z")

</div>

Can we also use truncation here? MixtureModel(Normal\[ Normal(-2.0, 1.2), Normal(0.0, 1.0), Normal(3.0, 2.5)\]) I was trying with some truncated distributions and it gives error. These distributions are obtaine…

---

## [SQL syntax hightlighting](https://discourse.julialang.org/t/sql-syntax-hightlighting/103845)

<div class="topic-metadata">

**Author:** [@Lincoln\_Hannah](https://discourse.julialang.org/u/Lincoln_Hannah)\
**Replies:** 6\
**Last updated:** [September 15, 2023, 1:25pm UTC](https://discourse.julialang.org/t/sql-syntax-hightlighting/103845 "2023-09-15T13:25:15Z")

</div>

This provides syntax highlighting and auto-completion of SQL in VS Code. Would it be possible to have a section in a .jl file that VS Code treats as SQL (for syntax highlight and autocompletion) ? Then convert the r…

---

## [Would slowing Julia's release cadence improve ecosystem quality?](https://discourse.julialang.org/t/would-slowing-julias-release-cadence-improve-ecosystem-quality/103114)

<div class="topic-metadata">

**Author:** [@xiaoxi](https://discourse.julialang.org/u/xiaoxi)\
**Replies:** 98\
**Last updated:** [September 15, 2023, 9:57am UTC](https://discourse.julialang.org/t/would-slowing-julias-release-cadence-improve-ecosystem-quality/103114 "2023-09-15T09:57:27Z")

</div>

Could it help improve the quality of the Julia ecosystem if Julia releases slow down their pace after the next LTS release? Are there any important features of Julia 1.11 or 1.12 that are worth getting as soon as possib…

---

## [PDE discretization error in MethodOfLines.jl](https://discourse.julialang.org/t/pde-discretization-error-in-methodoflines-jl/78566)

<div class="topic-metadata">

**Author:** [@RickDW](https://discourse.julialang.org/u/RickDW)\
**Replies:** 23\
**Last updated:** [September 15, 2023, 11:27am UTC](https://discourse.julialang.org/t/pde-discretization-error-in-methodoflines-jl/78566 "2023-09-15T11:27:58Z")

</div>

Hi all, I’m currently working on implementing a relatively simple reaction-diffusion-convection model of a 2D hydrogen flame. The PDESystem is created successfully, but the discretization step using methodoflines.jl fail…

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

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