# Latest

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

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

**Page:** 1523

---

## [Tidying up a csv file (follow-up to question 53261/4)](https://discourse.julialang.org/t/tidying-up-a-csv-file-follow-up-to-question-53261-4/53292)

<div class="topic-metadata">

**Author:** [@mocalvao](https://discourse.julialang.org/u/mocalvao)\
**Replies:** 9\
**Last updated:** [January 14, 2021, 7:38pm UTC](https://discourse.julialang.org/t/tidying-up-a-csv-file-follow-up-to-question-53261-4/53292 "2021-01-14T19:38:09Z")

</div>

Hi there, I have a .csv file (or, equivalently, I can have it as a .xlsx or .ods file), with the typical following format (suppressing many more intermediate rows): Vínculo Nome Número de identificação Estado Iniciado …

---

## [Minimum working example for ModelingToolkit's CTarget](https://discourse.julialang.org/t/minimum-working-example-for-modelingtoolkits-ctarget/53303)

<div class="topic-metadata">

**Author:** [@cadojo](https://discourse.julialang.org/u/cadojo)\
**Replies:** 5\
**Last updated:** [January 14, 2021, 7:34pm UTC](https://discourse.julialang.org/t/minimum-working-example-for-modelingtoolkits-ctarget/53303 "2021-01-14T19:34:50Z")

</div>

I’m trying to use ModelingToolkit.build\_function to generate a C function with “vector-like” inputs, and “matrix-like” outputs. I would prefer not to have the left-hand-side of the equations in the state vector, but I ca…

---

## [How to read files from a compressed file (zip/gz) lazily?](https://discourse.julialang.org/t/how-to-read-files-from-a-compressed-file-zip-gz-lazily/53314)

<div class="topic-metadata">

**Author:** [@jling](https://discourse.julialang.org/u/jling)\
**Replies:** 3\
**Last updated:** [January 14, 2021, 6:09pm UTC](https://discourse.julialang.org/t/how-to-read-files-from-a-compressed-file-zip-gz-lazily/53314 "2021-01-14T18:09:53Z")

</div>

I know how to use TranscodingStreams to read one file without fully decompress it first, what if the target.tar.gz contains multiple directories/files?

---

## [How to improve the speed of matrix multiplication?](https://discourse.julialang.org/t/how-to-improve-the-speed-of-matrix-multiplication/53293)

<div class="topic-metadata">

**Author:** [@zxjroger](https://discourse.julialang.org/u/zxjroger)\
**Replies:** 10\
**Last updated:** [January 14, 2021, 4:34pm UTC](https://discourse.julialang.org/t/how-to-improve-the-speed-of-matrix-multiplication/53293 "2021-01-14T16:34:39Z")

</div>

I have a code about large matrix multiplication in a for loop which currently takes longer time than I expected. I wonder if it is possible to improve the following MWE code: temp1 = randn(1600, 1600) temp2 = randn(1600…

---

## [Improve performance for multiple For-loops](https://discourse.julialang.org/t/improve-performance-for-multiple-for-loops/53289)

<div class="topic-metadata">

**Author:** [@EuRoXy](https://discourse.julialang.org/u/EuRoXy)\
**Replies:** 19\
**Last updated:** [January 14, 2021, 4:09pm UTC](https://discourse.julialang.org/t/improve-performance-for-multiple-for-loops/53289 "2021-01-14T16:09:40Z")

</div>

I am trying to optimize a calculation of correlation on a geo-grid of size 16x16: using NetCDF function corr1vall(s, lon1, lat1) # scenario, longitude 1, latitude 1 pathPv = myPath \* "pv/" \* ssps\[s\] \* "/day/EU/regr/…

---

## [Getting started with DrWatson.jl](https://discourse.julialang.org/t/getting-started-with-drwatson-jl/53339)

<div class="topic-metadata">

**Author:** [@Lucalino](https://discourse.julialang.org/u/Lucalino)\
**Replies:** 2\
**Last updated:** [January 14, 2021, 3:25pm UTC](https://discourse.julialang.org/t/getting-started-with-drwatson-jl/53339 "2021-01-14T15:25:20Z")

</div>

I’m using the scientific project managing package DrWatson which makes it easy to share code and make it run on different machines since it not only sets up a pre-designed project folder structure but also stores and act…

---

## [How does AbstractFloat\[1.0f0\] work?](https://discourse.julialang.org/t/how-does-abstractfloat-1-0f0-work/53333)

<div class="topic-metadata">

**Author:** [@HenrikM](https://discourse.julialang.org/u/HenrikM)\
**Replies:** 5\
**Last updated:** [January 14, 2021, 2:44pm UTC](https://discourse.julialang.org/t/how-does-abstractfloat-1-0f0-work/53333 "2021-01-14T14:44:48Z")

</div>

In the blog post Tutorial on precompilation there is a line cabs = AbstractFloat\[1.0f0\] . While trying to understand the syntax I found one case in the documentation, in the section Conversion there is a = Any\[1 2 3; 4 5…

---

## [HPC simulations with DrWatson (continued from Slack)](https://discourse.julialang.org/t/hpc-simulations-with-drwatson-continued-from-slack/44171)

<div class="topic-metadata">

**Author:** [@sebastianpech](https://discourse.julialang.org/u/sebastianpech)\
**Replies:** 3\
**Last updated:** [January 14, 2021, 2:43pm UTC](https://discourse.julialang.org/t/hpc-simulations-with-drwatson-continued-from-slack/44171 "2021-01-14T14:43:36Z")

</div>

We can continue the discussion here so it doesn’t get lost in Slack. Slack messagesRachel Kurchin 31. Juli um 18:52 Uhr Hi all, I had DMed @Datseris about this and he suggested I post here; I guess some other package m…

---

## [Pmap results in Array of type Any](https://discourse.julialang.org/t/pmap-results-in-array-of-type-any/53307)

<div class="topic-metadata">

**Author:** [@threadedblue](https://discourse.julialang.org/u/threadedblue)\
**Replies:** 6\
**Last updated:** [January 14, 2021, 2:33pm UTC](https://discourse.julialang.org/t/pmap-results-in-array-of-type-any/53307 "2021-01-14T14:33:00Z")

</div>

All, New to Julia Distribution and I have a question about pmap usage particularly as to it’s return value. I have two functions I am calling with pmap. One is written to return a simple string value, the otherreturns …

---

## [DiffEqFlux GPU example slow](https://discourse.julialang.org/t/diffeqflux-gpu-example-slow/53336)

<div class="topic-metadata">

**Author:** [@acse-ogb119](https://discourse.julialang.org/u/acse-ogb119)\
**Replies:** 3\
**Last updated:** [January 14, 2021, 1:53pm UTC](https://discourse.julialang.org/t/diffeqflux-gpu-example-slow/53336 "2021-01-14T13:53:11Z")

</div>

I copy and paste the DiffEqFlux.jl GPU example, slap in an @time on the sciml\_train call at the end and spin it up. The runtime is reported on my system as around 38 seconds. I then edit the example to be fully CPU, and…

---

## [@enter include("file.jl")](https://discourse.julialang.org/t/enter-include-file-jl/53335)

<div class="topic-metadata">

**Author:** [@Allan\_Baker](https://discourse.julialang.org/u/Allan_Baker)\
**Replies:** 0\
**Last updated:** [January 14, 2021, 1:14pm UTC](https://discourse.julialang.org/t/enter-include-file-jl/53335 "2021-01-14T13:14:06Z")

</div>

Can’t figure out how to get the VSCODE debugger to like: @enter include(“file.jl”) from the REPL When I step into the include, it goes into a ccall and doesn’t let me go into the file to hit a breakpoint. If I try to…

---

## [How to find gradients of weights and bias of multilayer neural network?](https://discourse.julialang.org/t/how-to-find-gradients-of-weights-and-bias-of-multilayer-neural-network/53323)

<div class="topic-metadata">

**Author:** [@Manu\_Francis](https://discourse.julialang.org/u/Manu_Francis)\
**Replies:** 4\
**Last updated:** [January 14, 2021, 10:41am UTC](https://discourse.julialang.org/t/how-to-find-gradients-of-weights-and-bias-of-multilayer-neural-network/53323 "2021-01-14T10:41:50Z")

</div>

Hi, I am trying to display gradients of weights and biases in each layer of a multi layer network as below: f = rand(2,10) y = rand(10) dims = \[2, 4, 2, 1\] layers = \[Dense(dims\[i\], dims\[i+1\], Flux.relu) for i in 1:len…

---

## [Caching precompiled function](https://discourse.julialang.org/t/caching-precompiled-function/53274)

<div class="topic-metadata">

**Author:** [@LinasBa](https://discourse.julialang.org/u/LinasBa)\
**Replies:** 7\
**Last updated:** [January 14, 2021, 9:56am UTC](https://discourse.julialang.org/t/caching-precompiled-function/53274 "2021-01-14T09:56:05Z")

</div>

Hi, I’m trying to figure out most convenient workflow/project structure for my use-case. Currently I have a directory with multiple \*.jl files without defining any new Modules or Packages. This project is under contin…

---

## [SparseArray types over distributed reduction](https://discourse.julialang.org/t/sparsearray-types-over-distributed-reduction/53116)

<div class="topic-metadata">

**Author:** [@tblz](https://discourse.julialang.org/u/tblz)\
**Replies:** 2\
**Last updated:** [January 14, 2021, 8:21am UTC](https://discourse.julialang.org/t/sparsearray-types-over-distributed-reduction/53116 "2021-01-14T08:21:44Z")

</div>

I have a use-case of large sparse arrays that can be built in parallel. A minimum working example similar to my code is: using Distributed @everywhere using SparseArrays @everywhere function build\_array() return spar…

---

## [How to close a remote Timer?](https://discourse.julialang.org/t/how-to-close-a-remote-timer/53295)

<div class="topic-metadata">

**Author:** [@Christian\_Dengler](https://discourse.julialang.org/u/Christian_Dengler)\
**Replies:** 3\
**Last updated:** [January 14, 2021, 7:47am UTC](https://discourse.julialang.org/t/how-to-close-a-remote-timer/53295 "2021-01-14T07:47:27Z")

</div>

I want to run mutliple procedures in parallel on a server in fixed time ntervals. The idea was to ,e.g., simply use “@spawnat :any” together with “Timer”, however, I cannot find a way to stop the Timer once its started. …

---

## [Path to 1.6.0-beta x86-64 Linux opens to what it says is 1.0.4](https://discourse.julialang.org/t/path-to-1-6-0-beta-x86-64-linux-opens-to-what-it-says-is-1-0-4/53316)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 3\
**Last updated:** [January 14, 2021, 6:58am UTC](https://discourse.julialang.org/t/path-to-1-6-0-beta-x86-64-linux-opens-to-what-it-says-is-1-0-4/53316 "2021-01-14T06:58:34Z")

</div>

When I put in the path to the version of 1.6 beta, that I loaded, it says 1.0.4 in the opening screen. I’m not sure if that means it loaded 1.0.4, or if the title is wrong.

---

## [I want to write a better performance array, don't know if there is a ready-made one?](https://discourse.julialang.org/t/i-want-to-write-a-better-performance-array-dont-know-if-there-is-a-ready-made-one/53317)

<div class="topic-metadata">

**Author:** [@Zq\_F](https://discourse.julialang.org/u/Zq_F)\
**Replies:** 3\
**Last updated:** [January 14, 2021, 4:06am UTC](https://discourse.julialang.org/t/i-want-to-write-a-better-performance-array-dont-know-if-there-is-a-ready-made-one/53317 "2021-01-14T04:06:10Z")

</div>

I want to write a better performance array, don’t know if there is a ready-made one? I wrote a prototype struct Arr{T, N} \<: AbstractArray{T, N} ilength::Int64 data::Array{T, N} end Base.length(A::Arr) = A.ilength …

---

## [StatsBase.countmap for iterator not working? \`countmap(i for i in 1:10)\`](https://discourse.julialang.org/t/statsbase-countmap-for-iterator-not-working-countmap-i-for-i-in-1-10/53309)

<div class="topic-metadata">

**Author:** [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Replies:** 2\
**Last updated:** [January 13, 2021, 10:48pm UTC](https://discourse.julialang.org/t/statsbase-countmap-for-iterator-not-working-countmap-i-for-i-in-1-10/53309 "2021-01-13T22:48:39Z")

</div>

Hey community :smiley: julia\> using StatsBase julia\> countmap(i for i in 1:10) ERROR: MethodError: no method matching countmap(::Base.Generator{UnitRange{Int64},typeof(identity)}) Closest candidates are: countmap(::A…

---

## [How to CartesianIndex array comprehension?](https://discourse.julialang.org/t/how-to-cartesianindex-array-comprehension/53308)

<div class="topic-metadata">

**Author:** [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Replies:** 4\
**Last updated:** [January 13, 2021, 10:45pm UTC](https://discourse.julialang.org/t/how-to-cartesianindex-array-comprehension/53308 "2021-01-13T22:45:16Z")

</div>

Hey community :smiley: julia\> CartesianIndex(1,1) .+ \[CartesianIndex(i,i) for i in 1:10\] ERROR: iteration is deliberately unsupported for CartesianIndex. Use \`I\` rather than \`I...\`, or use \`Tuple(I)...\` Stacktrace…

---

## [Interpolating a Dict with Exprs inside a quoted expression](https://discourse.julialang.org/t/interpolating-a-dict-with-exprs-inside-a-quoted-expression/53265)

<div class="topic-metadata">

**Author:** [@MasFlam](https://discourse.julialang.org/u/MasFlam)\
**Replies:** 5\
**Last updated:** [January 13, 2021, 8:25pm UTC](https://discourse.julialang.org/t/interpolating-a-dict-with-exprs-inside-a-quoted-expression/53265 "2021-01-13T20:25:14Z")

</div>

I am coding some macros and in one of them I end up with a Dict{Symbol, Tuple{Symbol, Expr}}, where the Exprs are all supposed to be interpolated into the expression returned by the macro. What I am doing right now is th…

---

## [Unexpected Segfault on \`deepcopy\` (perhaps in GC, JL 1.4)](https://discourse.julialang.org/t/unexpected-segfault-on-deepcopy-perhaps-in-gc-jl-1-4/52885)

<div class="topic-metadata">

**Author:** [@dehann](https://discourse.julialang.org/u/dehann)\
**Replies:** 3\
**Last updated:** [January 13, 2021, 8:22pm UTC](https://discourse.julialang.org/t/unexpected-segfault-on-deepcopy-perhaps-in-gc-jl-1-4/52885 "2021-01-13T20:22:07Z")

</div>

Hi Community, We recently got a segfault on a deepcopy of a larger composite Julia object. This is the first of it’s kind in many years of use. We’re tracking that as an issue in the local package, with details and st…

---

## [Excessive allocations when using Zygote.gradient](https://discourse.julialang.org/t/excessive-allocations-when-using-zygote-gradient/53296)

<div class="topic-metadata">

**Author:** [@MrRobot](https://discourse.julialang.org/u/MrRobot)\
**Replies:** 4\
**Last updated:** [January 13, 2021, 7:16pm UTC](https://discourse.julialang.org/t/excessive-allocations-when-using-zygote-gradient/53296 "2021-01-13T19:16:23Z")

</div>

I have as a MWE a lennard-Jones force calculation. I would like to define only energy functions, and then use automatic differentiation to calculate the derivative, and thus, force. However, for the LJ calculation, the …

---

## [Need advice when data almost (but not quite) fit log normal dist](https://discourse.julialang.org/t/need-advice-when-data-almost-but-not-quite-fit-log-normal-dist/53287)

<div class="topic-metadata">

**Author:** [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Replies:** 7\
**Last updated:** [January 13, 2021, 6:38pm UTC](https://discourse.julialang.org/t/need-advice-when-data-almost-but-not-quite-fit-log-normal-dist/53287 "2021-01-13T18:38:37Z")

</div>

This isn’t really a question about Julia so maybe this should be tagged as Offtopic, but I’m working with a data set that has several series of data that all closely follow a log normal distribution, but not quite. The p…

---

## [Optim.jl wrongly reporting success](https://discourse.julialang.org/t/optim-jl-wrongly-reporting-success/53174)

<div class="topic-metadata">

**Author:** [@Albert\_Zevelev](https://discourse.julialang.org/u/Albert_Zevelev)\
**Replies:** 4\
**Last updated:** [January 13, 2021, 6:44pm UTC](https://discourse.julialang.org/t/optim-jl-wrongly-reporting-success/53174 "2021-01-13T18:44:17Z")

</div>

I’m solving for the MLE. using Distributions, Random, Optim; DGP\_True = LogNormal(17,7); Random.seed!(123); const d\_train = rand(DGP\_True, 1\_000) const d\_test = rand(DGP\_True, 1\_000) # LogNormal function loglike(θ) …

---

## [DArray local part via global index range?](https://discourse.julialang.org/t/darray-local-part-via-global-index-range/53298)

<div class="topic-metadata">

**Author:** [@mkarikom](https://discourse.julialang.org/u/mkarikom)\
**Replies:** 0\
**Last updated:** [January 13, 2021, 6:22pm UTC](https://discourse.julialang.org/t/darray-local-part-via-global-index-range/53298 "2021-01-13T18:22:30Z")

</div>

I’d like to be able to get the local part via global indexing (without resorting to :L) in order to facilitate portability with SharedArrays. How can I fix the following: using Test,Distributed,DistributedArrays nwork…

---

## [\[ANN\] Kinetic.jl: advection-diffusion physics with SciML](https://discourse.julialang.org/t/ann-kinetic-jl-advection-diffusion-physics-with-sciml/53277)

<div class="topic-metadata">

**Author:** [@vavrines](https://discourse.julialang.org/u/vavrines)\
**Replies:** 2\
**Last updated:** [January 13, 2021, 4:57pm UTC](https://discourse.julialang.org/t/ann-kinetic-jl-advection-diffusion-physics-with-sciml/53277 "2021-01-13T16:57:24Z")

</div>

Hi there! I would like to announce the Kinetic.jl , a portable finite volume toolbox for advection-diffusion type equations and scientific machine learning. It is interested in theoretical and numerical studies of many-…

---

## [Tensor contractions with symmetries](https://discourse.julialang.org/t/tensor-contractions-with-symmetries/52980)

<div class="topic-metadata">

**Author:** [@Nellatur](https://discourse.julialang.org/u/Nellatur)\
**Replies:** 3\
**Last updated:** [January 13, 2021, 4:48pm UTC](https://discourse.julialang.org/t/tensor-contractions-with-symmetries/52980 "2021-01-13T16:48:12Z")

</div>

I have some tensor contractions, e.g., A\[abcd\] B\[cdef\] = C\[abef\], where A\[abcd\] = A\[badc\] and B\[cdef\] = B\[dcfe\]. I did not find information about symmetry in einsum in NumPy. Is there any Julia package can handle tensor …

---

## [Bottom-up in Pluto?](https://discourse.julialang.org/t/bottom-up-in-pluto/53182)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 8\
**Last updated:** [January 13, 2021, 4:21pm UTC](https://discourse.julialang.org/t/bottom-up-in-pluto/53182 "2021-01-13T16:21:51Z")

</div>

I just noticed that Pluto notebooks are built up bottom to top. Or, rather, the top is at the bottom, if saying it like this makes sense. I am hesitant to call this “wrong”, even though it did seem pretty strange to me.…

---

## [Calculation of Functions in a loop inside another Function](https://discourse.julialang.org/t/calculation-of-functions-in-a-loop-inside-another-function/53278)

<div class="topic-metadata">

**Author:** [@tgautam03](https://discourse.julialang.org/u/tgautam03)\
**Replies:** 5\
**Last updated:** [January 13, 2021, 4:21pm UTC](https://discourse.julialang.org/t/calculation-of-functions-in-a-loop-inside-another-function/53278 "2021-01-13T16:21:40Z")

</div>

Hi, I’m looking to calculate nested functions of form f(g(h(...k(x)...)) and have written a function that takes in two arguments. One is called chain which is the vector of Function defined in the order of their calcul…

---

## [Scalar getindex is disallowed](https://discourse.julialang.org/t/scalar-getindex-is-disallowed/53280)

<div class="topic-metadata">

**Author:** [@tgautam03](https://discourse.julialang.org/u/tgautam03)\
**Replies:** 2\
**Last updated:** [January 13, 2021, 4:20pm UTC](https://discourse.julialang.org/t/scalar-getindex-is-disallowed/53280 "2021-01-13T16:20:22Z")

</div>

Hi, I just wrote a function that computes chain rule using Finite Difference derivatives and ran into a weird issue. The function that calculates the derivative is defined as function chain\_deriv(chain:: Vector{\<:Funct…

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

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