# Latest

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

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

**Page:** 1214

---

## [Why does 'map' recompile each time?](https://discourse.julialang.org/t/why-does-map-recompile-each-time/71149)

<div class="topic-metadata">

**Author:** [@Iulian.Cioarca](https://discourse.julialang.org/u/Iulian.Cioarca)\
**Replies:** 4\
**Last updated:** [November 8, 2021, 4:10pm UTC](https://discourse.julialang.org/t/why-does-map-recompile-each-time/71149 "2021-11-08T16:10:44Z")

</div>

Consider the follosing example: y = \[1 2 3\] @time findall(map( x-\> x.== 3, y)) 0.077566 seconds (69.12 k allocations: 4.160 MiB, 13.08% gc time, 99.57% compilation time) 1-element Vector{CartesianIndex{2}}: CartesianI…

---

## [Limited parallel downloads](https://discourse.julialang.org/t/limited-parallel-downloads/71146)

<div class="topic-metadata">

**Author:** [@robertdj](https://discourse.julialang.org/u/robertdj)\
**Replies:** 7\
**Last updated:** [November 8, 2021, 4:09pm UTC](https://discourse.julialang.org/t/limited-parallel-downloads/71146 "2021-11-08T16:09:09Z")

</div>

I want to make a large number of REST calls to download files. Each call is slow and I can only make a certain number of concurrent downloads (say N). I would like to max out on the number of concurrent calls. I imagine…

---

## [Converting Missing to Date](https://discourse.julialang.org/t/converting-missing-to-date/71150)

<div class="topic-metadata">

**Author:** [@jnewbie](https://discourse.julialang.org/u/jnewbie)\
**Replies:** 2\
**Last updated:** [November 8, 2021, 2:39pm UTC](https://discourse.julialang.org/t/converting-missing-to-date/71150 "2021-11-08T14:39:35Z")

</div>

Hello everyone, I am trying to do this operation on my DataFrame: for i in 1:nrow(df2) for k in a df1\[k,:col3\] = max(datetime2unix(DateTime(Dates.today() + Dates.Day(60))), datetime2unix(DateTime(df2\[i,:co…

---

## [Type-instability in DifferentialEquations.jl](https://discourse.julialang.org/t/type-instability-in-differentialequations-jl/71141)

<div class="topic-metadata">

**Author:** [@Elyco](https://discourse.julialang.org/u/Elyco)\
**Replies:** 3\
**Last updated:** [November 8, 2021, 1:54pm UTC](https://discourse.julialang.org/t/type-instability-in-differentialequations-jl/71141 "2021-11-08T13:54:41Z")

</div>

Hi everyone, I’m trying to solve ODE many times each with different initial conditions, and I would like to optimize my code for that. I’ve tried to save in a (mutable) struct the solver in order to save time and the ne…

---

## [Problem with CUDAv3](https://discourse.julialang.org/t/problem-with-cudav3/71118)

<div class="topic-metadata">

**Author:** [@shiroghost](https://discourse.julialang.org/u/shiroghost)\
**Replies:** 9\
**Last updated:** [November 8, 2021, 1:19pm UTC](https://discourse.julialang.org/t/problem-with-cudav3/71118 "2021-11-08T13:19:30Z")

</div>

I have been using CUDAv2.4 and everything has worked perfect. But after upgrading, I have found that many kernels fail to compile. Even a simple kernel: function krnl\_foo!(ac,bc) b = threadIdx().x …

---

## [Reference source files is docs using Documenter](https://discourse.julialang.org/t/reference-source-files-is-docs-using-documenter/71148)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 0\
**Last updated:** [November 8, 2021, 1:13pm UTC](https://discourse.julialang.org/t/reference-source-files-is-docs-using-documenter/71148 "2021-11-08T13:13:01Z")

</div>

In some docs of a package, I want to point to some files in the github repository (some example files). Currently, I’m using something: The complete example file is available !\[here\](https://github.com/m3g/CellListMap.…

---

## [How to Find the maximum eigenvalue of the matrix](https://discourse.julialang.org/t/how-to-find-the-maximum-eigenvalue-of-the-matrix/71147)

<div class="topic-metadata">

**Author:** [@F-YF](https://discourse.julialang.org/u/F-YF)\
**Replies:** 1\
**Last updated:** [November 8, 2021, 1:06pm UTC](https://discourse.julialang.org/t/how-to-find-the-maximum-eigenvalue-of-the-matrix/71147 "2021-11-08T13:06:15Z")

</div>

The eigen () function is going to compute all the eigen values of the matrix, and that takes a long time, so I just want the biggest eigen value ,so how to do that?

---

## [Trying to use @eval to overwrite method defined by another package](https://discourse.julialang.org/t/trying-to-use-eval-to-overwrite-method-defined-by-another-package/71022)

<div class="topic-metadata">

**Author:** [@Bruno\_Amorim](https://discourse.julialang.org/u/Bruno_Amorim)\
**Replies:** 4\
**Last updated:** [November 8, 2021, 12:05pm UTC](https://discourse.julialang.org/t/trying-to-use-eval-to-overwrite-method-defined-by-another-package/71022 "2021-11-08T12:05:50Z")

</div>

I am trying to devellop a package that takes advantage of the multithreading provided by Polyester.jl to multithread sparse matrix - vec multiplication for matrices in the CSR format, as defined in the package SparseMatr…

---

## [Blogs, terminology, amazement](https://discourse.julialang.org/t/blogs-terminology-amazement/68256)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 5\
**Last updated:** [November 8, 2021, 11:58am UTC](https://discourse.julialang.org/t/blogs-terminology-amazement/68256 "2021-11-08T11:58:57Z")

</div>

I always look forward to the monthly JuliaComputing blogs, and I tend to point people to them (and e.g. the amazing case studies). They are usually readable. In the latest September one there is mention of: NeuralFMU:…

---

## [\[Turing\] Using a random variable as an index](https://discourse.julialang.org/t/turing-using-a-random-variable-as-an-index/66756)

<div class="topic-metadata">

**Author:** [@a\_garval](https://discourse.julialang.org/u/a_garval)\
**Replies:** 2\
**Last updated:** [November 8, 2021, 11:46am UTC](https://discourse.julialang.org/t/turing-using-a-random-variable-as-an-index/66756 "2021-11-08T11:46:21Z")

</div>

Hey everyone, I’m trying to run some examples from Bayesian Methods for Hackers. The example I’m working on is a simple Poisson model. I want to go further and investigate if we could find different a specific day on whi…

---

## [DomainError in TemporalGPs](https://discourse.julialang.org/t/domainerror-in-temporalgps/70708)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 7\
**Last updated:** [November 8, 2021, 11:32am UTC](https://discourse.julialang.org/t/domainerror-in-temporalgps/70708 "2021-11-08T11:32:54Z")

</div>

I’m trying to fit a GP with TemporalGPs. Sometimes I get a DomainError when it attempts to sqrt a negative number. When that happens I usually just guess again at some initial parameters and re-run it. Sometimes that doe…

---

## [Issue with PDMP and Forwardiff - DifferentialEquation](https://discourse.julialang.org/t/issue-with-pdmp-and-forwardiff-differentialequation/17925)

<div class="topic-metadata">

**Author:** [@rveltz](https://discourse.julialang.org/u/rveltz)\
**Replies:** 25\
**Last updated:** [November 8, 2021, 11:08am UTC](https://discourse.julialang.org/t/issue-with-pdmp-and-forwardiff-differentialequation/17925 "2021-11-08T11:08:57Z")

</div>

Hi, I repost here an issue posted in DifferentialEquations because I am not sure this issue concerns them entirely. In the following example, Forwardiff which is called from Rosenbrock23() fails. I spent quite some tim…

---

## [Allocation of Memory while evaluate a model](https://discourse.julialang.org/t/allocation-of-memory-while-evaluate-a-model/71064)

<div class="topic-metadata">

**Author:** [@HenrZu](https://discourse.julialang.org/u/HenrZu)\
**Replies:** 7\
**Last updated:** [November 8, 2021, 11:02am UTC](https://discourse.julialang.org/t/allocation-of-memory-while-evaluate-a-model/71064 "2021-11-08T11:02:05Z")

</div>

While working on the performance of a model used in a numerical simulation, I noticed that memory is allocated every time a model is evaluated. Since I call the model several times within the simulation, there is a sign…

---

## [Converting XLSX to DataFrame](https://discourse.julialang.org/t/converting-xlsx-to-dataframe/71142)

<div class="topic-metadata">

**Author:** [@jnewbie](https://discourse.julialang.org/u/jnewbie)\
**Replies:** 2\
**Last updated:** [November 8, 2021, 10:27am UTC](https://discourse.julialang.org/t/converting-xlsx-to-dataframe/71142 "2021-11-08T10:27:37Z")

</div>

Hello everyone, I am trying to read an xlsx file in julia : Materials = XLSX.readtable("MatData.xlsx","Sheet1"; header = true) In order to be able to make changes/calculations on it I want to convert it into a DataFra…

---

## [Test.jl and \`@testset\` are saving my package, but why? (and how make it work without them)](https://discourse.julialang.org/t/test-jl-and-testset-are-saving-my-package-but-why-and-how-make-it-work-without-them/71136)

<div class="topic-metadata">

**Author:** [@Azzaare](https://discourse.julialang.org/u/Azzaare)\
**Replies:** 0\
**Last updated:** [November 8, 2021, 9:24am UTC](https://discourse.julialang.org/t/test-jl-and-testset-are-saving-my-package-but-why-and-how-make-it-work-without-them/71136 "2021-11-08T09:24:41Z")

</div>

Hi there! Test.jl and @testset are saving my package in a funny way (and I don’t understand why yet). I am making a semi-automated performance checking package PerfChecker.jl I use a method in the package with one of i…

---

## [Sample rows of a 3 dimensional array without replacement](https://discourse.julialang.org/t/sample-rows-of-a-3-dimensional-array-without-replacement/71116)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 7\
**Last updated:** [November 8, 2021, 8:54am UTC](https://discourse.julialang.org/t/sample-rows-of-a-3-dimensional-array-without-replacement/71116 "2021-11-08T08:54:09Z")

</div>

I would like to sample rows from a three dimensional array without replacement. For example, if I have x = rand(10, 5, 3) a random set of indices might look like {(2,2), (9,3)}, where the first position is the index of…

---

## [It takes several minutes to add a single package](https://discourse.julialang.org/t/it-takes-several-minutes-to-add-a-single-package/70704)

<div class="topic-metadata">

**Author:** [@Lilith](https://discourse.julialang.org/u/Lilith)\
**Replies:** 105\
**Last updated:** [November 8, 2021, 8:11am UTC](https://discourse.julialang.org/t/it-takes-several-minutes-to-add-a-single-package/70704 "2021-11-08T08:11:46Z")

</div>

It takes several (6+) minutes to add a single package to my default Julia environment. What’s going wrong? (@v1.6) pkg\> add https://github.com/TakekazuKATO/TailRec.jl Cloning git-repo \`https://github.com/TakekazuKA…

---

## [Rb Tree, Benchmarking rate per CPU second](https://discourse.julialang.org/t/rb-tree-benchmarking-rate-per-cpu-second/71072)

<div class="topic-metadata">

**Author:** [@mnemonic](https://discourse.julialang.org/u/mnemonic)\
**Replies:** 2\
**Last updated:** [November 8, 2021, 3:31am UTC](https://discourse.julialang.org/t/rb-tree-benchmarking-rate-per-cpu-second/71072 "2021-11-08T03:31:38Z")

</div>

Is there a way to benchmark a block of Julia code in rate per CPU second? Example in Perl, see “timethese” How to benchmark Perl code for speed It outputs something like 10 wallclock secs (10.32 usr + 0.00 sys = 10.3…

---

## [Problem standardizing data with MLJ + NaN predictions in Flux](https://discourse.julialang.org/t/problem-standardizing-data-with-mlj-nan-predictions-in-flux/70923)

<div class="topic-metadata">

**Author:** [@lfenzo](https://discourse.julialang.org/u/lfenzo)\
**Replies:** 3\
**Last updated:** [November 8, 2021, 2:58am UTC](https://discourse.julialang.org/t/problem-standardizing-data-with-mlj-nan-predictions-in-flux/70923 "2021-11-08T02:58:36Z")

</div>

I’m new to Julia and Flux so I suspect this may be something dumb that I may be missing… I was trying to do some pre-processing in order to train a NN using Flux and ended up stuck with two problems: The predictions …

---

## [Help with global optimizers in NLopt and GalacticOptim](https://discourse.julialang.org/t/help-with-global-optimizers-in-nlopt-and-galacticoptim/71084)

<div class="topic-metadata">

**Author:** [@amrods](https://discourse.julialang.org/u/amrods)\
**Replies:** 11\
**Last updated:** [November 8, 2021, 1:29am UTC](https://discourse.julialang.org/t/help-with-global-optimizers-in-nlopt-and-galacticoptim/71084 "2021-11-08T01:29:00Z")

</div>

This is a very simple optimization problem, but for some reason I cannot get NLopt to converge: using GalacticOptim using NLopt rosenbrock(x, p) = (p\[1\] - x\[1\])^2 + p\[2\] \* (x\[2\] - x\[1\]^2)^2 x0 = zeros(2) p = \[1.0, 10…

---

## [Consistent use of FilterCoefficients in DSP.jl?](https://discourse.julialang.org/t/consistent-use-of-filtercoefficients-in-dsp-jl/71119)

<div class="topic-metadata">

**Author:** [@mbaz](https://discourse.julialang.org/u/mbaz)\
**Replies:** 0\
**Last updated:** [November 8, 2021, 1:22am UTC](https://discourse.julialang.org/t/consistent-use-of-filtercoefficients-in-dsp-jl/71119 "2021-11-08T01:22:53Z")

</div>

In DSP.jl, some filter design commands return a filter object, while others (like remez) return a plain Float64 vector. This is inconvenient because many of the package functions don’t take vectors as arguments. I have …

---

## [Plotting Atomic Orbitals with Makie](https://discourse.julialang.org/t/plotting-atomic-orbitals-with-makie/71032)

<div class="topic-metadata">

**Author:** [@Aroeira](https://discourse.julialang.org/u/Aroeira)\
**Replies:** 4\
**Last updated:** [November 8, 2021, 12:09am UTC](https://discourse.julialang.org/t/plotting-atomic-orbitals-with-makie/71032 "2021-11-08T00:09:03Z")

</div>

Hello, I am trying to write a function to produce an interactive plot for Atomic Orbitals using Makie.jl. The ultimate goal is to plot molecular orbitals, but if I can do atomic ones the extension must be trivial. Firs…

---

## [Conditional sum in constraint](https://discourse.julialang.org/t/conditional-sum-in-constraint/71100)

<div class="topic-metadata">

**Author:** [@Fabrizio](https://discourse.julialang.org/u/Fabrizio)\
**Replies:** 8\
**Last updated:** [November 7, 2021, 11:53pm UTC](https://discourse.julialang.org/t/conditional-sum-in-constraint/71100 "2021-11-07T23:53:02Z")

</div>

Dear all, the piece of code below works well with Jump until Ver 0.20.6, newer version of JuMP give to to me the error LoadError: KeyError: key (1, 1, 2, 1) not found The BRANCH set is a sparse set indicating the netwo…

---

## [How to create a vector of functions and index in a for loop](https://discourse.julialang.org/t/how-to-create-a-vector-of-functions-and-index-in-a-for-loop/71107)

<div class="topic-metadata">

**Author:** [@Sbeltranj](https://discourse.julialang.org/u/Sbeltranj)\
**Replies:** 3\
**Last updated:** [November 7, 2021, 10:23pm UTC](https://discourse.julialang.org/t/how-to-create-a-vector-of-functions-and-index-in-a-for-loop/71107 "2021-11-07T22:23:41Z")

</div>

Hi, I want to create a vector of functions in julia, so that I can index in a for loop: my code is: qxloc1 = \[qxloc(x) = 10 qxloc(x) = 10\] qyloc2 = \[qyloc(x) = 10 qyloc(x) = 10\] for e = 1:2 …

---

## [Workaround for Zygote.jl issue #317 not working?](https://discourse.julialang.org/t/workaround-for-zygote-jl-issue-317-not-working/59028)

<div class="topic-metadata">

**Author:** [@Andreas\_Poulsen](https://discourse.julialang.org/u/Andreas_Poulsen)\
**Replies:** 1\
**Last updated:** [November 7, 2021, 10:04pm UTC](https://discourse.julialang.org/t/workaround-for-zygote-jl-issue-317-not-working/59028 "2021-11-07T22:04:25Z")

</div>

Hi, I’ve run into the problem described in Zygote bugs #857, #317 and maybe #495. In essence, when broadcasting over a piecewise function where some branches may not have an adjoint, Zygote will try to back-propagate no…

---

## [Why does Julia have around 200MB of memory overhead, even for small programs?](https://discourse.julialang.org/t/why-does-julia-have-around-200mb-of-memory-overhead-even-for-small-programs/71071)

<div class="topic-metadata">

**Author:** [@akriegman](https://discourse.julialang.org/u/akriegman)\
**Replies:** 5\
**Last updated:** [November 7, 2021, 9:03pm UTC](https://discourse.julialang.org/t/why-does-julia-have-around-200mb-of-memory-overhead-even-for-small-programs/71071 "2021-11-07T21:03:49Z")

</div>

I was looking at Julia’s performance in the Computer Language Benchmarks Game. Julia does pretty well in terms of speed, but I was noticing that Julia has a memory footprint of around 200MB for every benchmark, even ones…

---

## [Tab complete for unicode variables in VS Code debug console?](https://discourse.julialang.org/t/tab-complete-for-unicode-variables-in-vs-code-debug-console/69450)

<div class="topic-metadata">

**Author:** [@thompsonmj](https://discourse.julialang.org/u/thompsonmj)\
**Replies:** 2\
**Last updated:** [November 7, 2021, 8:04pm UTC](https://discourse.julialang.org/t/tab-complete-for-unicode-variables-in-vs-code-debug-console/69450 "2021-11-07T20:04:24Z")

</div>

I can’t seem to use variables containing special Unicode characters (e.g. \\alpha\<tab\>) at the debug console because pressing Tab jumps to the next object rather than completing the character. Is this an issue with VS Co…

---

## [How to "transpose" a vector of vectors?](https://discourse.julialang.org/t/how-to-transpose-a-vector-of-vectors/71085)

<div class="topic-metadata">

**Author:** [@tp2750](https://discourse.julialang.org/u/tp2750)\
**Replies:** 7\
**Last updated:** [November 7, 2021, 8:08pm UTC](https://discourse.julialang.org/t/how-to-transpose-a-vector-of-vectors/71085 "2021-11-07T20:08:12Z")

</div>

I have a vector V1 of length m where each element is a vector of length n. How do I “transpose” that into a vector V2 of length n where each element is a vector of length m and V2\[i\]\[j\] == V1\[j\]\[i\]? As an example: V1 …

---

## [Constant propagation in recursive functions](https://discourse.julialang.org/t/constant-propagation-in-recursive-functions/22192)

<div class="topic-metadata">

**Author:** [@ffevotte](https://discourse.julialang.org/u/ffevotte)\
**Replies:** 2\
**Last updated:** [November 7, 2021, 8:04pm UTC](https://discourse.julialang.org/t/constant-propagation-in-recursive-functions/22192 "2021-11-07T20:04:30Z")

</div>

While trying to build a simple example illustrating constant propagation, I made the following test (using the recursive variant of Euclid’s algorithm to compute a GCD): julia\> function gcd\_rec(a, b) b == 0 &&…

---

## [Multiplying boolean matrices](https://discourse.julialang.org/t/multiplying-boolean-matrices/71086)

<div class="topic-metadata">

**Author:** [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Replies:** 4\
**Last updated:** [November 7, 2021, 6:54pm UTC](https://discourse.julialang.org/t/multiplying-boolean-matrices/71086 "2021-11-07T18:54:29Z")

</div>

Why is there such a performance difference between multiplying float matrices and other kinds of matrices? I understand float matrices hit BLAS which is heavily optimized. But is this a fundamental difference or or just …

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

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