# Latest

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

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

**Page:** 1439

---

## [Threads.@threads with ONE thread: how to remove the overhead?](https://discourse.julialang.org/t/threads-threads-with-one-thread-how-to-remove-the-overhead/58435)

<div class="topic-metadata">

**Author:** [@Shuhua](https://discourse.julialang.org/u/Shuhua)\
**Replies:** 10\
**Last updated:** [April 2, 2021, 7:00pm UTC](https://discourse.julialang.org/t/threads-threads-with-one-thread-how-to-remove-the-overhead/58435 "2021-04-02T19:00:17Z")

</div>

If there is only one thread set, the overhead of Threads.@threads is significant. julia\> Threads.nthreads() 1 julia\> function single\_thread(v) s = 0.0 @inbounds for i = 1:length(v) …

---

## [\[ANN\] IndexFunArrays.jl - Fun with indices (and functions on them)](https://discourse.julialang.org/t/ann-indexfunarrays-jl-fun-with-indices-and-functions-on-them/57862)

<div class="topic-metadata">

**Author:** [@roflmaostc](https://discourse.julialang.org/u/roflmaostc)\
**Replies:** 20\
**Last updated:** [April 2, 2021, 5:44pm UTC](https://discourse.julialang.org/t/ann-indexfunarrays-jl-fun-with-indices-and-functions-on-them/57862 "2021-04-02T17:44:13Z")

</div>

Hey, we recently created IndexFunArrays.jl. You can try it with: julia\> \] add IndexFunArrays Initially we wanted a tool calculating output arrays using the index position. For that purpose we created a IndexFunArray …

---

## [Restructuring Performant Code (C, Pascal) with Type Unions and Pointers](https://discourse.julialang.org/t/restructuring-performant-code-c-pascal-with-type-unions-and-pointers/58374)

<div class="topic-metadata">

**Author:** [@tawheeler](https://discourse.julialang.org/u/tawheeler)\
**Replies:** 11\
**Last updated:** [April 2, 2021, 5:39pm UTC](https://discourse.julialang.org/t/restructuring-performant-code-c-pascal-with-type-unions-and-pointers/58374 "2021-04-02T17:39:13Z")

</div>

Hello! I’ve been taking a stab at porting the YASS sokoban solver into Julia as a programming exercise. It is a 20k line Pascal program that can solve some pretty hard sokoban problems (block pushing) in under a second. …

---

## [Are PkgEval badges from JuliaHub and NanosolderReports based on the same results?](https://discourse.julialang.org/t/are-pkgeval-badges-from-juliahub-and-nanosolderreports-based-on-the-same-results/58455)

<div class="topic-metadata">

**Author:** [@Norman](https://discourse.julialang.org/u/Norman)\
**Replies:** 0\
**Last updated:** [April 2, 2021, 4:55pm UTC](https://discourse.julialang.org/t/are-pkgeval-badges-from-juliahub-and-nanosolderreports-based-on-the-same-results/58455 "2021-04-02T16:55:37Z")

</div>

It seems that the PkgEval badges from NanosolderReports are based on the daily run on nightly build of Julia. What about those badges from JuliaHub? Are they generated from the same data used for NanosolderReports? Most…

---

## [How are called "transversal" layers in NN?](https://discourse.julialang.org/t/how-are-called-transversal-layers-in-nn/58305)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 5\
**Last updated:** [April 2, 2021, 4:53pm UTC](https://discourse.julialang.org/t/how-are-called-transversal-layers-in-nn/58305 "2021-04-02T16:53:29Z")

</div>

Hello, how is it known the concept in a neural network of a “transversal” or “cross section” layer ? I can’t find anything relevant with these two words… Its characteristic is that its activation function takes as input…

---

## [LoopVectorization.jl's @avx does not store results](https://discourse.julialang.org/t/loopvectorization-jls-avx-does-not-store-results/58373)

<div class="topic-metadata">

**Author:** [@ambiso](https://discourse.julialang.org/u/ambiso)\
**Replies:** 9\
**Last updated:** [April 2, 2021, 4:14pm UTC](https://discourse.julialang.org/t/loopvectorization-jls-avx-does-not-store-results/58373 "2021-04-02T16:14:02Z")

</div>

Hi, I was trying to write a SIMD version of a to\_upper function using LoopVectorization.jl package. Here’s the branchless version: function to\_upper\_branchless(s) b = Vector{UInt8}(s) for i ∈ eachindex(b) …

---

## [ERROR: LoadError: ArgumentError: invalid index: :Position of type Symbol](https://discourse.julialang.org/t/error-loaderror-argumenterror-invalid-index-position-of-type-symbol/58453)

<div class="topic-metadata">

**Author:** [@asu10](https://discourse.julialang.org/u/asu10)\
**Replies:** 0\
**Last updated:** [April 2, 2021, 4:16pm UTC](https://discourse.julialang.org/t/error-loaderror-argumenterror-invalid-index-position-of-type-symbol/58453 "2021-04-02T16:16:12Z")

</div>

I’m trying to import a csv file using CSV.File, but I keep getting this error here are my paths # path\_skaters is a string that gives the path to the csv file with the skaters information (see example file for sugge…

---

## [How to make the legend fontsize larger in Makie.jl?](https://discourse.julialang.org/t/how-to-make-the-legend-fontsize-larger-in-makie-jl/58451)

<div class="topic-metadata">

**Author:** [@ericphanson](https://discourse.julialang.org/u/ericphanson)\
**Replies:** 1\
**Last updated:** [April 2, 2021, 3:51pm UTC](https://discourse.julialang.org/t/how-to-make-the-legend-fontsize-larger-in-makie-jl/58451 "2021-04-02T15:51:25Z")

</div>

Example: julia\> fig = Figure() Scene (512px, 320px): 0 Plots 0 Child Scenes julia\> ax = Axis(fig\[1,1\]) Axis with 0 plots: julia\> lines!(ax, sort(rand(10)), rand(10), label="Plot") Lines{Tuple{Vector{Point{2, Floa…

---

## [Using CartesianIndices with view()](https://discourse.julialang.org/t/using-cartesianindices-with-view/58411)

<div class="topic-metadata">

**Author:** [@Phil\_Tomson](https://discourse.julialang.org/u/Phil_Tomson)\
**Replies:** 2\
**Last updated:** [April 2, 2021, 3:18pm UTC](https://discourse.julialang.org/t/using-cartesianindices-with-view/58411 "2021-04-02T15:18:11Z")

</div>

I’ve got this function for computing the next state of a CA: function convGOL\_dot(A::AbstractMatrix, kern::AbstractMatrix) b = CartesianIndex(1,1) out = zeros(eltype(A), size(A)) @inbounds for i in CartesianIndic…

---

## [\`ForwardDiff\` and \`LAPACK\` don't get along](https://discourse.julialang.org/t/forwarddiff-and-lapack-dont-get-along/58397)

<div class="topic-metadata">

**Author:** [@Ross\_Boylan](https://discourse.julialang.org/u/Ross_Boylan)\
**Replies:** 2\
**Last updated:** [April 2, 2021, 2:23pm UTC](https://discourse.julialang.org/t/forwarddiff-and-lapack-dont-get-along/58397 "2021-04-02T14:23:59Z")

</div>

ForwardDiff only works with pure julia code AFAIK, which means it won’t work with the external calls to BLAS or LAPACK. When I inadvertently combine them by using qr() it doesn’t work. The question is what to do about …

---

## [The "sum" in constraint](https://discourse.julialang.org/t/the-sum-in-constraint/58434)

<div class="topic-metadata">

**Author:** [@hxxx123](https://discourse.julialang.org/u/hxxx123)\
**Replies:** 2\
**Last updated:** [April 2, 2021, 1:50pm UTC](https://discourse.julialang.org/t/the-sum-in-constraint/58434 "2021-04-02T13:50:37Z")

</div>

I’m trying to add one constraint :sum of “t\[i,j\]x\[i,j\]\<=10". T is one "1111” metrix and x\[1:11,1:11\] are binary variables.Seems to be error.

---

## [OS dependency of \`Float16(::BigFloat)\` on nightly](https://discourse.julialang.org/t/os-dependency-of-float16-bigfloat-on-nightly/58414)

<div class="topic-metadata">

**Author:** [@kimikage](https://discourse.julialang.org/u/kimikage)\
**Replies:** 4\
**Last updated:** [April 2, 2021, 1:13pm UTC](https://discourse.julialang.org/t/os-dependency-of-float16-bigfloat-on-nightly/58414 "2021-04-02T13:13:11Z")

</div>

Is there any OS dependency regarding the BigFloat → Float16 conversion? (Edit: Apparently, the core problem may be with the Float64 → Float16 conversion.) I’m not sure the cause, but the output of CI (GitHub Actions) fo…

---

## [Determine version lanuched from terminal](https://discourse.julialang.org/t/determine-version-lanuched-from-terminal/58441)

<div class="topic-metadata">

**Author:** [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Replies:** 1\
**Last updated:** [April 2, 2021, 12:55pm UTC](https://discourse.julialang.org/t/determine-version-lanuched-from-terminal/58441 "2021-04-02T12:55:48Z")

</div>

I have added C:\\Users\\username\\AppData\\Local\\Programs\\Julia 1.5.3\\bin to my path, so that I can launch Julia by typing julia in the terminal. I have since installed 1.6.0 via chocolatey. As far as I can tell, chocolatey …

---

## [Unitful + ForwardDiff](https://discourse.julialang.org/t/unitful-forwarddiff/41422)

<div class="topic-metadata">

**Author:** [@jw3126](https://discourse.julialang.org/u/jw3126)\
**Replies:** 2\
**Last updated:** [April 2, 2021, 12:18pm UTC](https://discourse.julialang.org/t/unitful-forwarddiff/41422 "2021-04-02T12:18:48Z")

</div>

ForwardDiff.jl and Unitful.jl do not work together out of the box. Did anybody try to make them work together?

---

## [Help understanding dot assignment to Vector of mutable static arrays](https://discourse.julialang.org/t/help-understanding-dot-assignment-to-vector-of-mutable-static-arrays/58108)

<div class="topic-metadata">

**Author:** [@PeterSimon](https://discourse.julialang.org/u/PeterSimon)\
**Replies:** 6\
**Last updated:** [April 2, 2021, 12:10pm UTC](https://discourse.julialang.org/t/help-understanding-dot-assignment-to-vector-of-mutable-static-arrays/58108 "2021-04-02T12:10:36Z")

</div>

I am puzzled by the following behavior, which produced a difficult to find bug… julia\> using StaticArrays julia\> t = @MVector(\[1.0,2.0\]) 2-element MVector{2, Float64} with indices SOneTo(2): 1.0 2.0 julia\> x = zeros…

---

## [Stheno.jl@0.7](https://discourse.julialang.org/t/stheno-jl-0-7/58440)

<div class="topic-metadata">

**Author:** [@willtebbutt](https://discourse.julialang.org/u/willtebbutt)\
**Replies:** 0\
**Last updated:** [April 2, 2021, 11:53am UTC](https://discourse.julialang.org/t/stheno-jl-0-7/58440 "2021-04-02T11:53:21Z")

</div>

Stheno.jl v0.7 has now been released. It is a very breaking release, in that much of the main user-facing interface has been refactored to ensure compatibility with the AbstractGPs.jl ecosystem that the JuliaGaussianProc…

---

## [VRP with JuMP](https://discourse.julialang.org/t/vrp-with-jump/58438)

<div class="topic-metadata">

**Author:** [@hxxx123](https://discourse.julialang.org/u/hxxx123)\
**Replies:** 1\
**Last updated:** [April 2, 2021, 11:22am UTC](https://discourse.julialang.org/t/vrp-with-jump/58438 "2021-04-02T11:22:28Z")

</div>

One VRP without time window: n customers who has n different loads need to be met at n locations,every vehicle have same capacity,which is m. we don’t need to consider serivce times.How to get minimum number of vehicle…

---

## [Julia test if number is NaN](https://discourse.julialang.org/t/julia-test-if-number-is-nan/25642)

<div class="topic-metadata">

**Author:** [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Replies:** 5\
**Last updated:** [April 2, 2021, 11:03am UTC](https://discourse.julialang.org/t/julia-test-if-number-is-nan/25642 "2021-04-02T11:03:50Z")

</div>

Hello, I have a variable that is non a number: julia\> Bs NaN and I have written a test to check for it: julia\> if Bs == NaN println("NON A NUMBER! Bs = ", Bs) else println("OK, Bs is ", B…

---

## [How to make a basic classification in flux?](https://discourse.julialang.org/t/how-to-make-a-basic-classification-in-flux/58358)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 2\
**Last updated:** [April 2, 2021, 10:17am UTC](https://discourse.julialang.org/t/how-to-make-a-basic-classification-in-flux/58358 "2021-04-02T10:17:00Z")

</div>

I am trying to make a basic classification in Flux, but I am obtainining crazy errors. Where am I wrong ? These are my attempts: Version 1: basic of the basic using Random, Flux x = \[0.1 10; 0.13 13; 0.17 17; 0.2 20; …

---

## [Flux Custom Loss Function Not Working Properly](https://discourse.julialang.org/t/flux-custom-loss-function-not-working-properly/58090)

<div class="topic-metadata">

**Author:** [@rmcsqrd](https://discourse.julialang.org/u/rmcsqrd)\
**Replies:** 20\
**Last updated:** [April 2, 2021, 10:09am UTC](https://discourse.julialang.org/t/flux-custom-loss-function-not-working-properly/58090 "2021-04-02T10:09:21Z")

</div>

Hello, I am trying to implement the A3C reinforcement learning algorithm in Flux.jl using a custom loss function described in the algorithm. I am having trouble with my custom loss function - the parameters of my model d…

---

## [Error While adding CuArrays.jl package](https://discourse.julialang.org/t/error-while-adding-cuarrays-jl-package/58387)

<div class="topic-metadata">

**Author:** [@Sumanshekhar17](https://discourse.julialang.org/u/Sumanshekhar17)\
**Replies:** 12\
**Last updated:** [April 2, 2021, 10:02am UTC](https://discourse.julialang.org/t/error-while-adding-cuarrays-jl-package/58387 "2021-04-02T10:02:13Z")

</div>

There are two problems that I am facing first is that- I have tried CUDA.has\_cuda(), and it gave me false. The second is that when I tried to add CuArrays.jl it gave me this error- julia\> import Pkg julia\> Pkg.add("C…

---

## [Pkg trying to add private repository gives GitError(Code:ERROR, Class:Net, unrecognized URL prefix)](https://discourse.julialang.org/t/pkg-trying-to-add-private-repository-gives-giterror-code-error-class-net-unrecognized-url-prefix/58432)

<div class="topic-metadata">

**Author:** [@Shane\_Kelly](https://discourse.julialang.org/u/Shane_Kelly)\
**Replies:** 0\
**Last updated:** [April 2, 2021, 9:32am UTC](https://discourse.julialang.org/t/pkg-trying-to-add-private-repository-gives-giterror-code-error-class-net-unrecognized-url-prefix/58432 "2021-04-02T09:32:30Z")

</div>

I am trying to add a private gitlab repository and I am encountering the following issue: (myEnv) pkg\> add https://gitlab.com/me/private.git Cloning git-repo \`https://gitlab.com/me/private.git\` ERROR: failed to clon…

---

## [Ccall problem while calling fortran](https://discourse.julialang.org/t/ccall-problem-while-calling-fortran/58413)

<div class="topic-metadata">

**Author:** [@Adam\_D](https://discourse.julialang.org/u/Adam_D)\
**Replies:** 3\
**Last updated:** [April 2, 2021, 6:59am UTC](https://discourse.julialang.org/t/ccall-problem-while-calling-fortran/58413 "2021-04-02T06:59:55Z")

</div>

Hi all, I was playing with calling a stupid fortran code in julia. I encountered some weird results. 1)Here is my fortran code to calculate “volume”. module volmod implicit none contains function volume(…

---

## [CoolProp Plot in Julia](https://discourse.julialang.org/t/coolprop-plot-in-julia/58204)

<div class="topic-metadata">

**Author:** [@HerAdri](https://discourse.julialang.org/u/HerAdri)\
**Replies:** 13\
**Last updated:** [April 2, 2021, 6:31am UTC](https://discourse.julialang.org/t/coolprop-plot-in-julia/58204 "2021-04-02T06:31:06Z")

</div>

How to reproduce this example in Julia: propane (R-290) import CoolProp from CoolProp.Plots import PropertyPlot plot = PropertyPlot('R290', 'ph') plot.calc\_isolines() plot.show()

---

## [Unexpected behavior possibly due to how scope and multithreading works on 1.4.2](https://discourse.julialang.org/t/unexpected-behavior-possibly-due-to-how-scope-and-multithreading-works-on-1-4-2/58412)

<div class="topic-metadata">

**Author:** [@dmitrip](https://discourse.julialang.org/u/dmitrip)\
**Replies:** 2\
**Last updated:** [April 2, 2021, 5:30am UTC](https://discourse.julialang.org/t/unexpected-behavior-possibly-due-to-how-scope-and-multithreading-works-on-1-4-2/58412 "2021-04-02T05:30:49Z")

</div>

This multithreading behavior with a weird “fix” happens on 1.4.2 for me, but not 1.5 or 1.6. I don’t understand what I’m doing wrong, so I’m wary of just upgrading and forgetting about it: module M function f() x =…

---

## [How to extract input data just knowing the output values?](https://discourse.julialang.org/t/how-to-extract-input-data-just-knowing-the-output-values/58380)

<div class="topic-metadata">

**Author:** [@mdsa3d](https://discourse.julialang.org/u/mdsa3d)\
**Replies:** 4\
**Last updated:** [April 2, 2021, 3:27am UTC](https://discourse.julialang.org/t/how-to-extract-input-data-just-knowing-the-output-values/58380 "2021-04-02T03:27:04Z")

</div>

I would like to inquire, how may i extract input data from a given dataset (I guess it is similar to data decomposition). The goal is to decompose a dataset to extract the features? For example: Extract individual com…

---

## [JuMP: how NOT to display the results of an optimization problem in the REPL?](https://discourse.julialang.org/t/jump-how-not-to-display-the-results-of-an-optimization-problem-in-the-repl/20429)

<div class="topic-metadata">

**Author:** [@ale](https://discourse.julialang.org/u/ale)\
**Replies:** 5\
**Last updated:** [April 2, 2021, 3:13am UTC](https://discourse.julialang.org/t/jump-how-not-to-display-the-results-of-an-optimization-problem-in-the-repl/20429 "2021-04-02T03:13:52Z")

</div>

Hello! I am using JuMP (0.18.4) (with Gurobi as solver) in a script to solve the same optimization problem for different input. This results in the same optimization problem being solved for many times. Now, everything…

---

## [Ref() which doesn't escape inside a function allocates on the heap](https://discourse.julialang.org/t/ref-which-doesnt-escape-inside-a-function-allocates-on-the-heap/58406)

<div class="topic-metadata">

**Author:** [@balenamiaa](https://discourse.julialang.org/u/balenamiaa)\
**Replies:** 1\
**Last updated:** [April 2, 2021, 1:55am UTC](https://discourse.julialang.org/t/ref-which-doesnt-escape-inside-a-function-allocates-on-the-heap/58406 "2021-04-02T01:55:45Z")

</div>

I recently learnt that creating a Ref inside a function in which it doesn’t escape will lead to a stack allocation instead of heap-allocation. But then when writing a cuda kernel like so - function \_kernel\_0(trail, part…

---

## [Factor mixture model in Turing - too slow?](https://discourse.julialang.org/t/factor-mixture-model-in-turing-too-slow/58394)

<div class="topic-metadata">

**Author:** [@opera\_malenky](https://discourse.julialang.org/u/opera_malenky)\
**Replies:** 1\
**Last updated:** [April 2, 2021, 12:32am UTC](https://discourse.julialang.org/t/factor-mixture-model-in-turing-too-slow/58394 "2021-04-02T00:32:51Z")

</div>

I have been trying to make a factor mixture model in Turing, but have run into some performance issues. To see where the slowdown comes from, I started by splitting the model into two separate models: a simple factor mo…

---

## [Rotate camera about point in Makie 3D scene](https://discourse.julialang.org/t/rotate-camera-about-point-in-makie-3d-scene/58337)

<div class="topic-metadata">

**Author:** [@airpmb](https://discourse.julialang.org/u/airpmb)\
**Replies:** 4\
**Last updated:** [April 1, 2021, 8:34pm UTC](https://discourse.julialang.org/t/rotate-camera-about-point-in-makie-3d-scene/58337 "2021-04-01T20:34:02Z")

</div>

This is what I’ve got for keeping my 3D scene pointed at the origin. It seems a bit janky, is there a better way? function lookcenter(scene, stopper) @async begin while !stopper\[\] && isopen(scene) sleep(0.25…

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

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