# Latest

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

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

**Page:** 1515

---

## [How to enforce shared behavior for subtype constructors of abstract type](https://discourse.julialang.org/t/how-to-enforce-shared-behavior-for-subtype-constructors-of-abstract-type/52875)

<div class="topic-metadata">

**Author:** [@jules](https://discourse.julialang.org/u/jules)\
**Replies:** 4\
**Last updated:** [January 23, 2021, 9:50pm UTC](https://discourse.julialang.org/t/how-to-enforce-shared-behavior-for-subtype-constructors-of-abstract-type/52875 "2021-01-23T21:50:07Z")

</div>

In Makie I have an abstract type Layoutable. Whenever a Layoutable is created with a Figure passed as the parent, I want the layoutable added to the figure’s children. The problem is that this behavior needs to happen in…

---

## [Using @benchmark in a for loop with a dictionary](https://discourse.julialang.org/t/using-benchmark-in-a-for-loop-with-a-dictionary/53780)

<div class="topic-metadata">

**Author:** [@Aje12](https://discourse.julialang.org/u/Aje12)\
**Replies:** 2\
**Last updated:** [January 23, 2021, 9:05pm UTC](https://discourse.julialang.org/t/using-benchmark-in-a-for-loop-with-a-dictionary/53780 "2021-01-23T21:05:01Z")

</div>

Hi all, I am pretty new to Julia and I am trying to use the @benchmark macro to benchmark the PageRank algorithm on multiple graphs which are stored in a dictionary. The aim is to store the graphs in the dictionary then…

---

## [Confusing instructions from JuliaRegistrator](https://discourse.julialang.org/t/confusing-instructions-from-juliaregistrator/53833)

<div class="topic-metadata">

**Author:** [@cscherrer](https://discourse.julialang.org/u/cscherrer)\
**Replies:** 5\
**Last updated:** [January 23, 2021, 5:27pm UTC](https://discourse.julialang.org/t/confusing-instructions-from-juliaregistrator/53833 "2021-01-23T17:27:37Z")

</div>

Hi, this message from JuliaRegistrator is really confusing: Also, note the warning: Version 0.1.3 skips over 0.1.2 This can be safely ignored. However, if you want to fix this you can do so. Call register() again afte…

---

## [Best way to call a function from another function with dispatch on first arg + various arguments](https://discourse.julialang.org/t/best-way-to-call-a-function-from-another-function-with-dispatch-on-first-arg-various-arguments/53795)

<div class="topic-metadata">

**Author:** [@rvezy](https://discourse.julialang.org/u/rvezy)\
**Replies:** 4\
**Last updated:** [January 23, 2021, 5:01pm UTC](https://discourse.julialang.org/t/best-way-to-call-a-function-from-another-function-with-dispatch-on-first-arg-various-arguments/53795 "2021-01-23T17:01:29Z")

</div>

OK I know my title doesn’t help but I don’t know how to explain my problem in a better way. Here is the thing, I have a function fn1 that is called by another function fn2, and the dispatch is made on the type of the fi…

---

## [Turing: truncated regression example](https://discourse.julialang.org/t/turing-truncated-regression-example/53832)

<div class="topic-metadata">

**Author:** [@drbenvincent](https://discourse.julialang.org/u/drbenvincent)\
**Replies:** 1\
**Last updated:** [January 23, 2021, 3:12pm UTC](https://discourse.julialang.org/t/turing-truncated-regression-example/53832 "2021-01-23T15:12:58Z")

</div>

Hi all. I’ve found that there are no real definitive guides on truncated vs censored regression in a Bayesian context. They are given some treatment in some Bayesian texts, but I’ve not found it easy to find worked examp…

---

## [Can I paint the background of a plot?](https://discourse.julialang.org/t/can-i-paint-the-background-of-a-plot/53807)

<div class="topic-metadata">

**Author:** [@klaff](https://discourse.julialang.org/u/klaff)\
**Replies:** 9\
**Last updated:** [January 23, 2021, 2:30pm UTC](https://discourse.julialang.org/t/can-i-paint-the-background-of-a-plot/53807 "2021-01-23T14:30:38Z")

</div>

I would like to make a function f(x,y) that returns a color and give that to plot to create the background of the plot. Is there something close to this on one of the plotting packages? Thanks.

---

## [Overlay a contour over a heatmap](https://discourse.julialang.org/t/overlay-a-contour-over-a-heatmap/53586)

<div class="topic-metadata">

**Author:** [@fkguo](https://discourse.julialang.org/u/fkguo)\
**Replies:** 13\
**Last updated:** [January 23, 2021, 12:02pm UTC](https://discourse.julialang.org/t/overlay-a-contour-over-a-heatmap/53586 "2021-01-23T12:02:11Z")

</div>

Hello, I have difficulty overlaying a contour plot over a heatmap. Here is an example let f(x,y) = (x + 2y^2) \* abs(sin(y) + cos(x)) p1 = heatmap(1:0.5:20, 1:0.5:20, f, alpha=0.3) p2 = Plots.contourf(1:0.5:…

---

## [Why is broadcast faster than the dot syntax? (Performance differences between @., ., broadcast and broadcast!)](https://discourse.julialang.org/t/why-is-broadcast-faster-than-the-dot-syntax-performance-differences-between-broadcast-and-broadcast/53814)

<div class="topic-metadata">

**Author:** [@schneiderfelipe](https://discourse.julialang.org/u/schneiderfelipe)\
**Replies:** 5\
**Last updated:** [January 23, 2021, 11:08am UTC](https://discourse.julialang.org/t/why-is-broadcast-faster-than-the-dot-syntax-performance-differences-between-broadcast-and-broadcast/53814 "2021-01-23T11:08:14Z")

</div>

From the manual, I expected both cases below to perform equally well, but that seems not to be the case: julia\> using BenchmarkTools julia\> a = \[2, 3, 4, 5\]; julia\> b = \[6 7 8 9\]; julia\> @benchmark a .+ b BenchmarkTo…

---

## [PINN with two boundary conditions](https://discourse.julialang.org/t/pinn-with-two-boundary-conditions/53813)

<div class="topic-metadata">

**Author:** [@Honza9723](https://discourse.julialang.org/u/Honza9723)\
**Replies:** 2\
**Last updated:** [January 23, 2021, 10:54am UTC](https://discourse.julialang.org/t/pinn-with-two-boundary-conditions/53813 "2021-01-23T10:54:12Z")

</div>

Hi, I am working on a physically informed neural network solution of ODE with two boundary conditions. In a standard initial value problem, let’s say y(x) - y’(x) = 0 with y(0) = 1, I would use approximation in a form y…

---

## [Help translating a JAGS model to Turing](https://discourse.julialang.org/t/help-translating-a-jags-model-to-turing/53434)

<div class="topic-metadata">

**Author:** [@drbenvincent](https://discourse.julialang.org/u/drbenvincent)\
**Replies:** 7\
**Last updated:** [January 23, 2021, 10:49am UTC](https://discourse.julialang.org/t/help-translating-a-jags-model-to-turing/53434 "2021-01-23T10:49:03Z")

</div>

I’m a beginner with Turing.jl, and am just trying to get to grips with it by translating some examples from the book Bayesian Cognitive Modelling: a practical course. I’ve had some luck with a number of models, but have …

---

## [Turing: indicator variables vs control flow](https://discourse.julialang.org/t/turing-indicator-variables-vs-control-flow/53539)

<div class="topic-metadata">

**Author:** [@drbenvincent](https://discourse.julialang.org/u/drbenvincent)\
**Replies:** 9\
**Last updated:** [January 23, 2021, 10:44am UTC](https://discourse.julialang.org/t/turing-indicator-variables-vs-control-flow/53539 "2021-01-23T10:44:39Z")

</div>

I have a change point detection model which I’m converting over from JAGS to Turing, and this one is interesting as it raises the question of whether you should use indicator variables (common to other PPL’s) or to use c…

---

## [Unable to guess system type on Chrome OS with linux (beta)](https://discourse.julialang.org/t/unable-to-guess-system-type-on-chrome-os-with-linux-beta/53820)

<div class="topic-metadata">

**Author:** [@kapple](https://discourse.julialang.org/u/kapple)\
**Replies:** 1\
**Last updated:** [January 23, 2021, 7:34am UTC](https://discourse.julialang.org/t/unable-to-guess-system-type-on-chrome-os-with-linux-beta/53820 "2021-01-23T07:34:50Z")

</div>

I get the following error in Julia’s package mode. (@v1.5) pkg\> build ForwardDiff Documenter Interpolations Roots IntervalArithmetic QuadGK OffsetArrays LinearAlgebra Building CRlibm → \`~/.julia/packages/CRlibm/NFCH5…

---

## [Performance comparision for equivalent DiffEqFlux models](https://discourse.julialang.org/t/performance-comparision-for-equivalent-diffeqflux-models/53804)

<div class="topic-metadata">

**Author:** [@Kevin\_Kleinbeck](https://discourse.julialang.org/u/Kevin_Kleinbeck)\
**Replies:** 3\
**Last updated:** [January 23, 2021, 7:28am UTC](https://discourse.julialang.org/t/performance-comparision-for-equivalent-diffeqflux-models/53804 "2021-01-23T07:28:19Z")

</div>

Hello, I am considering these 3 ODEs function minimalModelNonAlloc!(D, u, p, t) M = p v = 0.2 .\* ones(length(u)) D .= v - M \* u.^3 - u.^5 return nothing end function minimalModelAlloc(u, p, t) M = p v = 0.2 .\* …

---

## [Intern opportunity in Sydney, Australia remote welcome](https://discourse.julialang.org/t/intern-opportunity-in-sydney-australia-remote-welcome/6238)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 2\
**Last updated:** [January 23, 2021, 2:11am UTC](https://discourse.julialang.org/t/intern-opportunity-in-sydney-australia-remote-welcome/6238 "2021-01-23T02:11:32Z")

</div>

Our company is building an innovative personal finance product and we are using Julia! If you are a college/university student interested in doing a 3 month internship please email me at dzj— at ----- analytixware.com

---

## [Basic pivoting/widening of a table](https://discourse.julialang.org/t/basic-pivoting-widening-of-a-table/53812)

<div class="topic-metadata">

**Author:** [@affans](https://discourse.julialang.org/u/affans)\
**Replies:** 1\
**Last updated:** [January 23, 2021, 12:10am UTC](https://discourse.julialang.org/t/basic-pivoting-widening-of-a-table/53812 "2021-01-23T00:10:40Z")

</div>

Consider the following MWE: using DataFrames df\_str = """ mdate type yesno workerid 1/1/2020 pcr no 1 1/1/2020 molecular yes 1 1/1/2020 pcr yes 2 1/1/2020 molecular yes 2 1/1/2020 antigen yes 2 1/1/2020 molecular no 3…

---

## [Range(stop)](https://discourse.julialang.org/t/range-stop/53478)

<div class="topic-metadata">

**Author:** [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Replies:** 17\
**Last updated:** [January 22, 2021, 11:24pm UTC](https://discourse.julialang.org/t/range-stop/53478 "2021-01-22T23:24:03Z")

</div>

Should Julia have a range(stop) similar to the Python range(stop)? In Julia master (1.7.0-DEV), we recently merged an all keyword range(; start, stop, length, step) in #38041. In addition to allowing all range arguments…

---

## [Minimize Multiple norms using JuMP](https://discourse.julialang.org/t/minimize-multiple-norms-using-jump/53763)

<div class="topic-metadata">

**Author:** [@cheng\_chen](https://discourse.julialang.org/u/cheng_chen)\
**Replies:** 1\
**Last updated:** [January 22, 2021, 9:14pm UTC](https://discourse.julialang.org/t/minimize-multiple-norms-using-jump/53763 "2021-01-22T21:14:08Z")

</div>

Hi, I need to minimize an objective function that has multiple norms in it. Here is a minimal example: A is a variable of dimension d by n. x is a known constant matrix of dimension n by 1 and b\_t (dimension d by 1) …

---

## [Problems to build CPLEX](https://discourse.julialang.org/t/problems-to-build-cplex/53671)

<div class="topic-metadata">

**Author:** [@angeloaliano1](https://discourse.julialang.org/u/angeloaliano1)\
**Replies:** 14\
**Last updated:** [January 22, 2021, 8:43pm UTC](https://discourse.julialang.org/t/problems-to-build-cplex/53671 "2021-01-22T20:43:04Z")

</div>

Dear all, I am having a problem to build the CPLEX v 20.10 on my computer. The error message appears: Pkg.build("CPLEX") Building CPLEX → \`C:\\Users\\Usuário\\.julia\\packages\\CPLEX\\DgohF\\deps\\build.log\` ┌ Error: Error …

---

## [Use Julia to build better quantum computers](https://discourse.julialang.org/t/use-julia-to-build-better-quantum-computers/17073)

<div class="topic-metadata">

**Author:** [@amellnik](https://discourse.julialang.org/u/amellnik)\
**Replies:** 3\
**Last updated:** [November 7, 2018, 5:30pm UTC](https://discourse.julialang.org/t/use-julia-to-build-better-quantum-computers/17073 "2018-11-07T17:30:38Z")

</div>

Rigetti | Quantum Computing | Berkeley, CA | Onsite Rigetti Computing is building the world’s most powerful computers to help solve humanity’s most pressing and important problems. We’re hiring software engineers, data…

---

## [Data Coordinates included in plot (Matlab calls it data tip)](https://discourse.julialang.org/t/data-coordinates-included-in-plot-matlab-calls-it-data-tip/53405)

<div class="topic-metadata">

**Author:** [@Jake](https://discourse.julialang.org/u/Jake)\
**Replies:** 6\
**Last updated:** [January 22, 2021, 6:02pm UTC](https://discourse.julialang.org/t/data-coordinates-included-in-plot-matlab-calls-it-data-tip/53405 "2021-01-22T18:02:33Z")

</div>

I often plot the spectra of the vibration of rotating machines. Here it is critical to know the actual frequency and amplitude of the major sources of vibration. The most convenient way to obtain these values is by plo…

---

## [Multiple dispatch and type conversion for cousins of a type hierarchy](https://discourse.julialang.org/t/multiple-dispatch-and-type-conversion-for-cousins-of-a-type-hierarchy/53787)

<div class="topic-metadata">

**Author:** [@marty0801](https://discourse.julialang.org/u/marty0801)\
**Replies:** 2\
**Last updated:** [January 22, 2021, 5:47pm UTC](https://discourse.julialang.org/t/multiple-dispatch-and-type-conversion-for-cousins-of-a-type-hierarchy/53787 "2021-01-22T17:47:56Z")

</div>

I have the following type hierarchy: abstract type U end struct A \<: U ... end struct B \<: U ... end (I’ve omitted the details, but A and B both have identical field-names and types, but the semantic meaning of thei…

---

## [New Blog post live: "The 2020 Industry Julia Users Contributhon"](https://discourse.julialang.org/t/new-blog-post-live-the-2020-industry-julia-users-contributhon/53692)

<div class="topic-metadata">

**Author:** [@logankilpatrick](https://discourse.julialang.org/u/logankilpatrick)\
**Replies:** 1\
**Last updated:** [January 22, 2021, 5:38pm UTC](https://discourse.julialang.org/t/new-blog-post-live-the-2020-industry-julia-users-contributhon/53692 "2021-01-22T17:38:17Z")

</div>

A new blog post titled: “The 2020 Industry Julia Users Contributhon” was just posted on the Julia Language’s official blog. Check it out here: The 2020 Industry Julia Users Contributhon and let us know your thoughts!

---

## [A thick restarded Lanczos method with deflation/locking?](https://discourse.julialang.org/t/a-thick-restarded-lanczos-method-with-deflation-locking/53788)

<div class="topic-metadata">

**Author:** [@Bruno\_Amorim](https://discourse.julialang.org/u/Bruno_Amorim)\
**Replies:** 0\
**Last updated:** [January 22, 2021, 4:31pm UTC](https://discourse.julialang.org/t/a-thick-restarded-lanczos-method-with-deflation-locking/53788 "2021-01-22T16:31:06Z")

</div>

First some context: In the search for efficient eigensolvers for inner eigenvalues of hermitian matrices, I came across the following papers: \[1512.08135\] A Thick-Restart Lanczos algorithm with polynomial filtering for…

---

## [Is there any way to show the outline of the code in Juno?](https://discourse.julialang.org/t/is-there-any-way-to-show-the-outline-of-the-code-in-juno/5535)

<div class="topic-metadata">

**Author:** [@zhangliye](https://discourse.julialang.org/u/zhangliye)\
**Replies:** 4\
**Last updated:** [January 22, 2021, 4:14pm UTC](https://discourse.julialang.org/t/is-there-any-way-to-show-the-outline-of-the-code-in-juno/5535 "2021-01-22T16:14:43Z")

</div>

Is there any way to show the outline of the code like JuliaDT introduced on the following we page? JuliaDT This feature is very useful to navigate the code quickly in the large project.

---

## [Is varinfo() designed to not report size of an array of sparse matrices?](https://discourse.julialang.org/t/is-varinfo-designed-to-not-report-size-of-an-array-of-sparse-matrices/53786)

<div class="topic-metadata">

**Author:** [@brownlight](https://discourse.julialang.org/u/brownlight)\
**Replies:** 2\
**Last updated:** [January 22, 2021, 4:05pm UTC](https://discourse.julialang.org/t/is-varinfo-designed-to-not-report-size-of-an-array-of-sparse-matrices/53786 "2021-01-22T16:05:13Z")

</div>

Memory usage shoots up after computing two variable/references, D & Rj\_mats. For these two, varinfo() reports: D 6.000 MiB 262144×262144 SparseMatrixCSC{Int64,Int64} Rj\_mats 10.039 KiB 256-element Array{SparseMatrixCSC{…

---

## [Julia and C or just standalone C++](https://discourse.julialang.org/t/julia-and-c-or-just-standalone-c/53774)

<div class="topic-metadata">

**Author:** [@anbtta](https://discourse.julialang.org/u/anbtta)\
**Replies:** 6\
**Last updated:** [January 22, 2021, 3:07pm UTC](https://discourse.julialang.org/t/julia-and-c-or-just-standalone-c/53774 "2021-01-22T15:07:44Z")

</div>

Hello, I was wondering if in production the pair Julia and C was a better option to C++ only. In terms of performance, and for code management in a large scale project. Thank you.

---

## [Increment some components of a vector](https://discourse.julialang.org/t/increment-some-components-of-a-vector/53769)

<div class="topic-metadata">

**Author:** [@Benoit\_Gaudeul](https://discourse.julialang.org/u/Benoit_Gaudeul)\
**Replies:** 5\
**Last updated:** [January 22, 2021, 2:30pm UTC](https://discourse.julialang.org/t/increment-some-components-of-a-vector/53769 "2021-01-22T14:30:06Z")

</div>

Hi, I’m trying to increment some components of a vector (for a finite volume code). Here is a MWE: components=\[1,1,2\] vector=zeros(3) increment=collect(1:3) vector\[components\]+=increment The value of the I’m hoping fo…

---

## [InexactError when multiplying entirely missing matrices](https://discourse.julialang.org/t/inexacterror-when-multiplying-entirely-missing-matrices/53749)

<div class="topic-metadata">

**Author:** [@max\_schwarzer](https://discourse.julialang.org/u/max_schwarzer)\
**Replies:** 2\
**Last updated:** [January 22, 2021, 2:25pm UTC](https://discourse.julialang.org/t/inexacterror-when-multiplying-entirely-missing-matrices/53749 "2021-01-22T14:25:28Z")

</div>

I am trying to multiply matrices, some of which can be entirely missing. I would expect the result to be a missing value (similar to Python). Instead I get InexactError: trunc(Int64, Inf) omega = randn(10,10) a = Array{…

---

## [Help with disabling latexification in Plots.jl's ticks (pyplot)](https://discourse.julialang.org/t/help-with-disabling-latexification-in-plots-jls-ticks-pyplot/53738)

<div class="topic-metadata">

**Author:** [@claudio20497](https://discourse.julialang.org/u/claudio20497)\
**Replies:** 2\
**Last updated:** [January 22, 2021, 2:22pm UTC](https://discourse.julialang.org/t/help-with-disabling-latexification-in-plots-jls-ticks-pyplot/53738 "2021-01-22T14:22:28Z")

</div>

Hello, I don’t know how to disable latexification of strings in Plots.jl xticks argument. The point is that if I run the script: using Plots pyplot() strs = \["a\_1", "a\_3", "a\_3", "a\_4"\] heatmap(rand(Uniform(), 5,5), xt…

---

## [Implement the material point method (MPM) in julia, idea, collaborate, recommendation](https://discourse.julialang.org/t/implement-the-material-point-method-mpm-in-julia-idea-collaborate-recommendation/13444)

<div class="topic-metadata">

**Author:** [@WangWei90](https://discourse.julialang.org/u/WangWei90)\
**Replies:** 2\
**Last updated:** [January 22, 2021, 1:48pm UTC](https://discourse.julialang.org/t/implement-the-material-point-method-mpm-in-julia-idea-collaborate-recommendation/13444 "2021-01-22T13:48:20Z")

</div>

Hello, everyone! I’m a Ph.D. student studying underground engineering in China. Currently, I want to implement a THMC simulation model for an underground repository. I want to implement it using MPM, and I want some he…

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

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