# Latest

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

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

**Page:** 919

---

## [Allocations with BlockArrays multiplication](https://discourse.julialang.org/t/allocations-with-blockarrays-multiplication/87331)

<div class="topic-metadata">

**Author:** [@moataz-sabry](https://discourse.julialang.org/u/moataz-sabry)\
**Replies:** 1\
**Last updated:** [September 21, 2022, 1:39pm UTC](https://discourse.julialang.org/t/allocations-with-blockarrays-multiplication/87331 "2022-09-21T13:39:14Z")

</div>

I’m trying to do a vector matrix multiplication and store the result in a block vector from the BlockArrays package. But I ended up with a lot of allocations. Any ideas why? using BlockArrays, BenchmarkTools, LinearAlge…

---

## [How do I fit TGARCH-X model using ARCHModels.jl](https://discourse.julialang.org/t/how-do-i-fit-tgarch-x-model-using-archmodels-jl/87558)

<div class="topic-metadata">

**Author:** [@ultratrader](https://discourse.julialang.org/u/ultratrader)\
**Replies:** 2\
**Last updated:** [September 21, 2022, 12:48pm UTC](https://discourse.julialang.org/t/how-do-i-fit-tgarch-x-model-using-archmodels-jl/87558 "2022-09-21T12:48:00Z")

</div>

How do I fit a GARCH model with leverage effect as well as additional explanatory variables using ARCHModels.jl library? I can’t find any documentation about this in: https://s-broda.github.io/ARCHModels.jl/stable/

---

## [Plot step function \[x+1/2\]](https://discourse.julialang.org/t/plot-step-function-x-1-2/87114)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 8\
**Last updated:** [September 21, 2022, 12:45pm UTC](https://discourse.julialang.org/t/plot-step-function-x-1-2/87114 "2022-09-21T12:45:23Z")

</div>

Hi all, I have been trying to plot \[x+1/2\] learning from the codes at my old thread: But it returns not the plot that I want. I change 1 into 1.5 it still not working. Maybe it takes more than just that.

---

## [How to Plot Step Functions \[x\] Correctly in Julia?](https://discourse.julialang.org/t/how-to-plot-step-functions-x-correctly-in-julia/84087)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 15\
**Last updated:** [September 21, 2022, 12:39pm UTC](https://discourse.julialang.org/t/how-to-plot-step-functions-x-correctly-in-julia/84087 "2022-09-21T12:39:29Z")

</div>

Hi all, I have this code: using Plots, LaTeXStrings gr() f(x)=floor(x) plot(f,0,10,ylim=(-12,12)) Since \[ x \] denotes the gretest integer less than or equal to x, I want to plot it like this: Anyone know how?

---

## [Smoothing empirical CDFs](https://discourse.julialang.org/t/smoothing-empirical-cdfs/87544)

<div class="topic-metadata">

**Author:** [@amrods](https://discourse.julialang.org/u/amrods)\
**Replies:** 6\
**Last updated:** [September 21, 2022, 12:20pm UTC](https://discourse.julialang.org/t/smoothing-empirical-cdfs/87544 "2022-09-21T12:20:51Z")

</div>

I have 5 empirical CDFs coming from a model. I’d like to average them and plot that average against the empirical CDF of the data. The issue I’m facing is that the points of support of those 5 CDFs are not the same, so I…

---

## [How to draw Stationary Solution for functions 1/4 t^{2} and - 1/4 t^{2} from y' = \\sqrt{|y|}](https://discourse.julialang.org/t/how-to-draw-stationary-solution-for-functions-1-4-t-2-and-1-4-t-2-from-y-sqrt-y/87561)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 2\
**Last updated:** [September 21, 2022, 9:50am UTC](https://discourse.julialang.org/t/how-to-draw-stationary-solution-for-functions-1-4-t-2-and-1-4-t-2-from-y-sqrt-y/87561 "2022-09-21T09:50:27Z")

</div>

Hi all, this is a simple question, I wonder how to plot the stationary solution with y' = \\sqrt{|y|} y(0) = 0 The lecturer draws this, and I want to know how to plot it with Julia

---

## [Ocassional precompile error on a cluster using julia1.8](https://discourse.julialang.org/t/ocassional-precompile-error-on-a-cluster-using-julia1-8/82050)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 9\
**Last updated:** [September 21, 2022, 9:22am UTC](https://discourse.julialang.org/t/ocassional-precompile-error-on-a-cluster-using-julia1-8/82050 "2022-09-21T09:22:47Z")

</div>

I’ve just started using julia 1.8 on a cluster, and I have faced the following error while instantiating (or adding packages to) an environment: ┌ Error: Pkg.precompile error │ exception = │ IOError: could not spaw…

---

## [A unified type of \`Tuple\` and \`Vector\`](https://discourse.julialang.org/t/a-unified-type-of-tuple-and-vector/22552)

<div class="topic-metadata">

**Author:** [@singularitti](https://discourse.julialang.org/u/singularitti)\
**Replies:** 4\
**Last updated:** [September 21, 2022, 9:12am UTC](https://discourse.julialang.org/t/a-unified-type-of-tuple-and-vector/22552 "2022-09-21T09:12:30Z")

</div>

Sometimes I want my functions to work with both Tuples and Vectors. Those functions are pure and are iterating through each element of the Tuples and Vectors. Is there a unified type representing Tuples and Vectors? Or I…

---

## [Need help for Julia -struct - Global variable](https://discourse.julialang.org/t/need-help-for-julia-struct-global-variable/87540)

<div class="topic-metadata">

**Author:** [@B\_Linkoon](https://discourse.julialang.org/u/B_Linkoon)\
**Replies:** 1\
**Last updated:** [September 21, 2022, 9:09am UTC](https://discourse.julialang.org/t/need-help-for-julia-struct-global-variable/87540 "2022-09-21T09:09:14Z")

</div>

Hi, I am new to Julia. Could you please help me to understand the following line of codes. and how to define and access values @ Mesh struct. Thank you in advance. using StaticArrays struct Mesh{I \<: Integer, F \<: Rea…

---

## [Questions about missing](https://discourse.julialang.org/t/questions-about-missing/87545)

<div class="topic-metadata">

**Author:** [@zhangchunyong](https://discourse.julialang.org/u/zhangchunyong)\
**Replies:** 2\
**Last updated:** [September 21, 2022, 7:45am UTC](https://discourse.julialang.org/t/questions-about-missing/87545 "2022-09-21T07:45:10Z")

</div>

julia\> a=\[true,false,true,true,missing\] 5-element Vector{Union{Missing, Bool}}: true false true true missing julia\> mean(skipmissing(a)) 0.75 julia\> length(a) 5 julia\> length(skipmissing(a)) ERROR: MethodErr…

---

## [ODE parameter estimation using neural nets](https://discourse.julialang.org/t/ode-parameter-estimation-using-neural-nets/87458)

<div class="topic-metadata">

**Author:** [@RuoyuWang72](https://discourse.julialang.org/u/RuoyuWang72)\
**Replies:** 5\
**Last updated:** [September 21, 2022, 6:54am UTC](https://discourse.julialang.org/t/ode-parameter-estimation-using-neural-nets/87458 "2022-09-21T06:54:43Z")

</div>

I’m trying to add inequality constraints to my ODE parameter optimization problem. The example I followed was fluxdiffeq. I need p\[1\] + p\[2\] \<= 1 and p\[1\] and p\[2\] both also have to be positive. Is there any way I can ac…

---

## [How to do matlab's \`x \<= 0\` where x is a vector?](https://discourse.julialang.org/t/how-to-do-matlabs-x-0-where-x-is-a-vector/87534)

<div class="topic-metadata">

**Author:** [@Muhammad\_Nadeem](https://discourse.julialang.org/u/Muhammad_Nadeem)\
**Replies:** 12\
**Last updated:** [September 21, 2022, 6:15am UTC](https://discourse.julialang.org/t/how-to-do-matlabs-x-0-where-x-is-a-vector/87534 "2022-09-21T06:15:32Z")

</div>

Hello all, So iam bit confused, i am shifting from MATLAB coding to julia coding so it bit difficult for me. In matlab i have a code missmask = eMs \<= 0; where eMs = \[1.2; 1.3\]; so matlab using \<= check if each of th…

---

## [How to match performance of sum(A, dims=1)?](https://discourse.julialang.org/t/how-to-match-performance-of-sum-a-dims-1/87543)

<div class="topic-metadata">

**Author:** [@torrance](https://discourse.julialang.org/u/torrance)\
**Replies:** 14\
**Last updated:** [September 21, 2022, 6:25am UTC](https://discourse.julialang.org/t/how-to-match-performance-of-sum-a-dims-1/87543 "2022-09-21T06:25:50Z")

</div>

Well, this is a bit embarrassing… I’m writing up a set of slides to present to colleagues about Julia, and I wanted to show an example how explicit looping and so on is fine and dandy and as fast as any other language co…

---

## [PyPlot.jl reduce white space after tight\_layout()](https://discourse.julialang.org/t/pyplot-jl-reduce-white-space-after-tight-layout/86923)

<div class="topic-metadata">

**Author:** [@sparrowhawk](https://discourse.julialang.org/u/sparrowhawk)\
**Replies:** 2\
**Last updated:** [September 21, 2022, 6:22am UTC](https://discourse.julialang.org/t/pyplot-jl-reduce-white-space-after-tight-layout/86923 "2022-09-21T06:22:08Z")

</div>

Can I reduce the amount of whitespace between subplots after the plot? Please note I need AA and BB to have linked X, Y axes and the same sizes with a shared colorbar, and that AA, BB and CC need to have a shared X axis…

---

## [Help me: function in Julia](https://discourse.julialang.org/t/help-me-function-in-julia/87523)

<div class="topic-metadata">

**Author:** [@tryjulia](https://discourse.julialang.org/u/tryjulia)\
**Replies:** 8\
**Last updated:** [September 21, 2022, 2:57am UTC](https://discourse.julialang.org/t/help-me-function-in-julia/87523 "2022-09-21T02:57:14Z")

</div>

Hi, so I actually want to write a code that would show me the result of factorial of: x = x + 2 y = x\*(x-1) \* y but when I tried to put it in function, it doesn’t behave the way I want to. It needs to define the x and…

---

## [Unable to add multiple plots to a single scene in Makie](https://discourse.julialang.org/t/unable-to-add-multiple-plots-to-a-single-scene-in-makie/87527)

<div class="topic-metadata">

**Author:** [@malton31](https://discourse.julialang.org/u/malton31)\
**Replies:** 4\
**Last updated:** [September 21, 2022, 1:16am UTC](https://discourse.julialang.org/t/unable-to-add-multiple-plots-to-a-single-scene-in-makie/87527 "2022-09-21T01:16:17Z")

</div>

I am new to Makie and Julia in VSCode and I am trying to plot two plots in one scene. My code is using Makie, GLMakie GLMakie.activate!() Makie.inline!(true) x = rand(100) y = rand(100) z = rand(100) scene = scatter…

---

## [Julia unresponsive (Apple Silicon issue?)](https://discourse.julialang.org/t/julia-unresponsive-apple-silicon-issue/87484)

<div class="topic-metadata">

**Author:** [@hendri54](https://discourse.julialang.org/u/hendri54)\
**Replies:** 6\
**Last updated:** [September 21, 2022, 12:01am UTC](https://discourse.julialang.org/t/julia-unresponsive-apple-silicon-issue/87484 "2022-09-21T00:01:11Z")

</div>

I have a recurring problem where a long-running process hangs after some time. Screen updating then stops and Ctrl-C or Ctrl-D no longer interrupt the code. I have to restart iterm to stop execution. This happens after …

---

## [Parallelization way](https://discourse.julialang.org/t/parallelization-way/87536)

<div class="topic-metadata">

**Author:** [@andrey2185](https://discourse.julialang.org/u/andrey2185)\
**Replies:** 2\
**Last updated:** [September 20, 2022, 10:32pm UTC](https://discourse.julialang.org/t/parallelization-way/87536 "2022-09-20T22:32:34Z")

</div>

Hello, please help to parallelize the task, maybe with CUDA? There are two point clouds A and B, the clouds have a different number of points. In cloud A there can be several Y along the X axis, In cloud B, there is o…

---

## [Nth (univariate) derivative using AD](https://discourse.julialang.org/t/nth-univariate-derivative-using-ad/87504)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 5\
**Last updated:** [September 20, 2022, 9:24pm UTC](https://discourse.julialang.org/t/nth-univariate-derivative-using-ad/87504 "2022-09-20T21:24:58Z")

</div>

I need an n th derivative of a univariate function for testing purposes. I came up with import ForwardDiff function ddn(f, x, ::Val{N}) where {N} fn = foldl((f, \_) -\> x -\> ForwardDiff.derivative(f, x), …

---

## [Combine with regex column selector?](https://discourse.julialang.org/t/combine-with-regex-column-selector/87520)

<div class="topic-metadata">

**Author:** [@floswald](https://discourse.julialang.org/u/floswald)\
**Replies:** 19\
**Last updated:** [September 20, 2022, 8:06pm UTC](https://discourse.julialang.org/t/combine-with-regex-column-selector/87520 "2022-09-20T20:06:07Z")

</div>

I’m a bit puzzled by this example, where I expected the same column selector to work both for select as for combine. For some reason I’m unable to use the regex selector with combine: julia\> using DataFrames, Statistics…

---

## [Preparing tutorials and books](https://discourse.julialang.org/t/preparing-tutorials-and-books/59298)

<div class="topic-metadata">

**Author:** [@vector](https://discourse.julialang.org/u/vector)\
**Replies:** 11\
**Last updated:** [September 20, 2022, 7:12pm UTC](https://discourse.julialang.org/t/preparing-tutorials-and-books/59298 "2022-09-20T19:12:45Z")

</div>

Hi. I am not sure whther this is the right category for posting my query. I cannot find the appropriate category. What software or platform do you use for writing Julia languge tutorials and books? Is it the good old …

---

## [How to combine two different colormaps into one](https://discourse.julialang.org/t/how-to-combine-two-different-colormaps-into-one/87529)

<div class="topic-metadata">

**Author:** [@yhchang96](https://discourse.julialang.org/u/yhchang96)\
**Replies:** 1\
**Last updated:** [September 20, 2022, 7:40pm UTC](https://discourse.julialang.org/t/how-to-combine-two-different-colormaps-into-one/87529 "2022-09-20T19:40:45Z")

</div>

I come across the following colorbar somewhere and would like to implement something similar for my heatmap plot in CairoMakie: So suppose I want ColorSchemes.viridis from -5 to -2, and then ColorSchemes.Greys\_3 from …

---

## [Understanding @turbo behavior to use it right](https://discourse.julialang.org/t/understanding-turbo-behavior-to-use-it-right/87465)

<div class="topic-metadata">

**Author:** [@Sagar\_123](https://discourse.julialang.org/u/Sagar_123)\
**Replies:** 15\
**Last updated:** [September 20, 2022, 6:10pm UTC](https://discourse.julialang.org/t/understanding-turbo-behavior-to-use-it-right/87465 "2022-09-20T18:10:03Z")

</div>

s = ones(5) t = 2\*ones(Int8,5) @turbo for i = 1:5 a = t\[i\] s\[a\] += t\[i\] end Above code gives the values of s vector as \[1.0, 3.0, 1.0, 1.0, 1.0\]. If I remove the macro @turbo, I get the correct result, \[1.0, 11…

---

## [Super title in Plots and subplots](https://discourse.julialang.org/t/super-title-in-plots-and-subplots/29865)

<div class="topic-metadata">

**Author:** [@juliauser](https://discourse.julialang.org/u/juliauser)\
**Replies:** 12\
**Last updated:** [September 20, 2022, 5:43pm UTC](https://discourse.julialang.org/t/super-title-in-plots-and-subplots/29865 "2022-09-20T17:43:47Z")

</div>

Hi, I am having a hard time understanding how to organize titles in Plots.jl using pyplot(). I have 2X2 subplots and I would like to have a title for each subplot, one for each horizontal pair, and one for the overall …

---

## [Numeric string format for Makie plot?](https://discourse.julialang.org/t/numeric-string-format-for-makie-plot/87508)

<div class="topic-metadata">

**Author:** [@nvhoang.3110](https://discourse.julialang.org/u/nvhoang.3110)\
**Replies:** 5\
**Last updated:** [September 20, 2022, 5:10pm UTC](https://discourse.julialang.org/t/numeric-string-format-for-makie-plot/87508 "2022-09-20T17:10:44Z")

</div>

Hello everyone! Sorry if my question is too basic for some people. Basically I’m trying to define the numeric string format for my Makie plot, specifically for the axis. The numbers on the y-axis that I want to display h…

---

## [Optimizing a 2D masked mean](https://discourse.julialang.org/t/optimizing-a-2d-masked-mean/87455)

<div class="topic-metadata">

**Author:** [@kiranshila](https://discourse.julialang.org/u/kiranshila)\
**Replies:** 10\
**Last updated:** [September 20, 2022, 4:30pm UTC](https://discourse.julialang.org/t/optimizing-a-2d-masked-mean/87455 "2022-09-20T16:30:48Z")

</div>

Hey everyone! I’m working on a small package to be used as RFI mitigation in a radio telescope, and I’m getting a little stuck optimizing a small piece of the code. Specifically, I need to be able to take the mean down …

---

## [Ifelse() evalutes both cases](https://discourse.julialang.org/t/ifelse-evalutes-both-cases/87525)

<div class="topic-metadata">

**Author:** [@kucuksen](https://discourse.julialang.org/u/kucuksen)\
**Replies:** 3\
**Last updated:** [September 20, 2022, 3:35pm UTC](https://discourse.julialang.org/t/ifelse-evalutes-both-cases/87525 "2022-09-20T15:35:24Z")

</div>

I have encountered an unexpected (for myself) behavior of the ifelse() function. I thought that it would be easier to read if I used ifelse() function instead of an if-block. To see the problem that I had consider the f…

---

## [Vectorize but break early?](https://discourse.julialang.org/t/vectorize-but-break-early/87362)

<div class="topic-metadata">

**Author:** [@abulak](https://discourse.julialang.org/u/abulak)\
**Replies:** 3\
**Last updated:** [September 20, 2022, 3:10pm UTC](https://discourse.julialang.org/t/vectorize-but-break-early/87362 "2022-09-20T15:10:14Z")

</div>

I’d like to properly vectorize this: """ issuffix(u, v) Check if \`u\` is a suffix of \`v\` """ function issuffix(u::AbstractVector, v::AbstractVector) lu = length(u) lu ≤ length(v) || return false @inbounds…

---

## [Porting Python Global-Chem Knowledge Graph into Julia](https://discourse.julialang.org/t/porting-python-global-chem-knowledge-graph-into-julia/87475)

<div class="topic-metadata">

**Author:** [@Sulstice](https://discourse.julialang.org/u/Sulstice)\
**Replies:** 6\
**Last updated:** [September 20, 2022, 3:06pm UTC](https://discourse.julialang.org/t/porting-python-global-chem-knowledge-graph-into-julia/87475 "2022-09-20T15:06:06Z")

</div>

Hi Y’all, My name is Sul and I am a PhD Student at the University of Maryland, Baltimore. We are writing the molecules to common chemical names that the general public use and keeping a record for all of us to download …

---

## [What are common mistakes in julia that beginners should aware of?](https://discourse.julialang.org/t/what-are-common-mistakes-in-julia-that-beginners-should-aware-of/51874)

<div class="topic-metadata">

**Author:** [@vedasulo](https://discourse.julialang.org/u/vedasulo)\
**Replies:** 66\
**Last updated:** [September 20, 2022, 2:43pm UTC](https://discourse.julialang.org/t/what-are-common-mistakes-in-julia-that-beginners-should-aware-of/51874 "2022-09-20T14:43:14Z")

</div>

I’ve been reading all reference materials of Julia seen alot of scopes, … all things. Would you please paint a code of mistake that begineer (especially python developers) do when writing simple like (variable, functio…

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

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