# Latest

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

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

**Page:** 1372

---

## [Directional derivative with automatic differentiation](https://discourse.julialang.org/t/directional-derivative-with-automatic-differentiation/62305)

<div class="topic-metadata">

**Author:** [@mleprovost](https://discourse.julialang.org/u/mleprovost)\
**Replies:** 4\
**Last updated:** [June 4, 2021, 1:48am UTC](https://discourse.julialang.org/t/directional-derivative-with-automatic-differentiation/62305 "2021-06-04T01:48:49Z")

</div>

Hello, I would like to compute the directional derivative of a vector-valued function f at a point x along the direction v, i.e. \\nabla f(x) \\cdot v using ForwardDiff.jl. From what I understood, it is possible to comp…

---

## [Replace values in a DataFrame column based on a Dict of corresponding values](https://discourse.julialang.org/t/replace-values-in-a-dataframe-column-based-on-a-dict-of-corresponding-values/62353)

<div class="topic-metadata">

**Author:** [@franco](https://discourse.julialang.org/u/franco)\
**Replies:** 5\
**Last updated:** [June 4, 2021, 1:42am UTC](https://discourse.julialang.org/t/replace-values-in-a-dataframe-column-based-on-a-dict-of-corresponding-values/62353 "2021-06-04T01:42:43Z")

</div>

Is there a way to replace values in a DataFrame column based on a Dict() of corresponding values: #Read the CSV file and transform it into a DataFrame rain\_data = CSV.read("data/historico\_precipitaciones.csv", DataFram…

---

## [Parallel sampling](https://discourse.julialang.org/t/parallel-sampling/62310)

<div class="topic-metadata">

**Author:** [@marouane](https://discourse.julialang.org/u/marouane)\
**Replies:** 5\
**Last updated:** [June 4, 2021, 12:57am UTC](https://discourse.julialang.org/t/parallel-sampling/62310 "2021-06-04T00:57:35Z")

</div>

it is the first time i’m trying the parallel computing and before i go to my actual code, i decided to try it on a simple code to see the speed of the execution of the code @everywhere function sampler(x, y) z=…

---

## [How to recompile specific methods](https://discourse.julialang.org/t/how-to-recompile-specific-methods/62340)

<div class="topic-metadata">

**Author:** [@kimikage](https://discourse.julialang.org/u/kimikage)\
**Replies:** 6\
**Last updated:** [June 4, 2021, 12:29am UTC](https://discourse.julialang.org/t/how-to-recompile-specific-methods/62340 "2021-06-04T00:29:10Z")

</div>

I don’t know why, but sometimes the precompilation produces strange results. Typically, a recompilation due to invalidation will fix the problem (even if there is essentially no change in the code). The technique of dele…

---

## [Obtain cartesian indices from dimensions only](https://discourse.julialang.org/t/obtain-cartesian-indices-from-dimensions-only/62366)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 4\
**Last updated:** [June 4, 2021, 12:03am UTC](https://discourse.julialang.org/t/obtain-cartesian-indices-from-dimensions-only/62366 "2021-06-04T00:03:36Z")

</div>

I can obtain the cartesian indices of a matrix from a linear index with: julia\> A = zeros(2,4,3); julia\> CartesianIndices(A)\[5\] CartesianIndex(1, 3, 1) I would want to obtain that without having to define A, that is,…

---

## [Minimize Allocations](https://discourse.julialang.org/t/minimize-allocations/62362)

<div class="topic-metadata">

**Author:** [@natgeo-wong](https://discourse.julialang.org/u/natgeo-wong)\
**Replies:** 3\
**Last updated:** [June 3, 2021, 11:04pm UTC](https://discourse.julialang.org/t/minimize-allocations/62362 "2021-06-03T23:04:01Z")

</div>

Hi! How do I minimize allocations here? I thought that since all variables involved here are scalars, there should be minimal allocations? function ϕfield!( ϕn::Array{FT}, ϕ::Array{FT}, u::Array{FT}, v::Array{FT},…

---

## [Flux came a long way](https://discourse.julialang.org/t/flux-came-a-long-way/62288)

<div class="topic-metadata">

**Author:** [@Alexander-Barth](https://discourse.julialang.org/u/Alexander-Barth)\
**Replies:** 3\
**Last updated:** [June 3, 2021, 9:12pm UTC](https://discourse.julialang.org/t/flux-came-a-long-way/62288 "2021-06-03T21:12:59Z")

</div>

I was following the Keras presentation at the Google IO 2021 by Martin Gorner and François Chollet (creator of Keras) about convolutional varitional autoencoder (VAE). As a way to learn about VAE, I re-implemented the n…

---

## [Cd.. in Julia?](https://discourse.julialang.org/t/cd-in-julia/62357)

<div class="topic-metadata">

**Author:** [@JosephPollacco](https://discourse.julialang.org/u/JosephPollacco)\
**Replies:** 2\
**Last updated:** [June 3, 2021, 10:08pm UTC](https://discourse.julialang.org/t/cd-in-julia/62357 "2021-06-03T22:08:34Z")

</div>

Hi, I will be grateful if you could provide me with the Julia command of cd… For example I get the directory from: Home = @\_\_DIR\_\_ Which gives me D:\\Main\\MODELS\\SoilWater-ToolBox2\\src\\HyPix So what command can I…

---

## [Job Ad: Wireless Systems Research Engineer at Julia Computing](https://discourse.julialang.org/t/job-ad-wireless-systems-research-engineer-at-julia-computing/62360)

<div class="topic-metadata">

**Author:** [@Keno](https://discourse.julialang.org/u/Keno)\
**Replies:** 0\
**Last updated:** [June 3, 2021, 9:36pm UTC](https://discourse.julialang.org/t/job-ad-wireless-systems-research-engineer-at-julia-computing/62360 "2021-06-03T21:36:00Z")

</div>

Julia Computing, one of the principal driving forces behind the Julia programming language, is seeking a Wireless Systems Research Engineer to aid in the development of a flexible, Julia-based stack for prototyping and d…

---

## [MKL threading bug?](https://discourse.julialang.org/t/mkl-threading-bug/62342)

<div class="topic-metadata">

**Author:** [@juthohaegeman](https://discourse.julialang.org/u/juthohaegeman)\
**Replies:** 4\
**Last updated:** [June 3, 2021, 9:21pm UTC](https://discourse.julialang.org/t/mkl-threading-bug/62342 "2021-06-03T21:21:56Z")

</div>

Before posting this as a github issue, I wanted to confirm that this is not some problem with my computer. The following happens for me, but only on mac (macOs Mojave 10.14.6, MacBook Pro (15-inch, 2016), 2,9 GHz Intel …

---

## [How to speed up permutedims for high dimensional tensors](https://discourse.julialang.org/t/how-to-speed-up-permutedims-for-high-dimensional-tensors/62351)

<div class="topic-metadata">

**Author:** [@1115](https://discourse.julialang.org/u/1115)\
**Replies:** 3\
**Last updated:** [June 3, 2021, 8:58pm UTC](https://discourse.julialang.org/t/how-to-speed-up-permutedims-for-high-dimensional-tensors/62351 "2021-06-03T20:58:51Z")

</div>

I find permutedims is so slow, this is something can not be explained by complexity theory. It is because the permutedims is not fully optimized? it occupies \>90% of the computing time of my tensor program. julia\> a = …

---

## [ANN: new version of BifurcationKit.jl](https://discourse.julialang.org/t/ann-new-version-of-bifurcationkit-jl/62355)

<div class="topic-metadata">

**Author:** [@rveltz](https://discourse.julialang.org/u/rveltz)\
**Replies:** 0\
**Last updated:** [June 3, 2021, 8:11pm UTC](https://discourse.julialang.org/t/ann-new-version-of-bifurcationkit-jl/62355 "2021-06-03T20:11:54Z")

</div>

Dear all, I am glad to report a new version of BifurcationKit.jl. Compared to the previous one, emphasis was put on the computation of codimension 2 bifurcation points. the continuation of Fold/Hopf points have been g…

---

## [Parallell multiplication matrix and inverse iteratively julia9](https://discourse.julialang.org/t/parallell-multiplication-matrix-and-inverse-iteratively-julia9/61834)

<div class="topic-metadata">

**Author:** [@Beh123](https://discourse.julialang.org/u/Beh123)\
**Replies:** 10\
**Last updated:** [June 3, 2021, 6:33pm UTC](https://discourse.julialang.org/t/parallell-multiplication-matrix-and-inverse-iteratively-julia9/61834 "2021-06-03T18:33:50Z")

</div>

I’m new julia programmer. I want to write a program that can calculate multiple and inverse iteratively. But I can’t return result. It’s my code. addprocs(4); @everywhere using Distributed , DistributedArrays C=dzer…

---

## [Flux/DiffEqFlux: error when a loss function does not use all the weights of the NN](https://discourse.julialang.org/t/flux-diffeqflux-error-when-a-loss-function-does-not-use-all-the-weights-of-the-nn/61849)

<div class="topic-metadata">

**Author:** [@SvenDummer](https://discourse.julialang.org/u/SvenDummer)\
**Replies:** 8\
**Last updated:** [June 3, 2021, 5:11pm UTC](https://discourse.julialang.org/t/flux-diffeqflux-error-when-a-loss-function-does-not-use-all-the-weights-of-the-nn/61849 "2021-06-03T17:11:40Z")

</div>

Hi everyone, I have a question that is related to training a Neural Network using the sciml\_train function of DiffEqFlux.jl. Context: I want to train a Neural Stochastic Differential Equation where the loss explicitly …

---

## [Testing your DP model after training](https://discourse.julialang.org/t/testing-your-dp-model-after-training/62268)

<div class="topic-metadata">

**Author:** [@Linda\_tK](https://discourse.julialang.org/u/Linda_tK)\
**Replies:** 1\
**Last updated:** [June 3, 2021, 4:48pm UTC](https://discourse.julialang.org/t/testing-your-dp-model-after-training/62268 "2021-06-03T16:48:14Z")

</div>

Hi there, I have trained a model to approximate a system of differential equations using certain initial conditions and parameters. I would now like to see how my models performs if I use different starting conditions. I…

---

## [Generating random functions (as opposed to random numbers)](https://discourse.julialang.org/t/generating-random-functions-as-opposed-to-random-numbers/62328)

<div class="topic-metadata">

**Author:** [@pablosanjose](https://discourse.julialang.org/u/pablosanjose)\
**Replies:** 14\
**Last updated:** [June 3, 2021, 2:53pm UTC](https://discourse.julialang.org/t/generating-random-functions-as-opposed-to-random-numbers/62328 "2021-06-03T14:53:23Z")

</div>

I need to write a single-argument function f(r::Number) that returns a different random number for different values of r, but always the same number for the same r. Same r is meant in the sense of isequal or ==, it doesn…

---

## [How to list all subdirectories of a parent directory using Julia](https://discourse.julialang.org/t/how-to-list-all-subdirectories-of-a-parent-directory-using-julia/62331)

<div class="topic-metadata">

**Author:** [@josimar](https://discourse.julialang.org/u/josimar)\
**Replies:** 5\
**Last updated:** [June 3, 2021, 2:12pm UTC](https://discourse.julialang.org/t/how-to-list-all-subdirectories-of-a-parent-directory-using-julia/62331 "2021-06-03T14:12:57Z")

</div>

I am looking to understand how to list all the subdirectories of a main directory using Julia. In shell script I would do something like this: ls -d Simulations/SHmaxSv\_\*/\*/ \> dirNames.dat I naively tried to do somethi…

---

## [Closure in struct type inference](https://discourse.julialang.org/t/closure-in-struct-type-inference/62180)

<div class="topic-metadata">

**Author:** [@cdawg](https://discourse.julialang.org/u/cdawg)\
**Replies:** 12\
**Last updated:** [June 3, 2021, 1:57pm UTC](https://discourse.julialang.org/t/closure-in-struct-type-inference/62180 "2021-06-03T13:57:10Z")

</div>

This comes up a lot in my code style. I’ve been doing this thing which is to store methods inside a struct as closures. (sort of like oo programming I guess?). This is a lot more convenient than storing the captured valu…

---

## [Sparse Cholesky factorization with multiple threads](https://discourse.julialang.org/t/sparse-cholesky-factorization-with-multiple-threads/62327)

<div class="topic-metadata">

**Author:** [@Jeffrey](https://discourse.julialang.org/u/Jeffrey)\
**Replies:** 1\
**Last updated:** [June 3, 2021, 1:34pm UTC](https://discourse.julialang.org/t/sparse-cholesky-factorization-with-multiple-threads/62327 "2021-06-03T13:34:28Z")

</div>

Hi. I’m relatively new to Julia and I am trying to use multiple threads to speed up the sparse Cholesky factorization from SuiteSparse. I have a total of 32 physical cores available on the machine I’m using. When using …

---

## [Parallel prefix sum with CUDA.jl](https://discourse.julialang.org/t/parallel-prefix-sum-with-cuda-jl/62316)

<div class="topic-metadata">

**Author:** [@adam246](https://discourse.julialang.org/u/adam246)\
**Replies:** 2\
**Last updated:** [June 3, 2021, 12:08pm UTC](https://discourse.julialang.org/t/parallel-prefix-sum-with-cuda-jl/62316 "2021-06-03T12:08:24Z")

</div>

Is there a “parallel prefix sum” function implemented in CUDA.jl? If not, I’d offer to write one, but am relatively new to Julia and would need some examples/documentation on how to do that.

---

## [Using PokeApi in Pluto](https://discourse.julialang.org/t/using-pokeapi-in-pluto/62295)

<div class="topic-metadata">

**Author:** [@alvarmaciel](https://discourse.julialang.org/u/alvarmaciel)\
**Replies:** 2\
**Last updated:** [June 3, 2021, 11:17am UTC](https://discourse.julialang.org/t/using-pokeapi-in-pluto/62295 "2021-06-03T11:17:20Z")

</div>

Hi to all, I’ve wondering if there is a way or a proper way to use the PokeApi in Julia, specifically in Pluto. If there is, can you give me some hints to investigate. Thanks!

---

## [Param fit for ODE, starting from 0 or restarting from intermediate time points give different results](https://discourse.julialang.org/t/param-fit-for-ode-starting-from-0-or-restarting-from-intermediate-time-points-give-different-results/61781)

<div class="topic-metadata">

**Author:** [@cricci](https://discourse.julialang.org/u/cricci)\
**Replies:** 4\
**Last updated:** [June 3, 2021, 10:39am UTC](https://discourse.julialang.org/t/param-fit-for-ode-starting-from-0-or-restarting-from-intermediate-time-points-give-different-results/61781 "2021-06-03T10:39:57Z")

</div>

My problem is the following. I have an ODE with some parameters to estimate, based on some data. In this example however I will generate the data from the ode itself to make some test. I take an example from LotkaVolter…

---

## [Plots.jl tiny plots in Jupyter](https://discourse.julialang.org/t/plots-jl-tiny-plots-in-jupyter/62281)

<div class="topic-metadata">

**Author:** [@Henri\_Laurie](https://discourse.julialang.org/u/Henri_Laurie)\
**Replies:** 6\
**Last updated:** [June 3, 2021, 9:10am UTC](https://discourse.julialang.org/t/plots-jl-tiny-plots-in-jupyter/62281 "2021-06-03T09:10:30Z")

</div>

Sadly, this is still a problem. The workaround still fixes it. Also the PyPlot backend doesn’t show this, weirdly enough. Looks like I’m stuck with pyplot() for the introductory course I will teach in 6 weeks time. I on…

---

## [Reading and interpreting math in text file](https://discourse.julialang.org/t/reading-and-interpreting-math-in-text-file/62320)

<div class="topic-metadata">

**Author:** [@Marc\_Sevaux](https://discourse.julialang.org/u/Marc_Sevaux)\
**Replies:** 3\
**Last updated:** [June 3, 2021, 8:44am UTC](https://discourse.julialang.org/t/reading-and-interpreting-math-in-text-file/62320 "2021-06-03T08:44:37Z")

</div>

Hi all, I have a text file containing data like : 2.2\*cos(pi\*25/16), 2.2\*sin(pi\*25/16) 2.2\*cos(pi\*23/16), 2.2\*sin(pi\*23/16) 2.2\*cos(pi\*7/16) , 2.2\*sin(pi\*7/16) ... I would like to read these data and store them as num…

---

## [Array of @NLexpression](https://discourse.julialang.org/t/array-of-nlexpression/62324)

<div class="topic-metadata">

**Author:** [@manoj.centura](https://discourse.julialang.org/u/manoj.centura)\
**Replies:** 1\
**Last updated:** [June 3, 2021, 8:43am UTC](https://discourse.julialang.org/t/array-of-nlexpression/62324 "2021-06-03T08:43:31Z")

</div>

can we add array of nl expressions with name in macro using JuMP mm=Model() for i in 1:5 @NLexpression(mm,pp\[i\],i) end ERROR: An object of name pp is already attached to this model. If this is intended, …

---

## [LinearAlgebra.SingularException(2) when solving matrix equation which is solvable in Maple](https://discourse.julialang.org/t/linearalgebra-singularexception-2-when-solving-matrix-equation-which-is-solvable-in-maple/62142)

<div class="topic-metadata">

**Author:** [@vikhes](https://discourse.julialang.org/u/vikhes)\
**Replies:** 7\
**Last updated:** [June 3, 2021, 7:24am UTC](https://discourse.julialang.org/t/linearalgebra-singularexception-2-when-solving-matrix-equation-which-is-solvable-in-maple/62142 "2021-06-03T07:24:23Z")

</div>

Hi I’m doing an assignment where I use my own implementation of Implicit Eulers with adaptive step size using error estimation. For this, I have made my own implementation of the Newton solver. In one ODE system, my num…

---

## [Prose comment in plot](https://discourse.julialang.org/t/prose-comment-in-plot/62309)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 3\
**Last updated:** [June 3, 2021, 6:04am UTC](https://discourse.julialang.org/t/prose-comment-in-plot/62309 "2021-06-03T06:04:39Z")

</div>

I want to put a comment in my plot. How can I format it as a normal paragraph, with each line pressed against the left edge? using CairoMakie using TextWrap fig = Figure() fig\[1:2, 1:3\] = \[Axis(fig) for \_ in 1:6\] supe…

---

## [Obtain multiple components from a ComponentArray](https://discourse.julialang.org/t/obtain-multiple-components-from-a-componentarray/62315)

<div class="topic-metadata">

**Author:** [@amrods](https://discourse.julialang.org/u/amrods)\
**Replies:** 2\
**Last updated:** [June 3, 2021, 3:58am UTC](https://discourse.julialang.org/t/obtain-multiple-components-from-a-componentarray/62315 "2021-06-03T03:58:22Z")

</div>

Is there a way to obtain multiple components from a ComponentArray? something like using ComponentArrays ca = ComponentArray(x1 = \[1, 2\], x2 = \[10, 20\], x3 = \[100, 200\]) ca\[:x1, :x3\] # would return (ca.x1, ca.x2)

---

## [Flux or Knet?](https://discourse.julialang.org/t/flux-or-knet/45803)

<div class="topic-metadata">

**Author:** [@Yifan\_Liu](https://discourse.julialang.org/u/Yifan_Liu)\
**Replies:** 7\
**Last updated:** [June 3, 2021, 1:35am UTC](https://discourse.julialang.org/t/flux-or-knet/45803 "2021-06-03T01:35:21Z")

</div>

I need to apply some machine learning algorithms to a very big dataset (about 30 G). I personally prefer pure Julia implementations without any dependencies on Python. Here are my lists of algorithms and corresponding Py…

---

## [How to do division in a linear model with JuMP](https://discourse.julialang.org/t/how-to-do-division-in-a-linear-model-with-jump/62077)

<div class="topic-metadata">

**Author:** [@zlq178](https://discourse.julialang.org/u/zlq178)\
**Replies:** 9\
**Last updated:** [June 3, 2021, 12:45am UTC](https://discourse.julialang.org/t/how-to-do-division-in-a-linear-model-with-jump/62077 "2021-06-03T00:45:30Z")

</div>

There is a constraint “P=Q./R”, where P and Q are vector{variableRef}, Q is array{Float64,2} JuMP model is as follow: using JuMP,Gurobi,LinearAlgebra model=Model(Gurobi.Optimizer) Q=\[1,2,3\] …

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

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