# Latest

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

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

**Page:** 1431

---

## [Nested Comprehensions with Stateful](https://discourse.julialang.org/t/nested-comprehensions-with-stateful/58888)

<div class="topic-metadata">

**Author:** [@cortner](https://discourse.julialang.org/u/cortner)\
**Replies:** 6\
**Last updated:** [April 10, 2021, 2:05pm UTC](https://discourse.julialang.org/t/nested-comprehensions-with-stateful/58888 "2021-04-10T14:05:37Z")

</div>

A Stateful iterator “empties” itself as one iterates through it. The result is the following fun behaviour (if one thinks about for a minute it becomes obvious why this happens): using Base.Iterators: Stateful x = \[1,2,…

---

## [Similar\_type for Vector](https://discourse.julialang.org/t/similar-type-for-vector/58945)

<div class="topic-metadata">

**Author:** [@circonflexe](https://discourse.julialang.org/u/circonflexe)\
**Replies:** 3\
**Last updated:** [April 10, 2021, 1:57pm UTC](https://discourse.julialang.org/t/similar-type-for-vector/58945 "2021-04-10T13:57:32Z")

</div>

So I have a variable v which may take several types, including (at least) Vector{T}, SVector{N,T}, where N is an integer and T is a real type (including at least Int, Rational{Int} and Float64). I want to compute a type …

---

## [Check if a type is a "concretization" of some UnionAll](https://discourse.julialang.org/t/check-if-a-type-is-a-concretization-of-some-unionall/58974)

<div class="topic-metadata">

**Author:** [@tisztamo](https://discourse.julialang.org/u/tisztamo)\
**Replies:** 2\
**Last updated:** [April 10, 2021, 1:48pm UTC](https://discourse.julialang.org/t/check-if-a-type-is-a-concretization-of-some-unionall/58974 "2021-04-10T13:48:26Z")

</div>

Having a UnionAll and another type I would like to check if the other was constructed by filling the parameters of the UnionAll: struct A{T} end const C1 = A{Int} using Test @test concretizationof(C1, A) == true @test …

---

## [ANN: Mixtape.jl -- a static overlay and optimization tool](https://discourse.julialang.org/t/ann-mixtape-jl-a-static-overlay-and-optimization-tool/58979)

<div class="topic-metadata">

**Author:** [@McCoy](https://discourse.julialang.org/u/McCoy)\
**Replies:** 0\
**Last updated:** [April 10, 2021, 1:39pm UTC](https://discourse.julialang.org/t/ann-mixtape-jl-a-static-overlay-and-optimization-tool/58979 "2021-04-10T13:39:20Z")

</div>

Hi all – I’d like to present a small experimental compiler package I’ve been working on with the help of AbstractInterpreter and GPUCompiler (as well as the sick, twisted minds of @vchuravy and @Roger-luo). If you’d l…

---

## [Broadcasting arrays with different number of dimension](https://discourse.julialang.org/t/broadcasting-arrays-with-different-number-of-dimension/58973)

<div class="topic-metadata">

**Author:** [@Sunny](https://discourse.julialang.org/u/Sunny)\
**Replies:** 7\
**Last updated:** [April 10, 2021, 1:17pm UTC](https://discourse.julialang.org/t/broadcasting-arrays-with-different-number-of-dimension/58973 "2021-04-10T13:17:18Z")

</div>

In PyTorch it’s possible to do the operation: # v.shape = torch.Size(\[1, 2, 1\]) # b = torch.Size(\[2, 8\]) a = v - b # a.shape = torch.Size(\[1, 2, 8\]) However when I try to implement this in Julia I get an error rand(1…

---

## [Stheno with Makie](https://discourse.julialang.org/t/stheno-with-makie/58882)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 4\
**Last updated:** [April 10, 2021, 1:04pm UTC](https://discourse.julialang.org/t/stheno-with-makie/58882 "2021-04-10T13:04:00Z")

</div>

How can I plot Stheno intervals with Makie (instead of Plots.jl)? Docs Stheno.jl knows how to use Plots.jl to plot GPs, so it’s straightforward to look at the posterior: x\_plot = range(-4.0, 4.0; length=1000); plot!…

---

## [JuMP Space Shuttle example failing](https://discourse.julialang.org/t/jump-space-shuttle-example-failing/58971)

<div class="topic-metadata">

**Author:** [@sinom](https://discourse.julialang.org/u/sinom)\
**Replies:** 1\
**Last updated:** [April 10, 2021, 9:51am UTC](https://discourse.julialang.org/t/jump-space-shuttle-example-failing/58971 "2021-04-10T09:51:12Z")

</div>

Hello all, first let me say I’m just starting out with Julia and I’m already super impressed with what can be achieved. It’s really such a well designed language as far as I can tell. I’m still using mostly Python for …

---

## [LinearAlgebra: change in behavior between 1.1 and 1.7](https://discourse.julialang.org/t/linearalgebra-change-in-behavior-between-1-1-and-1-7/58948)

<div class="topic-metadata">

**Author:** [@harven](https://discourse.julialang.org/u/harven)\
**Replies:** 3\
**Last updated:** [April 10, 2021, 7:19am UTC](https://discourse.julialang.org/t/linearalgebra-change-in-behavior-between-1-1-and-1-7/58948 "2021-04-10T07:19:36Z")

</div>

The following code gives different results under 1.1 and 1.7. PP = \[1 0 1 0 1 0 0 1 1 0 1 0 1 0 1 0 0 1 1 0 0 1 0 1 0 1 0 1 1 0 …

---

## [What is a neutral element (for accumulate on gpu)?](https://discourse.julialang.org/t/what-is-a-neutral-element-for-accumulate-on-gpu/58845)

<div class="topic-metadata">

**Author:** [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)\
**Replies:** 8\
**Last updated:** [April 10, 2021, 1:26am UTC](https://discourse.julialang.org/t/what-is-a-neutral-element-for-accumulate-on-gpu/58845 "2021-04-10T01:26:16Z")

</div>

Hello, So I’m trying this simple accumulate function on a CuArray: julia\> using CUDA julia\> d\_d = cu(rand(10,20)); julia\> accumulate((a,d) -\> d + 0.99\*0.95\*a, d\_d, dims = 2, init = 0f0) ERROR: GPUArrays.jl needs to kno…

---

## [LoadError: LoadError: UndefVarError: ASCIIString not defined](https://discourse.julialang.org/t/loaderror-loaderror-undefvarerror-asciistring-not-defined/58885)

<div class="topic-metadata">

**Author:** [@SudhakarKuma](https://discourse.julialang.org/u/SudhakarKuma)\
**Replies:** 1\
**Last updated:** [April 8, 2021, 11:01pm UTC](https://discourse.julialang.org/t/loaderror-loaderror-undefvarerror-asciistring-not-defined/58885 "2021-04-08T23:01:12Z")

</div>

Hello everyone! I have a function (as given below) in Julia that was working for Julia 0.4.5. function pinMode(file\_des::SerialPorts.SerialPort , pin\_no::Int64 , mode::ASCIIString) m = uppercase(mode) …

---

## [Register a new PyCall version?](https://discourse.julialang.org/t/register-a-new-pycall-version/58947)

<div class="topic-metadata">

**Author:** [@sethaxen](https://discourse.julialang.org/u/sethaxen)\
**Replies:** 3\
**Last updated:** [April 9, 2021, 10:45pm UTC](https://discourse.julialang.org/t/register-a-new-pycall-version/58947 "2021-04-09T22:45:34Z")

</div>

A fix for a Python/Julia interop issue was pushed to PyCall.jl 3 months ago. Can someone please register a new version? I have been unable to reach the maintainers through GitHub and Slack.

---

## [Is \`Meta.parse\` safe to use on unsanitized external input?](https://discourse.julialang.org/t/is-meta-parse-safe-to-use-on-unsanitized-external-input/58894)

<div class="topic-metadata">

**Author:** [@Krastanov](https://discourse.julialang.org/u/Krastanov)\
**Replies:** 10\
**Last updated:** [April 9, 2021, 10:09pm UTC](https://discourse.julialang.org/t/is-meta-parse-safe-to-use-on-unsanitized-external-input/58894 "2021-04-09T22:09:07Z")

</div>

The question might be naive, almost disrespectful, but better safe than sorry: Does Meta.parse use any eval-like calls or anything else that would make it dangerous to use on potentially malicious input?

---

## [Julia v1.6.0 has been released](https://discourse.julialang.org/t/julia-v1-6-0-has-been-released/57938)

<div class="topic-metadata">

**Author:** [@ararslan](https://discourse.julialang.org/u/ararslan)\
**Replies:** 56\
**Last updated:** [April 9, 2021, 9:57pm UTC](https://discourse.julialang.org/t/julia-v1-6-0-has-been-released/57938 "2021-04-09T21:57:38Z")

</div>

The Julia developers are pleased to announce the release of Julia v1.6.0, the sixth minor release in the 1.x series. Some folks put together a blog post highlighting some of the most exciting new features in 1.6. Check i…

---

## [Optimal way to flatten array](https://discourse.julialang.org/t/optimal-way-to-flatten-array/58923)

<div class="topic-metadata">

**Author:** [@Sunny](https://discourse.julialang.org/u/Sunny)\
**Replies:** 5\
**Last updated:** [April 9, 2021, 9:39pm UTC](https://discourse.julialang.org/t/optimal-way-to-flatten-array/58923 "2021-04-09T21:39:06Z")

</div>

I have an array of array y = \[ones(Float32, 3) for i=1:3\] sum(abs2, y) which I can’t apply abs2 to. I need it to compute my loss function Now I use custom function function flat\_this(x) arr = ones(0) for i=1…

---

## [Optimizing Linear Algebra Code?](https://discourse.julialang.org/t/optimizing-linear-algebra-code/58797)

<div class="topic-metadata">

**Author:** [@loki](https://discourse.julialang.org/u/loki)\
**Replies:** 12\
**Last updated:** [April 9, 2021, 9:16pm UTC](https://discourse.julialang.org/t/optimizing-linear-algebra-code/58797 "2021-04-09T21:16:34Z")

</div>

Hello everyone! I’ve been trying to convert some simple functions that were originally implemented in Matlab into Julia. They revolve around vector/matrix and matrix/matrix multiplication. My question stems from trying …

---

## [LoadError; InitError when building project](https://discourse.julialang.org/t/loaderror-initerror-when-building-project/58944)

<div class="topic-metadata">

**Author:** [@meck](https://discourse.julialang.org/u/meck)\
**Replies:** 0\
**Last updated:** [April 9, 2021, 8:30pm UTC](https://discourse.julialang.org/t/loaderror-initerror-when-building-project/58944 "2021-04-09T20:30:47Z")

</div>

Shortly after installing Julia 1.6 I am getting that error and am not any longer able to use that package. Though I don\`t know if the new version has anything to do with that since I am not seeing similar issues from oth…

---

## [Upsampling or downsampling sample data of two sensors to match](https://discourse.julialang.org/t/upsampling-or-downsampling-sample-data-of-two-sensors-to-match/58937)

<div class="topic-metadata">

**Author:** [@Eggy](https://discourse.julialang.org/u/Eggy)\
**Replies:** 2\
**Last updated:** [April 9, 2021, 7:43pm UTC](https://discourse.julialang.org/t/upsampling-or-downsampling-sample-data-of-two-sensors-to-match/58937 "2021-04-09T19:43:18Z")

</div>

I used two accelerometers to collect data, but forgot to check and put them at the same sample rate; they went back to their defaults. One was sampling at 256 Hz and the other was sampling at 100 Hz. I am looking for fre…

---

## [How do you find Unicode Characters in VSCode?](https://discourse.julialang.org/t/how-do-you-find-unicode-characters-in-vscode/58938)

<div class="topic-metadata">

**Author:** [@gleyland](https://discourse.julialang.org/u/gleyland)\
**Replies:** 0\
**Last updated:** [April 9, 2021, 6:50pm UTC](https://discourse.julialang.org/t/how-do-you-find-unicode-characters-in-vscode/58938 "2021-04-09T18:50:03Z")

</div>

The LaTeX autocompletion in the Julia VSCode extension is lovely (I only recently learned that it was from the Julia extension, not a VSCode thing), but I can’t seem to find a way to enter unicode characters in the find …

---

## [How to use interior point algorithm in GLPK](https://discourse.julialang.org/t/how-to-use-interior-point-algorithm-in-glpk/58904)

<div class="topic-metadata">

**Author:** [@manoj.centura](https://discourse.julialang.org/u/manoj.centura)\
**Replies:** 5\
**Last updated:** [April 9, 2021, 5:32pm UTC](https://discourse.julialang.org/t/how-to-use-interior-point-algorithm-in-glpk/58904 "2021-04-09T17:32:14Z")

</div>

What param and value to use to set GLPK to use interior point. via set\_optimizer\_attribute Thanks Manoj

---

## [JuliaDB groupby many columns](https://discourse.julialang.org/t/juliadb-groupby-many-columns/58935)

<div class="topic-metadata">

**Author:** [@Fabien1](https://discourse.julialang.org/u/Fabien1)\
**Replies:** 0\
**Last updated:** [April 9, 2021, 5:10pm UTC](https://discourse.julialang.org/t/juliadb-groupby-many-columns/58935 "2021-04-09T17:10:20Z")

</div>

Hi guys , I’m trying to groupby using JuliaDB , everything works well except when i want to apply a function that takes two columns in one time. JuliaDB.groupby( ( TOTAL\_PAID = :PRICE =\> sum, FREQ…

---

## [Flux gradients intepretation](https://discourse.julialang.org/t/flux-gradients-intepretation/58925)

<div class="topic-metadata">

**Author:** [@Sunny](https://discourse.julialang.org/u/Sunny)\
**Replies:** 1\
**Last updated:** [April 9, 2021, 4:20pm UTC](https://discourse.julialang.org/t/flux-gradients-intepretation/58925 "2021-04-09T16:20:25Z")

</div>

There is a code for simple RNN network using Flux rnn = Flux.RNN(2, 3) seq = \[rand(Float32,2) for i = 1:3\] y = \[ones(Float32, 3) for i=1:3\] function loss(x, y) a = flat\_this((rnn.(x) .- y)) \_loss = sum(abs2, a)…

---

## [Binary classification with Flux](https://discourse.julialang.org/t/binary-classification-with-flux/54636)

<div class="topic-metadata">

**Author:** [@Tord](https://discourse.julialang.org/u/Tord)\
**Replies:** 8\
**Last updated:** [April 9, 2021, 4:15pm UTC](https://discourse.julialang.org/t/binary-classification-with-flux/54636 "2021-04-09T16:15:14Z")

</div>

I originally asked this question on the Julia slack, but it occurred to me that this could be a better place to ask: I’ve used Flux successfully for regression and multi-label classification in the past, but today I got…

---

## [How remove missing value from vector](https://discourse.julialang.org/t/how-remove-missing-value-from-vector/58916)

<div class="topic-metadata">

**Author:** [@Rafael\_Brus](https://discourse.julialang.org/u/Rafael_Brus)\
**Replies:** 5\
**Last updated:** [April 9, 2021, 2:24pm UTC](https://discourse.julialang.org/t/how-remove-missing-value-from-vector/58916 "2021-04-09T14:24:04Z")

</div>

How do I remove these missing values: a = \["NY", "NY", "NY", missing, missing\]

---

## [Plots.GRBackend Error](https://discourse.julialang.org/t/plots-grbackend-error/58758)

<div class="topic-metadata">

**Author:** [@MA22](https://discourse.julialang.org/u/MA22)\
**Replies:** 6\
**Last updated:** [April 9, 2021, 2:19pm UTC](https://discourse.julialang.org/t/plots-grbackend-error/58758 "2021-04-09T14:19:20Z")

</div>

Hey everyone, I’m working on this CFD code with its author: https://github.com/weymouth/WaterLily.jl When running an example like “TwoD\_Circle.jl”, I get the following error: LoadError: MethodError: no method matchin…

---

## [Initialization of vector of matrix decompositions](https://discourse.julialang.org/t/initialization-of-vector-of-matrix-decompositions/58909)

<div class="topic-metadata">

**Author:** [@BambOoxX](https://discourse.julialang.org/u/BambOoxX)\
**Replies:** 4\
**Last updated:** [April 9, 2021, 2:08pm UTC](https://discourse.julialang.org/t/initialization-of-vector-of-matrix-decompositions/58909 "2021-04-09T14:08:19Z")

</div>

For one of my projects, I need to perform multiple QR (up to multiple hundreds) decompositions of dense tall complex matrices. These decompositions are later used in some linear algebra operations, where the operations a…

---

## [Nesting subtype in parameter of a subtype](https://discourse.julialang.org/t/nesting-subtype-in-parameter-of-a-subtype/58842)

<div class="topic-metadata">

**Author:** [@cadojo](https://discourse.julialang.org/u/cadojo)\
**Replies:** 1\
**Last updated:** [April 9, 2021, 1:35pm UTC](https://discourse.julialang.org/t/nesting-subtype-in-parameter-of-a-subtype/58842 "2021-04-09T13:35:52Z")

</div>

I’m struggling to create the following structure. Say I have… abstract type AbstractType{A,B,C} end and… abstract type AbstractSubType{A,B,C} \<: AbstractType{A,B,C} end I’d like to make… struct ConcreteType{D, E\<:Ab…

---

## [Make a secret or black box function?](https://discourse.julialang.org/t/make-a-secret-or-black-box-function/58017)

<div class="topic-metadata">

**Author:** [@Gus\_Hart](https://discourse.julialang.org/u/Gus_Hart)\
**Replies:** 28\
**Last updated:** [April 9, 2021, 1:17pm UTC](https://discourse.julialang.org/t/make-a-secret-or-black-box-function/58017 "2021-04-09T13:17:58Z")

</div>

I’d like to give students in my research group a function to optimize…but I’d like to keep the functional form secret, for pedagogical purposes. Is there some way to “compile” a function or obfuscate it somehow so that a…

---

## [Making a more type-stable arraydist for Turing?](https://discourse.julialang.org/t/making-a-more-type-stable-arraydist-for-turing/58871)

<div class="topic-metadata">

**Author:** [@opera\_malenky](https://discourse.julialang.org/u/opera_malenky)\
**Replies:** 3\
**Last updated:** [April 9, 2021, 1:00pm UTC](https://discourse.julialang.org/t/making-a-more-type-stable-arraydist-for-turing/58871 "2021-04-09T13:00:00Z")

</div>

I recently noticed that making an arraydist prior composed of different types of distributions leads to type instability (which seems a bit obvious, in hindsight). Playing around, I thought making a union of the componen…

---

## [Type Stability with Named Constraints in JuMP](https://discourse.julialang.org/t/type-stability-with-named-constraints-in-jump/58878)

<div class="topic-metadata">

**Author:** [@Ian\_Slagle](https://discourse.julialang.org/u/Ian_Slagle)\
**Replies:** 2\
**Last updated:** [April 9, 2021, 12:55pm UTC](https://discourse.julialang.org/t/type-stability-with-named-constraints-in-jump/58878 "2021-04-09T12:55:27Z")

</div>

I’ve got a Nash equilibrium calculation running through JuMP that names a constraint on the row player so that the column player can be extracted (see Efficient Nash Equilibria using JuMP - #6 by Ian\_Slagle) . function …

---

## [How namespace of Base.Iterators works](https://discourse.julialang.org/t/how-namespace-of-base-iterators-works/58854)

<div class="topic-metadata">

**Author:** [@Tbl](https://discourse.julialang.org/u/Tbl)\
**Replies:** 6\
**Last updated:** [April 9, 2021, 12:44pm UTC](https://discourse.julialang.org/t/how-namespace-of-base-iterators-works/58854 "2021-04-09T12:44:49Z")

</div>

I like to code using more functional-like style working with iterators, so Base.Iterators comes in handy, but I have problem understanding how its namespace is structured. It is part of the Base, yet it is not by defau…

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

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