# Latest

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

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

**Page:** 390

---

## [Emptying figures in makie](https://discourse.julialang.org/t/emptying-figures-in-makie/115425)

<div class="topic-metadata">

**Author:** [@Davidbarber](https://discourse.julialang.org/u/Davidbarber)\
**Replies:** 5\
**Last updated:** [June 11, 2024, 9:54am UTC](https://discourse.julialang.org/t/emptying-figures-in-makie/115425 "2024-06-11T09:54:55Z")

</div>

I have created a figure in GLMakie with an image and an IntervalSlider to adjust contrast. This works fine. If I empty the figure with empty!(fig) and then recreate the image plot object and the IntervalSlider plot objec…

---

## ["Diagonal coordinate system" for Julia arrays](https://discourse.julialang.org/t/diagonal-coordinate-system-for-julia-arrays/115447)

<div class="topic-metadata">

**Author:** [@oOosys](https://discourse.julialang.org/u/oOosys)\
**Replies:** 15\
**Last updated:** [June 11, 2024, 9:46am UTC](https://discourse.julialang.org/t/diagonal-coordinate-system-for-julia-arrays/115447 "2024-06-11T09:46:05Z")

</div>

I would like to be able to use a “diagonal coordinate system” to access array items the same way as with a “column/row system”. In other words I would like to access the elements using indices and slices which specify th…

---

## [Programmatically fixing variables with near-zero coefficients to zero in JuMP](https://discourse.julialang.org/t/programmatically-fixing-variables-with-near-zero-coefficients-to-zero-in-jump/115452)

<div class="topic-metadata">

**Author:** [@Shuvomoy\_Das\_Gupta](https://discourse.julialang.org/u/Shuvomoy_Das_Gupta)\
**Replies:** 6\
**Last updated:** [June 11, 2024, 8:32am UTC](https://discourse.julialang.org/t/programmatically-fixing-variables-with-near-zero-coefficients-to-zero-in-jump/115452 "2024-06-11T08:32:18Z")

</div>

In JuMP, is there a way to programmatically fix the variables, that have zero or near-zero multiplicative coefficients, to zero? A simple toy example (where it is very easy to compute the coefficients) that shows what I …

---

## [Python function cis.read\_data() equivalent in Julia](https://discourse.julialang.org/t/python-function-cis-read-data-equivalent-in-julia/115361)

<div class="topic-metadata">

**Author:** [@raman\_kumar](https://discourse.julialang.org/u/raman_kumar)\
**Replies:** 10\
**Last updated:** [June 11, 2024, 6:34am UTC](https://discourse.julialang.org/t/python-function-cis-read-data-equivalent-in-julia/115361 "2024-06-11T06:34:11Z")

</div>

I want to write Python function cis.read\_data() equivalent in Julia. def read\_data(data\_list, read\_function): """ Wrapper for calling an HDF reading function for each dataset, and then concatenating the result. …

---

## [Increasing the markersize of the legend](https://discourse.julialang.org/t/increasing-the-markersize-of-the-legend/81928)

<div class="topic-metadata">

**Author:** [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Replies:** 4\
**Last updated:** [June 11, 2024, 5:36am UTC](https://discourse.julialang.org/t/increasing-the-markersize-of-the-legend/81928 "2024-06-11T05:36:35Z")

</div>

In Makie, how do you increase the markersize of the legend, even though the markersize used in the plot is small? I have a scatter plot with many points so I set a small marker size. But the same markersize in the legen…

---

## [GTPSA.jl: A Julia interface to the new GTPSA library for fast, high-order automatic differentiation](https://discourse.julialang.org/t/gtpsa-jl-a-julia-interface-to-the-new-gtpsa-library-for-fast-high-order-automatic-differentiation/115370)

<div class="topic-metadata">

**Author:** [@mattsignorelli](https://discourse.julialang.org/u/mattsignorelli)\
**Replies:** 13\
**Last updated:** [June 11, 2024, 3:06am UTC](https://discourse.julialang.org/t/gtpsa-jl-a-julia-interface-to-the-new-gtpsa-library-for-fast-high-order-automatic-differentiation/115370 "2024-06-11T03:06:04Z")

</div>

GTPSA.jl is a new Julia package that provides a full-featured interface to the Generalised Truncated Power Series Algebra library for computing Taylor expansions, or Truncated Power Series (TPSs) of real and complex mult…

---

## [Mismatch in the cost function in MOSEK with Convex.jl](https://discourse.julialang.org/t/mismatch-in-the-cost-function-in-mosek-with-convex-jl/115374)

<div class="topic-metadata">

**Author:** [@CaG21](https://discourse.julialang.org/u/CaG21)\
**Replies:** 4\
**Last updated:** [June 11, 2024, 12:22am UTC](https://discourse.julialang.org/t/mismatch-in-the-cost-function-in-mosek-with-convex-jl/115374 "2024-06-11T00:22:02Z")

</div>

I am using Convex.jl and MOSEK to solve a mixed integer second-order cone programming problem. The cost function is encoded as minimize(-x + μ \* sum(abs.(v)) - a \* sum(γ)) where x (real value), v (real vector), and γ …

---

## [Batched matmul with einsum](https://discourse.julialang.org/t/batched-matmul-with-einsum/115448)

<div class="topic-metadata">

**Author:** [@smartalecH](https://discourse.julialang.org/u/smartalecH)\
**Replies:** 1\
**Last updated:** [June 11, 2024, 12:15am UTC](https://discourse.julialang.org/t/batched-matmul-with-einsum/115448 "2024-06-11T00:15:34Z")

</div>

I’m performing a batched matmul using Einsum. Is there a clean way to infer leading dimensions, like I can with numpy? For example, I’m currently doing this: @einsum C\[k, l, m, j\] = A\[i, j\] \* B\[k, l, m, j\] But it’d be…

---

## [FiniteDiff, ForwardDiff and Enzyme disagree: who is right?](https://discourse.julialang.org/t/finitediff-forwarddiff-and-enzyme-disagree-who-is-right/115441)

<div class="topic-metadata">

**Author:** [@jbrea](https://discourse.julialang.org/u/jbrea)\
**Replies:** 9\
**Last updated:** [June 10, 2024, 11:37pm UTC](https://discourse.julialang.org/t/finitediff-forwarddiff-and-enzyme-disagree-who-is-right/115441 "2024-06-10T23:37:36Z")

</div>

As mentioned in the title, FiniteDiff, ForwardDiff and Enzyme return different results for the following code. Any ideas what is going wrong and which partial derivatives are correct? using Pkg Pkg.activate(temp = true)…

---

## [Julia thinks inverse of a Hermitian matrix is not Hermitian](https://discourse.julialang.org/t/julia-thinks-inverse-of-a-hermitian-matrix-is-not-hermitian/115443)

<div class="topic-metadata">

**Author:** [@archisman](https://discourse.julialang.org/u/archisman)\
**Replies:** 4\
**Last updated:** [June 10, 2024, 8:51pm UTC](https://discourse.julialang.org/t/julia-thinks-inverse-of-a-hermitian-matrix-is-not-hermitian/115443 "2024-06-10T20:51:44Z")

</div>

Here is my code: using LinearAlgebra a = randn(50,50); a = (a+a')/2; println(ishermitian(a)) println(ishermitian(inv(a))) The output is True False However, the inverse of a Hermitian matrix is supposed to be Hermiti…

---

## [Getting Starred Talks from JuliaCon's Pretalx Agenda into Your Calendar!](https://discourse.julialang.org/t/getting-starred-talks-from-juliacons-pretalx-agenda-into-your-calendar/102071)

<div class="topic-metadata">

**Author:** [@jmair](https://discourse.julialang.org/u/jmair)\
**Replies:** 1\
**Last updated:** [June 10, 2024, 8:41pm UTC](https://discourse.julialang.org/t/getting-starred-talks-from-juliacons-pretalx-agenda-into-your-calendar/102071 "2024-06-10T20:41:13Z")

</div>

Since I couldn’t find an obvious way to download all the talks I had favourited, I wrote a quick script to download just the talks that I had starred on the JuliaCon schedule website. As this might be helpful to others, …

---

## [Augmenting positional labels with their corresponding images for training](https://discourse.julialang.org/t/augmenting-positional-labels-with-their-corresponding-images-for-training/115444)

<div class="topic-metadata">

**Author:** [@mward19](https://discourse.julialang.org/u/mward19)\
**Replies:** 0\
**Last updated:** [June 10, 2024, 8:18pm UTC](https://discourse.julialang.org/t/augmenting-positional-labels-with-their-corresponding-images-for-training/115444 "2024-06-10T20:18:39Z")

</div>

I have used Augmentor.jl to perform data augmentation in the past, and it’s a great package. Recently I have been working with image data whose labels are coordinates (i.e., each label is an (x, y) coordinate specifying …

---

## [How to avoid memory blow up with FFT without expensive garbage collection?](https://discourse.julialang.org/t/how-to-avoid-memory-blow-up-with-fft-without-expensive-garbage-collection/115400)

<div class="topic-metadata">

**Author:** [@singularity](https://discourse.julialang.org/u/singularity)\
**Replies:** 3\
**Last updated:** [June 10, 2024, 7:55pm UTC](https://discourse.julialang.org/t/how-to-avoid-memory-blow-up-with-fft-without-expensive-garbage-collection/115400 "2024-06-10T19:55:33Z")

</div>

I am trying to write a code that has a for loop inside which an array is broken into chunks, sent to multiple processors, and FFT is performed on those chunks. Without using garbage collection GC.gc() command at the end …

---

## [I cant understand the equations written in trixi](https://discourse.julialang.org/t/i-cant-understand-the-equations-written-in-trixi/115376)

<div class="topic-metadata">

**Author:** [@Chowdhury\_MD\_Irtiza](https://discourse.julialang.org/u/Chowdhury_MD_Irtiza)\
**Replies:** 12\
**Last updated:** [June 10, 2024, 6:43pm UTC](https://discourse.julialang.org/t/i-cant-understand-the-equations-written-in-trixi/115376 "2024-06-10T18:43:29Z")

</div>

Hello, my professor gave me a problem to solve, and in order to solve the problem, I have to modify the compressible navier-strokes equation 2D that already in trixi documentation into fully compressible reactive unstead…

---

## [Union type constructor question](https://discourse.julialang.org/t/union-type-constructor-question/115433)

<div class="topic-metadata">

**Author:** [@slwu89](https://discourse.julialang.org/u/slwu89)\
**Replies:** 3\
**Last updated:** [June 10, 2024, 4:34pm UTC](https://discourse.julialang.org/t/union-type-constructor-question/115433 "2024-06-10T16:34:35Z")

</div>

Can someone help explain to me why the first line produces an error but the second works? On v1.10.3, thanks! julia\> Union{Int,Symbol}(5) ERROR: MethodError: no method matching Union{Int64, Symbol}(::Int64) Stacktrace: …

---

## [GSOC Periodic Orbits](https://discourse.julialang.org/t/gsoc-periodic-orbits/115440)

<div class="topic-metadata">

**Author:** [@JonasKoziorek](https://discourse.julialang.org/u/JonasKoziorek)\
**Replies:** 0\
**Last updated:** [June 10, 2024, 4:27pm UTC](https://discourse.julialang.org/t/gsoc-periodic-orbits/115440 "2024-06-10T16:27:04Z")

</div>

Hi community! My name is Jonas Koziorek and I am one of the Google summer of code (GSOC) contributors for the Julia Language organization this year. I am contributing to DynamicalSystems.jl under guidance of my mentor G…

---

## [How to read a static array of a composite type](https://discourse.julialang.org/t/how-to-read-a-static-array-of-a-composite-type/115436)

<div class="topic-metadata">

**Author:** [@s153283](https://discourse.julialang.org/u/s153283)\
**Replies:** 0\
**Last updated:** [June 10, 2024, 3:54pm UTC](https://discourse.julialang.org/t/how-to-read-a-static-array-of-a-composite-type/115436 "2024-06-10T15:54:55Z")

</div>

I am trying to read arrays of composite types from some binary files using static arrays. I get into some issues reading the data because the sizeof the composite type is not equal to the sizeof the fields summed. Here i…

---

## [Density and histograms](https://discourse.julialang.org/t/density-and-histograms/115394)

<div class="topic-metadata">

**Author:** [@LoneWolf1304](https://discourse.julialang.org/u/LoneWolf1304)\
**Replies:** 5\
**Last updated:** [June 10, 2024, 3:49pm UTC](https://discourse.julialang.org/t/density-and-histograms/115394 "2024-06-10T15:49:55Z")

</div>

I am using Julia for plotting the density of a data using density(). I wanted to know if there is any way to obtain the data points of the density(), like the values that is plotted by density(). I can obtain the histogr…

---

## [Julia PyPlot updating vector fields](https://discourse.julialang.org/t/julia-pyplot-updating-vector-fields/115431)

<div class="topic-metadata">

**Author:** [@rzhou-space](https://discourse.julialang.org/u/rzhou-space)\
**Replies:** 0\
**Last updated:** [June 10, 2024, 2:49pm UTC](https://discourse.julialang.org/t/julia-pyplot-updating-vector-fields/115431 "2024-06-10T14:49:22Z")

</div>

Hi all, i am new to Julia and trying to plot a dynamic vector field generated by PIV analysis. I tried to achieve by ploting the vector fields in a for loop and at each step clear the old vector field and replace it wit…

---

## [Reparametrization trick in Flux.jl](https://discourse.julialang.org/t/reparametrization-trick-in-flux-jl/100489)

<div class="topic-metadata">

**Author:** [@josemanuel22](https://discourse.julialang.org/u/josemanuel22)\
**Replies:** 8\
**Last updated:** [June 10, 2024, 2:16pm UTC](https://discourse.julialang.org/t/reparametrization-trick-in-flux-jl/100489 "2024-06-10T14:16:38Z")

</div>

Does Flux.jl have an equivalent to rsample in PyTorch that automatically implements these stochastic/policy gradients. That way the reparameterized sample becomes differentiable.

---

## [Query regarding namespaces when adding a method using a macro](https://discourse.julialang.org/t/query-regarding-namespaces-when-adding-a-method-using-a-macro/115392)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 4\
**Last updated:** [June 10, 2024, 2:07pm UTC](https://discourse.julialang.org/t/query-regarding-namespaces-when-adding-a-method-using-a-macro/115392 "2024-06-10T14:07:24Z")

</div>

I am confused about how namespaces are being applied in the following code, and would appreciate some help. module A using LinearAlgebra abstract type AbsType end struct SubType \<: AbsType end macro newmethod() quo…

---

## [Why is Julia allocating when accessing these structs?](https://discourse.julialang.org/t/why-is-julia-allocating-when-accessing-these-structs/89905)

<div class="topic-metadata">

**Author:** [@dellagd](https://discourse.julialang.org/u/dellagd)\
**Replies:** 18\
**Last updated:** [June 10, 2024, 2:05pm UTC](https://discourse.julialang.org/t/why-is-julia-allocating-when-accessing-these-structs/89905 "2024-06-10T14:05:05Z")

</div>

Been struggling to figure out why accesses to these struct fields are causing memory allocations. Here is my test code: module AllocationsTest struct SubStruct a::Float64 b::Float64 end struct AllocationsStruc…

---

## [A Modification of the LLL Reduction Algorithm](https://discourse.julialang.org/t/a-modification-of-the-lll-reduction-algorithm/115422)

<div class="topic-metadata">

**Author:** [@adam\_doo](https://discourse.julialang.org/u/adam_doo)\
**Replies:** 0\
**Last updated:** [June 10, 2024, 12:22pm UTC](https://discourse.julialang.org/t/a-modification-of-the-lll-reduction-algorithm/115422 "2024-06-10T12:22:04Z")

</div>

This question shows research effort; it is useful and clear -1 Am looking at an implementation of the A Modification of the LLL Reduction Algorithm by M Pohst. Anyone know ? https://www.researchgate.net/publication/22…

---

## [Efficient operations on vectors of static things](https://discourse.julialang.org/t/efficient-operations-on-vectors-of-static-things/115387)

<div class="topic-metadata">

**Author:** [@ddcampayo](https://discourse.julialang.org/u/ddcampayo)\
**Replies:** 12\
**Last updated:** [June 10, 2024, 11:27am UTC](https://discourse.julialang.org/t/efficient-operations-on-vectors-of-static-things/115387 "2024-06-10T11:27:36Z")

</div>

Hello. I am (still) trying to make sense on how to efficiently traverse a vector containing static vectors and matrices and doing operations on them. This is in the context of molecular dynamics, where I have N particle…

---

## [Using JupyterLab](https://discourse.julialang.org/t/using-jupyterlab/20595)

<div class="topic-metadata">

**Author:** [@yordiak](https://discourse.julialang.org/u/yordiak)\
**Replies:** 11\
**Last updated:** [June 10, 2024, 9:51am UTC](https://discourse.julialang.org/t/using-jupyterlab/20595 "2024-06-10T09:51:47Z")

</div>

Hello, Since I am a newbie in Julia, I would appreciated if you could provide me the steps on who to make Julia to work in Jupyterlab. I am running julia 1.1.0 on win10. I use winpython as my python (v3.6) distribution…

---

## [Scalar Indexing with CUDA](https://discourse.julialang.org/t/scalar-indexing-with-cuda/115379)

<div class="topic-metadata">

**Author:** [@Jason\_Meziere](https://discourse.julialang.org/u/Jason_Meziere)\
**Replies:** 4\
**Last updated:** [June 10, 2024, 8:04am UTC](https://discourse.julialang.org/t/scalar-indexing-with-cuda/115379 "2024-06-10T08:04:01Z")

</div>

I have a portion of my code that I haven’t quite figured out how to do without scalar indexing. I was messing around in the repl and noticed that, while something like a\[1\]=1 will give the scalar indexing warning, some…

---

## [Best/simplest way to calculate sparse Hessian](https://discourse.julialang.org/t/best-simplest-way-to-calculate-sparse-hessian/58629)

<div class="topic-metadata">

**Author:** [@ElOceanografo](https://discourse.julialang.org/u/ElOceanografo)\
**Replies:** 4\
**Last updated:** [June 10, 2024, 7:01am UTC](https://discourse.julialang.org/t/best-simplest-way-to-calculate-sparse-hessian/58629 "2024-06-10T07:01:34Z")

</div>

I’ve got a log-probability density function of multiple variables, and would like to integrate it using a Laplace approximation. To do this I need to find the function’s maximum and calculate the Hessian at that point. …

---

## [Writing an equivalent Julia mutable struct that have similar functionality of a Python class](https://discourse.julialang.org/t/writing-an-equivalent-julia-mutable-struct-that-have-similar-functionality-of-a-python-class/115406)

<div class="topic-metadata">

**Author:** [@Shuvomoy\_Das\_Gupta](https://discourse.julialang.org/u/Shuvomoy_Das_Gupta)\
**Replies:** 4\
**Last updated:** [June 10, 2024, 5:10am UTC](https://discourse.julialang.org/t/writing-an-equivalent-julia-mutable-struct-that-have-similar-functionality-of-a-python-class/115406 "2024-06-10T05:10:25Z")

</div>

I have the following Python class with a class counter and self-referential assignment as follows: class Foo(object): counter = 0 # a class attributeinitialized to 0 that is shared across all instances of the clas…

---

## [Question about PKG](https://discourse.julialang.org/t/question-about-pkg/115393)

<div class="topic-metadata">

**Author:** [@abcde](https://discourse.julialang.org/u/abcde)\
**Replies:** 1\
**Last updated:** [June 9, 2024, 3:06pm UTC](https://discourse.julialang.org/t/question-about-pkg/115393 "2024-06-09T15:06:40Z")

</div>

Why can’t I install these Pkg? thank you！

---

## [How to get help with plot parameters](https://discourse.julialang.org/t/how-to-get-help-with-plot-parameters/115357)

<div class="topic-metadata">

**Author:** [@VinodV](https://discourse.julialang.org/u/VinodV)\
**Replies:** 2\
**Last updated:** [June 10, 2024, 1:15am UTC](https://discourse.julialang.org/t/how-to-get-help-with-plot-parameters/115357 "2024-06-10T01:15:37Z")

</div>

using Plots x = \[2\] scalars = \[-2 1 2\] vals = \[0 0 0; x \* scalars\] labels= \[(-3.6, -4.2, "-2x"), (2.4, 1.8, "x"), (4.4, 3.8, "2x")\] plot(vals, vals, arrow= true, color= \[:red :red :blue\], legend = :none, xlims = (-5,…

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

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