# Latest

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

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

**Page:** 1236

---

## [An error from stacking a new array with an initialization array (empty)](https://discourse.julialang.org/t/an-error-from-stacking-a-new-array-with-an-initialization-array-empty/69955)

<div class="topic-metadata">

**Author:** [@leon](https://discourse.julialang.org/u/leon)\
**Replies:** 6\
**Last updated:** [October 18, 2021, 10:20am UTC](https://discourse.julialang.org/t/an-error-from-stacking-a-new-array-with-an-initialization-array-empty/69955 "2021-10-18T10:20:17Z")

</div>

Here is my code: A = \[\]; for ... A = vcat(A, b); end I’m getting the below error. Before A is assigned any values, it is an empty array, and the program is complaining that: number of columns of each array must match …

---

## [Purpose of secure\_cookie in Electron.jl](https://discourse.julialang.org/t/purpose-of-secure-cookie-in-electron-jl/68296)

<div class="topic-metadata">

**Author:** [@ettersi](https://discourse.julialang.org/u/ettersi)\
**Replies:** 3\
**Last updated:** [September 17, 2021, 8:25am UTC](https://discourse.julialang.org/t/purpose-of-secure-cookie-in-electron-jl/68296 "2021-09-17T08:25:00Z")

</div>

When Electron.jl launches a new electron process, it passes a secure cookie which is then used to authenticate the electron process when it tries to connect back to the Julia process. I’m not sure I understand the purpos…

---

## [From VSCode: Error while parsing your current enviroment.jpg](https://discourse.julialang.org/t/from-vscode-error-while-parsing-your-current-enviroment-jpg/69958)

<div class="topic-metadata">

**Author:** [@HerAdri](https://discourse.julialang.org/u/HerAdri)\
**Replies:** 3\
**Last updated:** [October 18, 2021, 9:27am UTC](https://discourse.julialang.org/t/from-vscode-error-while-parsing-your-current-enviroment-jpg/69958 "2021-10-18T09:27:47Z")

</div>

I am presenting the following problem; shown in the figure. How to solve it? It will be related to:Warning: could not download…?

---

## [How to remove specific rows of an array?](https://discourse.julialang.org/t/how-to-remove-specific-rows-of-an-array/69948)

<div class="topic-metadata">

**Author:** [@leon](https://discourse.julialang.org/u/leon)\
**Replies:** 4\
**Last updated:** [October 18, 2021, 7:47am UTC](https://discourse.julialang.org/t/how-to-remove-specific-rows-of-an-array/69948 "2021-10-18T07:47:53Z")

</div>

As Matlab person, I thought the below would work, but it doesn’t. So what is the Julia way of doing this simple task? A = rand(1:10, 12,3); Ind = A\[:,1\].\<5; A\[Ind, :\] = \[\];

---

## [Plots: Using multiple colours in title](https://discourse.julialang.org/t/plots-using-multiple-colours-in-title/69870)

<div class="topic-metadata">

**Author:** [@MattSainsbury-Dale](https://discourse.julialang.org/u/MattSainsbury-Dale)\
**Replies:** 9\
**Last updated:** [October 18, 2021, 7:39am UTC](https://discourse.julialang.org/t/plots-using-multiple-colours-in-title/69870 "2021-10-18T07:39:36Z")

</div>

Using Plots.jl, is it possible to use multiple colours in the title? Here is an example of the sort of thing I am trying to do. Thanks very much in advance.

---

## [Release vs. Debug in application code](https://discourse.julialang.org/t/release-vs-debug-in-application-code/69912)

<div class="topic-metadata">

**Author:** [@goerch](https://discourse.julialang.org/u/goerch)\
**Replies:** 10\
**Last updated:** [October 18, 2021, 7:20am UTC](https://discourse.julialang.org/t/release-vs-debug-in-application-code/69912 "2021-10-18T07:20:04Z")

</div>

I’ve just learned about conditional compilation via Conditional code and precompilation. Are there any best practices to use something like this for release vs. debug mode in library code?

---

## [ThreadsX mapreduce performance](https://discourse.julialang.org/t/threadsx-mapreduce-performance/69879)

<div class="topic-metadata">

**Author:** [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)\
**Replies:** 12\
**Last updated:** [October 18, 2021, 4:58am UTC](https://discourse.julialang.org/t/threadsx-mapreduce-performance/69879 "2021-10-18T04:58:20Z")

</div>

Hi, I wonder why ThreadsX.mapreduce is slower than a straightforward @threads loop for a simple function like ThreadsX.mapreduce(abs,max,x) computing the maximal absolute value of an array x. julia\> main() Threads.nth…

---

## ["rv\_to\_tle" function in satellite toolbox](https://discourse.julialang.org/t/rv-to-tle-function-in-satellite-toolbox/69919)

<div class="topic-metadata">

**Author:** [@sxd190026](https://discourse.julialang.org/u/sxd190026)\
**Replies:** 2\
**Last updated:** [October 18, 2021, 3:19am UTC](https://discourse.julialang.org/t/rv-to-tle-function-in-satellite-toolbox/69919 "2021-10-18T03:19:17Z")

</div>

I am using SGP4 package in satellite toolbox. But I want to modify bstar term at every orbit. For this purpose, I am trying to propagate a given tle for a single orbit and define a new tle at that point. Then I want to p…

---

## [DBInterface specify types?](https://discourse.julialang.org/t/dbinterface-specify-types/69956)

<div class="topic-metadata">

**Author:** [@Lincoln\_Hannah](https://discourse.julialang.org/u/Lincoln_Hannah)\
**Replies:** 0\
**Last updated:** [October 18, 2021, 2:21am UTC](https://discourse.julialang.org/t/dbinterface-specify-types/69956 "2021-10-18T02:21:36Z")

</div>

Is there an equivalent of CSV.read types= e.g. DBInterface.execute( "select statement", types = Dict( Col1 =\> Date, ... ) ) Querying SQL server, DateTime comes through ok, but Date becames a string

---

## [How to initialize an empty StaticArray?](https://discourse.julialang.org/t/how-to-initialize-an-empty-staticarray/69942)

<div class="topic-metadata">

**Author:** [@curious](https://discourse.julialang.org/u/curious)\
**Replies:** 15\
**Last updated:** [October 18, 2021, 1:09am UTC](https://discourse.julialang.org/t/how-to-initialize-an-empty-staticarray/69942 "2021-10-18T01:09:50Z")

</div>

For performance reasons, I want to replace usage of standard arrays with StaticArrays. However, I couldn’t find how to initialize an empty StaticArray of a given size, that I can populate as values become available. I am…

---

## [Can you avoid stating the arguments in an anonymous function?](https://discourse.julialang.org/t/can-you-avoid-stating-the-arguments-in-an-anonymous-function/69795)

<div class="topic-metadata">

**Author:** [@Lincoln\_Hannah](https://discourse.julialang.org/u/Lincoln_Hannah)\
**Replies:** 13\
**Last updated:** [October 18, 2021, 12:07am UTC](https://discourse.julialang.org/t/can-you-avoid-stating-the-arguments-in-an-anonymous-function/69795 "2021-10-18T00:07:21Z")

</div>

Is it possible to avoid stating the arguments in an anonymous function? x = (a=1,b=2) ( (a,b) -\> a+b )(x...) works fine, but could you do something like ( (\_...) -\> a+b )(x...) x would have to contain elements a and …

---

## [How to define local or global variables?](https://discourse.julialang.org/t/how-to-define-local-or-global-variables/69949)

<div class="topic-metadata">

**Author:** [@leon](https://discourse.julialang.org/u/leon)\
**Replies:** 2\
**Last updated:** [October 17, 2021, 10:36pm UTC](https://discourse.julialang.org/t/how-to-define-local-or-global-variables/69949 "2021-10-17T22:36:18Z")

</div>

So far the most frustrating part of using Julia has been the below annoying error message: Assignment to \`IDOutput\` in soft scope is ambiguous because a global variable by the same name exists: \`IDOutput\` will be treate…

---

## [TypeError: in typeassert in Julia 1.6.3](https://discourse.julialang.org/t/typeerror-in-typeassert-in-julia-1-6-3/69945)

<div class="topic-metadata">

**Author:** [@daneshvar.amrollahi](https://discourse.julialang.org/u/daneshvar.amrollahi)\
**Replies:** 0\
**Last updated:** [October 17, 2021, 8:07pm UTC](https://discourse.julialang.org/t/typeerror-in-typeassert-in-julia-1-6-3/69945 "2021-10-17T20:07:58Z")

</div>

I am new to Julia. I am working on a Julia package which the writer is not available. This is the part of the code where I have a problem with: function find\_partition(model::Model, ms) ps = Dict{Z3Expr,Vector{…

---

## [TypeError: in typeassert in hashindex method](https://discourse.julialang.org/t/typeerror-in-typeassert-in-hashindex-method/69941)

<div class="topic-metadata">

**Author:** [@daneshvar.amrollahi](https://discourse.julialang.org/u/daneshvar.amrollahi)\
**Replies:** 0\
**Last updated:** [October 17, 2021, 7:38pm UTC](https://discourse.julialang.org/t/typeerror-in-typeassert-in-hashindex-method/69941 "2021-10-17T19:38:55Z")

</div>

Hi, I am new to Julia. I am working with a Julia package not written by myself which the writer is not available. I am facing this error: ERROR: TypeError: in typeassert, expected UInt64, got a value of type UInt32 Th…

---

## [Things that are easier in Julia than Python/R etc](https://discourse.julialang.org/t/things-that-are-easier-in-julia-than-python-r-etc/69403)

<div class="topic-metadata">

**Author:** [@Derek\_Vetsch](https://discourse.julialang.org/u/Derek_Vetsch)\
**Replies:** 59\
**Last updated:** [October 17, 2021, 8:59pm UTC](https://discourse.julialang.org/t/things-that-are-easier-in-julia-than-python-r-etc/69403 "2021-10-17T20:59:03Z")

</div>

For the past year or so, I’ve been trying to encourage my firm to give Julia a place in our tech stack. Now that the idea has finally gained some traction, I can present a more formal case with some code samples. To tha…

---

## [The difference between PCHIPInterpolation and SimplePCHIP](https://discourse.julialang.org/t/the-difference-between-pchipinterpolation-and-simplepchip/69927)

<div class="topic-metadata">

**Author:** [@leon](https://discourse.julialang.org/u/leon)\
**Replies:** 4\
**Last updated:** [October 17, 2021, 8:57pm UTC](https://discourse.julialang.org/t/the-difference-between-pchipinterpolation-and-simplepchip/69927 "2021-10-17T20:57:03Z")

</div>

Anyone knows their differences? I wonder which one I should use? Thanks.

---

## [Conditional statistics over 1 dimension of a multidimensional array](https://discourse.julialang.org/t/conditional-statistics-over-1-dimension-of-a-multidimensional-array/69944)

<div class="topic-metadata">

**Author:** [@Chiil](https://discourse.julialang.org/u/Chiil)\
**Replies:** 2\
**Last updated:** [October 17, 2021, 8:39pm UTC](https://discourse.julialang.org/t/conditional-statistics-over-1-dimension-of-a-multidimensional-array/69944 "2021-10-17T20:39:50Z")

</div>

I would like to compute conditional statistics over one dimension of a two-dimensional array. I have an array a and I would like to compute a mean over the first dimension, taking into account only the cells where b \< 0.…

---

## [Specify a prerelease version in Project.toml compat section?](https://discourse.julialang.org/t/specify-a-prerelease-version-in-project-toml-compat-section/69938)

<div class="topic-metadata">

**Author:** [@Mark\_Nahabedian](https://discourse.julialang.org/u/Mark_Nahabedian)\
**Replies:** 1\
**Last updated:** [October 17, 2021, 8:00pm UTC](https://discourse.julialang.org/t/specify-a-prerelease-version-in-project-toml-compat-section/69938 "2021-10-17T20:00:48Z")

</div>

I have a clone of NativeSVG.jl at https://github.com/MarkNahabedian/NativeSVG.jl. It’s Project.toml file designates it as version = "0.1.0-naha" which parses successfully as a VersionNumber. VersionNumber("0.1.0-nah…

---

## [Using JuMP to solve the heat equation - performance tips requested](https://discourse.julialang.org/t/using-jump-to-solve-the-heat-equation-performance-tips-requested/69749)

<div class="topic-metadata">

**Author:** [@krusharth.shah](https://discourse.julialang.org/u/krusharth.shah)\
**Replies:** 11\
**Last updated:** [October 17, 2021, 7:55pm UTC](https://discourse.julialang.org/t/using-jump-to-solve-the-heat-equation-performance-tips-requested/69749 "2021-10-17T19:55:32Z")

</div>

Hello everyone! I am studying MSc Mechatronics and currently working on my scientific project. It is regarding making the Julia code of 1D Heat equation faster. With this message, I have also attached the Julia source…

---

## [Special casing small integers known at compile time](https://discourse.julialang.org/t/special-casing-small-integers-known-at-compile-time/69934)

<div class="topic-metadata">

**Author:** [@Lilith](https://discourse.julialang.org/u/Lilith)\
**Replies:** 4\
**Last updated:** [October 17, 2021, 6:35pm UTC](https://discourse.julialang.org/t/special-casing-small-integers-known-at-compile-time/69934 "2021-10-17T18:35:21Z")

</div>

I see this sort of code sometimes and it makes me cringe similar(a::Array{T,1}) where {T} = Vector{T}(undef, size(a,1)) similar(a::Array{T,2}) where {T} = Matrix{T}(undef, size(a,1)…

---

## [My gradients IdDIct keys are GlobalRefs instead of arrays](https://discourse.julialang.org/t/my-gradients-iddict-keys-are-globalrefs-instead-of-arrays/69665)

<div class="topic-metadata">

**Author:** [@Johan-Gronqvist](https://discourse.julialang.org/u/Johan-Gronqvist)\
**Replies:** 2\
**Last updated:** [October 17, 2021, 5:50pm UTC](https://discourse.julialang.org/t/my-gradients-iddict-keys-are-globalrefs-instead-of-arrays/69665 "2021-10-17T17:50:11Z")

</div>

My gradients sometimes appear with keys of type GlobalRef. I do not understand why and I do not understand how to change that. Example code: using Flux function h(x; bs=bs) for b in bs\[1:end-1\] x = x+b …

---

## [Error using Differential Equations and Unitful](https://discourse.julialang.org/t/error-using-differential-equations-and-unitful/69909)

<div class="topic-metadata">

**Author:** [@MisterBiggs](https://discourse.julialang.org/u/MisterBiggs)\
**Replies:** 5\
**Last updated:** [October 17, 2021, 4:59pm UTC](https://discourse.julialang.org/t/error-using-differential-equations-and-unitful/69909 "2021-10-17T16:59:54Z")

</div>

I am using Differential Equations and Unitful together for the first time and I am running into the following error when trying to solve my OdeProblem: ArgumentError: zero(Unitful.Quantity{Float64}) not defined. My ODE …

---

## [Gnuplot (Gaston.jl) backend for Plots](https://discourse.julialang.org/t/gnuplot-gaston-jl-backend-for-plots/64122)

<div class="topic-metadata">

**Author:** [@isentropic](https://discourse.julialang.org/u/isentropic)\
**Replies:** 4\
**Last updated:** [October 17, 2021, 4:10pm UTC](https://discourse.julialang.org/t/gnuplot-gaston-jl-backend-for-plots/64122 "2021-10-17T16:10:53Z")

</div>

Dear Plot users, Experimental gnuplot/gaston.jl backend has been merged into Plots.jl master branch (including a release). My primary goal is to have a lightweight backend in plots that supports REPL plotting. Since man…

---

## [What is the proper way to use Julia Jupyter notebooks in VS Code?](https://discourse.julialang.org/t/what-is-the-proper-way-to-use-julia-jupyter-notebooks-in-vs-code/69925)

<div class="topic-metadata">

**Author:** [@Eugeleo](https://discourse.julialang.org/u/Eugeleo)\
**Replies:** 2\
**Last updated:** [October 17, 2021, 2:32pm UTC](https://discourse.julialang.org/t/what-is-the-proper-way-to-use-julia-jupyter-notebooks-in-vs-code/69925 "2021-10-17T14:32:32Z")

</div>

I tried to setup Jupyter with Julia recently, but I’ve never arrived at a perfect solution. See below for information about what I tried and what didn’t work. My questions are: What Julia packages should I add to my pr…

---

## [Which laptop to choose?](https://discourse.julialang.org/t/which-laptop-to-choose/69830)

<div class="topic-metadata">

**Author:** [@Seif\_Shebl](https://discourse.julialang.org/u/Seif_Shebl)\
**Replies:** 18\
**Last updated:** [October 17, 2021, 10:48am UTC](https://discourse.julialang.org/t/which-laptop-to-choose/69830 "2021-10-17T10:48:18Z")

</div>

I’m just about to buy a new laptop for coding and work, and I have the following two options: Lenovo Legion 5 Pro (Intel i7-11800H) Lenovo Legion 5 (AMD R7-5800H) I can summarize the main differences as below: CPU …

---

## [What does jl\_init\_restored\_modules do? Why does loading my package take so long?](https://discourse.julialang.org/t/what-does-jl-init-restored-modules-do-why-does-loading-my-package-take-so-long/69906)

<div class="topic-metadata">

**Author:** [@cjdoris](https://discourse.julialang.org/u/cjdoris)\
**Replies:** 12\
**Last updated:** [October 17, 2021, 12:58pm UTC](https://discourse.julialang.org/t/what-does-jl-init-restored-modules-do-why-does-loading-my-package-take-so-long/69906 "2021-10-17T12:58:00Z")

</div>

Here is the ProfileView flamegraph of using PythonCall, which takes about 4.5 seconds: As you can see, almost half the time is spent in \_include\_from\_serialized at this line, namely the jl\_init\_restored\_modules C fun…

---

## [Sparse matrix coefficient computation with ForwardDiff and LoopVectorization](https://discourse.julialang.org/t/sparse-matrix-coefficient-computation-with-forwarddiff-and-loopvectorization/69928)

<div class="topic-metadata">

**Author:** [@Gravlax](https://discourse.julialang.org/u/Gravlax)\
**Replies:** 0\
**Last updated:** [October 17, 2021, 12:20pm UTC](https://discourse.julialang.org/t/sparse-matrix-coefficient-computation-with-forwarddiff-and-loopvectorization/69928 "2021-10-17T12:20:20Z")

</div>

Hi everyone, I am trying to write a code that computes both the residual and sparse matrix coefficients for multi-dimensional non-linear Poisson-type problems. The idea is that information about the stencil and boundary…

---

## [How to do custom allocators](https://discourse.julialang.org/t/how-to-do-custom-allocators/69112)

<div class="topic-metadata">

**Author:** [@goerch](https://discourse.julialang.org/u/goerch)\
**Replies:** 22\
**Last updated:** [October 17, 2021, 11:50am UTC](https://discourse.julialang.org/t/how-to-do-custom-allocators/69112 "2021-10-17T11:50:20Z")

</div>

In the everlasting quest to reduce allocations I stumbled about problems with node based data structures. Constructing a test case based on DataStructures.jl’s singly linked list I tried to eliminate allocations in const…

---

## [Internal link ins Pluto](https://discourse.julialang.org/t/internal-link-ins-pluto/69924)

<div class="topic-metadata">

**Author:** [@doppioandante](https://discourse.julialang.org/u/doppioandante)\
**Replies:** 1\
**Last updated:** [October 17, 2021, 11:09am UTC](https://discourse.julialang.org/t/internal-link-ins-pluto/69924 "2021-10-17T11:09:05Z")

</div>

I have a bibliography section in my Pluto notebook (written in markdown, with a ## Heading) and I want to link to this section when citing inside the document (i.e. the click scrolls the page down to the bibliography). I…

---

## [Data augmentation question (CIFAR10)](https://discourse.julialang.org/t/data-augmentation-question-cifar10/69667)

<div class="topic-metadata">

**Author:** [@Rasmus\_Hoier](https://discourse.julialang.org/u/Rasmus_Hoier)\
**Replies:** 9\
**Last updated:** [October 17, 2021, 9:36am UTC](https://discourse.julialang.org/t/data-augmentation-question-cifar10/69667 "2021-10-17T09:36:22Z")

</div>

Hi, I am training a CNN on CIFAR10 (via Flux.DataLoader) and am trying to apply some stochastic data transformations to each batch of data at runtime. My goal is to apply the following operations to each batch I get fr…

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

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