# Latest

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

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

**Page:** 1126

---

## [How to reference a variable within a struct](https://discourse.julialang.org/t/how-to-reference-a-variable-within-a-struct/76135)

<div class="topic-metadata">

**Author:** [@maxkapur](https://discourse.julialang.org/u/maxkapur)\
**Replies:** 5\
**Last updated:** [February 10, 2022, 2:02pm UTC](https://discourse.julialang.org/t/how-to-reference-a-variable-within-a-struct/76135 "2022-02-10T14:02:57Z")

</div>

I understand that Julia doesn’t have “pointers” in the way that C++ does. However, I have stumbled upon an instance in which I feel like I really need something like a pointer that can refer to a variable from within a s…

---

## [Failed to install Interact, DiffEqFlux & Symbolics on 1.7.2](https://discourse.julialang.org/t/failed-to-install-interact-diffeqflux-symbolics-on-1-7-2/76036)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 16\
**Last updated:** [February 10, 2022, 1:54pm UTC](https://discourse.julialang.org/t/failed-to-install-interact-diffeqflux-symbolics-on-1-7-2/76036 "2022-02-10T13:54:39Z")

</div>

Three packages that did not install for v1.7.2 (out of a long list): Interact DiffEqFlux Symbolics Anyone with similar experience? \[Windows 11, 64bit, latest version.\]

---

## [Odd behaviour of custom labels in Plot recipes](https://discourse.julialang.org/t/odd-behaviour-of-custom-labels-in-plot-recipes/76057)

<div class="topic-metadata">

**Author:** [@GoodDayToYouAll](https://discourse.julialang.org/u/GoodDayToYouAll)\
**Replies:** 11\
**Last updated:** [February 10, 2022, 1:44pm UTC](https://discourse.julialang.org/t/odd-behaviour-of-custom-labels-in-plot-recipes/76057 "2022-02-10T13:44:05Z")

</div>

Hello everyone, I am very new to this forum as this is my first question here. I try to follow the guidelines for posting questions, but please point out any mistakes I do in this regard. To my question: I want to plot…

---

## [Where is the right place to put default settings for Plots.jl](https://discourse.julialang.org/t/where-is-the-right-place-to-put-default-settings-for-plots-jl/76149)

<div class="topic-metadata">

**Author:** [@Fred\_He](https://discourse.julialang.org/u/Fred_He)\
**Replies:** 9\
**Last updated:** [February 10, 2022, 1:32pm UTC](https://discourse.julialang.org/t/where-is-the-right-place-to-put-default-settings-for-plots-jl/76149 "2022-02-10T13:32:23Z")

</div>

I would like to set the default plotting style, e.g., default(grid=:off, box=:on)， when using Plots.jl to avoid doing it every time when I need to use it. putting it in startup.jl doesn’t work as an error occurs. So whe…

---

## [Interactive testing and test-specific dependencies](https://discourse.julialang.org/t/interactive-testing-and-test-specific-dependencies/76151)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 3\
**Last updated:** [February 10, 2022, 1:17pm UTC](https://discourse.julialang.org/t/interactive-testing-and-test-specific-dependencies/76151 "2022-02-10T13:17:29Z")

</div>

I do not understand how test-specific dependencies are meant to be used in interactive work. To make this concrete, suppose that package Foo has using Foo using Test using Bar in test/runtests.jl. There is also a tes…

---

## [Taking variable as independent with Zygote (Automatic differentiation)](https://discourse.julialang.org/t/taking-variable-as-independent-with-zygote-automatic-differentiation/76159)

<div class="topic-metadata">

**Author:** [@Eriklw](https://discourse.julialang.org/u/Eriklw)\
**Replies:** 1\
**Last updated:** [February 10, 2022, 12:36pm UTC](https://discourse.julialang.org/t/taking-variable-as-independent-with-zygote-automatic-differentiation/76159 "2022-02-10T12:36:05Z")

</div>

I have a function that I want to take the gradient of in the end. I want to achive that a certain variable is deemed independent of the variable i wish to differentiate in the the end. I tried to do this with the Zygote.…

---

## [PyPlotly.jl](https://discourse.julialang.org/t/pyplotly-jl/76035)

<div class="topic-metadata">

**Author:** [@terasakisatoshi](https://discourse.julialang.org/u/terasakisatoshi)\
**Replies:** 1\
**Last updated:** [February 10, 2022, 12:49pm UTC](https://discourse.julialang.org/t/pyplotly-jl/76035 "2022-02-10T12:49:26Z")

</div>

Hello, everyone. I’ve created a Julia package named PyPlotly.jl which provides us Julia interface for plotly. I know, there are PlotlyJS.jl and Plotly.jl (including Plots.jl with function call plotly()), but when it com…

---

## [Allocation in broadcasting of round for staticarrays](https://discourse.julialang.org/t/allocation-in-broadcasting-of-round-for-staticarrays/76143)

<div class="topic-metadata">

**Author:** [@Jae-Mo\_Lihm](https://discourse.julialang.org/u/Jae-Mo_Lihm)\
**Replies:** 3\
**Last updated:** [February 10, 2022, 11:36am UTC](https://discourse.julialang.org/t/allocation-in-broadcasting-of-round-for-staticarrays/76143 "2022-02-10T11:36:51Z")

</div>

Why does the round.(Int, x::SVector) allocate? using BenchmarkTools, StaticArrays x = SVector{2}(\[0., 1.\]) @btime round.(Int, $x) # 21.180 ns (1 allocation: 16 bytes) @btime round.(Int, $(x.data)) # 6.451 ns (0 allocat…

---

## [Julia version lower bound for new manifest format](https://discourse.julialang.org/t/julia-version-lower-bound-for-new-manifest-format/76152)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 4\
**Last updated:** [February 10, 2022, 10:57am UTC](https://discourse.julialang.org/t/julia-version-lower-bound-for-new-manifest-format/76152 "2022-02-10T10:57:28Z")

</div>

If a package wants to use the new manifest format, what’s the lower bound for the Julia version? Some discussions suggests that backporting it to 1.6 was planned, but I could not find it.

---

## [Creating a graph with objects or structs as nodes](https://discourse.julialang.org/t/creating-a-graph-with-objects-or-structs-as-nodes/76088)

<div class="topic-metadata">

**Author:** [@flobe](https://discourse.julialang.org/u/flobe)\
**Replies:** 3\
**Last updated:** [February 10, 2022, 10:54am UTC](https://discourse.julialang.org/t/creating-a-graph-with-objects-or-structs-as-nodes/76088 "2022-02-10T10:54:36Z")

</div>

Hi everyone, I would like to create a graph where the nodes can contain multiple pieces of information. I tried to use graph.jl, but currently I don’t see any way to store more information than the child nodes. For exa…

---

## [Julia nightly downloads seem outdated](https://discourse.julialang.org/t/julia-nightly-downloads-seem-outdated/76146)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 1\
**Last updated:** [February 10, 2022, 9:17am UTC](https://discourse.julialang.org/t/julia-nightly-downloads-seem-outdated/76146 "2022-02-10T09:17:34Z")

</div>

Just downloaded the nightly build from the official download link, and I find (base) jishnu:Downloads/ $ wget https://julialangnightlies-s3.julialang.org/bin/linux/x64/julia-latest-linux64.tar.gz --2022-02-10 11:13:27--…

---

## [Rdir: search recursive for files with a given name pattern](https://discourse.julialang.org/t/rdir-search-recursive-for-files-with-a-given-name-pattern/75605)

<div class="topic-metadata">

**Author:** [@ellocco](https://discourse.julialang.org/u/ellocco)\
**Replies:** 21\
**Last updated:** [February 10, 2022, 8:02am UTC](https://discourse.julialang.org/t/rdir-search-recursive-for-files-with-a-given-name-pattern/75605 "2022-02-10T08:02:55Z")

</div>

I am looking for a function that lists all files in all sub-directories according to a given search pattern. I can imagine that such a function already exist, but I failed to find it. Below my version: # rdir: list fi…

---

## [Understanding how to declare a function and store it inside another variable for later use](https://discourse.julialang.org/t/understanding-how-to-declare-a-function-and-store-it-inside-another-variable-for-later-use/76144)

<div class="topic-metadata">

**Author:** [@mirror63](https://discourse.julialang.org/u/mirror63)\
**Replies:** 2\
**Last updated:** [February 10, 2022, 7:07am UTC](https://discourse.julialang.org/t/understanding-how-to-declare-a-function-and-store-it-inside-another-variable-for-later-use/76144 "2022-02-10T07:07:12Z")

</div>

histogram(x\[1000:end\], norm=true, label=\["Empirical distribution"\]) xGrid = -4:0.1:4 pdfnormalDensity(z) = pdf(Normal(0,1),z) pdf\_normal=pdfnormalDensity.(xGrid) plot!(xGrid, pdf\_normal, xlims=(-4,4), label=\["Normal pdf"…

---

## [Syntax of exchanging values of 2 variables seems to be broken in short-circuit evaluation](https://discourse.julialang.org/t/syntax-of-exchanging-values-of-2-variables-seems-to-be-broken-in-short-circuit-evaluation/76125)

<div class="topic-metadata">

**Author:** [@frankwswang](https://discourse.julialang.org/u/frankwswang)\
**Replies:** 5\
**Last updated:** [February 10, 2022, 6:26am UTC](https://discourse.julialang.org/t/syntax-of-exchanging-values-of-2-variables-seems-to-be-broken-in-short-circuit-evaluation/76125 "2022-02-10T06:26:54Z")

</div>

Tested on Julia 1.7.2: julia\> t1 = rand(4) 4-element Vector{Float64}: 0.8846483727403565 0.5933843798087087 0.23231684762850824 0.6599451690863327 julia\> t2 = rand(5) 5-element Vector{Float64}: 0.9708033624024174 …

---

## [Question about Dot Notation and "$"](https://discourse.julialang.org/t/question-about-dot-notation-and/76141)

<div class="topic-metadata">

**Author:** [@Kuldeep](https://discourse.julialang.org/u/Kuldeep)\
**Replies:** 1\
**Last updated:** [February 10, 2022, 3:31am UTC](https://discourse.julialang.org/t/question-about-dot-notation-and/76141 "2022-02-10T03:31:57Z")

</div>

I=10;J=5; P=zeros(I,J); #Related to Q1 P.= @. 1e-2\*ones(I,J)\*1; #Option 1.1, Don't work P.= 1e-2.\*ones(I,J).\*1; #Option1.2, works #Related to Q2 P.= @. 1e-2\*ones(I,J)\*1; #Option 2.1, Don't work P.= @. 1e-2\*$ones(I,J)…

---

## [In-place multiplication is too much slower for ComplexF64](https://discourse.julialang.org/t/in-place-multiplication-is-too-much-slower-for-complexf64/75887)

<div class="topic-metadata">

**Author:** [@photor](https://discourse.julialang.org/u/photor)\
**Replies:** 19\
**Last updated:** [February 10, 2022, 2:29am UTC](https://discourse.julialang.org/t/in-place-multiplication-is-too-much-slower-for-complexf64/75887 "2022-02-10T02:29:46Z")

</div>

The ordinary version: using BenchmarkTools const p = 60 const dd=randn(p,p) const ψ=randn(p,p\*p)+im\*randn(p,p\*p) function d2x(ψ::Array{ComplexF64,2})::Array{ComplexF64,2} ψr=dd\*ψ return ψr end @btime d2x(ψ); …

---

## [Learning testing in Julia by practice, propositions?](https://discourse.julialang.org/t/learning-testing-in-julia-by-practice-propositions/75855)

<div class="topic-metadata">

**Author:** [@KZiemian](https://discourse.julialang.org/u/KZiemian)\
**Replies:** 19\
**Last updated:** [February 9, 2022, 11:43pm UTC](https://discourse.julialang.org/t/learning-testing-in-julia-by-practice-propositions/75855 "2022-02-09T23:43:58Z")

</div>

I want to learn testing Julia code and the best way to do this that I see, I find some untested project and try to write test for it. I can’t promise anything, my spare time is quite fluid thing, but I search for some go…

---

## [ModellingToolkit system with ODEForwardSensitivityProblem](https://discourse.julialang.org/t/modellingtoolkit-system-with-odeforwardsensitivityproblem/76093)

<div class="topic-metadata">

**Author:** [@ap2013](https://discourse.julialang.org/u/ap2013)\
**Replies:** 1\
**Last updated:** [February 9, 2022, 11:37pm UTC](https://discourse.julialang.org/t/modellingtoolkit-system-with-odeforwardsensitivityproblem/76093 "2022-02-09T23:37:32Z")

</div>

Hi, I am using ModellingToolkit to define a system following the spring-mass example in the documentation. I solve the ODEForwardSensitivityProblem of the system. The problem is when I try to access the states of the s…

---

## [Compile fails on 1.7.2](https://discourse.julialang.org/t/compile-fails-on-1-7-2/76119)

<div class="topic-metadata">

**Author:** [@JackStrauss](https://discourse.julialang.org/u/JackStrauss)\
**Replies:** 2\
**Last updated:** [February 9, 2022, 9:38pm UTC](https://discourse.julialang.org/t/compile-fails-on-1-7-2/76119 "2022-02-09T21:38:56Z")

</div>

Hi I just downloaded 1.7.2 and started by making an image, and it gives a warning. Any idea what this means? This is on an Intel mac \[ Info: PackageCompiler: Done :heavy\_check\_mark: \[04m:10s\] PackageCompiler: compilin…

---

## [Assign types to a Dict returned by PyCall](https://discourse.julialang.org/t/assign-types-to-a-dict-returned-by-pycall/76113)

<div class="topic-metadata">

**Author:** [@milesf](https://discourse.julialang.org/u/milesf)\
**Replies:** 5\
**Last updated:** [February 9, 2022, 9:26pm UTC](https://discourse.julialang.org/t/assign-types-to-a-dict-returned-by-pycall/76113 "2022-02-09T21:26:50Z")

</div>

I’m attempting to call a Python function from Julia which returns a dictionary with known types. I’d like to efficiently get a Julia dictionary with these correct types. It seems like there should be a way to provide th…

---

## [Speeding up Matrix multiplication involving dot and hadamard product](https://discourse.julialang.org/t/speeding-up-matrix-multiplication-involving-dot-and-hadamard-product/76094)

<div class="topic-metadata">

**Author:** [@psterzinger](https://discourse.julialang.org/u/psterzinger)\
**Replies:** 11\
**Last updated:** [February 9, 2022, 8:31pm UTC](https://discourse.julialang.org/t/speeding-up-matrix-multiplication-involving-dot-and-hadamard-product/76094 "2022-02-09T20:31:06Z")

</div>

Hi everyone, I am looking for suggestions to speed up the following operation, which I need to frequently evaluate to construct a Jacobian matrix, and which accounts for approx. 80% of computation time for said Jacobia…

---

## [Typeconst proposal](https://discourse.julialang.org/t/typeconst-proposal/75953)

<div class="topic-metadata">

**Author:** [@lewis](https://discourse.julialang.org/u/lewis)\
**Replies:** 33\
**Last updated:** [February 9, 2022, 8:34pm UTC](https://discourse.julialang.org/t/typeconst-proposal/75953 "2022-02-09T20:34:35Z")

</div>

Great discussion, which added a lot of nuances and explicit advice based on use cases. The difficulty of expressing this so clearly might suggest that the keyword const is a misnomer, though it helps the Julia compiler …

---

## [Plots failed to precompile](https://discourse.julialang.org/t/plots-failed-to-precompile/76109)

<div class="topic-metadata">

**Author:** [@Zunnki0](https://discourse.julialang.org/u/Zunnki0)\
**Replies:** 0\
**Last updated:** [February 9, 2022, 6:49pm UTC](https://discourse.julialang.org/t/plots-failed-to-precompile/76109 "2022-02-09T18:49:36Z")

</div>

Solved after uninstalling Julia and installing a later version. I have tried to include the Plots package from the REPL with: (@v1.7) pkg\> add Plots This has failed. The error occurs when Julia is “Building GR”. Se…

---

## [How to implement a piece-wise defined function in JuMP](https://discourse.julialang.org/t/how-to-implement-a-piece-wise-defined-function-in-jump/76095)

<div class="topic-metadata">

**Author:** [@Jian\_ZUO](https://discourse.julialang.org/u/Jian_ZUO)\
**Replies:** 8\
**Last updated:** [February 9, 2022, 8:06pm UTC](https://discourse.julialang.org/t/how-to-implement-a-piece-wise-defined-function-in-jump/76095 "2022-02-09T20:06:08Z")

</div>

I have an optimization problem simplified as: function α(x) global Lmin, Lnom, Lmax, α\_0 # values calculated outside a = 0.0019727939 b = 0.0078887 if Lmin \<= x \< Lnom return a \* (x-Lnom)^2 + α\_0 elseif Lnom \<= x…

---

## [Turing TypeErrror Issue](https://discourse.julialang.org/t/turing-typeerrror-issue/76032)

<div class="topic-metadata">

**Author:** [@gideonsimpson](https://discourse.julialang.org/u/gideonsimpson)\
**Replies:** 4\
**Last updated:** [February 9, 2022, 7:26pm UTC](https://discourse.julialang.org/t/turing-typeerrror-issue/76032 "2022-02-09T19:26:29Z")

</div>

I’m experimenting with using Turing to handle some Gaussian random fields problems, and I’m struggling a bit with the interface. The following is supposed to do a Bayesian posterior sampling of the problem y= u(x\_i) +…

---

## [How to use MAXLOC(ARRAY, DIM , MASK \[,KIND\] \[,BACK\]) function in Julia?](https://discourse.julialang.org/t/how-to-use-maxloc-array-dim-mask-kind-back-function-in-julia/76107)

<div class="topic-metadata">

**Author:** [@aksahoo](https://discourse.julialang.org/u/aksahoo)\
**Replies:** 0\
**Last updated:** [February 9, 2022, 6:40pm UTC](https://discourse.julialang.org/t/how-to-use-maxloc-array-dim-mask-kind-back-function-in-julia/76107 "2022-02-09T18:40:36Z")

</div>

I did find the argmax function of julia but it does not consider the mask option of the MAXLOC function of fortran. Please suggest how to find the location of maximum value of matrix with the mask. Or how to call the m…

---

## [Does Julia have an "invisible" function?](https://discourse.julialang.org/t/does-julia-have-an-invisible-function/76063)

<div class="topic-metadata">

**Author:** [@jamaas](https://discourse.julialang.org/u/jamaas)\
**Replies:** 16\
**Last updated:** [February 9, 2022, 5:54pm UTC](https://discourse.julialang.org/t/does-julia-have-an-invisible-function/76063 "2022-02-09T17:54:20Z")

</div>

I’ve cobbled together a function that will return a password from my gnome keyring, the only problem is that it shows the password on the console when it executes. Does Julia have an “invisible” function, like that of R…

---

## [Setting up Turing.jl model for an astrophysics problem](https://discourse.julialang.org/t/setting-up-turing-jl-model-for-an-astrophysics-problem/75618)

<div class="topic-metadata">

**Author:** [@majoburo](https://discourse.julialang.org/u/majoburo)\
**Replies:** 2\
**Last updated:** [February 9, 2022, 4:45pm UTC](https://discourse.julialang.org/t/setting-up-turing-jl-model-for-an-astrophysics-problem/75618 "2022-02-09T16:45:05Z")

</div>

Hi guys, I’m new to using Julia and Turing.jl. A friend recommended I ask about this here. I’m trying to model the dispersion of the stellar orbits around the supermassive black hole at the center of the Milky Way. I’…

---

## [Inconsistent behavior between two- and three-argument methods of \`ldiv!\`](https://discourse.julialang.org/t/inconsistent-behavior-between-two-and-three-argument-methods-of-ldiv/76102)

<div class="topic-metadata">

**Author:** [@simsurace](https://discourse.julialang.org/u/simsurace)\
**Replies:** 0\
**Last updated:** [February 9, 2022, 4:41pm UTC](https://discourse.julialang.org/t/inconsistent-behavior-between-two-and-three-argument-methods-of-ldiv/76102 "2022-02-09T16:41:55Z")

</div>

While implementing methods for \\ and ldiv! for diagonal GPUArrays , (see this PR in case you’re interested) I noticed that the two and three-argument versions of \`ldiv! don’t have the same behavior for singular diagonal …

---

## [Multinomial(::Int, ::Vector{Any}) error in Turing doing LDA](https://discourse.julialang.org/t/multinomial-int-vector-any-error-in-turing-doing-lda/76066)

<div class="topic-metadata">

**Author:** [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)\
**Replies:** 5\
**Last updated:** [February 9, 2022, 4:13pm UTC](https://discourse.julialang.org/t/multinomial-int-vector-any-error-in-turing-doing-lda/76066 "2022-02-09T16:13:30Z")

</div>

Hello, I’m trying to get my hands on Turing by implementing a Latent Dirichlet Allocation model from a youtube course I’m following. I implemented the following model: using Turing, Distributions @model function LDA(w…

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

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