# Latest

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

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

**Page:** 1210

---

## [Nested static arrays perform worse than nested arrays](https://discourse.julialang.org/t/nested-static-arrays-perform-worse-than-nested-arrays/70938)

<div class="topic-metadata">

**Author:** [@anneJulia](https://discourse.julialang.org/u/anneJulia)\
**Replies:** 14\
**Last updated:** [November 12, 2021, 11:02am UTC](https://discourse.julialang.org/t/nested-static-arrays-perform-worse-than-nested-arrays/70938 "2021-11-12T11:02:24Z")

</div>

I am performing array operations, where I retrieve elements of an array (this array is nested). The functions below are minimal working examples of what I am trying to do. using TimerOutputs using StaticArrays using Sta…

---

## [How to include a time dependent parameter while solving a system of SDEs in Julia?](https://discourse.julialang.org/t/how-to-include-a-time-dependent-parameter-while-solving-a-system-of-sdes-in-julia/71043)

<div class="topic-metadata">

**Author:** [@rimi](https://discourse.julialang.org/u/rimi)\
**Replies:** 3\
**Last updated:** [November 12, 2021, 10:58am UTC](https://discourse.julialang.org/t/how-to-include-a-time-dependent-parameter-while-solving-a-system-of-sdes-in-julia/71043 "2021-11-12T10:58:23Z")

</div>

Hello, I am new to Julia, started using it in R to solve SDEs. I am trying to solve this system of SDEs, dX = (-X\*a + (Y-X) b + h)dt + g dW and dY = (-Y a + (X-Y)\*b)dt for time \[0,200\], a=0.30, b=0.2, g=1 and h is 1 for…

---

## [How to fix an error related to the Effects package](https://discourse.julialang.org/t/how-to-fix-an-error-related-to-the-effects-package/71320)

<div class="topic-metadata">

**Author:** [@Jad](https://discourse.julialang.org/u/Jad)\
**Replies:** 2\
**Last updated:** [November 12, 2021, 10:24am UTC](https://discourse.julialang.org/t/how-to-fix-an-error-related-to-the-effects-package/71320 "2021-11-12T10:24:11Z")

</div>

I want to run the average marginal effects between two predictors: education and unemployment rate. While the package Effects in Julia can do the trick, i am having an error which i will describe below. First, i show the…

---

## [How to find crossing point using Spline1D in julia?](https://discourse.julialang.org/t/how-to-find-crossing-point-using-spline1d-in-julia/71364)

<div class="topic-metadata">

**Author:** [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Replies:** 2\
**Last updated:** [November 12, 2021, 9:38am UTC](https://discourse.julialang.org/t/how-to-find-crossing-point-using-spline1d-in-julia/71364 "2021-11-12T09:38:08Z")

</div>

I have fitted a spline function using Spline1D from the package Dierckx to the data: x = \[0.0, 0.25167322597331027, 1.6518531853618088, 4.032506892599284, 6.871304792339401, 10.090447889235595, 13.686254426579751, 17.61…

---

## [Linear regression from scratch using QR decomposition](https://discourse.julialang.org/t/linear-regression-from-scratch-using-qr-decomposition/71363)

<div class="topic-metadata">

**Author:** [@valperez](https://discourse.julialang.org/u/valperez)\
**Replies:** 3\
**Last updated:** [November 12, 2021, 6:27am UTC](https://discourse.julialang.org/t/linear-regression-from-scratch-using-qr-decomposition/71363 "2021-11-12T06:27:08Z")

</div>

Hi there :slight\_smile: I’m trying to fit a polinomial regression of grade 10 from scratch. First things first, imagine I have a dataset with just two columns, x and y. I want to fit a polinomial of grade 10 but I don’t…

---

## [Using GalacticOptim to optimize, cannot understand the error](https://discourse.julialang.org/t/using-galacticoptim-to-optimize-cannot-understand-the-error/71308)

<div class="topic-metadata">

**Author:** [@yewalenikhil65](https://discourse.julialang.org/u/yewalenikhil65)\
**Replies:** 5\
**Last updated:** [November 12, 2021, 8:39am UTC](https://discourse.julialang.org/t/using-galacticoptim-to-optimize-cannot-understand-the-error/71308 "2021-11-12T08:39:42Z")

</div>

I have a vector of ODE problems that i want to optimize, and here is first odeproblem from the probs array which contains my ODEProblem. I am using GalacticOptim to optimize, but am encountering following error. Some cod…

---

## [How to debug in coroutine(task)?](https://discourse.julialang.org/t/how-to-debug-in-coroutine-task/71299)

<div class="topic-metadata">

**Author:** [@HANHAOHAN](https://discourse.julialang.org/u/HANHAOHAN)\
**Replies:** 6\
**Last updated:** [November 12, 2021, 6:50am UTC](https://discourse.julialang.org/t/how-to-debug-in-coroutine-task/71299 "2021-11-12T06:50:31Z")

</div>

Recently, when I develop, the process output nothing. Then with using @show I found bug in the code of task(coroutine). Does anyone knows if there be some tools or methods to debug in coroutine(task)?

---

## [Make @chain base Julia](https://discourse.julialang.org/t/make-chain-base-julia/71357)

<div class="topic-metadata">

**Author:** [@Lincoln\_Hannah](https://discourse.julialang.org/u/Lincoln_Hannah)\
**Replies:** 3\
**Last updated:** [November 12, 2021, 6:30am UTC](https://discourse.julialang.org/t/make-chain-base-julia/71357 "2021-11-12T06:30:51Z")

</div>

Instead of having the @chain macro, how about making the previous line’s output always available (if you want it) through “\_” or by omitting the first argument of a function. So you could write something like. 1…

---

## [Understanding dependencies of a package](https://discourse.julialang.org/t/understanding-dependencies-of-a-package/71347)

<div class="topic-metadata">

**Author:** [@affans](https://discourse.julialang.org/u/affans)\
**Replies:** 12\
**Last updated:** [November 12, 2021, 4:51am UTC](https://discourse.julialang.org/t/understanding-dependencies-of-a-package/71347 "2021-11-12T04:51:44Z")

</div>

I am trying to install a package TSAnalysis.jl, which according to its Project.toml only depends on \[deps\] Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b" Distribution…

---

## [Should @\_\_DIR\_\_ give a path to the directory of the current file?](https://discourse.julialang.org/t/should-dir-give-a-path-to-the-directory-of-the-current-file/71303)

<div class="topic-metadata">

**Author:** [@BMval](https://discourse.julialang.org/u/BMval)\
**Replies:** 7\
**Last updated:** [November 12, 2021, 4:43am UTC](https://discourse.julialang.org/t/should-dir-give-a-path-to-the-directory-of-the-current-file/71303 "2021-11-12T04:43:28Z")

</div>

should @DIR give a path to the directory of the current file? pwd() and @DIR give the same result.

---

## [SMTPClient error 554](https://discourse.julialang.org/t/smtpclient-error-554/71360)

<div class="topic-metadata">

**Author:** [@sransome](https://discourse.julialang.org/u/sransome)\
**Replies:** 0\
**Last updated:** [November 12, 2021, 1:59am UTC](https://discourse.julialang.org/t/smtpclient-error-554/71360 "2021-11-12T01:59:54Z")

</div>

I’m using SMTPClient to send emails with csv attachments via office 365 and it’s largely working. However, when the attachment size is greater than about 10KB I get an error that crashes my code. ERROR: LoadError: curl…

---

## [Questions about pyjulia usage](https://discourse.julialang.org/t/questions-about-pyjulia-usage/71332)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 6\
**Last updated:** [November 11, 2021, 10:33pm UTC](https://discourse.julialang.org/t/questions-about-pyjulia-usage/71332 "2021-11-11T22:33:15Z")

</div>

I am trying to see how well a code runs called from python, and I’m facing some problems and have some doubts: When trying to import any package I am getting this error: Your Python interpreter "/usr/bin/python3" is s…

---

## [What is # = none: 1 = # in expression?](https://discourse.julialang.org/t/what-is-none-1-in-expression/71355)

<div class="topic-metadata">

**Author:** [@andrey2185](https://discourse.julialang.org/u/andrey2185)\
**Replies:** 2\
**Last updated:** [November 11, 2021, 11:51pm UTC](https://discourse.julialang.org/t/what-is-none-1-in-expression/71355 "2021-11-11T23:51:41Z")

</div>

Hellow! what is # = none: 4 = #, is it possible to create an expression without this? or is bad idea to generate src-files based on expressions? julia\> ex = quote x = 1 y = 2 x + y …

---

## [Why is Julia designed this way? NaN != NaN but -0.0 == 0.0](https://discourse.julialang.org/t/why-is-julia-designed-this-way-nan-nan-but-0-0-0-0/71350)

<div class="topic-metadata">

**Author:** [@leon](https://discourse.julialang.org/u/leon)\
**Replies:** 11\
**Last updated:** [November 11, 2021, 11:06pm UTC](https://discourse.julialang.org/t/why-is-julia-designed-this-way-nan-nan-but-0-0-0-0/71350 "2021-11-11T23:06:13Z")

</div>

I’m reading Julia’s documentation, and below are the realities: julia\> NaN == NaN false julia\> isequal(NaN, NaN) true julia\> -0.0 == 0.0 true julia\> isequal(-0.0, 0.0) false My data often contain NaNs, -0.0, and 0.0…

---

## [How can I skip missing values of a DF without deleating them?](https://discourse.julialang.org/t/how-can-i-skip-missing-values-of-a-df-without-deleating-them/71354)

<div class="topic-metadata">

**Author:** [@SamanthaCassab](https://discourse.julialang.org/u/SamanthaCassab)\
**Replies:** 4\
**Last updated:** [November 11, 2021, 10:59pm UTC](https://discourse.julialang.org/t/how-can-i-skip-missing-values-of-a-df-without-deleating-them/71354 "2021-11-11T22:59:46Z")

</div>

Hi, I have a DataFrame with NaN and missing values. And I´m trying to use the function groupby and combine, with a function I define as: flujos(x)=mean(filter(!isnan,skipmissing(x - lag(x)))) And then I use gpb and co…

---

## [Empty iterator](https://discourse.julialang.org/t/empty-iterator/4440)

<div class="topic-metadata">

**Author:** [@pint](https://discourse.julialang.org/u/pint)\
**Replies:** 4\
**Last updated:** [November 11, 2021, 10:47pm UTC](https://discourse.julialang.org/t/empty-iterator/4440 "2021-11-11T22:47:17Z")

</div>

a function of mine returns an iterator. in some cases, i want to return an empty iterator, but one that is efficient and typed. so i came up with this little thing struct Empty{T} end Base.iteratorsize(::Type{\<:Empty}) …

---

## [Write - accented characters take extra byte](https://discourse.julialang.org/t/write-accented-characters-take-extra-byte/71271)

<div class="topic-metadata">

**Author:** [@yoh-meyers](https://discourse.julialang.org/u/yoh-meyers)\
**Replies:** 6\
**Last updated:** [November 11, 2021, 10:31pm UTC](https://discourse.julialang.org/t/write-accented-characters-take-extra-byte/71271 "2021-11-11T22:31:47Z")

</div>

Hello, When calling write with a string containing accented characters, I realise that 2 bytes are returned. E.g: julia\> write(stdout, "ñ") ñ2 julia\> write(stdout, "n") n1 This is an issue when the output is expecti…

---

## [Multicollinearity and GLM](https://discourse.julialang.org/t/multicollinearity-and-glm/71340)

<div class="topic-metadata">

**Author:** [@rikh](https://discourse.julialang.org/u/rikh)\
**Replies:** 5\
**Last updated:** [November 11, 2021, 9:29pm UTC](https://discourse.julialang.org/t/multicollinearity-and-glm/71340 "2021-11-11T21:29:44Z")

</div>

Below, I show some generated data for a linear regression. With these features (also known as variables, covariates or predictors) A, B, C, D and E, I aim to predict an outcome Y. Would the data shown below be considered…

---

## [What's the usual practice about type stability testing in packages?](https://discourse.julialang.org/t/whats-the-usual-practice-about-type-stability-testing-in-packages/64113)

<div class="topic-metadata">

**Author:** [@heliosdrm](https://discourse.julialang.org/u/heliosdrm)\
**Replies:** 2\
**Last updated:** [November 11, 2021, 8:48pm UTC](https://discourse.julialang.org/t/whats-the-usual-practice-about-type-stability-testing-in-packages/64113 "2021-11-11T20:48:31Z")

</div>

Julia developers have utilities to test type stability in their packages, as commented in another post long ago. And new tools that improve it have been released since then, e.g. Cthulhu.jl, or JETTests.jl more recently. …

---

## [Run code non-interactively from script with -e option](https://discourse.julialang.org/t/run-code-non-interactively-from-script-with-e-option/71338)

<div class="topic-metadata">

**Author:** [@mzaffalon](https://discourse.julialang.org/u/mzaffalon)\
**Replies:** 2\
**Last updated:** [November 11, 2021, 8:13pm UTC](https://discourse.julialang.org/t/run-code-non-interactively-from-script-with-e-option/71338 "2021-11-11T20:13:17Z")

</div>

How do I escape correctly the quotation marks in C:\\Users\\mzaffalon\>julia -e 'println("hello world")' on a Windows machine? The line above gives ERROR: syntax: character literal contains multiple characters Stacktrace…

---

## [Package folder in .julia/packages](https://discourse.julialang.org/t/package-folder-in-julia-packages/71346)

<div class="topic-metadata">

**Author:** [@user2](https://discourse.julialang.org/u/user2)\
**Replies:** 2\
**Last updated:** [November 11, 2021, 8:02pm UTC](https://discourse.julialang.org/t/package-folder-in-julia-packages/71346 "2021-11-11T20:02:29Z")

</div>

Can I ask why there are many folder for the same package? And I want to know that I can remove the folder. thank you

---

## [Skipmissing no working in cor function](https://discourse.julialang.org/t/skipmissing-no-working-in-cor-function/71293)

<div class="topic-metadata">

**Author:** [@jsaraviadrago](https://discourse.julialang.org/u/jsaraviadrago)\
**Replies:** 5\
**Last updated:** [November 11, 2021, 4:57pm UTC](https://discourse.julialang.org/t/skipmissing-no-working-in-cor-function/71293 "2021-11-11T16:57:50Z")

</div>

Hi everyone, I am trying to make a correlation in Julia but one line of missing values. (My code is below). I use the skipmissing and the result is skipmissing(missing), if I don’t put that it says missing. I tried th…

---

## [VS Code Julia language-server caching?](https://discourse.julialang.org/t/vs-code-julia-language-server-caching/38967)

<div class="topic-metadata">

**Author:** [@oschulz](https://discourse.julialang.org/u/oschulz)\
**Replies:** 22\
**Last updated:** [November 11, 2021, 6:44pm UTC](https://discourse.julialang.org/t/vs-code-julia-language-server-caching/38967 "2021-11-11T18:44:15Z")

</div>

I currently have to use VS Code with a rather heavy/large Julia environment. The first time the language-server started, it needed ages until everything was “ready” (is indexed the right term?), even though I had already…

---

## [CuArray only supports element types that are stored inline?](https://discourse.julialang.org/t/cuarray-only-supports-element-types-that-are-stored-inline/71339)

<div class="topic-metadata">

**Author:** [@Ludovic\_Dumoulin](https://discourse.julialang.org/u/Ludovic_Dumoulin)\
**Replies:** 1\
**Last updated:** [November 11, 2021, 5:23pm UTC](https://discourse.julialang.org/t/cuarray-only-supports-element-types-that-are-stored-inline/71339 "2021-11-11T17:23:19Z")

</div>

Hello, I would like to define, a mutable structure with a field of type ::CuArray{an\_other\_mutable\_structure} but I get this error: CuArray only supports element types that are stored inline I don’t understand what i…

---

## [IRTools and Core.Compiler](https://discourse.julialang.org/t/irtools-and-core-compiler/71311)

<div class="topic-metadata">

**Author:** [@KDr2](https://discourse.julialang.org/u/KDr2)\
**Replies:** 1\
**Last updated:** [November 11, 2021, 4:35pm UTC](https://discourse.julialang.org/t/irtools-and-core-compiler/71311 "2021-11-11T16:35:34Z")

</div>

I noticed IRTools.jl doesn’t work any longer on the latest Julia (1.8.x or the master branch). And from long ago, there exists a module named Core.Compiler, but I failed to find any document about this module. I have a …

---

## [Where to insert some commands before running REPL in VS Code?](https://discourse.julialang.org/t/where-to-insert-some-commands-before-running-repl-in-vs-code/71228)

<div class="topic-metadata">

**Author:** [@Amro](https://discourse.julialang.org/u/Amro)\
**Replies:** 8\
**Last updated:** [November 10, 2021, 6:16pm UTC](https://discourse.julialang.org/t/where-to-insert-some-commands-before-running-repl-in-vs-code/71228 "2021-11-10T18:16:20Z")

</div>

I am using julia as an extension in VS code. I usually write a script then click on the julia: Execute Active file in REPL to run it. However, I need sometimes to run the REPL with some startup commands such as with jul…

---

## [How to avoid allocations in recursive data structures](https://discourse.julialang.org/t/how-to-avoid-allocations-in-recursive-data-structures/71268)

<div class="topic-metadata">

**Author:** [@peremato](https://discourse.julialang.org/u/peremato)\
**Replies:** 3\
**Last updated:** [November 11, 2021, 4:00pm UTC](https://discourse.julialang.org/t/how-to-avoid-allocations-in-recursive-data-structures/71268 "2021-11-11T16:00:26Z")

</div>

For my project I need a tree-like data structure. Since I didn’t find a way to forward declare types I am using the trick of an abstract type instead of a reference a concrete type. The problem is that when using this da…

---

## [Find all Hamiltonian cycles using Graphs.jl](https://discourse.julialang.org/t/find-all-hamiltonian-cycles-using-graphs-jl/71304)

<div class="topic-metadata">

**Author:** [@mdtisdall](https://discourse.julialang.org/u/mdtisdall)\
**Replies:** 3\
**Last updated:** [November 11, 2021, 3:42pm UTC](https://discourse.julialang.org/t/find-all-hamiltonian-cycles-using-graphs-jl/71304 "2021-11-11T15:42:20Z")

</div>

I’m wondering if there’s an existing implementation of an algorithm to find all Hamiltonian cycles within an unweighted, undirected graph. The graphs I’m interested in are small, on the order of 20 vertices. Basically I’…

---

## [How to programatically construct a ComponentArray or NamedTuple?](https://discourse.julialang.org/t/how-to-programatically-construct-a-componentarray-or-namedtuple/70937)

<div class="topic-metadata">

**Author:** [@amrods](https://discourse.julialang.org/u/amrods)\
**Replies:** 5\
**Last updated:** [November 11, 2021, 3:22pm UTC](https://discourse.julialang.org/t/how-to-programatically-construct-a-componentarray-or-namedtuple/70937 "2021-11-11T15:22:48Z")

</div>

As the title says, how can I programatically construct a ComponentArray or NamedTuple from a vector of strings (or symbols) and a vector of numbers? from this n = \["a", "b", "c"\] x = \[1, 2, 3\] I want to get this ca =…

---

## [Optional arguments of subtype](https://discourse.julialang.org/t/optional-arguments-of-subtype/71333)

<div class="topic-metadata">

**Author:** [@Kruxigt](https://discourse.julialang.org/u/Kruxigt)\
**Replies:** 2\
**Last updated:** [November 11, 2021, 2:55pm UTC](https://discourse.julialang.org/t/optional-arguments-of-subtype/71333 "2021-11-11T14:55:12Z")

</div>

Hi good folks! Quick question which I’m sure has been answered many times but which’s answers I can’t find. Can I specify a subtype for an optional argument. Something similar to: function f(a::Int64, b::T=10) where T\<…

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

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