# Latest

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

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

**Page:** 1503

---

## [Unexpected type instability with getproperty but not setproperty!](https://discourse.julialang.org/t/unexpected-type-instability-with-getproperty-but-not-setproperty/26975)

<div class="topic-metadata">

**Author:** [@cshenton](https://discourse.julialang.org/u/cshenton)\
**Replies:** 17\
**Last updated:** [February 4, 2021, 6:34am UTC](https://discourse.julialang.org/t/unexpected-type-instability-with-getproperty-but-not-setproperty/26975 "2021-02-04T06:34:02Z")

</div>

Julia 1.1.0 on macOS mojave In the following example, I’d expect branch elimination to make both of the following type stable, however getproperty isn’t type stable and is allocating. Could someone shed some light on wh…

---

## [Gradient penalty problems with relu](https://discourse.julialang.org/t/gradient-penalty-problems-with-relu/54594)

<div class="topic-metadata">

**Author:** [@ancorso](https://discourse.julialang.org/u/ancorso)\
**Replies:** 0\
**Last updated:** [February 4, 2021, 6:25am UTC](https://discourse.julialang.org/t/gradient-penalty-problems-with-relu/54594 "2021-02-04T06:25:32Z")

</div>

I am trying to implement the gradient penalty of WGAN-GP in Flux and Zygote, but am getting an error when I have relus in my model. See the following MWE. If I switch the relu to a tanh then it works fine. Thoughts? usi…

---

## [Installing the Polynomials Package on Jupyter](https://discourse.julialang.org/t/installing-the-polynomials-package-on-jupyter/54587)

<div class="topic-metadata">

**Author:** [@xdiploid](https://discourse.julialang.org/u/xdiploid)\
**Replies:** 0\
**Last updated:** [February 4, 2021, 3:21am UTC](https://discourse.julialang.org/t/installing-the-polynomials-package-on-jupyter/54587 "2021-02-04T03:21:46Z")

</div>

Is there a reason why this isn’t working to install the Polynomials package? Pkg.add("Polynomials") using Polynomials I tried running it in Julia terminal outside of Jupyter and that didn’t work either. I followed th…

---

## [Best practice for storing functions in a struct](https://discourse.julialang.org/t/best-practice-for-storing-functions-in-a-struct/9654)

<div class="topic-metadata">

**Author:** [@colintbowers](https://discourse.julialang.org/u/colintbowers)\
**Replies:** 31\
**Last updated:** [February 4, 2021, 2:23am UTC](https://discourse.julialang.org/t/best-practice-for-storing-functions-in-a-struct/9654 "2021-02-04T02:23:14Z")

</div>

Given that Function is an abstract type, I was wondering whether the following will impact performance on future function calls: struct FuncStruct f::Function end Should I instead be doing the following? struct Fu…

---

## [What algebraic properties should new operator methods have?](https://discourse.julialang.org/t/what-algebraic-properties-should-new-operator-methods-have/54576)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 0\
**Last updated:** [February 4, 2021, 1:15am UTC](https://discourse.julialang.org/t/what-algebraic-properties-should-new-operator-methods-have/54576 "2021-02-04T01:15:14Z")

</div>

Operator Precedence and Associativity has syntax rules for various operators and a footnote says: The operators + , ++ and \* are non-associative. I am wondering about the semantics of various operator methods. Are …

---

## [EnsembleSummary deprecated?](https://discourse.julialang.org/t/ensemblesummary-deprecated/54570)

<div class="topic-metadata">

**Author:** [@zenkavi](https://discourse.julialang.org/u/zenkavi)\
**Replies:** 1\
**Last updated:** [February 4, 2021, 12:22am UTC](https://discourse.julialang.org/t/ensemblesummary-deprecated/54570 "2021-02-04T00:22:48Z")

</div>

I’m very new to Julia so I might be misinterpreting what’s happening here. The EnsembleSummary function stopped working for me which doesn’t seem to make sense since it is part of SciMLBase so maybe dependencies are mes…

---

## [Optim with autodiff return error when optimize paralleled objective function](https://discourse.julialang.org/t/optim-with-autodiff-return-error-when-optimize-paralleled-objective-function/54496)

<div class="topic-metadata">

**Author:** [@zxjroger](https://discourse.julialang.org/u/zxjroger)\
**Replies:** 9\
**Last updated:** [February 4, 2021, 12:22am UTC](https://discourse.julialang.org/t/optim-with-autodiff-return-error-when-optimize-paralleled-objective-function/54496 "2021-02-04T00:22:45Z")

</div>

I have a very complicated objective function which involves some distributed call. I would like to optimize the function using Optim with Forward Difference. However, it reports an error. This is the MWE: using Distribu…

---

## [Are \_symmetric\_ multimethods worth it?](https://discourse.julialang.org/t/are-symmetric-multimethods-worth-it/54471)

<div class="topic-metadata">

**Author:** [@seertaak](https://discourse.julialang.org/u/seertaak)\
**Replies:** 15\
**Last updated:** [February 3, 2021, 11:40pm UTC](https://discourse.julialang.org/t/are-symmetric-multimethods-worth-it/54471 "2021-02-03T23:40:13Z")

</div>

Multimethods are awesome. I think anyone who’s interested in Julia will agree with that. But I would like to ask an “out there” question: are symmetic multimethods - vs non-symmetric ones - worth the trouble? Reasons I’…

---

## [Weird performance sensitivity to order of operations in broadcasted expression](https://discourse.julialang.org/t/weird-performance-sensitivity-to-order-of-operations-in-broadcasted-expression/54568)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 4\
**Last updated:** [February 3, 2021, 11:33pm UTC](https://discourse.julialang.org/t/weird-performance-sensitivity-to-order-of-operations-in-broadcasted-expression/54568 "2021-02-03T23:33:26Z")

</div>

I’m seeing a weird performance sensitivity to order of operations. foo1(x,y) = @. x\*(x + y) + y\*y foo2(x,y) = @. (x + y)\*x + y\*y For StaticArray inputs, the first function allocates, while the second function does not. …

---

## [Hey all, super confused by variables scope in Julia. I have the following function](https://discourse.julialang.org/t/hey-all-super-confused-by-variables-scope-in-julia-i-have-the-following-function/54566)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 1\
**Last updated:** [February 3, 2021, 10:57pm UTC](https://discourse.julialang.org/t/hey-all-super-confused-by-variables-scope-in-julia-i-have-the-following-function/54566 "2021-02-03T22:57:14Z")

</div>

Hey all, super confused by variables scope in Julia. I have the following function function init\_agents(;teams, workpatterns)::Vector{Agent} # print(typeof(teams), " ", typeof(workpatterns)) for (teamname, info)…

---

## [Network ODE Model; Type error with ForwardDiff Dual](https://discourse.julialang.org/t/network-ode-model-type-error-with-forwarddiff-dual/54379)

<div class="topic-metadata">

**Author:** [@PavanChaggar](https://discourse.julialang.org/u/PavanChaggar)\
**Replies:** 9\
**Last updated:** [February 3, 2021, 10:37pm UTC](https://discourse.julialang.org/t/network-ode-model-type-error-with-forwarddiff-dual/54379 "2021-02-03T22:37:59Z")

</div>

Hello, I am new to Turing and trying to use it for my research on network ODE models. I have started with a simple model (network diffusion) \\frac{du}{dt} = - \\rho \\mathbf{L} \\mathbf{u} and am trying to infer the va…

---

## [ANN: XKCD.jl: Retrieve images and hover text from XKCD webcomic](https://discourse.julialang.org/t/ann-xkcd-jl-retrieve-images-and-hover-text-from-xkcd-webcomic/32963)

<div class="topic-metadata">

**Author:** [@joshday](https://discourse.julialang.org/u/joshday)\
**Replies:** 7\
**Last updated:** [February 3, 2021, 9:46pm UTC](https://discourse.julialang.org/t/ann-xkcd-jl-retrieve-images-and-hover-text-from-xkcd-webcomic/32963 "2021-02-03T21:46:10Z")

</div>

I had a bit of fun this morning filling an obvious void in the Julia ecosystem: using XKCD XKCD.comic(552) # Dict{Symbol,String} with 2 entries: # :imgsrc =\> "https://imgs.xkcd.com/comics/correlation.png" # :hover …

---

## [Question regarding Abstract types](https://discourse.julialang.org/t/question-regarding-abstract-types/54557)

<div class="topic-metadata">

**Author:** [@owinter92](https://discourse.julialang.org/u/owinter92)\
**Replies:** 4\
**Last updated:** [February 3, 2021, 9:36pm UTC](https://discourse.julialang.org/t/question-regarding-abstract-types/54557 "2021-02-03T21:36:49Z")

</div>

Hi, can I include nickname of concrete type as suptype of my Abstract type? Something like this: abstract type AbstractGeometricObject end const Vec \<: AbstractGeometricObject = SVector

---

## [Problems to install packages](https://discourse.julialang.org/t/problems-to-install-packages/54561)

<div class="topic-metadata">

**Author:** [@angeloaliano1](https://discourse.julialang.org/u/angeloaliano1)\
**Replies:** 1\
**Last updated:** [February 3, 2021, 8:38pm UTC](https://discourse.julialang.org/t/problems-to-install-packages/54561 "2021-02-03T20:38:13Z")

</div>

Dear all, When I try to install some package an error appears. For example, when I run Pkg.add("SymEngine") an error appears: (@JuliaPro\_v1.5.3-1) pkg\> add SymEngine ERROR: The following package names could not be re…

---

## [K nearest neighbor utility in Julia](https://discourse.julialang.org/t/k-nearest-neighbor-utility-in-julia/54479)

<div class="topic-metadata">

**Author:** [@compleat](https://discourse.julialang.org/u/compleat)\
**Replies:** 13\
**Last updated:** [February 3, 2021, 8:11pm UTC](https://discourse.julialang.org/t/k-nearest-neighbor-utility-in-julia/54479 "2021-02-03T20:11:34Z")

</div>

Hi. Is there a working K-nearest neighbors package or sub-package available in Julia (apart from Scikit Learn)? There used to be kNN but that is not currently working. A search within the past year yields essential…

---

## [How to debug killed julia session?](https://discourse.julialang.org/t/how-to-debug-killed-julia-session/54546)

<div class="topic-metadata">

**Author:** [@kevbonham](https://discourse.julialang.org/u/kevbonham)\
**Replies:** 6\
**Last updated:** [February 3, 2021, 8:00pm UTC](https://discourse.julialang.org/t/how-to-debug-killed-julia-session/54546 "2021-02-03T20:00:07Z")

</div>

I have a script that I’m trying to run that keeps getting killed after running for a bit and generating some amount of output. I have a list of identifiers for groups of files, and the program does read list of identif…

---

## [Is there @code\_warntype output documentation anywhere?](https://discourse.julialang.org/t/is-there-code-warntype-output-documentation-anywhere/54506)

<div class="topic-metadata">

**Author:** [@zenkavi](https://discourse.julialang.org/u/zenkavi)\
**Replies:** 3\
**Last updated:** [February 3, 2021, 7:41pm UTC](https://discourse.julialang.org/t/is-there-code-warntype-output-documentation-anywhere/54506 "2021-02-03T19:41:35Z")

</div>

Where can I find more information on understanding the output of @code\_warntype mentioned in Turing Performance Tips? I’m trying to use it to debug some ForwardDiff Dual Type errors mentioned often (e.g. one recent exam…

---

## [GLMakie: recording a movie without displaying intermediate frames?](https://discourse.julialang.org/t/glmakie-recording-a-movie-without-displaying-intermediate-frames/54537)

<div class="topic-metadata">

**Author:** [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)\
**Replies:** 1\
**Last updated:** [February 3, 2021, 7:30pm UTC](https://discourse.julialang.org/t/glmakie-recording-a-movie-without-displaying-intermediate-frames/54537 "2021-02-03T19:30:29Z")

</div>

Hi, I would like to use GLMakie on a remote machine without exporting a display. Note that I was not able to use WGLMakie because of speed issue neither CairoMakie because these are 3D plots. Is it possible to record …

---

## [Issue with MvNormal and Turing](https://discourse.julialang.org/t/issue-with-mvnormal-and-turing/54541)

<div class="topic-metadata">

**Author:** [@Carter](https://discourse.julialang.org/u/Carter)\
**Replies:** 8\
**Last updated:** [February 3, 2021, 7:29pm UTC](https://discourse.julialang.org/t/issue-with-mvnormal-and-turing/54541 "2021-02-03T19:29:07Z")

</div>

I’m trying to recreate the model from chapter 5.1 to estimate correlation from the book Bayesian Cognitive Modeling: A Practical Course using Turing. However, I keep running into an issue with MvNormal where it does not …

---

## [Weird error message with sum(1,2)](https://discourse.julialang.org/t/weird-error-message-with-sum-1-2/54522)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 10\
**Last updated:** [February 3, 2021, 7:22pm UTC](https://discourse.julialang.org/t/weird-error-message-with-sum-1-2/54522 "2021-02-03T19:22:29Z")

</div>

Could this be improved? julia\> sum(1,2) ERROR: MethodError: objects of type Int64 are not callable Note that sum(1,2,3) results in a much better ERROR: MethodError: no method matching sum(::Int64, ::Int64, ::Int64) I …

---

## [File access error on Arch: ERROR: IOError: stat: permission denied (EACCES) for file "/usr/bin/../etc/julia/startup.jl"](https://discourse.julialang.org/t/file-access-error-on-arch-error-ioerror-stat-permission-denied-eacces-for-file-usr-bin-etc-julia-startup-jl/54549)

<div class="topic-metadata">

**Author:** [@r-cheologist](https://discourse.julialang.org/u/r-cheologist)\
**Replies:** 5\
**Last updated:** [February 3, 2021, 6:40pm UTC](https://discourse.julialang.org/t/file-access-error-on-arch-error-ioerror-stat-permission-denied-eacces-for-file-usr-bin-etc-julia-startup-jl/54549 "2021-02-03T18:40:49Z")

</div>

Trying to play around with julia on Archlinux, I installed the julia package and generated a tiny printing script. When run like so: $ julia hello.jl I get this error: ERROR: IOError: stat: permission denied…

---

## [Bukdu, How to use a Timer](https://discourse.julialang.org/t/bukdu-how-to-use-a-timer/54531)

<div class="topic-metadata">

**Author:** [@zhangliye](https://discourse.julialang.org/u/zhangliye)\
**Replies:** 3\
**Last updated:** [February 3, 2021, 6:25pm UTC](https://discourse.julialang.org/t/bukdu-how-to-use-a-timer/54531 "2021-02-03T18:25:28Z")

</div>

When run \>julia server.jl The Timer is not triggered. Is this caused by Bukdu? Thanks! #server.jl using Bukdu using HTTP const g\_temp\_data = Ref{String} function do\_work(t) g\_temp\_data\[\] ="Hello the word" pri…

---

## [Calculating power transfer distribution factor (PTDF) matrix using PowerModels.jl](https://discourse.julialang.org/t/calculating-power-transfer-distribution-factor-ptdf-matrix-using-powermodels-jl/42668)

<div class="topic-metadata">

**Author:** [@gobs](https://discourse.julialang.org/u/gobs)\
**Replies:** 7\
**Last updated:** [February 3, 2021, 5:46pm UTC](https://discourse.julialang.org/t/calculating-power-transfer-distribution-factor-ptdf-matrix-using-powermodels-jl/42668 "2021-02-03T17:46:10Z")

</div>

I want to obtain a PTDF matrix to use in my power system optimisation model using data in PowerModels.jl format (I also raised an issue for this to be integrated into PowerModels.jl itself: https://github.com/lanl-ansi/P…

---

## [Arrow.write on NamedTuple](https://discourse.julialang.org/t/arrow-write-on-namedtuple/54538)

<div class="topic-metadata">

**Author:** [@atteson](https://discourse.julialang.org/u/atteson)\
**Replies:** 2\
**Last updated:** [February 3, 2021, 5:29pm UTC](https://discourse.julialang.org/t/arrow-write-on-namedtuple/54538 "2021-02-03T17:29:33Z")

</div>

The Arrow.jl documentation seems to indicate that I can use Arrow.write on NamedTuple’s of AbstractVector’s. Can anyone help me understand why the following code doesn’t work: using Arrow Arrow.write( "test", (x=collec…

---

## [OrderedCollections: Not binary-compatible with prior version?](https://discourse.julialang.org/t/orderedcollections-not-binary-compatible-with-prior-version/54540)

<div class="topic-metadata">

**Author:** [@PGS62](https://discourse.julialang.org/u/PGS62)\
**Replies:** 2\
**Last updated:** [February 3, 2021, 5:15pm UTC](https://discourse.julialang.org/t/orderedcollections-not-binary-compatible-with-prior-version/54540 "2021-02-03T17:15:51Z")

</div>

I think OrderedCollections breaks “binary-compatibility” between the latest version 1.3.3 and the prior version 1.3.2. Here’s what I mean: I’m using version 1.3.2 and have model where typeof(model) == OrderedCollectio…

---

## [Why don’t different non-optional keyword parameters specify multiple dispatches](https://discourse.julialang.org/t/why-don-t-different-non-optional-keyword-parameters-specify-multiple-dispatches/54500)

<div class="topic-metadata">

**Author:** [@frankwswang](https://discourse.julialang.org/u/frankwswang)\
**Replies:** 4\
**Last updated:** [February 3, 2021, 4:45pm UTC](https://discourse.julialang.org/t/why-don-t-different-non-optional-keyword-parameters-specify-multiple-dispatches/54500 "2021-02-03T16:45:50Z")

</div>

julia\> foo(a; b, d="d", e="e") = (@show a b d e) foo (generic function with 1 method) julia\> foo(a; m, d="d", e="e") = (@show a m d e) foo (generic function with 1 method) julia\> foo(a; b, c, d="d", e="e") = (@show a b…

---

## [Transparency in Plots](https://discourse.julialang.org/t/transparency-in-plots/54409)

<div class="topic-metadata">

**Author:** [@orestis](https://discourse.julialang.org/u/orestis)\
**Replies:** 2\
**Last updated:** [February 3, 2021, 4:41pm UTC](https://discourse.julialang.org/t/transparency-in-plots/54409 "2021-02-03T16:41:58Z")

</div>

Hello, I would like to plot a heatmap on top of a 2d map. Something like: plot(geometry) heatmap!(x, y, values) The heatmap is consisting of a lot of zeros and I would like to be able to have all those zeros mapping t…

---

## [Package for visualizing wireframe cube](https://discourse.julialang.org/t/package-for-visualizing-wireframe-cube/54400)

<div class="topic-metadata">

**Author:** [@EL-Bakkali-Jaafar](https://discourse.julialang.org/u/EL-Bakkali-Jaafar)\
**Replies:** 6\
**Last updated:** [February 3, 2021, 3:41pm UTC](https://discourse.julialang.org/t/package-for-visualizing-wireframe-cube/54400 "2021-02-03T15:41:37Z")

</div>

Hi all, What I am looking for is a package to draw a wireframe cube and to draw segment connecting two 3d points. Thanks.

---

## [PyCall issues: possible to choose conda environment as path?](https://discourse.julialang.org/t/pycall-issues-possible-to-choose-conda-environment-as-path/54481)

<div class="topic-metadata">

**Author:** [@ZettEff](https://discourse.julialang.org/u/ZettEff)\
**Replies:** 8\
**Last updated:** [February 3, 2021, 3:11pm UTC](https://discourse.julialang.org/t/pycall-issues-possible-to-choose-conda-environment-as-path/54481 "2021-02-03T15:11:40Z")

</div>

Hi, i am struggling to get PyCall running properly. My understanding is that PyCall uses its own internal julia conda environment. Using this was working initially. However, when I then tried to set an alternative pyth…

---

## [I have a ThinkPad running Windows 10 that seems stuck on Updating Registry when I](https://discourse.julialang.org/t/i-have-a-thinkpad-running-windows-10-that-seems-stuck-on-updating-registry-when-i/54285)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 1\
**Last updated:** [February 3, 2021, 2:31pm UTC](https://discourse.julialang.org/t/i-have-a-thinkpad-running-windows-10-that-seems-stuck-on-updating-registry-when-i/54285 "2021-02-03T14:31:59Z")

</div>

I have a ThinkPad running Windows 10 that seems stuck on Updating Registry when I tried to add a package. In fact, after half an hour, it was still stuck. What could I do to make it go past updating registry? Note that …

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

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