# Latest

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

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

**Page:** 1253

---

## [Findall return type](https://discourse.julialang.org/t/findall-return-type/68971)

<div class="topic-metadata">

**Author:** [@greg\_plowman](https://discourse.julialang.org/u/greg_plowman)\
**Replies:** 0\
**Last updated:** [September 29, 2021, 11:12pm UTC](https://discourse.julialang.org/t/findall-return-type/68971 "2021-09-29T23:12:18Z")

</div>

Following from related discussion Keeping Up With The Cartesians - Findall Return Type I understand that findall returns a list of CartesianIndex for a Matrix, which I guess makes sense. But compare this to eachindex w…

---

## [Porting MATLAB code that uses Mapping Toolbox](https://discourse.julialang.org/t/porting-matlab-code-that-uses-mapping-toolbox/68967)

<div class="topic-metadata">

**Author:** [@fyzycyst](https://discourse.julialang.org/u/fyzycyst)\
**Replies:** 1\
**Last updated:** [September 29, 2021, 10:27pm UTC](https://discourse.julialang.org/t/porting-matlab-code-that-uses-mapping-toolbox/68967 "2021-09-29T22:27:35Z")

</div>

Looking for opinions/options… I’ve got some old MATLAB code that makes use of Mapping Toolbox that I want to port into Julia. What’s my best bet? Thanks.

---

## [Optional macro invocation](https://discourse.julialang.org/t/optional-macro-invocation/18588)

<div class="topic-metadata">

**Author:** [@essenciary](https://discourse.julialang.org/u/essenciary)\
**Replies:** 21\
**Last updated:** [September 29, 2021, 8:33pm UTC](https://discourse.julialang.org/t/optional-macro-invocation/18588 "2021-09-29T20:33:07Z")

</div>

What’s the idiomatic and DRY way of writing something like this: function foo(async::Bool) if async @async dostuff() else dostuff() end The problem here is that the code is not DRY, I have to call dostuf…

---

## [Issues with CSV in Julia 1.6.2](https://discourse.julialang.org/t/issues-with-csv-in-julia-1-6-2/67507)

<div class="topic-metadata">

**Author:** [@compleat](https://discourse.julialang.org/u/compleat)\
**Replies:** 33\
**Last updated:** [September 29, 2021, 7:13pm UTC](https://discourse.julialang.org/t/issues-with-csv-in-julia-1-6-2/67507 "2021-09-29T19:13:03Z")

</div>

This morning I did a standard upgrade to Julia 1.6.2 and loaded the basic packages I use for Data Science. After adding everything, I tried to get started, beginning with the simple statement ‘using CSV’ and got a pag…

---

## [Navigating Distributions.jl - actual code being run](https://discourse.julialang.org/t/navigating-distributions-jl-actual-code-being-run/68956)

<div class="topic-metadata">

**Author:** [@djholiver](https://discourse.julialang.org/u/djholiver)\
**Replies:** 3\
**Last updated:** [September 29, 2021, 7:08pm UTC](https://discourse.julialang.org/t/navigating-distributions-jl-actual-code-being-run/68956 "2021-09-29T19:08:56Z")

</div>

Hi, I have a need to extend Distributions.pdf(MvNormalCanon(mu, Sigma),DIstributionMatrix :: Matrix{Float}) to replace the DistributionMatrix with an Arrow.Table, however, embarrassingly, I am unable to find the actua…

---

## [Formatting code in vscode](https://discourse.julialang.org/t/formatting-code-in-vscode/68927)

<div class="topic-metadata">

**Author:** [@scheinerman](https://discourse.julialang.org/u/scheinerman)\
**Replies:** 3\
**Last updated:** [September 29, 2021, 6:15pm UTC](https://discourse.julialang.org/t/formatting-code-in-vscode/68927 "2021-09-29T18:15:12Z")

</div>

I used to be able to format Julia code in VS Code by right-clicking on the file name and a menu would appear with an option to format my code. (I can use JuliaFormatter in the REPL, but doing this in VS Code was particul…

---

## [ODE of Vector of Matrices](https://discourse.julialang.org/t/ode-of-vector-of-matrices/68889)

<div class="topic-metadata">

**Author:** [@TyBalduf](https://discourse.julialang.org/u/TyBalduf)\
**Replies:** 3\
**Last updated:** [September 29, 2021, 6:02pm UTC](https://discourse.julialang.org/t/ode-of-vector-of-matrices/68889 "2021-09-29T18:02:26Z")

</div>

I’m trying to construct/solve an ODE of several different sized matrices, but solving the ODE fails. The MWE below should demonstrate the issue: using DifferentialEquations using LinearAlgebra function flow!(du,u,p,t) …

---

## [LANL postdoc positions](https://discourse.julialang.org/t/lanl-postdoc-positions/68952)

<div class="topic-metadata">

**Author:** [@monty](https://discourse.julialang.org/u/monty)\
**Replies:** 0\
**Last updated:** [September 29, 2021, 5:39pm UTC](https://discourse.julialang.org/t/lanl-postdoc-positions/68952 "2021-09-29T17:39:27Z")

</div>

https://lanl.jobs/los-alamos-nm/computational-earth-science-postdoc/46283D3C3DBD4500A13BDC7BE66CEED2/job/

---

## [Differentiation matrix stack overflow](https://discourse.julialang.org/t/differentiation-matrix-stack-overflow/68944)

<div class="topic-metadata">

**Author:** [@GianpieroPascale](https://discourse.julialang.org/u/GianpieroPascale)\
**Replies:** 3\
**Last updated:** [September 29, 2021, 5:14pm UTC](https://discourse.julialang.org/t/differentiation-matrix-stack-overflow/68944 "2021-09-29T17:14:40Z")

</div>

I’m trying to follow along with @stevengj’s lecture notes on 2D differentiation matrices, but I can’t get past the first example without Julia reporting a stack-overflow error. The piece of code in question is # constru…

---

## [Static methods](https://discourse.julialang.org/t/static-methods/68945)

<div class="topic-metadata">

**Author:** [@whatsthecraic](https://discourse.julialang.org/u/whatsthecraic)\
**Replies:** 2\
**Last updated:** [September 29, 2021, 4:59pm UTC](https://discourse.julialang.org/t/static-methods/68945 "2021-09-29T16:59:52Z")

</div>

Imagine there are a bunch of static methods (a la C++/Java) defined like: foo(::Any) = 0 foo(::A) = 1 foo(::T) where (T \<: B} = 2 foo(::C) = 3 function trampoline(t) ... large code chunk here that doesn't depend on t…

---

## [Where can I find the API docs of type X?](https://discourse.julialang.org/t/where-can-i-find-the-api-docs-of-type-x/68938)

<div class="topic-metadata">

**Author:** [@whatsthecraic](https://discourse.julialang.org/u/whatsthecraic)\
**Replies:** 5\
**Last updated:** [September 29, 2021, 4:29pm UTC](https://discourse.julialang.org/t/where-can-i-find-the-api-docs-of-type-x/68938 "2021-09-29T16:29:34Z")

</div>

Hi there, where can I find the API of a given class from the stdlib, e.g. what are the fields, methods and the hierarchy of a DataType ?

---

## [Issues with HMC/NUTS samplers](https://discourse.julialang.org/t/issues-with-hmc-nuts-samplers/68900)

<div class="topic-metadata">

**Author:** [@tchebycheff](https://discourse.julialang.org/u/tchebycheff)\
**Replies:** 4\
**Last updated:** [September 29, 2021, 3:53pm UTC](https://discourse.julialang.org/t/issues-with-hmc-nuts-samplers/68900 "2021-09-29T15:53:41Z")

</div>

Hi - I am trying to run MCMC on this model with Turing. Only SMC sampler works. With HMC, NUTS, PG, DynamicHMC I get the error TypeError: in typeassert, expected Float64, got a value of type ForwardDiff.Dual{Nothing, F…

---

## [Save interactive html plot with Plots.jl](https://discourse.julialang.org/t/save-interactive-html-plot-with-plots-jl/68933)

<div class="topic-metadata">

**Author:** [@jw3126](https://discourse.julialang.org/u/jw3126)\
**Replies:** 8\
**Last updated:** [September 29, 2021, 3:41pm UTC](https://discourse.julialang.org/t/save-interactive-html-plot-with-plots-jl/68933 "2021-09-29T15:41:37Z")

</div>

I produced a plot with Plots.jl and plotly backend. In jupyter notebook, this plot has basic interactivity like zooming and tooltips. I would like to save it to say HTML so that this basic interactivity is preserved. I t…

---

## [Piecewise function for Wind Turbine Generation](https://discourse.julialang.org/t/piecewise-function-for-wind-turbine-generation/68575)

<div class="topic-metadata">

**Author:** [@CollinsJnr](https://discourse.julialang.org/u/CollinsJnr)\
**Replies:** 4\
**Last updated:** [September 29, 2021, 2:17pm UTC](https://discourse.julialang.org/t/piecewise-function-for-wind-turbine-generation/68575 "2021-09-29T14:17:16Z")

</div>

Hello guys, please I am trying to implement this any help will be great.

---

## [Pluto over local network?](https://discourse.julialang.org/t/pluto-over-local-network/68914)

<div class="topic-metadata">

**Author:** [@Daneel](https://discourse.julialang.org/u/Daneel)\
**Replies:** 6\
**Last updated:** [September 29, 2021, 2:16pm UTC](https://discourse.julialang.org/t/pluto-over-local-network/68914 "2021-09-29T14:16:03Z")

</div>

Is there anything preventing Pluto.jl from being used on a local network? When starting Pluto, using Pluto;Pluto.run(), it gives a local address, http://localhost:1234/?secret=Nagu3EAW. If I substitute localhost with the…

---

## [Why does findfirst(==(T), ...) on a tuple of typed only constant fold for the first?](https://discourse.julialang.org/t/why-does-findfirst-t-on-a-tuple-of-typed-only-constant-fold-for-the-first/68893)

<div class="topic-metadata">

**Author:** [@oxinabox](https://discourse.julialang.org/u/oxinabox)\
**Replies:** 2\
**Last updated:** [September 29, 2021, 1:32pm UTC](https://discourse.julialang.org/t/why-does-findfirst-t-on-a-tuple-of-typed-only-constant-fold-for-the-first/68893 "2021-09-29T13:32:52Z")

</div>

Consider: position(::T) where T = findfirst(==(T), (Int, Float64, Char)) You might think this would either constant fold or not. But actually, it constant-folds for the Int inputs but not for Float64 or Char. And if …

---

## [Version problem github actions documenter.jl build](https://discourse.julialang.org/t/version-problem-github-actions-documenter-jl-build/68931)

<div class="topic-metadata">

**Author:** [@floswald](https://discourse.julialang.org/u/floswald)\
**Replies:** 0\
**Last updated:** [September 29, 2021, 1:25pm UTC](https://discourse.julialang.org/t/version-problem-github-actions-documenter-jl-build/68931 "2021-09-29T13:25:37Z")

</div>

i have a problem with building docs on gh-actions. locally no problems. I see this log on the runner: Resolving package versions... 51 ERROR: Unsatisfiable requirements detected for package Flux \[587475ba\]: 52 Flux …

---

## [Problems using BacksolveAdjoint for an SDE with DiffEqFlux](https://discourse.julialang.org/t/problems-using-backsolveadjoint-for-an-sde-with-diffeqflux/68049)

<div class="topic-metadata">

**Author:** [@JoseG](https://discourse.julialang.org/u/JoseG)\
**Replies:** 5\
**Last updated:** [September 29, 2021, 1:15pm UTC](https://discourse.julialang.org/t/problems-using-backsolveadjoint-for-an-sde-with-diffeqflux/68049 "2021-09-29T13:15:19Z")

</div>

I’m trying to train a SDE with DiffEqFlux. I had issues with stack overflows when using TrackerAdjoint (probably because of the size of the problem), so i tried using BacksolveAdjoint but this errors on calculating the g…

---

## [JET.jl type checker does not update module (can Revise.jl help?)](https://discourse.julialang.org/t/jet-jl-type-checker-does-not-update-module-can-revise-jl-help/68929)

<div class="topic-metadata">

**Author:** [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Replies:** 0\
**Last updated:** [September 29, 2021, 12:57pm UTC](https://discourse.julialang.org/t/jet-jl-type-checker-does-not-update-module-can-revise-jl-help/68929 "2021-09-29T12:57:45Z")

</div>

Suppose I have a file test.jl which contains using MyModule. I use the type checker JET.jl with report\_file("test.jl"). The main purpose is to perform type checking of the code in MyModule. However, when I update the cod…

---

## [Is there an easy way to fill with zeros in array concatenation?](https://discourse.julialang.org/t/is-there-an-easy-way-to-fill-with-zeros-in-array-concatenation/68910)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 10\
**Last updated:** [September 29, 2021, 12:53pm UTC](https://discourse.julialang.org/t/is-there-an-easy-way-to-fill-with-zeros-in-array-concatenation/68910 "2021-09-29T12:53:38Z")

</div>

For example, julia\> \[rand(2,2) zeros(2,3) zeros(3,2) rand(3,3)\] 5×5 Matrix{Float64}: 0.717944 0.840054 0.0 0.0 0.0 0.513488 0.62959 0.0 0.0 0.0 0.0 0.0 0.553575 0.129…

---

## [How can I eliminate allocations here?](https://discourse.julialang.org/t/how-can-i-eliminate-allocations-here/68859)

<div class="topic-metadata">

**Author:** [@amrods](https://discourse.julialang.org/u/amrods)\
**Replies:** 5\
**Last updated:** [September 29, 2021, 12:28pm UTC](https://discourse.julialang.org/t/how-can-i-eliminate-allocations-here/68859 "2021-09-29T12:28:15Z")

</div>

How can I eliminate allocations here? I understand I am allocating in shares1 = copy(shares), but where else? function logit(x; min=0, max=1) (max - min) \* (1/(1 + exp(-x))) + min end function \_cessum(x, shares, r)…

---

## [New "Packages Announcement" category](https://discourse.julialang.org/t/new-packages-announcement-category/68925)

<div class="topic-metadata">

**Author:** [@logankilpatrick](https://discourse.julialang.org/u/logankilpatrick)\
**Replies:** 0\
**Last updated:** [September 29, 2021, 12:21pm UTC](https://discourse.julialang.org/t/new-packages-announcement-category/68925 "2021-09-29T12:21:38Z")

</div>

Hey folks, given the high volume of new packages, there is now a dedicated category for new package announcements: Package Announcements - JuliaLang Feel free to also post new versions updates for your packages (if ther…

---

## [Efficient generation of random number from 2 columns in a dataframe](https://discourse.julialang.org/t/efficient-generation-of-random-number-from-2-columns-in-a-dataframe/68824)

<div class="topic-metadata">

**Author:** [@CompulsoryCoffee](https://discourse.julialang.org/u/CompulsoryCoffee)\
**Replies:** 4\
**Last updated:** [September 29, 2021, 12:07pm UTC](https://discourse.julialang.org/t/efficient-generation-of-random-number-from-2-columns-in-a-dataframe/68824 "2021-09-29T12:07:58Z")

</div>

Hi, If I have a column with the mean and another one with the standard deviation - how to create a new column with this function: rng(m,s) = rand(Normal(m, s), 1) The fastest option is preferred … Thanks!

---

## [Plots -- transparency of surface?](https://discourse.julialang.org/t/plots-transparency-of-surface/24524)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 9\
**Last updated:** [September 29, 2021, 11:47am UTC](https://discourse.julialang.org/t/plots-transparency-of-surface/24524 "2021-09-29T11:47:15Z")

</div>

Can I control the transparency/alpha value of the surface in surface plots? I would like to superimpose the solution of an ode on a surface… fillalpha=0.2 doesn’t have an effect. Another way to do it? (e.g. using wirefra…

---

## [Cannot insert the row to the data frame](https://discourse.julialang.org/t/cannot-insert-the-row-to-the-data-frame/68909)

<div class="topic-metadata">

**Author:** [@Xiao](https://discourse.julialang.org/u/Xiao)\
**Replies:** 2\
**Last updated:** [September 29, 2021, 8:47am UTC](https://discourse.julialang.org/t/cannot-insert-the-row-to-the-data-frame/68909 "2021-09-29T08:47:48Z")

</div>

I cannot insert the new row to the dataframe. Any suggestions? Thanks! julia\> my\_data = DataFrame(A = repeat(\["test"\], 5), B = repeat(\[100\], 5), C = repeat(\["100%"\], 5)) 5×3 DataFrame Row │ A B C …

---

## [Kubernetes-pod-fails-with-crashloopbackoff while deploying using docker image on GCP](https://discourse.julialang.org/t/kubernetes-pod-fails-with-crashloopbackoff-while-deploying-using-docker-image-on-gcp/68912)

<div class="topic-metadata">

**Author:** [@mdsa3d](https://discourse.julialang.org/u/mdsa3d)\
**Replies:** 3\
**Last updated:** [September 29, 2021, 11:15am UTC](https://discourse.julialang.org/t/kubernetes-pod-fails-with-crashloopbackoff-while-deploying-using-docker-image-on-gcp/68912 "2021-09-29T11:15:20Z")

</div>

Hi, I created a docker file for my application: FROM julia:1.6 RUN apt-get update && apt-get install -y gcc ENV JULIA\_PROJECT @. WORKDIR /home ENV VERSION 1 ADD . /home RUN julia deploy/packagecompile.jl EXPOSE 80…

---

## [Shouldn't this throw an error?](https://discourse.julialang.org/t/shouldnt-this-throw-an-error/68898)

<div class="topic-metadata">

**Author:** [@amrods](https://discourse.julialang.org/u/amrods)\
**Replies:** 2\
**Last updated:** [September 29, 2021, 11:13am UTC](https://discourse.julialang.org/t/shouldnt-this-throw-an-error/68898 "2021-09-29T11:13:34Z")

</div>

I have inadvertently made this mistake: F(x, f::F) where F = f(x) julia\> F(0.5, sin) ERROR: MethodError: no method matching F(::Float64, ::typeof(sin)) Shouldn’t the first line throw and error or are there cases where…

---

## [Solving a large system of differential equations](https://discourse.julialang.org/t/solving-a-large-system-of-differential-equations/68870)

<div class="topic-metadata">

**Author:** [@danielw96](https://discourse.julialang.org/u/danielw96)\
**Replies:** 10\
**Last updated:** [September 29, 2021, 10:50am UTC](https://discourse.julialang.org/t/solving-a-large-system-of-differential-equations/68870 "2021-09-29T10:50:18Z")

</div>

Hey :slight\_smile: , I am currently trying to solve a system of differential equations. I create the coefficient matrix as a sparse matrix, but when i try to use the ode solver, it gives me an out of memory error. The c…

---

## [Stability of system of periodic delay differential equations](https://discourse.julialang.org/t/stability-of-system-of-periodic-delay-differential-equations/68904)

<div class="topic-metadata">

**Author:** [@ANasc](https://discourse.julialang.org/u/ANasc)\
**Replies:** 1\
**Last updated:** [September 29, 2021, 10:49am UTC](https://discourse.julialang.org/t/stability-of-system-of-periodic-delay-differential-equations/68904 "2021-09-29T10:49:40Z")

</div>

Hi All, I want to analyze the stability of a system of delay differential equations. I have tried to dive into some of the literature on this but frankly it’s over my head mathematically. I have tried to implement a pub…

---

## [ModelingToolkit, initial data for second order ODE with state vector](https://discourse.julialang.org/t/modelingtoolkit-initial-data-for-second-order-ode-with-state-vector/68907)

<div class="topic-metadata">

**Author:** [@SteffenPL](https://discourse.julialang.org/u/SteffenPL)\
**Replies:** 2\
**Last updated:** [September 29, 2021, 10:16am UTC](https://discourse.julialang.org/t/modelingtoolkit-initial-data-for-second-order-ode-with-state-vector/68907 "2021-09-29T10:16:30Z")

</div>

I don’t get why this doesn’t work: @variables t z\[1:2,1:2\](t) z = collect(z) Dt = Differential(t) eqs = Dt.(Dt.(z\[:\])) .~ 1 u0 = vcat(z\[:\] .=\> 0., Dt.(z\[:\]) .=\> 1.0) tspan = (0.0, 10.0) @named sys = ODESystem(eqs) pr…

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

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