# Latest

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

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

**Page:** 1552

---

## [How to make dataframe from output of loop](https://discourse.julialang.org/t/how-to-make-dataframe-from-output-of-loop/51587)

<div class="topic-metadata">

**Author:** [@sai\_matcha](https://discourse.julialang.org/u/sai_matcha)\
**Replies:** 1\
**Last updated:** [December 10, 2020, 5:54am UTC](https://discourse.julialang.org/t/how-to-make-dataframe-from-output-of-loop/51587 "2020-12-10T05:54:10Z")

</div>

data i have a = (0:1:160) conc = (for i in a println(1.05\*exp(-0.0228\*i)) end i want to get dataframe with “a” and “conc” columns

---

## [When to use a discrete callback in DifferentialEquations.jl](https://discourse.julialang.org/t/when-to-use-a-discrete-callback-in-differentialequations-jl/51493)

<div class="topic-metadata">

**Author:** [@affans](https://discourse.julialang.org/u/affans)\
**Replies:** 2\
**Last updated:** [December 10, 2020, 4:52am UTC](https://discourse.julialang.org/t/when-to-use-a-discrete-callback-in-differentialequations-jl/51493 "2020-12-10T04:52:38Z")

</div>

I have a fairly large model I am trying to solve (~100 differential equations). There is a particular parameter that changes every 28 days. Right now, I switch this parameter using a callback function function model!(du…

---

## [Learning non-linear spatio-temporal dynamics with convolutional Neural ODEs](https://discourse.julialang.org/t/learning-non-linear-spatio-temporal-dynamics-with-convolutional-neural-odes/51448)

<div class="topic-metadata">

**Author:** [@johnh](https://discourse.julialang.org/u/johnh)\
**Replies:** 1\
**Last updated:** [December 10, 2020, 4:42am UTC](https://discourse.julialang.org/t/learning-non-linear-spatio-temporal-dynamics-with-convolutional-neural-odes/51448 "2020-12-10T04:42:27Z")

</div>

I work for Dell, but am not involved. @ChrisRackauckas please tell us this is all written in Julia… https://ml4physicalsciences.github.io/2020/files/NeurIPS\_ML4PS\_2020\_125.pdf

---

## [How to make a custom (/manual) legend with Plots.jl?](https://discourse.julialang.org/t/how-to-make-a-custom-manual-legend-with-plots-jl/51579)

<div class="topic-metadata">

**Author:** [@bvilmann](https://discourse.julialang.org/u/bvilmann)\
**Replies:** 0\
**Last updated:** [December 10, 2020, 2:45am UTC](https://discourse.julialang.org/t/how-to-make-a-custom-manual-legend-with-plots-jl/51579 "2020-12-10T02:45:30Z")

</div>

Dear community! I want to make a common (/manual) legend for my plot for the various “types” of production units. How do I do that with Plots? My code is something similar to: groupedbar( hcat(C'-P', P',zeros(N…

---

## [Aliases not recognized in Julia shell mode](https://discourse.julialang.org/t/aliases-not-recognized-in-julia-shell-mode/51571)

<div class="topic-metadata">

**Author:** [@Xijiang\_Yu](https://discourse.julialang.org/u/Xijiang_Yu)\
**Replies:** 2\
**Last updated:** [December 10, 2020, 1:01am UTC](https://discourse.julialang.org/t/aliases-not-recognized-in-julia-shell-mode/51571 "2020-12-10T01:01:37Z")

</div>

Type ; to enter shell mode. It is easy to run commands like ls. But an alias defined e.g., in .bashrc, like ll is not recognized. The latter gives an error Could not determine command. Any suggestion?

---

## [Column/row-wise norm](https://discourse.julialang.org/t/column-row-wise-norm/51572)

<div class="topic-metadata">

**Author:** [@Alip](https://discourse.julialang.org/u/Alip)\
**Replies:** 1\
**Last updated:** [December 9, 2020, 11:40pm UTC](https://discourse.julialang.org/t/column-row-wise-norm/51572 "2020-12-09T23:40:00Z")

</div>

Sorry if this has been posted a bunch but my googling has failed me. I have a 2D array, and want to treat each row (or column) as a vector and find norm of it. I’m looking for something like N = vecnorm(A,p,dim) in matl…

---

## [Find\_zero with Brent method](https://discourse.julialang.org/t/find-zero-with-brent-method/51569)

<div class="topic-metadata">

**Author:** [@Yifan\_Liu](https://discourse.julialang.org/u/Yifan_Liu)\
**Replies:** 3\
**Last updated:** [December 9, 2020, 11:33pm UTC](https://discourse.julialang.org/t/find-zero-with-brent-method/51569 "2020-12-09T23:33:43Z")

</div>

I am trying to find the root of a function f. After using Roots, find\_zero(f, (0, 1), Roots.Brent()) works, but find\_zero(f, (0, 1), Brent()) does not work (error message says Brent not defined). When I use the Bisectio…

---

## [Which solver/model library can be used recursively / reentrantly](https://discourse.julialang.org/t/which-solver-model-library-can-be-used-recursively-reentrantly/51294)

<div class="topic-metadata">

**Author:** [@xyz1](https://discourse.julialang.org/u/xyz1)\
**Replies:** 2\
**Last updated:** [December 9, 2020, 8:47pm UTC](https://discourse.julialang.org/t/which-solver-model-library-can-be-used-recursively-reentrantly/51294 "2020-12-09T20:47:48Z")

</div>

Hello, my code currently consists of a recursive function f and I am planning on using an optimization solver (global optimization for integer programming with binary variables) for solving a sub-problem of the function f…

---

## [Manually defined partially conjugate update step](https://discourse.julialang.org/t/manually-defined-partially-conjugate-update-step/51299)

<div class="topic-metadata">

**Author:** [@fmeulen](https://discourse.julialang.org/u/fmeulen)\
**Replies:** 2\
**Last updated:** [December 9, 2020, 8:05pm UTC](https://discourse.julialang.org/t/manually-defined-partially-conjugate-update-step/51299 "2020-12-09T20:05:05Z")

</div>

I have a model where I can apply Turing to the full parameter vector, that seems to work. However, I can partition the parameter such that a Gibbs sampler can be devised where one parameter is updated in a partially conj…

---

## [HEC-RAS notebooks](https://discourse.julialang.org/t/hec-ras-notebooks/51556)

<div class="topic-metadata">

**Author:** [@esdmd100](https://discourse.julialang.org/u/esdmd100)\
**Replies:** 0\
**Last updated:** [December 9, 2020, 8:00pm UTC](https://discourse.julialang.org/t/hec-ras-notebooks/51556 "2020-12-09T20:00:18Z")

</div>

I was wondering if there is any development in Julia that could perform similarly to HEC-RAS (Hydrologic Engineering Center-River Analysis System) (HEC-RAS or https://www.fithydro.wiki/index.php/HEC-RAS)?

---

## [How to merge arrays in julia](https://discourse.julialang.org/t/how-to-merge-arrays-in-julia/51520)

<div class="topic-metadata">

**Author:** [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Replies:** 4\
**Last updated:** [December 9, 2020, 7:39pm UTC](https://discourse.julialang.org/t/how-to-merge-arrays-in-julia/51520 "2020-12-09T19:39:34Z")

</div>

Hello, I have two arrays like this: ulia\> soln1 retcode: Success Interpolation: Automatic order switching interpolation t: 5-element Array{Float64,1}: 0.0 0.23056783545255075 1.117776876821525 2.470121871347117 2.…

---

## [Performance regression with GPUArrays subset sum](https://discourse.julialang.org/t/performance-regression-with-gpuarrays-subset-sum/50767)

<div class="topic-metadata">

**Author:** [@eaubanel](https://discourse.julialang.org/u/eaubanel)\
**Replies:** 9\
**Last updated:** [December 9, 2020, 7:20pm UTC](https://discourse.julialang.org/t/performance-regression-with-gpuarrays-subset-sum/50767 "2020-12-09T19:20:23Z")

</div>

I’ve been away from Julia for several months, and have been rerunning GPU code from this past summer on a new installation of Jula 1.5.3 and CUDA.jl (previously I used the separate CUDA packages). My subset sum program n…

---

## [Root isolation of real-rooted integer polynomials](https://discourse.julialang.org/t/root-isolation-of-real-rooted-integer-polynomials/51421)

<div class="topic-metadata">

**Author:** [@malacroi](https://discourse.julialang.org/u/malacroi)\
**Replies:** 12\
**Last updated:** [December 9, 2020, 6:37pm UTC](https://discourse.julialang.org/t/root-isolation-of-real-rooted-integer-polynomials/51421 "2020-12-09T18:37:33Z")

</div>

I have a collection of polynomials with non-negative integer coefficients that I know to be real-rooted with no repeated roots by examining Sturm chains for each. I would like to show that they form an interlacing famil…

---

## [Problems with level curves](https://discourse.julialang.org/t/problems-with-level-curves/51488)

<div class="topic-metadata">

**Author:** [@angeloaliano1](https://discourse.julialang.org/u/angeloaliano1)\
**Replies:** 9\
**Last updated:** [December 9, 2020, 3:30pm UTC](https://discourse.julialang.org/t/problems-with-level-curves/51488 "2020-12-09T15:30:13Z")

</div>

Dear all I have the following code to plot the level curves: using Plots plotly() import Contour: contours, levels, level, lines, coordinates f(x,y) = y^2 + x^2 xs = ys = range(-5, stop=5, length=100) contour(xs, ys, f…

---

## [Solving Ax=B for large matrix dimensions efficiently in Julia](https://discourse.julialang.org/t/solving-ax-b-for-large-matrix-dimensions-efficiently-in-julia/51504)

<div class="topic-metadata">

**Author:** [@musman](https://discourse.julialang.org/u/musman)\
**Replies:** 12\
**Last updated:** [December 9, 2020, 2:36pm UTC](https://discourse.julialang.org/t/solving-ax-b-for-large-matrix-dimensions-efficiently-in-julia/51504 "2020-12-09T14:36:27Z")

</div>

Hi all, I have the linear set of equation Ax=b where A can be as large as 20000 x 20000 and is invertible. What is the best computationally efficient way of solving this problem in Julia? I have looked into linear alge…

---

## [Using DifferentialEquations with treatment of uncertainties](https://discourse.julialang.org/t/using-differentialequations-with-treatment-of-uncertainties/51501)

<div class="topic-metadata">

**Author:** [@HerAdri](https://discourse.julialang.org/u/HerAdri)\
**Replies:** 3\
**Last updated:** [December 9, 2020, 2:30pm UTC](https://discourse.julialang.org/t/using-differentialequations-with-treatment-of-uncertainties/51501 "2020-12-09T14:30:34Z")

</div>

I try to reproduce the code found on the site: The accelerating adoption of Julia The first part of the code is reproduced without problem. Loading the Plots package, not mentioned in the article. But in the part of t…

---

## [How to get started to contribute to Julia and packages](https://discourse.julialang.org/t/how-to-get-started-to-contribute-to-julia-and-packages/51489)

<div class="topic-metadata">

**Author:** [@bvilmann](https://discourse.julialang.org/u/bvilmann)\
**Replies:** 6\
**Last updated:** [December 9, 2020, 2:22pm UTC](https://discourse.julialang.org/t/how-to-get-started-to-contribute-to-julia-and-packages/51489 "2020-12-09T14:22:36Z")

</div>

I have coded in Julia for a little month and I am very excited about many things. Since it is a programming language in its freshman year, improvements are to be made. And I would like to contribute to these but I am q…

---

## [Unnesting columns of a data frame containing arrays](https://discourse.julialang.org/t/unnesting-columns-of-a-data-frame-containing-arrays/51526)

<div class="topic-metadata">

**Author:** [@jolars](https://discourse.julialang.org/u/jolars)\
**Replies:** 1\
**Last updated:** [December 9, 2020, 2:10pm UTC](https://discourse.julialang.org/t/unnesting-columns-of-a-data-frame-containing-arrays/51526 "2020-12-09T14:10:51Z")

</div>

Let’s say I have the following Julia data frame: using DataFrames d = DataFrame(a = Int64\[\], b = Array{Int64, 1}\[\]) push!(d, (1, \[2, 3\])) 1×2 DataFrame Row │ a b │ Int64 Array… ─────┼───────────────…

---

## [Find index of maximum value of array](https://discourse.julialang.org/t/find-index-of-maximum-value-of-array/51525)

<div class="topic-metadata">

**Author:** [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Replies:** 1\
**Last updated:** [December 9, 2020, 1:47pm UTC](https://discourse.julialang.org/t/find-index-of-maximum-value-of-array/51525 "2020-12-09T13:47:37Z")

</div>

I have an array and I woul dlike to find the index of the maximum value. I tried with: julia\> X = \[0,0,0,0,0,0,0,0,5,0,0,0,0,1\] 14-element Array{Int64,1}: 0 0 0 0 0 0 0 0 5 0 0 0 0 1 julia\> find(x == max…

---

## [NLSolve performance 32 vs 64 bits](https://discourse.julialang.org/t/nlsolve-performance-32-vs-64-bits/51515)

<div class="topic-metadata">

**Author:** [@bdc](https://discourse.julialang.org/u/bdc)\
**Replies:** 1\
**Last updated:** [December 9, 2020, 12:18pm UTC](https://discourse.julialang.org/t/nlsolve-performance-32-vs-64-bits/51515 "2020-12-09T12:18:45Z")

</div>

Hi, For an application with NLsolve.jl I ran into an OutOfMemoryError(), so I decided to try using single instead of double precision in order to reduce the memory footprint (approach similar to machine learning on GPU’…

---

## [JSON3: ERROR: MethodError: no method matching Array{Int64,2}(::Array{Int64,1})](https://discourse.julialang.org/t/json3-error-methoderror-no-method-matching-array-int64-2-array-int64-1/51457)

<div class="topic-metadata">

**Author:** [@sz1992](https://discourse.julialang.org/u/sz1992)\
**Replies:** 8\
**Last updated:** [December 9, 2020, 12:41pm UTC](https://discourse.julialang.org/t/json3-error-methoderror-no-method-matching-array-int64-2-array-int64-1/51457 "2020-12-09T12:41:48Z")

</div>

Hi, i need some help with JSON3. If I add Arrays into my custom structure, I get error on JSON3.read. MWE: Base.@kwdef mutable struct MyStruct3 name::String = "" par1::Int = 10 par2::Int32 = 32 par3::A…

---

## [Random number in (0,1)](https://discourse.julialang.org/t/random-number-in-0-1/51451)

<div class="topic-metadata">

**Author:** [@jherekhealy](https://discourse.julialang.org/u/jherekhealy)\
**Replies:** 9\
**Last updated:** [December 9, 2020, 10:38am UTC](https://discourse.julialang.org/t/random-number-in-0-1/51451 "2020-12-09T10:38:22Z")

</div>

In Random.jl, there is the possibility to generate a random number in the interval \[0,1) through CloseOpen01, or even in \[1,2) (I can see the reason for this for implementation, less so for a user) through CloseOpen12, …

---

## [How do I implement array indexing?](https://discourse.julialang.org/t/how-do-i-implement-array-indexing/51506)

<div class="topic-metadata">

**Author:** [@minetest2048](https://discourse.julialang.org/u/minetest2048)\
**Replies:** 4\
**Last updated:** [December 9, 2020, 10:13am UTC](https://discourse.julialang.org/t/how-do-i-implement-array-indexing/51506 "2020-12-09T10:13:18Z")

</div>

I have this array type: struct Delay{T} head\_idx::Int arr::Vector{T} function Delay{T}(length::Int) where T if ispow2(length) arr = zeros(T,length) new(0, arr) else throw(ArgumentError("Length is not pow…

---

## [Weird constructor error](https://discourse.julialang.org/t/weird-constructor-error/51502)

<div class="topic-metadata">

**Author:** [@stefkuypers](https://discourse.julialang.org/u/stefkuypers)\
**Replies:** 2\
**Last updated:** [December 9, 2020, 10:11am UTC](https://discourse.julialang.org/t/weird-constructor-error/51502 "2020-12-09T10:11:30Z")

</div>

Hi, I’m getting an error when calling a constructor and I can’t figure out what’s wrong. It used to work but after fiddling with the code a bit (I honestly don’t know what I changed exactly anymore since I was experimen…

---

## [Pluto - UndefVarError](https://discourse.julialang.org/t/pluto-undefvarerror/51480)

<div class="topic-metadata">

**Author:** [@ZettEff](https://discourse.julialang.org/u/ZettEff)\
**Replies:** 3\
**Last updated:** [December 9, 2020, 9:58am UTC](https://discourse.julialang.org/t/pluto-undefvarerror/51480 "2020-12-09T09:58:39Z")

</div>

Hi, I am using Pluto and got an UndefVarError I cannot reproduce in VSCode. If I run the following code in Pluto I get an error that foo is not defined: begin foo = \[1,2,3\] all\_foos = \[\] for i in 1:5 new\_foo = @…

---

## [Pipe operator with multiple instances](https://discourse.julialang.org/t/pipe-operator-with-multiple-instances/51505)

<div class="topic-metadata">

**Author:** [@kadir-gunel](https://discourse.julialang.org/u/kadir-gunel)\
**Replies:** 1\
**Last updated:** [December 9, 2020, 9:00am UTC](https://discourse.julialang.org/t/pipe-operator-with-multiple-instances/51505 "2020-12-09T09:00:25Z")

</div>

I have a function which takes a Matrix as an argument. And I have a multidimensional array as input (513, 321, 1, 2). The last column represents the number of samples. All I want is to use the |\> pipe operator for each s…

---

## [Understanding Julia documentation syntax](https://discourse.julialang.org/t/understanding-julia-documentation-syntax/51484)

<div class="topic-metadata">

**Author:** [@Gregstrq](https://discourse.julialang.org/u/Gregstrq)\
**Replies:** 2\
**Last updated:** [December 9, 2020, 7:46am UTC](https://discourse.julialang.org/t/understanding-julia-documentation-syntax/51484 "2020-12-09T07:46:32Z")

</div>

I’ve decided to familiarize myself with the documentaion system in Julia. For that, I am looking through the source Julia code as the source of inspiration. However, I have encountered a puzzling syntax in one of the s…

---

## [Trying to solve a second order differential equation. Your advices](https://discourse.julialang.org/t/trying-to-solve-a-second-order-differential-equation-your-advices/41162)

<div class="topic-metadata">

**Author:** [@aquarelle332](https://discourse.julialang.org/u/aquarelle332)\
**Replies:** 19\
**Last updated:** [December 9, 2020, 7:40am UTC](https://discourse.julialang.org/t/trying-to-solve-a-second-order-differential-equation-your-advices/41162 "2020-12-09T07:40:15Z")

</div>

Hello dear all, I don’t know whether it is the right place to post what follows… I am trying to resolve a differential equation like (namely Rayleigh-Plesset eq): R\*d²R/dt²+3/2\*dR/dt=P where P is a constant, say. Pre…

---

## [How to Compose a Array Comprehension embedding a Condition Test?](https://discourse.julialang.org/t/how-to-compose-a-array-comprehension-embedding-a-condition-test/51497)

<div class="topic-metadata">

**Author:** [@KyleJT](https://discourse.julialang.org/u/KyleJT)\
**Replies:** 4\
**Last updated:** [December 9, 2020, 7:32am UTC](https://discourse.julialang.org/t/how-to-compose-a-array-comprehension-embedding-a-condition-test/51497 "2020-12-09T07:32:49Z")

</div>

I have a code as the following: list = \[\] for itr in "Watch out! Hello, world" if isletter(itr) append!(list,itr) end end println(list) How can I convert the above code snippet into an array comprehensi…

---

## [Fail to precompile RCall package](https://discourse.julialang.org/t/fail-to-precompile-rcall-package/51438)

<div class="topic-metadata">

**Author:** [@nzhwtq](https://discourse.julialang.org/u/nzhwtq)\
**Replies:** 3\
**Last updated:** [December 9, 2020, 7:25am UTC](https://discourse.julialang.org/t/fail-to-precompile-rcall-package/51438 "2020-12-09T07:25:35Z")

</div>

R\_HOME directory is all set and R installation is all good, but the precompiling step didn’t work. julia\> using RCall \[ Info: Precompiling RCall \[6f49c342-dc21-5d91-9882-a32aef131414\] ERROR: LoadError: RCall not properl…

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

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