# Latest

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

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

**Page:** 1569

---

## [Why do I get a type error when passing a dict with subtypes?](https://discourse.julialang.org/t/why-do-i-get-a-type-error-when-passing-a-dict-with-subtypes/50421)

<div class="topic-metadata">

**Author:** [@stefkuypers](https://discourse.julialang.org/u/stefkuypers)\
**Replies:** 1\
**Last updated:** [November 19, 2020, 11:01am UTC](https://discourse.julialang.org/t/why-do-i-get-a-type-error-when-passing-a-dict-with-subtypes/50421 "2020-11-19T11:01:09Z")

</div>

Hi, I’m passing a dict to a constructor containing objects which are a subtype of the type expected and I get a type error on it: ERROR: TypeError: in keyword argument res\_input, expected Dict{BluePrint,Int64}, got a v…

---

## [\[ANN\] Trixi.jl: A tree-based numerical simulation framework for hyperbolic PDEs](https://discourse.julialang.org/t/ann-trixi-jl-a-tree-based-numerical-simulation-framework-for-hyperbolic-pdes/45886)

<div class="topic-metadata">

**Author:** [@sloede](https://discourse.julialang.org/u/sloede)\
**Replies:** 9\
**Last updated:** [November 19, 2020, 10:08am UTC](https://discourse.julialang.org/t/ann-trixi-jl-a-tree-based-numerical-simulation-framework-for-hyperbolic-pdes/45886 "2020-11-19T10:08:29Z")

</div>

Trixi.jl is a numerical simulation framework for hyperbolic conservation laws. A key objective for the framework is to be useful to both scientists and students. Therefore, next to having an extensible design with a fast…

---

## [Issue querying probabilities using chain](https://discourse.julialang.org/t/issue-querying-probabilities-using-chain/50383)

<div class="topic-metadata">

**Author:** [@michielver](https://discourse.julialang.org/u/michielver)\
**Replies:** 6\
**Last updated:** [November 19, 2020, 8:18am UTC](https://discourse.julialang.org/t/issue-querying-probabilities-using-chain/50383 "2020-11-19T08:18:23Z")

</div>

Hi, This is my first post, so I will try to make it as clear as possible, otherwise point out anything that is unclear. I am running into an issue with querying probabilities using chains. I tried to reduce it to as sm…

---

## [Quality vs quantity in OSS development - a contributor's perspective](https://discourse.julialang.org/t/quality-vs-quantity-in-oss-development-a-contributors-perspective/50278)

<div class="topic-metadata">

**Author:** [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Replies:** 8\
**Last updated:** [November 19, 2020, 7:39am UTC](https://discourse.julialang.org/t/quality-vs-quantity-in-oss-development-a-contributors-perspective/50278 "2020-11-19T07:39:01Z")

</div>

As someone who has been doing open source development in the Julia community for a while, both paid and unpaid, I find myself often having to choose between developing or maintaining more packages or focusing my time and…

---

## [eGPU or Compute Box](https://discourse.julialang.org/t/egpu-or-compute-box/50208)

<div class="topic-metadata">

**Author:** [@anon92994695](https://discourse.julialang.org/u/anon92994695)\
**Replies:** 11\
**Last updated:** [November 19, 2020, 6:47am UTC](https://discourse.julialang.org/t/egpu-or-compute-box/50208 "2020-11-19T06:47:20Z")

</div>

Hi everyone, so I’m thinking of upgrading my compute situation a bit. I have a ratty old desktop, a laptop, and a decent GPU laying around. What I want is for my main driver, my laptop, to offload on prem. compute to a …

---

## [How to query Slurm Array Task ID in Julia?](https://discourse.julialang.org/t/how-to-query-slurm-array-task-id-in-julia/36771)

<div class="topic-metadata">

**Author:** [@zxjroger](https://discourse.julialang.org/u/zxjroger)\
**Replies:** 15\
**Last updated:** [November 19, 2020, 5:19am UTC](https://discourse.julialang.org/t/how-to-query-slurm-array-task-id-in-julia/36771 "2020-11-19T05:19:05Z")

</div>

I want to parallel 100 Monte Carlo study on 100 compute nodes. Within each node, it should execute the Julia script attached with a unique random seed (so that it will generate a unique fake dataset). Also, within each n…

---

## [Sample() nchains vs n\_chains](https://discourse.julialang.org/t/sample-nchains-vs-n-chains/50336)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 2\
**Last updated:** [November 19, 2020, 3:16am UTC](https://discourse.julialang.org/t/sample-nchains-vs-n-chains/50336 "2020-11-19T03:16:46Z")

</div>

sample() has many methods. One has nchains and another has n\_chains. What is the difference between these parameters? nchains: sample(model::AbstractMCMC.AbstractModel, sampler::AbstractMCMC.AbstractSampler, parallel::A…

---

## [Getting model parameter names from DataFrame](https://discourse.julialang.org/t/getting-model-parameter-names-from-dataframe/50008)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 5\
**Last updated:** [November 19, 2020, 3:15am UTC](https://discourse.julialang.org/t/getting-model-parameter-names-from-dataframe/50008 "2020-11-19T03:15:30Z")

</div>

Suppose I have df = DataFrame( age=\[20, 30, 40\], height=\[80, 130, 200\], ) weight = \[100, 120, 200\] I want to predict weight from the other columns using linear regression. There are two options. Explicitly wr…

---

## [How do I do a plain old "A=LU" decomposition of sparse matrices?](https://discourse.julialang.org/t/how-do-i-do-a-plain-old-a-lu-decomposition-of-sparse-matrices/49619)

<div class="topic-metadata">

**Author:** [@casey\_watkins](https://discourse.julialang.org/u/casey_watkins)\
**Replies:** 7\
**Last updated:** [November 19, 2020, 1:16am UTC](https://discourse.julialang.org/t/how-do-i-do-a-plain-old-a-lu-decomposition-of-sparse-matrices/49619 "2020-11-19T01:16:29Z")

</div>

I have a very large sparse matrix A and need to produce L, U such that A=L\*U for the specific type of problem I am solving. I am aware of LinearAlgebra.lu, where setting the “pivot” flag to false accomplishes this. This…

---

## [Help using @nloops and @nref](https://discourse.julialang.org/t/help-using-nloops-and-nref/50397)

<div class="topic-metadata">

**Author:** [@gregory](https://discourse.julialang.org/u/gregory)\
**Replies:** 3\
**Last updated:** [November 18, 2020, 11:06pm UTC](https://discourse.julialang.org/t/help-using-nloops-and-nref/50397 "2020-11-18T23:06:48Z")

</div>

Hello, I am trying to build general function that will take the min and max of a K-dimensional array of N data points and use this to create a mesh of a user-specified discretization. For example, here is a 5D array of …

---

## [Dataframe to csv with the index column](https://discourse.julialang.org/t/dataframe-to-csv-with-the-index-column/50400)

<div class="topic-metadata">

**Author:** [@acycliq](https://discourse.julialang.org/u/acycliq)\
**Replies:** 3\
**Last updated:** [November 18, 2020, 9:42pm UTC](https://discourse.julialang.org/t/dataframe-to-csv-with-the-index-column/50400 "2020-11-18T21:42:26Z")

</div>

How to write a dataframe with the index column to a csv please? This is what I have put togeter but I am missing the index. (Btw, I dont even know if thats the best way. What I want, is to save a nested list of lists to …

---

## [How to get --machine-file for array tasks?](https://discourse.julialang.org/t/how-to-get-machine-file-for-array-tasks/50401)

<div class="topic-metadata">

**Author:** [@mkarikom](https://discourse.julialang.org/u/mkarikom)\
**Replies:** 0\
**Last updated:** [November 18, 2020, 9:22pm UTC](https://discourse.julialang.org/t/how-to-get-machine-file-for-array-tasks/50401 "2020-11-18T21:22:46Z")

</div>

I have the following sbatch.sub script which defines a job array where each is meant to call run.jl with it’s respective slurm nodefile (please see below). This produces outputs for both array iterations but they say so…

---

## [Why is bang(!) indicating argument mutation a convention, but not enforced?](https://discourse.julialang.org/t/why-is-bang-indicating-argument-mutation-a-convention-but-not-enforced/49783)

<div class="topic-metadata">

**Author:** [@bilderbuchi](https://discourse.julialang.org/u/bilderbuchi)\
**Replies:** 15\
**Last updated:** [November 18, 2020, 7:48pm UTC](https://discourse.julialang.org/t/why-is-bang-indicating-argument-mutation-a-convention-but-not-enforced/49783 "2020-11-18T19:48:48Z")

</div>

As a Julia beginner/neophyte, I am wondering why using a ! name suffix for functions that may mutate their arguments is merely a convention, but is not enforced by the compiler? It is nice to have this indication availa…

---

## [Solving vector field PDE with DiffEqOperators.jl](https://discourse.julialang.org/t/solving-vector-field-pde-with-diffeqoperators-jl/50391)

<div class="topic-metadata">

**Author:** [@jarias9](https://discourse.julialang.org/u/jarias9)\
**Replies:** 1\
**Last updated:** [November 18, 2020, 7:19pm UTC](https://discourse.julialang.org/t/solving-vector-field-pde-with-diffeqoperators-jl/50391 "2020-11-18T19:19:52Z")

</div>

Hello all, I am wondering if there is a workaround to solving a vector field for lets say Maxwell’s equations such as \\frac{\\partial \\mathbf{E}}{\\partial t} = \\frac{1}{\\varepsilon\_0} \\times \\mathbf{H} \\frac{\\partial…

---

## [Query status of the solution when using Roots](https://discourse.julialang.org/t/query-status-of-the-solution-when-using-roots/50328)

<div class="topic-metadata">

**Author:** [@optimist](https://discourse.julialang.org/u/optimist)\
**Replies:** 4\
**Last updated:** [November 18, 2020, 7:08pm UTC](https://discourse.julialang.org/t/query-status-of-the-solution-when-using-roots/50328 "2020-11-18T19:08:51Z")

</div>

Edited to make it more specific I would like to query status of the solution when using the Roots package, before the function returns an answer. I can see in the source code of “find\_zero.jl” that it has some functiona…

---

## [Same code, very different results with Julia 1.4.2 and Julia 1.5.2](https://discourse.julialang.org/t/same-code-very-different-results-with-julia-1-4-2-and-julia-1-5-2/47416)

<div class="topic-metadata">

**Author:** [@CodeLenz](https://discourse.julialang.org/u/CodeLenz)\
**Replies:** 23\
**Last updated:** [November 18, 2020, 7:02pm UTC](https://discourse.julialang.org/t/same-code-very-different-results-with-julia-1-4-2-and-julia-1-5-2/47416 "2020-11-18T19:02:14Z")

</div>

Hi. I am running a very long piece of code, with finite element, Monte Carlo Simulation (parallel loop) and topology optimization. It turns out that after moving to Julia 1.5.2, I observed a drastic change in all my sol…

---

## [Efficient generation of acceptance rejection random number array](https://discourse.julialang.org/t/efficient-generation-of-acceptance-rejection-random-number-array/50374)

<div class="topic-metadata">

**Author:** [@mocalvao](https://discourse.julialang.org/u/mocalvao)\
**Replies:** 6\
**Last updated:** [November 18, 2020, 6:06pm UTC](https://discourse.julialang.org/t/efficient-generation-of-acceptance-rejection-random-number-array/50374 "2020-11-18T18:06:04Z")

</div>

Hi there, I have the following (unnormalized) probability density function (pdf): f(x) = -x\*(x-1) whose support is the interval (0, 1). I have coded the following to generate a 10000-element array of random numbers dr…

---

## [Dynamic dispatch in a for loop](https://discourse.julialang.org/t/dynamic-dispatch-in-a-for-loop/50282)

<div class="topic-metadata">

**Author:** [@drarnau](https://discourse.julialang.org/u/drarnau)\
**Replies:** 17\
**Last updated:** [November 18, 2020, 6:03pm UTC](https://discourse.julialang.org/t/dynamic-dispatch-in-a-for-loop/50282 "2020-11-18T18:03:31Z")

</div>

Hello, While trying to optimise my code, Juno’s profiler flagged a portion of my code as doing some dynamic dispatch. Since my original code is fairly long, here is the smallest example I could come up with to illustrat…

---

## [Testing different constant definitions](https://discourse.julialang.org/t/testing-different-constant-definitions/50376)

<div class="topic-metadata">

**Author:** [@Luapulu](https://discourse.julialang.org/u/Luapulu)\
**Replies:** 5\
**Last updated:** [November 18, 2020, 6:00pm UTC](https://discourse.julialang.org/t/testing-different-constant-definitions/50376 "2020-11-18T18:00:06Z")

</div>

I have a macro, which creates / defines useful constants for the user. I would like to test if the macro created the correct constants and if they function as expected. How can I get something like the following to work? …

---

## [Documenter: Unable to get the binding](https://discourse.julialang.org/t/documenter-unable-to-get-the-binding/50384)

<div class="topic-metadata">

**Author:** [@TheRoniOne](https://discourse.julialang.org/u/TheRoniOne)\
**Replies:** 2\
**Last updated:** [November 18, 2020, 5:09pm UTC](https://discourse.julialang.org/t/documenter-unable-to-get-the-binding/50384 "2020-11-18T17:09:24Z")

</div>

I’m trying to build documentation for a package I’m developing using Documenter.jl, but I currently got stuck getting Warning: unable to get the binding for 'readMDTable(file::String; header::Bool=true)::DataFrame' in \`…

---

## [Julia's loop scope behavior differs from Fortran?](https://discourse.julialang.org/t/julias-loop-scope-behavior-differs-from-fortran/50275)

<div class="topic-metadata">

**Author:** [@CosmoProf](https://discourse.julialang.org/u/CosmoProf)\
**Replies:** 37\
**Last updated:** [November 18, 2020, 4:52pm UTC](https://discourse.julialang.org/t/julias-loop-scope-behavior-differs-from-fortran/50275 "2020-11-18T16:52:59Z")

</div>

Hi, the oddest thing about Julia is how it behaves in loops (especially For loops). The following example gives me an error, DataVar: Not Defined, and I cannot imagine why: function TestLogic(Nloops) for i in 1:Nlo…

---

## [Not sure how to apply a filter](https://discourse.julialang.org/t/not-sure-how-to-apply-a-filter/50265)

<div class="topic-metadata">

**Author:** [@klaff](https://discourse.julialang.org/u/klaff)\
**Replies:** 7\
**Last updated:** [November 18, 2020, 4:11pm UTC](https://discourse.julialang.org/t/not-sure-how-to-apply-a-filter/50265 "2020-11-18T16:11:53Z")

</div>

I’ve constructed a filter as follows: filter1 = let f1 = 6.31 f2 = 1258.9 Q1 = 0.71 f3 = 15.915 f4 = 15.915 Q2 = 0.64 SecondOrderSections(\[ Biquad(4π^2\*f2^2,0.0,0.0,2π\*f1/Q1, 4π^2\*f1^2), Biquad(0.0,0.0,1.0,…

---

## [How can I set a Specific chain name for a Structure？(BioStrcuture Package)](https://discourse.julialang.org/t/how-can-i-set-a-specific-chain-name-for-a-structure-biostrcuture-package/50211)

<div class="topic-metadata">

**Author:** [@Wang-Lin-boop](https://discourse.julialang.org/u/Wang-Lin-boop)\
**Replies:** 6\
**Last updated:** [November 18, 2020, 3:26pm UTC](https://discourse.julialang.org/t/how-can-i-set-a-specific-chain-name-for-a-structure-biostrcuture-package/50211 "2020-11-18T15:26:13Z")

</div>

Recently, I was working on a project dealing with a large number of coordinate files, which required me to convert each chain in some coordinate files with MMCIF/PDBXML/MMTF/PDB format into PDB format. Some of the chains…

---

## [Examples of memory aliasing](https://discourse.julialang.org/t/examples-of-memory-aliasing/50382)

<div class="topic-metadata">

**Author:** [@wulpuqu](https://discourse.julialang.org/u/wulpuqu)\
**Replies:** 2\
**Last updated:** [November 18, 2020, 3:14pm UTC](https://discourse.julialang.org/t/examples-of-memory-aliasing/50382 "2020-11-18T15:14:35Z")

</div>

Hello, I was reading the definition of AbstractArray in Base and I was searching for concrete cases of memory aliasing with two AbstractArrays. A simple case with SubArrays. julia\> A=randn(10) julia\> Base.mightalias(…

---

## [New Gurobi.jl syntax trouble](https://discourse.julialang.org/t/new-gurobi-jl-syntax-trouble/50344)

<div class="topic-metadata">

**Author:** [@afazevedo](https://discourse.julialang.org/u/afazevedo)\
**Replies:** 2\
**Last updated:** [November 18, 2020, 1:04pm UTC](https://discourse.julialang.org/t/new-gurobi-jl-syntax-trouble/50344 "2020-11-18T13:04:16Z")

</div>

Hi all I’ve got some issues in adapting to the new Gurobi.jl syntax. For example, this is a callback that I made in the old syntax: function cb(cb\_data, cb\_where) if cb\_where == CB\_MIPNODE #first node …

---

## [How to save "globally" installed package in a project folder?](https://discourse.julialang.org/t/how-to-save-globally-installed-package-in-a-project-folder/50380)

<div class="topic-metadata">

**Author:** [@mike\_k](https://discourse.julialang.org/u/mike_k)\
**Replies:** 1\
**Last updated:** [November 18, 2020, 2:03pm UTC](https://discourse.julialang.org/t/how-to-save-globally-installed-package-in-a-project-folder/50380 "2020-11-18T14:03:08Z")

</div>

Dear folks, a while ago I created a Julia project in /myproject with pkg\> activate . . However, I was a bit lazy and worked with the “globally” installed packages from /.julia/environments/v1.4 which I updated several t…

---

## [Sum-Of-Squares SOC constraint in JuMP](https://discourse.julialang.org/t/sum-of-squares-soc-constraint-in-jump/50091)

<div class="topic-metadata">

**Author:** [@andrewrosemberg](https://discourse.julialang.org/u/andrewrosemberg)\
**Replies:** 5\
**Last updated:** [November 16, 2020, 8:52am UTC](https://discourse.julialang.org/t/sum-of-squares-soc-constraint-in-jump/50091 "2020-11-16T08:52:04Z")

</div>

I’m trying to add a constraint of type (x'Ax \<= b) in JuMP to be interpreted as SOC by the solver. A is Positive definite. Seems to be the same error as presented in this issue, but A+A' has positive eigenvalues: eigv…

---

## [About Julia's stack (its range, growing direction, etc)](https://discourse.julialang.org/t/about-julias-stack-its-range-growing-direction-etc/50351)

<div class="topic-metadata">

**Author:** [@KDr2](https://discourse.julialang.org/u/KDr2)\
**Replies:** 4\
**Last updated:** [November 18, 2020, 1:45pm UTC](https://discourse.julialang.org/t/about-julias-stack-its-range-growing-direction-etc/50351 "2020-11-18T13:45:26Z")

</div>

I want to know if a certain object is allocated on stack or heap, here’s my thought: find the range of the stack find the location where the object data is placed check if the data location is in the stack range And h…

---

## [MethodError: no method matching Lagrange\_Polynomials(::Float64, ::LinRange{Float64}, ::Array{Float64,1})](https://discourse.julialang.org/t/methoderror-no-method-matching-lagrange-polynomials-float64-linrange-float64-array-float64-1/50370)

<div class="topic-metadata">

**Author:** [@veenz98](https://discourse.julialang.org/u/veenz98)\
**Replies:** 1\
**Last updated:** [November 18, 2020, 1:14pm UTC](https://discourse.julialang.org/t/methoderror-no-method-matching-lagrange-polynomials-float64-linrange-float64-array-float64-1/50370 "2020-11-18T13:14:49Z")

</div>

Hi, I’m new to Julia, for this function in main I got an error message: MethodError: no method matching LagrangePolynomial(::Float64, ::LinRange{Float64}, ::Array{Float64,1}) Closest candidates are: LagrangePolynomia…

---

## [Plotting GPU data](https://discourse.julialang.org/t/plotting-gpu-data/50379)

<div class="topic-metadata">

**Author:** [@rveltz](https://discourse.julialang.org/u/rveltz)\
**Replies:** 0\
**Last updated:** [November 18, 2020, 12:57pm UTC](https://discourse.julialang.org/t/plotting-gpu-data/50379 "2020-11-18T12:57:52Z")

</div>

Hi, I used to plot 2d arrays directly from the GPU using ArrayFire.jl but it does not work for me anymore: julia\> ArrayFire.image(u0) 0x00007fee23c3f920 no window appears. It could be because I am on OSX but no error …

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

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