# Latest

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

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

**Page:** 820

---

## [Zygote InexactError using repeat() with inner keyword](https://discourse.julialang.org/t/zygote-inexacterror-using-repeat-with-inner-keyword/92600)

<div class="topic-metadata">

**Author:** [@phK3](https://discourse.julialang.org/u/phK3)\
**Replies:** 3\
**Last updated:** [January 6, 2023, 3:01pm UTC](https://discourse.julialang.org/t/zygote-inexacterror-using-repeat-with-inner-keyword/92600 "2023-01-06T15:01:51Z")

</div>

The following function throws InexactError: Int64(2.0794415416798357): function get\_error(G, E, x) n, m = size(G) Ê = repeat(E, inner=(1, m)) Ĝ = repeat(G, inner=(1, m)) return Ĝ \* prod(x.^Ê, dims=1)…

---

## [How to solve a partial derivative equation (Navier-Stokes)](https://discourse.julialang.org/t/how-to-solve-a-partial-derivative-equation-navier-stokes/92605)

<div class="topic-metadata">

**Author:** [@Islam\_ZERROUGUI](https://discourse.julialang.org/u/Islam_ZERROUGUI)\
**Replies:** 3\
**Last updated:** [January 6, 2023, 2:59pm UTC](https://discourse.julialang.org/t/how-to-solve-a-partial-derivative-equation-navier-stokes/92605 "2023-01-06T14:59:57Z")

</div>

Hi everyone, I ended up with the following equation, and I want to solve it for the pressure (P) and saturation (s). The two variables are in two dimensions rectangular form with a length of 1 cm and a width of 2cm.

---

## [3D wireframe diagrams?](https://discourse.julialang.org/t/3d-wireframe-diagrams/47918)

<div class="topic-metadata">

**Author:** [@amca01](https://discourse.julialang.org/u/amca01)\
**Replies:** 8\
**Last updated:** [January 6, 2023, 2:25pm UTC](https://discourse.julialang.org/t/3d-wireframe-diagrams/47918 "2023-01-06T14:25:43Z")

</div>

Hello, I’m wanting a Julia package that will enable me to draw a wireframe diagram - just points in space joined by lines - and move it around to view it from different angles or perspectives. I do most of my work in Ju…

---

## [What is the recommended way to debug \`using\` latency issues?](https://discourse.julialang.org/t/what-is-the-recommended-way-to-debug-using-latency-issues/92561)

<div class="topic-metadata">

**Author:** [@ranocha](https://discourse.julialang.org/u/ranocha)\
**Replies:** 3\
**Last updated:** [January 6, 2023, 2:19pm UTC](https://discourse.julialang.org/t/what-is-the-recommended-way-to-debug-using-latency-issues/92561 "2023-01-06T14:19:01Z")

</div>

I wonder if anybody has good recommendations for debugging the latency of using statements. The new @time\_imports already helps quite a lot but I haven’t found a workflow I really like. Here is an example of what I mean: …

---

## [The mutation function changes all the values in a dictionary](https://discourse.julialang.org/t/the-mutation-function-changes-all-the-values-in-a-dictionary/92602)

<div class="topic-metadata">

**Author:** [@fordonez](https://discourse.julialang.org/u/fordonez)\
**Replies:** 3\
**Last updated:** [January 6, 2023, 1:50pm UTC](https://discourse.julialang.org/t/the-mutation-function-changes-all-the-values-in-a-dictionary/92602 "2023-01-06T13:50:46Z")

</div>

Hi everyone. I am using a mutate function that changes the value of an array and then I save the array to a dictionary. The problem is that the function changes all the values saved in the dictionary. a = Dict() b = o…

---

## [Counting the number of paragraphs ("p") between containers ("div")](https://discourse.julialang.org/t/counting-the-number-of-paragraphs-p-between-containers-div/92576)

<div class="topic-metadata">

**Author:** [@Nash](https://discourse.julialang.org/u/Nash)\
**Replies:** 22\
**Last updated:** [January 6, 2023, 1:47pm UTC](https://discourse.julialang.org/t/counting-the-number-of-paragraphs-p-between-containers-div/92576 "2023-01-06T13:47:11Z")

</div>

I am trying to parse the content of a website and part of the logic to get the right information is counting the number of times a paragraph of text (represented by the element “p”) occurs between a particular container …

---

## [Would a search directly calling memchr have disadvantages?](https://discourse.julialang.org/t/would-a-search-directly-calling-memchr-have-disadvantages/92592)

<div class="topic-metadata">

**Author:** [@CodeGodz](https://discourse.julialang.org/u/CodeGodz)\
**Replies:** 5\
**Last updated:** [January 6, 2023, 12:07pm UTC](https://discourse.julialang.org/t/would-a-search-directly-calling-memchr-have-disadvantages/92592 "2023-01-06T12:07:38Z")

</div>

Just looking at the ScanByte package by @jakobnissen (thanks for giving me ideas! :slight\_smile: ). It’s written to find the first occurrence of a given byte in a byte array. Just as a test I thought I can also call memc…

---

## [AbstractPlotting Example Won't Work After I Change it to Makie](https://discourse.julialang.org/t/abstractplotting-example-wont-work-after-i-change-it-to-makie/92593)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 9\
**Last updated:** [January 6, 2023, 11:36am UTC](https://discourse.julialang.org/t/abstractplotting-example-wont-work-after-i-change-it-to-makie/92593 "2023-01-06T11:36:09Z")

</div>

Hi all, I saw this link: https://juliaplots.org/MakieReferenceImages/gallery//streamplot\_animation/index.html I want to create the animation, but it said that “everything from AbstractPlotting is moved to Makie” thus …

---

## [Why do I get this error in JET.jl](https://discourse.julialang.org/t/why-do-i-get-this-error-in-jet-jl/92565)

<div class="topic-metadata">

**Author:** [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Replies:** 3\
**Last updated:** [January 6, 2023, 11:28am UTC](https://discourse.julialang.org/t/why-do-i-get-this-error-in-jet-jl/92565 "2023-01-06T11:28:48Z")

</div>

Hi all :slight\_smile: I’m using that awesome tool JET. It works well, but I get the following error - don’t understand why julia\> JET.@report\_call Dict{String, String}(string(k) =\> v for (k,v) in enumerate(\["1", "2"\]))…

---

## [Why are the inferred types different between collect and comprehension?](https://discourse.julialang.org/t/why-are-the-inferred-types-different-between-collect-and-comprehension/92590)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 3\
**Last updated:** [January 6, 2023, 9:23am UTC](https://discourse.julialang.org/t/why-are-the-inferred-types-different-between-collect-and-comprehension/92590 "2023-01-06T09:23:10Z")

</div>

julia\> using ApproxFun julia\> A = Derivative(); B = Multiplication(Fun()); julia\> ops = (A, B); julia\> \[ops...\] |\> eltype Operator{Float64} julia\> collect(ops) |\> eltype Operator Shouldn’t these lead to the same res…

---

## [Range (statistics)](https://discourse.julialang.org/t/range-statistics/92518)

<div class="topic-metadata">

**Author:** [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Replies:** 23\
**Last updated:** [January 6, 2023, 9:09am UTC](https://discourse.julialang.org/t/range-statistics/92518 "2023-01-06T09:09:58Z")

</div>

I often need to compute a statistical range (difference between maximum and minimum). Is there a function in the Statistics standard library to compute the range? Or should we use: maximum(x) - minimum(x)?

---

## [Precompilation of complex code does not make time to first model step faster](https://discourse.julialang.org/t/precompilation-of-complex-code-does-not-make-time-to-first-model-step-faster/92453)

<div class="topic-metadata">

**Author:** [@Chiil](https://discourse.julialang.org/u/Chiil)\
**Replies:** 8\
**Last updated:** [January 5, 2023, 11:29am UTC](https://discourse.julialang.org/t/precompilation-of-complex-code-does-not-make-time-to-first-model-step-faster/92453 "2023-01-05T11:29:23Z")

</div>

I have ported the dynamical core of our C++ CFD code to Julia a while ago, and see now huge speedups going from 1.8 to 1.9 (170 sec to 21 sec to first model step). Inspired by many discussions on this forum, I tried to p…

---

## [Why are the colours in errorshow.jl hardcoded?](https://discourse.julialang.org/t/why-are-the-colours-in-errorshow-jl-hardcoded/92013)

<div class="topic-metadata">

**Author:** [@Euhan](https://discourse.julialang.org/u/Euhan)\
**Replies:** 4\
**Last updated:** [January 6, 2023, 6:01am UTC](https://discourse.julialang.org/t/why-are-the-colours-in-errorshow-jl-hardcoded/92013 "2023-01-06T06:01:24Z")

</div>

After having struggled with debugging on command-line (rather that jupyter that I had been using before), I realised that the trace of stack frames provides references to files and lines in the output. I had not noticed …

---

## [Meta-metaprogramming practical examples](https://discourse.julialang.org/t/meta-metaprogramming-practical-examples/92535)

<div class="topic-metadata">

**Author:** [@xlxs4](https://discourse.julialang.org/u/xlxs4)\
**Replies:** 4\
**Last updated:** [January 6, 2023, 3:23am UTC](https://discourse.julialang.org/t/meta-metaprogramming-practical-examples/92535 "2023-01-06T03:23:47Z")

</div>

From Tom Kwongs’ excellent Hands-on Design Patterns and Best Practices with Julia: It is possible to have a quoted expression that contains another quoted expression. \[…\] :( :( x = 1 ) ) |\> dump \[…\] It can be usefu…

---

## [Symbolic Legendre Polynomials](https://discourse.julialang.org/t/symbolic-legendre-polynomials/92579)

<div class="topic-metadata">

**Author:** [@elvispy](https://discourse.julialang.org/u/elvispy)\
**Replies:** 5\
**Last updated:** [January 6, 2023, 2:25am UTC](https://discourse.julialang.org/t/symbolic-legendre-polynomials/92579 "2023-01-06T02:25:08Z")

</div>

Is there an implemented version of the legendre Polynomials with symbolic variables? I have checked Symbolics.jl which points to SpecialFunctions.jl The Polynomials.jl The ClassicalOrthogonalPolyomials.jl Bu…

---

## [Computing Lyapunov Spectrum of the Lorenz Attraktor with Gram Schmidt and variational equation](https://discourse.julialang.org/t/computing-lyapunov-spectrum-of-the-lorenz-attraktor-with-gram-schmidt-and-variational-equation/92575)

<div class="topic-metadata">

**Author:** [@physician97](https://discourse.julialang.org/u/physician97)\
**Replies:** 1\
**Last updated:** [January 6, 2023, 1:21am UTC](https://discourse.julialang.org/t/computing-lyapunov-spectrum-of-the-lorenz-attraktor-with-gram-schmidt-and-variational-equation/92575 "2023-01-06T01:21:22Z")

</div>

Hello, I’m new to this forum. I’m studying physics at Cologne university and for my thesis I want to calculate Lyapunovexponents of several systems. I choosed the Lorentz Attraktor at first to program the way to calcula…

---

## [Only 1 BLAS thread in 1.9-beta2](https://discourse.julialang.org/t/only-1-blas-thread-in-1-9-beta2/92578)

<div class="topic-metadata">

**Author:** [@PeterSimon](https://discourse.julialang.org/u/PeterSimon)\
**Replies:** 2\
**Last updated:** [January 6, 2023, 12:18am UTC](https://discourse.julialang.org/t/only-1-blas-thread-in-1-9-beta2/92578 "2023-01-06T00:18:14Z")

</div>

When I start up Julia 1.9-beta2 on my 8-core Windows machine, BLAS.get\_num\_threads() returns 1 (whether or not I start with the -t8 option. Is this intended behavior or a bug? PS D:\\peter\\Documents\> julia …

---

## [Yeppp-package](https://discourse.julialang.org/t/yeppp-package/90866)

<div class="topic-metadata">

**Author:** [@ofk123](https://discourse.julialang.org/u/ofk123)\
**Replies:** 9\
**Last updated:** [January 6, 2023, 12:03am UTC](https://discourse.julialang.org/t/yeppp-package/90866 "2023-01-06T00:03:05Z")

</div>

Hi, I have seen the package Yeppp been mentioned here (Fast logsumexp). This might be an ignorant question but when adding Yeppp it wont install, and I get some errors telling me to Pkg.build instead, which also does not…

---

## [Prevent JuliaFormatter from adding whitespaces to logging arguments](https://discourse.julialang.org/t/prevent-juliaformatter-from-adding-whitespaces-to-logging-arguments/92547)

<div class="topic-metadata">

**Author:** [@sstroemer](https://discourse.julialang.org/u/sstroemer)\
**Replies:** 1\
**Last updated:** [January 5, 2023, 11:38pm UTC](https://discourse.julialang.org/t/prevent-juliaformatter-from-adding-whitespaces-to-logging-arguments/92547 "2023-01-05T23:38:11Z")

</div>

Is there any setting that I can add to my .JuliaFormatter.toml that stops it from adding whitespaces to something like @error "An error occured" code="XY on Z" foo=1 bar=2 because I find the resulting @error "An error…

---

## [More examples of PlotlyJS with Buttons](https://discourse.julialang.org/t/more-examples-of-plotlyjs-with-buttons/92581)

<div class="topic-metadata">

**Author:** [@marianoarnaiz](https://discourse.julialang.org/u/marianoarnaiz)\
**Replies:** 0\
**Last updated:** [January 5, 2023, 10:57pm UTC](https://discourse.julialang.org/t/more-examples-of-plotlyjs-with-buttons/92581 "2023-01-05T22:57:01Z")

</div>

Hi all. I was wondering if anyone has some examples for adding buttons with using PlotlyJS. The ones on the documentation are OK but do not answer any of my questions hehehe. Cheers. M.

---

## [Simulation HJM model via stochastic Diffeq](https://discourse.julialang.org/t/simulation-hjm-model-via-stochastic-diffeq/61089)

<div class="topic-metadata">

**Author:** [@kirgush](https://discourse.julialang.org/u/kirgush)\
**Replies:** 8\
**Last updated:** [January 5, 2023, 10:55pm UTC](https://discourse.julialang.org/t/simulation-hjm-model-via-stochastic-diffeq/61089 "2023-01-05T22:55:08Z")

</div>

I want to do forward curve simulation from simplest HJM model using awesome DiffEq package: using Parameters using Statistics using Printf using Plots using DifferentialEquations α=0.4 σ = 1.4 M = 10 u₀= 10 f(u,p,t) …

---

## [Julia v1.9.0-beta2 is fast](https://discourse.julialang.org/t/julia-v1-9-0-beta2-is-fast/92290)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 43\
**Last updated:** [January 5, 2023, 10:20pm UTC](https://discourse.julialang.org/t/julia-v1-9-0-beta2-is-fast/92290 "2023-01-05T22:20:59Z")

</div>

First test on Ubuntu 20.04: Code, save it in bench.jl: using CSV const input=""" time,ping 1,25.7 2,31.8 """ function read\_csv(in) io = IOBuffer(in) file = CSV.File(io) close(io) file end file = read…

---

## [General partial application in Base?](https://discourse.julialang.org/t/general-partial-application-in-base/28176)

<div class="topic-metadata">

**Author:** [@Sean\_McBane](https://discourse.julialang.org/u/Sean_McBane)\
**Replies:** 5\
**Last updated:** [December 25, 2022, 12:14am UTC](https://discourse.julialang.org/t/general-partial-application-in-base/28176 "2022-12-25T00:14:30Z")

</div>

We already have Base.Fix1 and Base.Fix2 for partial function application. It seems that it would be nice and probably often useful to define a similar facility for the general case, available upon request. Is this someth…

---

## [Running Julia from a Python script](https://discourse.julialang.org/t/running-julia-from-a-python-script/92567)

<div class="topic-metadata">

**Author:** [@erlebach](https://discourse.julialang.org/u/erlebach)\
**Replies:** 9\
**Last updated:** [January 5, 2023, 8:07pm UTC](https://discourse.julialang.org/t/running-julia-from-a-python-script/92567 "2023-01-05T20:07:59Z")

</div>

I would like to run Julia from a Python script, such as: import os for o in \[1,2\]: cmd = f'julia -i --project="." -- tst.jl --omega={o}' os.system(cmd) However, when I execute the script, I get subshel…

---

## [Prevent GLM from dropping rows with missings](https://discourse.julialang.org/t/prevent-glm-from-dropping-rows-with-missings/92569)

<div class="topic-metadata">

**Author:** [@croberts](https://discourse.julialang.org/u/croberts)\
**Replies:** 1\
**Last updated:** [January 5, 2023, 7:25pm UTC](https://discourse.julialang.org/t/prevent-glm-from-dropping-rows-with-missings/92569 "2023-01-05T19:25:26Z")

</div>

The @formula macro allows the construction of variables when creating a model matrix. This is great! I don’t have to add various transformations of variables to a DataFrame simply because I want to try alternative regr…

---

## [Tackling the AbstractArray fallback trap - wrapped sparse matrices](https://discourse.julialang.org/t/tackling-the-abstractarray-fallback-trap-wrapped-sparse-matrices/18592)

<div class="topic-metadata">

**Author:** [@klacru](https://discourse.julialang.org/u/klacru)\
**Replies:** 5\
**Last updated:** [January 5, 2023, 6:01pm UTC](https://discourse.julialang.org/t/tackling-the-abstractarray-fallback-trap-wrapped-sparse-matrices/18592 "2023-01-05T18:01:43Z")

</div>

When handling wrapped sparse matrices, for example Symmetric(sparse(...)), it easily happens, the performance is not as expected, because you get caught in the “abstract array fallback” trap: while you are expecting to u…

---

## [Unusual empty \`UnitRange\`s while reinterpreting a vector](https://discourse.julialang.org/t/unusual-empty-unitrange-s-while-reinterpreting-a-vector/92546)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 4\
**Last updated:** [January 5, 2023, 5:25pm UTC](https://discourse.julialang.org/t/unusual-empty-unitrange-s-while-reinterpreting-a-vector/92546 "2023-01-05T17:25:51Z")

</div>

julia\> r = reinterpret(UnitRange{Int}, \[1,-1\])\[1\] 1:-1 julia\> isempty(r) true julia\> length(r) # source of errors -1 julia\> 1:-1 # the constructor changes the endpoint to ensure that the length is zero 1:0 julia\> r =…

---

## [What makes multiple dispatch so special?](https://discourse.julialang.org/t/what-makes-multiple-dispatch-so-special/91753)

<div class="topic-metadata">

**Author:** [@chadagreene](https://discourse.julialang.org/u/chadagreene)\
**Replies:** 12\
**Last updated:** [January 5, 2023, 5:17pm UTC](https://discourse.julialang.org/t/what-makes-multiple-dispatch-so-special/91753 "2023-01-05T17:17:20Z")

</div>

I’ve heard many people speak with great enthusiasm about the revolutionary nature of multiple dispatch, so after a few months of playing around with Julia, I thought that I would have “gotten it” by now. However, it’s st…

---

## [When should you use views?](https://discourse.julialang.org/t/when-should-you-use-views/25092)

<div class="topic-metadata">

**Author:** [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)\
**Replies:** 9\
**Last updated:** [June 10, 2019, 3:51pm UTC](https://discourse.julialang.org/t/when-should-you-use-views/25092 "2019-06-10T15:51:32Z")

</div>

I was wondering in which cases you should use views to avoid copy of data. The example I had in mind is m = maximum(arr\[4:end\]) m = maximum(@view arr\[4:end\]) are those equivalent ?

---

## [Indexing using multi-indices with fixed sum](https://discourse.julialang.org/t/indexing-using-multi-indices-with-fixed-sum/92486)

<div class="topic-metadata">

**Author:** [@sbarthelme](https://discourse.julialang.org/u/sbarthelme)\
**Replies:** 8\
**Last updated:** [January 5, 2023, 4:40pm UTC](https://discourse.julialang.org/t/indexing-using-multi-indices-with-fixed-sum/92486 "2023-01-05T16:40:46Z")

</div>

I’m trying to implement de Casteljau’s algorithm in a dimension-independent way. For the curious, it’s alg. 2.13 in this reference. The algorithm is naturally expressed as a loop that involves a multi-index \\alpha: H…

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

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