# Latest

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

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

**Page:** 1348

---

## [Weights update in Flux](https://discourse.julialang.org/t/weights-update-in-flux/63657)

<div class="topic-metadata">

**Author:** [@Mariana](https://discourse.julialang.org/u/Mariana)\
**Replies:** 2\
**Last updated:** [June 28, 2021, 9:24am UTC](https://discourse.julialang.org/t/weights-update-in-flux/63657 "2021-06-28T09:24:16Z")

</div>

Hello! I am trying to use Flux to train a neural network but, in this case I don’t have the target values for the output. I will try to formulate a simpler version of my problem. Suppose I have an input input = \[0.8 0…

---

## [Get a legend with twinx()](https://discourse.julialang.org/t/get-a-legend-with-twinx/63672)

<div class="topic-metadata">

**Author:** [@Paolo\_Jara](https://discourse.julialang.org/u/Paolo_Jara)\
**Replies:** 1\
**Last updated:** [June 28, 2021, 8:39am UTC](https://discourse.julialang.org/t/get-a-legend-with-twinx/63672 "2021-06-28T08:39:50Z")

</div>

Hi, I’m using the twinx () command, is there a way to have both labels in the same legend? using Plots x12=randn(10) y12=1000\*randn(10) plot(x12, label="x12") plot!(twinx(), y12, c=:red, legend=:bottomleft, label="y12")…

---

## [Confusion about matrix multiplication order (\>2 matrices)](https://discourse.julialang.org/t/confusion-about-matrix-multiplication-order-2-matrices/63681)

<div class="topic-metadata">

**Author:** [@MartaVanin](https://discourse.julialang.org/u/MartaVanin)\
**Replies:** 1\
**Last updated:** [June 28, 2021, 8:33am UTC](https://discourse.julialang.org/t/confusion-about-matrix-multiplication-order-2-matrices/63681 "2021-06-28T08:33:07Z")

</div>

Hello, I am performing some matrix multiplication and I am a bit confused about the results. Specifically, I have a sparse matrix H 390x331 and a diagonal matrix R 390x390. I want to calculate G = transpose(H)\*inv(R)\*…

---

## [Difficulties with unicode arrows in function names](https://discourse.julialang.org/t/difficulties-with-unicode-arrows-in-function-names/57736)

<div class="topic-metadata">

**Author:** [@markmbaum](https://discourse.julialang.org/u/markmbaum)\
**Replies:** 14\
**Last updated:** [June 28, 2021, 8:27am UTC](https://discourse.julialang.org/t/difficulties-with-unicode-arrows-in-function-names/57736 "2021-06-28T08:27:42Z")

</div>

I think it would look nice to have up and down arrows in some function names that compute upward and downward propagating properties, but I’m getting errors when I try to use them. In my REPL, when I try test↑(x, y) = x…

---

## [Basic stochastic model](https://discourse.julialang.org/t/basic-stochastic-model/63680)

<div class="topic-metadata">

**Author:** [@Cyber](https://discourse.julialang.org/u/Cyber)\
**Replies:** 0\
**Last updated:** [June 28, 2021, 8:19am UTC](https://discourse.julialang.org/t/basic-stochastic-model/63680 "2021-06-28T08:19:26Z")

</div>

Hello all. I am trying to simulate stochasitc motions for some particles in a specific domain. It is fine for just 2 particles. But if I would like to simulate more than 2 particles, my code becomes too slow.(I only know…

---

## [Round CategoricalArrays.cut labels](https://discourse.julialang.org/t/round-categoricalarrays-cut-labels/63674)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 1\
**Last updated:** [June 28, 2021, 7:09am UTC](https://discourse.julialang.org/t/round-categoricalarrays-cut-labels/63674 "2021-06-28T07:09:47Z")

</div>

How can I round the labels to two digits without changing anything else? using CategoricalArrays cut(rand(5), 2, labels=((from, to, i;kw...)-\>"$(round(from, digits=2))-$(round(to, digits=2))")) ERROR: MethodError: no m…

---

## [First CUDA Program- Addressing Scalar Indexing](https://discourse.julialang.org/t/first-cuda-program-addressing-scalar-indexing/63396)

<div class="topic-metadata">

**Author:** [@loki](https://discourse.julialang.org/u/loki)\
**Replies:** 5\
**Last updated:** [June 28, 2021, 5:50am UTC](https://discourse.julialang.org/t/first-cuda-program-addressing-scalar-indexing/63396 "2021-06-28T05:50:41Z")

</div>

Hello, I am trying to get my feet wet in the world of CUDA programming. I started with some CPU code that I previously written but have been having some trouble with Scalar Indexing slowing down the computation. The prob…

---

## [MLJ TunedModel with imbalanced classes](https://discourse.julialang.org/t/mlj-tunedmodel-with-imbalanced-classes/63667)

<div class="topic-metadata">

**Author:** [@Vishal\_Sharma1](https://discourse.julialang.org/u/Vishal_Sharma1)\
**Replies:** 1\
**Last updated:** [June 28, 2021, 3:51am UTC](https://discourse.julialang.org/t/mlj-tunedmodel-with-imbalanced-classes/63667 "2021-06-28T03:51:26Z")

</div>

The TunedModel interface supports parameter - weights but not class\_weights. For classification problems with highly imbalanced classes, we need tuned model measures working with class weights. Is it currently possible…

---

## [Is it possible to use SIMD in multithreading?](https://discourse.julialang.org/t/is-it-possible-to-use-simd-in-multithreading/63662)

<div class="topic-metadata">

**Author:** [@ignis](https://discourse.julialang.org/u/ignis)\
**Replies:** 5\
**Last updated:** [June 28, 2021, 2:30am UTC](https://discourse.julialang.org/t/is-it-possible-to-use-simd-in-multithreading/63662 "2021-06-28T02:30:15Z")

</div>

I was wondering how I could combine multithreading with SIMD operations and I’m not sure if it is even possible. I’m writing a few toy codes just to check that the code is actually being vectorized but as I don’t have mu…

---

## [Vscode tab completion suddenly broken](https://discourse.julialang.org/t/vscode-tab-completion-suddenly-broken/63646)

<div class="topic-metadata">

**Author:** [@Joris\_Pinkse](https://discourse.julialang.org/u/Joris_Pinkse)\
**Replies:** 3\
**Last updated:** [June 28, 2021, 1:48am UTC](https://discourse.julialang.org/t/vscode-tab-completion-suddenly-broken/63646 "2021-06-28T01:48:07Z")

</div>

I’ve been using vscode with Julia for a while now. All of a sudden, tab completion for symbols like \\approx stopped working, but it still works for function names and such. Similar posts on this forum have not solved t…

---

## [JuMP optimization with vector input and analytical gradient](https://discourse.julialang.org/t/jump-optimization-with-vector-input-and-analytical-gradient/63664)

<div class="topic-metadata">

**Author:** [@nicolas](https://discourse.julialang.org/u/nicolas)\
**Replies:** 5\
**Last updated:** [June 27, 2021, 10:58pm UTC](https://discourse.julialang.org/t/jump-optimization-with-vector-input-and-analytical-gradient/63664 "2021-06-27T22:58:11Z")

</div>

In JuMP’s manual, there are simple instructions to either optimize by providing an analytical gradient function or by providing a vector input with splatting: Nonlinear Modeling · JuMP. I have been trying to combine the …

---

## [Google Sheets](https://discourse.julialang.org/t/google-sheets/3602)

<div class="topic-metadata">

**Author:** [@dmbates](https://discourse.julialang.org/u/dmbates)\
**Replies:** 6\
**Last updated:** [June 27, 2021, 9:10pm UTC](https://discourse.julialang.org/t/google-sheets/3602 "2021-06-27T21:10:11Z")

</div>

I would like to modify Google spreadsheets using Julia. The API is well documented but, sadly, without examples using Julia. I don’t have much experience with web-based API’s and would appreciate pointers on where to s…

---

## [Why matrix multiplication is much slower than PyTorch](https://discourse.julialang.org/t/why-matrix-multiplication-is-much-slower-than-pytorch/63661)

<div class="topic-metadata">

**Author:** [@yingqiuz](https://discourse.julialang.org/u/yingqiuz)\
**Replies:** 4\
**Last updated:** [June 27, 2021, 8:49pm UTC](https://discourse.julialang.org/t/why-matrix-multiplication-is-much-slower-than-pytorch/63661 "2021-06-27T20:49:27Z")

</div>

For example, matrix multiplication of 10,000 x 10,100 matrices, single threaded In julia: BLAS.set\_num\_threads(1) A = randn(10000, 10000) B = randn(10000, 10000) C = Matrix{Float64}(undef, 10000, 10000) @benchmark mul…

---

## [Converting an hexadecimal number returned by a C function to a plain integer in Julia](https://discourse.julialang.org/t/converting-an-hexadecimal-number-returned-by-a-c-function-to-a-plain-integer-in-julia/63659)

<div class="topic-metadata">

**Author:** [@mmv](https://discourse.julialang.org/u/mmv)\
**Replies:** 6\
**Last updated:** [June 27, 2021, 8:48pm UTC](https://discourse.julialang.org/t/converting-an-hexadecimal-number-returned-by-a-c-function-to-a-plain-integer-in-julia/63659 "2021-06-27T20:48:44Z")

</div>

Hi! I’m calling a C function from Julia. That function works fine: it returns a status of 0 as expected, and the output parameters are numerically correct, though they are expressed in a hexadecimal format for some reaso…

---

## [Modifying view index results in silent out-of-bound access](https://discourse.julialang.org/t/modifying-view-index-results-in-silent-out-of-bound-access/63663)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 1\
**Last updated:** [June 27, 2021, 8:27pm UTC](https://discourse.julialang.org/t/modifying-view-index-results-in-silent-out-of-bound-access/63663 "2021-06-27T20:27:25Z")

</div>

The view doc says The behavior is undefined if the shape of the parent array is changed after view is called because there is no bound check for the parent array; e.g., it may cause a segmentation fault. but it do…

---

## [A simple SIMD.jl loop that is slower than a vanilla \`@inbounds @simd\`](https://discourse.julialang.org/t/a-simple-simd-jl-loop-that-is-slower-than-a-vanilla-inbounds-simd/63655)

<div class="topic-metadata">

**Author:** [@Krastanov](https://discourse.julialang.org/u/Krastanov)\
**Replies:** 8\
**Last updated:** [June 27, 2021, 8:21pm UTC](https://discourse.julialang.org/t/a-simple-simd-jl-loop-that-is-slower-than-a-vanilla-inbounds-simd/63655 "2021-06-27T20:21:43Z")

</div>

I have a loop that performs some bit-fiddling operations. Because of the way some out-of-loop constants are used, @simd (and occasionally even LoopVectorization.jl) does not always give the fastest possible machine code.…

---

## [Immutable reference](https://discourse.julialang.org/t/immutable-reference/63405)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 4\
**Last updated:** [June 27, 2021, 8:56am UTC](https://discourse.julialang.org/t/immutable-reference/63405 "2021-06-27T08:56:23Z")

</div>

I want to pass a mutable object or array into a function and be sure that the object won’t be changed by that function. Is there an immutable wrapper I can use like f(immutableview(x))? I know there are conventions like…

---

## [Errors in packages with julia v1.7-beta2: problem with package or julia?](https://discourse.julialang.org/t/errors-in-packages-with-julia-v1-7-beta2-problem-with-package-or-julia/63642)

<div class="topic-metadata">

**Author:** [@mcreel](https://discourse.julialang.org/u/mcreel)\
**Replies:** 2\
**Last updated:** [June 27, 2021, 5:28pm UTC](https://discourse.julialang.org/t/errors-in-packages-with-julia-v1-7-beta2-problem-with-package-or-julia/63642 "2021-06-27T17:28:21Z")

</div>

I have seen a couple of places where code runs with julia 1.6, but not 1.7-beta2. In particular: MCMCChains.jl, the Chains function. chn=Chains(rand(10,2), \["a", "b"\]) works fine on 1.6, errors on 1.7 BSON.jl: load…

---

## [Overloading ()](https://discourse.julialang.org/t/overloading/63649)

<div class="topic-metadata">

**Author:** [@ess3sq](https://discourse.julialang.org/u/ess3sq)\
**Replies:** 11\
**Last updated:** [June 27, 2021, 4:18pm UTC](https://discourse.julialang.org/t/overloading/63649 "2021-06-27T16:18:41Z")

</div>

Dear all, I am trying to overload the () operator in order to simulate executability of an object type. Basically, this is what I got: import Base: () Base.:()(L::Lagrangian{F}, q::Vector{G}, v::Vector{G}) where {F\<:…

---

## [Package version conflict troubleshooting](https://discourse.julialang.org/t/package-version-conflict-troubleshooting/63647)

<div class="topic-metadata">

**Author:** [@Libbum](https://discourse.julialang.org/u/Libbum)\
**Replies:** 2\
**Last updated:** [June 27, 2021, 3:29pm UTC](https://discourse.julialang.org/t/package-version-conflict-troubleshooting/63647 "2021-06-27T15:29:53Z")

</div>

Hi all, Not sure if this is a local issue on my machine or something to do with how we’ve put together our \[compat\] section. Here’s a MWE Project.toml of my problem: name = "makie\_compat" uuid = "bacbe515-7035-49b6-9f…

---

## [Is possible possible to define a type signature such that \`T\` is a subtype of \`S\` except type \`W\` like \`where {Union{} != T \<: InlineString}\`](https://discourse.julialang.org/t/is-possible-possible-to-define-a-type-signature-such-that-t-is-a-subtype-of-s-except-type-w-like-where-union-t-inlinestring/63626)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 8\
**Last updated:** [June 27, 2021, 2:14pm UTC](https://discourse.julialang.org/t/is-possible-possible-to-define-a-type-signature-such-that-t-is-a-subtype-of-s-except-type-w-like-where-union-t-inlinestring/63626 "2021-06-27T14:14:01Z")

</div>

This where definition doesn’t work. function meh(::Type{T}) where {Union{} != T \<: InlineString} print("done") end Is it possible to specify the type T such that it cannot be Union{}? This is related to

---

## [Problem about parameter in NearestNeighbors.jl](https://discourse.julialang.org/t/problem-about-parameter-in-nearestneighbors-jl/63533)

<div class="topic-metadata">

**Author:** [@zlq178](https://discourse.julialang.org/u/zlq178)\
**Replies:** 2\
**Last updated:** [June 27, 2021, 11:56am UTC](https://discourse.julialang.org/t/problem-about-parameter-in-nearestneighbors-jl/63533 "2021-06-27T11:56:02Z")

</div>

I find an example from NearestNeighbors.jl package, But I can’t find the explaination to “idxs”. What does it mean? What’s more, how to get nearest neighbors and get the predicted value? The example is as follow: using …

---

## [Having trouble implementating a Tables.jl row-table; when using BadukGoWeiqiTools, DataFrame(tbl) no longer works!](https://discourse.julialang.org/t/having-trouble-implementating-a-tables-jl-row-table-when-using-badukgoweiqitools-dataframe-tbl-no-longer-works/63622)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 3\
**Last updated:** [June 27, 2021, 12:27pm UTC](https://discourse.julialang.org/t/having-trouble-implementating-a-tables-jl-row-table-when-using-badukgoweiqitools-dataframe-tbl-no-longer-works/63622 "2021-06-27T12:27:38Z")

</div>

I have checked through the other posts on implementing the Tables.jl row interface and I think I’ve implemented everything in the Tables.jl row-table interface Here’s a MWE using TableScraper, DataFrames tbl = TableScr…

---

## [Forbidding feature branches on JuliaLang/julia repo](https://discourse.julialang.org/t/forbidding-feature-branches-on-julialang-julia-repo/53154)

<div class="topic-metadata">

**Author:** [@oxinabox](https://discourse.julialang.org/u/oxinabox)\
**Replies:** 10\
**Last updated:** [June 27, 2021, 12:03pm UTC](https://discourse.julialang.org/t/forbidding-feature-branches-on-julialang-julia-repo/53154 "2021-06-27T12:03:20Z")

</div>

Right now the JuliaLang/julia has 914 branches. I am pretty suire the majority of which are stale feature branches, where someone started to implement a feature and then for some reason stopped. Taking a look, in many…

---

## [\[ANN\] IRViewer.jl: A small package for visualization of Julia's LLVM IR](https://discourse.julialang.org/t/ann-irviewer-jl-a-small-package-for-visualization-of-julias-llvm-ir/63633)

<div class="topic-metadata">

**Author:** [@anon56330260](https://discourse.julialang.org/u/anon56330260)\
**Replies:** 1\
**Last updated:** [June 27, 2021, 8:08am UTC](https://discourse.julialang.org/t/ann-irviewer-jl-a-small-package-for-visualization-of-julias-llvm-ir/63633 "2021-06-27T08:08:54Z")

</div>

Recently when I try to optimize some Julia codes, I find that Julia’s LLVM IR output is rather long and hard to read in terminal. So I make this small package IRViewer to visualize LLVM IR by graphviz. You can install it…

---

## [Can't get a user defined function to work in my Turing Model specification](https://discourse.julialang.org/t/cant-get-a-user-defined-function-to-work-in-my-turing-model-specification/63487)

<div class="topic-metadata">

**Author:** [@DoktorMike](https://discourse.julialang.org/u/DoktorMike)\
**Replies:** 6\
**Last updated:** [June 27, 2021, 8:02am UTC](https://discourse.julialang.org/t/cant-get-a-user-defined-function-to-work-in-my-turing-model-specification/63487 "2021-06-27T08:02:56Z")

</div>

I have this simple Turing model which I cannot get to work. The full MWE is given below. using Turing, Distributions function myfilter(x::AbstractVector, λ) xnew = x xnew\[1\] = x\[1\] for i in 2:length(x) …

---

## [Tilted slider](https://discourse.julialang.org/t/tilted-slider/63600)

<div class="topic-metadata">

**Author:** [@heliosdrm](https://discourse.julialang.org/u/heliosdrm)\
**Replies:** 2\
**Last updated:** [June 27, 2021, 6:48am UTC](https://discourse.julialang.org/t/tilted-slider/63600 "2021-06-27T06:48:31Z")

</div>

I have seen funny layouts in Pluto, with tilted scroll bars etc. So I wonder if it would be possible to make a Pluto notebook with a range slider that is not vertical or horizontal, but tilted 45 degrees next to a plot. …

---

## [Export just the plotting area with Makie](https://discourse.julialang.org/t/export-just-the-plotting-area-with-makie/63629)

<div class="topic-metadata">

**Author:** [@EvoArt](https://discourse.julialang.org/u/EvoArt)\
**Replies:** 2\
**Last updated:** [June 27, 2021, 6:37am UTC](https://discourse.julialang.org/t/export-just-the-plotting-area-with-makie/63629 "2021-06-27T06:37:30Z")

</div>

Is it possible to save just the plotting area as a PDF from Cairo Makie? Hiding decorations and spines gets close. But there is still a small border around the output.

---

## [New abstract supertype of existing type](https://discourse.julialang.org/t/new-abstract-supertype-of-existing-type/63624)

<div class="topic-metadata">

**Author:** [@Joris\_Pinkse](https://discourse.julialang.org/u/Joris_Pinkse)\
**Replies:** 1\
**Last updated:** [June 27, 2021, 2:22am UTC](https://discourse.julialang.org/t/new-abstract-supertype-of-existing-type/63624 "2021-06-27T02:22:39Z")

</div>

Can a type have more than one immediate supertype? If not, why not? If it can, then can one define an abstract supertype of e.g. Float64? \[ I sense from Make an existing type a child of an abstract type - #2 by Ra…

---

## [Julia vs Rust ML which is the best path?](https://discourse.julialang.org/t/julia-vs-rust-ml-which-is-the-best-path/63610)

<div class="topic-metadata">

**Author:** [@manojsnair](https://discourse.julialang.org/u/manojsnair)\
**Replies:** 9\
**Last updated:** [June 27, 2021, 1:18am UTC](https://discourse.julialang.org/t/julia-vs-rust-ml-which-is-the-best-path/63610 "2021-06-27T01:18:20Z")

</div>

Which is the best path, comparing Julia and Rust based ML for learning as well as for writing production level projects. Given the adoption of Rust in AOSP, Firefox and Brave do you think Rust-ML can compete with Julia? …

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

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