# Latest

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

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

**Page:** 599

---

## [Serialization error when using \`MPI.gather\`](https://discourse.julialang.org/t/serialization-error-when-using-mpi-gather/103802)

<div class="topic-metadata">

**Author:** [@pat-alt](https://discourse.julialang.org/u/pat-alt)\
**Replies:** 5\
**Last updated:** [September 14, 2023, 5:04am UTC](https://discourse.julialang.org/t/serialization-error-when-using-mpi-gather/103802 "2023-09-14T05:04:12Z")

</div>

Hi there, I’ve recently added support for multi-threading to CounterfactualExplanations.jl. This has been my first time using MPI so there are probably many things that can be improved here (any thoughts very much welco…

---

## [TimesDates.jl dev for v2](https://discourse.julialang.org/t/timesdates-jl-dev-for-v2/78377)

<div class="topic-metadata">

**Author:** [@JeffreySarnoff](https://discourse.julialang.org/u/JeffreySarnoff)\
**Replies:** 44\
**Last updated:** [September 14, 2023, 3:50am UTC](https://discourse.julialang.org/t/timesdates-jl-dev-for-v2/78377 "2023-09-14T03:50:59Z")

</div>

I am working on a new version of TimesDates.jl using advancements that have become part of the Dates stdlib to simplify the implementation. Some of these improvements are accessible through non-exported specific element…

---

## [Oscar and DynamicaPolynomials: Convert polynomial type for basis of invariant rings](https://discourse.julialang.org/t/oscar-and-dynamicapolynomials-convert-polynomial-type-for-basis-of-invariant-rings/102422)

<div class="topic-metadata">

**Author:** [@ilovemath](https://discourse.julialang.org/u/ilovemath)\
**Replies:** 6\
**Last updated:** [September 14, 2023, 2:57am UTC](https://discourse.julialang.org/t/oscar-and-dynamicapolynomials-convert-polynomial-type-for-basis-of-invariant-rings/102422 "2023-09-14T02:57:48Z")

</div>

I would like to know if there is a way to convert a type nf\_elem to a polynomial. My goal with this code is to find all minimal monomials of degree d that obey a rotational symmetry, so I can directly construct a polyno…

---

## [BilevelJump with mode=BilevelJuMP.BigMMode or mode=BilevelJuMP.FortunyAmatMcCarlMode](https://discourse.julialang.org/t/bileveljump-with-mode-bileveljump-bigmmode-or-mode-bileveljump-fortunyamatmccarlmode/103806)

<div class="topic-metadata">

**Author:** [@martina.gherardi](https://discourse.julialang.org/u/martina.gherardi)\
**Replies:** 2\
**Last updated:** [September 14, 2023, 2:26am UTC](https://discourse.julialang.org/t/bileveljump-with-mode-bileveljump-bigmmode-or-mode-bileveljump-fortunyamatmccarlmode/103806 "2023-09-14T02:26:10Z")

</div>

Hi, I would like to ask 2 questions about the reformulation of the complementary slackness with Fortuny-Amat and McCarl done by BilevelJump with the following setting mode=BilevelJuMP.BigMMode(; with\_slack = false, pri…

---

## [New Iterator from Nested Iterators](https://discourse.julialang.org/t/new-iterator-from-nested-iterators/103377)

<div class="topic-metadata">

**Author:** [@bmit](https://discourse.julialang.org/u/bmit)\
**Replies:** 19\
**Last updated:** [September 14, 2023, 12:51am UTC](https://discourse.julialang.org/t/new-iterator-from-nested-iterators/103377 "2023-09-14T00:51:41Z")

</div>

Is there any shortcut to create a new iterator from existing nested iterators? I know I can manually define a new type, length, iterate, and eltype, but I’m wondering if there’s a more direct way. Below is a MWE of a ge…

---

## [LLama2-7b difference in inference when between Float16 and Float32](https://discourse.julialang.org/t/llama2-7b-difference-in-inference-when-between-float16-and-float32/103826)

<div class="topic-metadata">

**Author:** [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Replies:** 1\
**Last updated:** [September 13, 2023, 10:58pm UTC](https://discourse.julialang.org/t/llama2-7b-difference-in-inference-when-between-float16-and-float32/103826 "2023-09-13T22:58:11Z")

</div>

Hello, I want to present the results of one more tests I wanted to do. I have noticed that llama2-7b gives weird (read incorrect) results when used with Float16. I have set-up a small test demostrating the behavior to n…

---

## [Curious about copying a model that has had constraints deleted](https://discourse.julialang.org/t/curious-about-copying-a-model-that-has-had-constraints-deleted/103814)

<div class="topic-metadata">

**Author:** [@hdavid16](https://discourse.julialang.org/u/hdavid16)\
**Replies:** 1\
**Last updated:** [September 13, 2023, 9:44pm UTC](https://discourse.julialang.org/t/curious-about-copying-a-model-that-has-had-constraints-deleted/103814 "2023-09-13T21:44:21Z")

</div>

Here is an interesting scenario. I’m playing around with how copy works in JuMP. #make dummy model m=Model(); @variable(m,x); c1=@constraint(m,x\<=10); c2=@constraint(m,x\<=100); delete(m,c1) delete(m,c2) #readd c…

---

## [How to speed the function H in this code? (Hausdorff Chirality Measurement)](https://discourse.julialang.org/t/how-to-speed-the-function-h-in-this-code-hausdorff-chirality-measurement/103831)

<div class="topic-metadata">

**Author:** [@Luis\_Manuel\_Espinoza](https://discourse.julialang.org/u/Luis_Manuel_Espinoza)\
**Replies:** 5\
**Last updated:** [September 13, 2023, 9:43pm UTC](https://discourse.julialang.org/t/how-to-speed-the-function-h-in-this-code-hausdorff-chirality-measurement/103831 "2023-09-13T21:43:03Z")

</div>

Luis\_Manuel\_Espinoza 1m I am trying to do the Hausdorff Chirality Measurement from the article by Andrzej B. Buda and Kurt Mislow\* but as I thought it is taking too long because to obtain a reliable value, I need to ta…

---

## [Lifting functions with multiple return values](https://discourse.julialang.org/t/lifting-functions-with-multiple-return-values/103821)

<div class="topic-metadata">

**Author:** [@mschauer](https://discourse.julialang.org/u/mschauer)\
**Replies:** 1\
**Last updated:** [September 13, 2023, 9:33pm UTC](https://discourse.julialang.org/t/lifting-functions-with-multiple-return-values/103821 "2023-09-13T21:33:46Z")

</div>

I want to lift a function with multiple return values such that each return value is an observable. Below is an example which makes an observable pair, instead, as I wish, a pair of observables. julia\> z = Observable(3 …

---

## [Tips for improving performance of NODEs with sparsely sampled time series?](https://discourse.julialang.org/t/tips-for-improving-performance-of-nodes-with-sparsely-sampled-time-series/103828)

<div class="topic-metadata">

**Author:** [@jarroyoe](https://discourse.julialang.org/u/jarroyoe)\
**Replies:** 1\
**Last updated:** [September 13, 2023, 8:46pm UTC](https://discourse.julialang.org/t/tips-for-improving-performance-of-nodes-with-sparsely-sampled-time-series/103828 "2023-09-13T20:46:41Z")

</div>

I have a synthetic time series coming from a model with a daily time scale. The real dynamics closely follow a sine function, but I’m trying to sample at a monthly time scale (every 30 time steps). A sample time series l…

---

## [Is it possible to solve pdes using neuralpde.jl that involve interpolated function](https://discourse.julialang.org/t/is-it-possible-to-solve-pdes-using-neuralpde-jl-that-involve-interpolated-function/103820)

<div class="topic-metadata">

**Author:** [@Shashank](https://discourse.julialang.org/u/Shashank)\
**Replies:** 6\
**Last updated:** [September 13, 2023, 8:45pm UTC](https://discourse.julialang.org/t/is-it-possible-to-solve-pdes-using-neuralpde-jl-that-involve-interpolated-function/103820 "2023-09-13T20:45:18Z")

</div>

I am trying to solve a differential equation of the form dy(t)/dt = -y(t) f(t), but I do not know the function f(t). I generate f(t) by interpolating values from a data file. In that case, neuralpde.jl fails. Is it possi…

---

## [How to plot a 3D contour surface with Makie](https://discourse.julialang.org/t/how-to-plot-a-3d-contour-surface-with-makie/103822)

<div class="topic-metadata">

**Author:** [@yhchang96](https://discourse.julialang.org/u/yhchang96)\
**Replies:** 2\
**Last updated:** [September 13, 2023, 8:31pm UTC](https://discourse.julialang.org/t/how-to-plot-a-3d-contour-surface-with-makie/103822 "2023-09-13T20:31:58Z")

</div>

Suppose I want to plot the solution to the equation -x^3+r\*x+h=0 in 3D, with r and h on the X-Y plane, and x as the z-axis to demonstrate the cusp catastrophe in bifurcation. In Mathematica, I have something like this: …

---

## [Gradient of llama2 computed by Zygote seems to be incorrect](https://discourse.julialang.org/t/gradient-of-llama2-computed-by-zygote-seems-to-be-incorrect/103810)

<div class="topic-metadata">

**Author:** [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Replies:** 6\
**Last updated:** [September 13, 2023, 7:35pm UTC](https://discourse.julialang.org/t/gradient-of-llama2-computed-by-zygote-seems-to-be-incorrect/103810 "2023-09-13T19:35:49Z")

</div>

Hi, I have tested gradient of llama2-7b model with respect its input and it gives me wrong results (tested only on GPU). I have created a MWE as follows using ProfileSummarizer using Transformers using Flux using TextE…

---

## [Log whenever a method is compiled](https://discourse.julialang.org/t/log-whenever-a-method-is-compiled/103823)

<div class="topic-metadata">

**Author:** [@taotree](https://discourse.julialang.org/u/taotree)\
**Replies:** 3\
**Last updated:** [September 13, 2023, 7:25pm UTC](https://discourse.julialang.org/t/log-whenever-a-method-is-compiled/103823 "2023-09-13T19:25:59Z")

</div>

When I run certain code with @time, it’s showing that most of the time is in compilation. It happens every time even though the code hasn’t changed. Usually, it compiles code the first time, and subsequent runs use that.…

---

## [The nature of pipes](https://discourse.julialang.org/t/the-nature-of-pipes/103808)

<div class="topic-metadata">

**Author:** [@ShalokShalom](https://discourse.julialang.org/u/ShalokShalom)\
**Replies:** 25\
**Last updated:** [September 13, 2023, 6:50pm UTC](https://discourse.julialang.org/t/the-nature-of-pipes/103808 "2023-09-13T18:50:11Z")

</div>

Could I somehow pipe the output of addition to subtraction: addition(x, y) = x + y subtraction(a, b) = a - b function calculation() addition(10, 2) subtraction(12) end calculation() I am used to this kind …

---

## [Keep track of order of graph edges when iterating over them](https://discourse.julialang.org/t/keep-track-of-order-of-graph-edges-when-iterating-over-them/103759)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 11\
**Last updated:** [September 13, 2023, 6:39pm UTC](https://discourse.julialang.org/t/keep-track-of-order-of-graph-edges-when-iterating-over-them/103759 "2023-09-13T18:39:40Z")

</div>

I have a piece of code where I might want to convert Graphs to DiGraphs. However, I need to keep track of where the edges are (so that for the edge connecting vertices 1 and 2 in the original graph, I know where 1 =\> 2 a…

---

## [Poll Memory Utilization](https://discourse.julialang.org/t/poll-memory-utilization/103815)

<div class="topic-metadata">

**Author:** [@mrufsvold](https://discourse.julialang.org/u/mrufsvold)\
**Replies:** 3\
**Last updated:** [September 13, 2023, 4:48pm UTC](https://discourse.julialang.org/t/poll-memory-utilization/103815 "2023-09-13T16:48:34Z")

</div>

Is there a way for me to poll system memory utilization? I am working in an AWS container that will crash out if I allocate more than my allotted memory (no swap), so I’m hoping to add some throttles to my pipeline if I …

---

## [Determining source of failure to precompile when using PrecompileTools](https://discourse.julialang.org/t/determining-source-of-failure-to-precompile-when-using-precompiletools/103705)

<div class="topic-metadata">

**Author:** [@pluie](https://discourse.julialang.org/u/pluie)\
**Replies:** 15\
**Last updated:** [September 13, 2023, 4:42pm UTC](https://discourse.julialang.org/t/determining-source-of-failure-to-precompile-when-using-precompiletools/103705 "2023-09-13T16:42:32Z")

</div>

I have a module as defined below. module MyModule using PrecompileTools export TV @compile\_workload begin include("foo.jl") #Defines TV end end When I run using MyModule, I have printouts that indicate that t…

---

## [Comparing time series with lead/lag tolerances](https://discourse.julialang.org/t/comparing-time-series-with-lead-lag-tolerances/99227)

<div class="topic-metadata">

**Author:** [@airpmb](https://discourse.julialang.org/u/airpmb)\
**Replies:** 2\
**Last updated:** [September 13, 2023, 2:55pm UTC](https://discourse.julialang.org/t/comparing-time-series-with-lead-lag-tolerances/99227 "2023-09-13T14:55:41Z")

</div>

Is anyone aware of a Julia package that implements testing of time series output against baselines? By this I mean that I’d like to be able to compare simulation outputs over time against some “truth model” equivalent o…

---

## [Why doesn't \`x \< zero(x)\` for an unsigned integer lead to dead-code elimination?](https://discourse.julialang.org/t/why-doesnt-x-zero-x-for-an-unsigned-integer-lead-to-dead-code-elimination/103752)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 7\
**Last updated:** [September 13, 2023, 2:53pm UTC](https://discourse.julialang.org/t/why-doesnt-x-zero-x-for-an-unsigned-integer-lead-to-dead-code-elimination/103752 "2023-09-13T14:53:44Z")

</div>

julia\> isnegative(x) = x \< zero(x) isnegative (generic function with 1 method) julia\> @code\_typed isnegative(UInt(2)) CodeInfo( 1 ─ %1 = Base.ult\_int(x, 0x0000000000000000)::Bool └── return %1 ) =\> Bool I would ha…

---

## [In-place assignment, without allocation](https://discourse.julialang.org/t/in-place-assignment-without-allocation/103811)

<div class="topic-metadata">

**Author:** [@user664303](https://discourse.julialang.org/u/user664303)\
**Replies:** 8\
**Last updated:** [September 13, 2023, 1:17pm UTC](https://discourse.julialang.org/t/in-place-assignment-without-allocation/103811 "2023-09-13T13:17:45Z")

</div>

I’m trying to do y = x\[ind\] in-place, where y, x, ind are all vectors. By in-place, I mean no memory is allocated. I’m able to achieve this using a hand-written for loop (assign2! below). I suspect there is a way to achi…

---

## [Argument confusion when calling macro with semicolon parameter syntax](https://discourse.julialang.org/t/argument-confusion-when-calling-macro-with-semicolon-parameter-syntax/103716)

<div class="topic-metadata">

**Author:** [@hhaensel](https://discourse.julialang.org/u/hhaensel)\
**Replies:** 7\
**Last updated:** [September 13, 2023, 8:04am UTC](https://discourse.julialang.org/t/argument-confusion-when-calling-macro-with-semicolon-parameter-syntax/103716 "2023-09-13T08:04:07Z")

</div>

Applying semicolon parameter syntax generates a surprising order of expressions; parameters go in the first place, followed by the expected order of arguments julia\> macro m1(expressions...) @show expression…

---

## [Outer product & broadcast?](https://discourse.julialang.org/t/outer-product-broadcast/103731)

<div class="topic-metadata">

**Author:** [@ryofurue](https://discourse.julialang.org/u/ryofurue)\
**Replies:** 8\
**Last updated:** [September 13, 2023, 7:24am UTC](https://discourse.julialang.org/t/outer-product-broadcast/103731 "2023-09-13T07:24:41Z")

</div>

I often need gridded versions of continuous functions. For a function with one argument, the usual broad cast is the most elegant way: oned(x) = 2\*x # 1D func xs = 0.0:1.0:10.0 # x grid oned\_gridded = oned.(xs) This …

---

## [Failed to precompile OMEinsum](https://discourse.julialang.org/t/failed-to-precompile-omeinsum/103728)

<div class="topic-metadata">

**Author:** [@mzd1893](https://discourse.julialang.org/u/mzd1893)\
**Replies:** 5\
**Last updated:** [September 13, 2023, 6:44am UTC](https://discourse.julialang.org/t/failed-to-precompile-omeinsum/103728 "2023-09-13T06:44:16Z")

</div>

There is something wrong when I am using OMEinsum, under Julia version 1.9.2. What’s the reason and how can I fix this? Here are the error report: julia\> using OMEinsum \[ Info: Precompiling OMEinsum \[ebe7aa44-baf0-506c-…

---

## [Outer constructor not getting called despite being in stack trace?](https://discourse.julialang.org/t/outer-constructor-not-getting-called-despite-being-in-stack-trace/103801)

<div class="topic-metadata">

**Author:** [@deaminase](https://discourse.julialang.org/u/deaminase)\
**Replies:** 3\
**Last updated:** [September 13, 2023, 6:42am UTC](https://discourse.julialang.org/t/outer-constructor-not-getting-called-despite-being-in-stack-trace/103801 "2023-09-13T06:42:50Z")

</div>

Somehow Julia’s constructors manage to consistently confuse me. Here is a pared-down example of what I’m trying and failing to do: const Optional{T} = Union{Some{T}, Nothing} struct State{InpIterState,Input} full\_inp…

---

## [VScode with custom DEPOT\_PATH](https://discourse.julialang.org/t/vscode-with-custom-depot-path/101909)

<div class="topic-metadata">

**Author:** [@discourserogu](https://discourse.julialang.org/u/discourserogu)\
**Replies:** 2\
**Last updated:** [September 13, 2023, 6:07am UTC](https://discourse.julialang.org/t/vscode-with-custom-depot-path/101909 "2023-09-13T06:07:59Z")

</div>

I’m trying to get Julia to work in VScode with a custom DEPOT\_PATH, I know for general execution you could use JULIA\_DEPOT\_PATH=\\path\\to\\dir julia and it would work. How do I accomplish the same for working with VScode…

---

## [Most performant way of updating vector values?](https://discourse.julialang.org/t/most-performant-way-of-updating-vector-values/103753)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 9\
**Last updated:** [September 13, 2023, 5:39am UTC](https://discourse.julialang.org/t/most-performant-way-of-updating-vector-values/103753 "2023-09-13T05:39:56Z")

</div>

Several times in my code, I will update the values of a vector. I want to avoid allocations and other stuff, and make it as performant as possible. At the beginning the vector is preallocated with n dummy values, and the…

---

## [FFT convolution heat equation](https://discourse.julialang.org/t/fft-convolution-heat-equation/103681)

<div class="topic-metadata">

**Author:** [@mleprovost](https://discourse.julialang.org/u/mleprovost)\
**Replies:** 7\
**Last updated:** [September 13, 2023, 5:32am UTC](https://discourse.julialang.org/t/fft-convolution-heat-equation/103681 "2023-09-13T05:32:51Z")

</div>

Hello, I am looking at the heat equation \\partial\_t u(x,t) = \\alpha \\partial^2\_{x} u(x,t) on \\mathbb{R} with initial condition u(x,0) = f(x) The analytical solution is given by u(x,t) = G \\star f, where G(x,t) = \\frac{…

---

## [\`eigen\` does not support keyword argumwnt \`permute\` for BigFloat matrix](https://discourse.julialang.org/t/eigen-does-not-support-keyword-argumwnt-permute-for-bigfloat-matrix/103798)

<div class="topic-metadata">

**Author:** [@frankwswang](https://discourse.julialang.org/u/frankwswang)\
**Replies:** 4\
**Last updated:** [September 13, 2023, 3:26am UTC](https://discourse.julialang.org/t/eigen-does-not-support-keyword-argumwnt-permute-for-bigfloat-matrix/103798 "2023-09-13T03:26:43Z")

</div>

MWE: julia\> using LinearAlgebra julia\> m = rand(3,3) .|\> big |\> Hermitian; julia\> using GenericLinearAlgebra julia\> eigen(m); julia\> eigen(m, permute=false); ERROR: MethodError: no method matching eigen(::Hermitian{…

---

## [Julians, are you interested in making a StarCraft 2 bot in Julia?](https://discourse.julialang.org/t/julians-are-you-interested-in-making-a-starcraft-2-bot-in-julia/103767)

<div class="topic-metadata">

**Author:** [@Tarny\_GG\_Channie](https://discourse.julialang.org/u/Tarny_GG_Channie)\
**Replies:** 3\
**Last updated:** [September 12, 2023, 11:15pm UTC](https://discourse.julialang.org/t/julians-are-you-interested-in-making-a-starcraft-2-bot-in-julia/103767 "2023-09-12T23:15:05Z")

</div>

Making a Starcraft 2 bot in Julia requires an API to interface with the game. APIs already exist in multiple languages, but there currently is no Julia API. Would anyone in the Julia community be interested in developing…

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

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