# Latest

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

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

**Page:** 1078

---

## [Dense layer field alias](https://discourse.julialang.org/t/dense-layer-field-alias/78993)

<div class="topic-metadata">

**Author:** [@Rasmus\_Hoier](https://discourse.julialang.org/u/Rasmus_Hoier)\
**Replies:** 2\
**Last updated:** [April 4, 2022, 10:28am UTC](https://discourse.julialang.org/t/dense-layer-field-alias/78993 "2022-04-04T10:28:45Z")

</div>

Hi, I am writing a custom layer and am trying to emulate the UI of Flux layers. In the definition of Flux’s Dense layer the Dense struct has a field weight, but this field also has a kind of alias W. How/where is this a…

---

## [How to pass args to FFMPEG.jl](https://discourse.julialang.org/t/how-to-pass-args-to-ffmpeg-jl/78998)

<div class="topic-metadata">

**Author:** [@quietlight](https://discourse.julialang.org/u/quietlight)\
**Replies:** 0\
**Last updated:** [April 4, 2022, 10:04am UTC](https://discourse.julialang.org/t/how-to-pass-args-to-ffmpeg-jl/78998 "2022-04-04T10:04:26Z")

</div>

I am unable to pass this argument to ffmpeg.jl, ignorance yes, but we all start somewhere. ffmpeg -ss 20 -to 30 -i C05\_20211201\_040000.wav output.wav Tried lots of options but it’s not happening. Read the docs but ther…

---

## [Square plots in GR](https://discourse.julialang.org/t/square-plots-in-gr/78988)

<div class="topic-metadata">

**Author:** [@jackwoodside](https://discourse.julialang.org/u/jackwoodside)\
**Replies:** 3\
**Last updated:** [April 4, 2022, 8:14am UTC](https://discourse.julialang.org/t/square-plots-in-gr/78988 "2022-04-04T08:14:07Z")

</div>

I am currently trying to make a contour plot of a a 100x100 matrix using Plots with the GR backend. Since it is a square matrix I would like the contour plot to be square also. Someone suggested to me using aspect\_ratio=…

---

## [A piece-wise defined objective function can be solved by Gurobi?](https://discourse.julialang.org/t/a-piece-wise-defined-objective-function-can-be-solved-by-gurobi/78959)

<div class="topic-metadata">

**Author:** [@Jian\_ZUO](https://discourse.julialang.org/u/Jian_ZUO)\
**Replies:** 7\
**Last updated:** [April 4, 2022, 7:44am UTC](https://discourse.julialang.org/t/a-piece-wise-defined-objective-function-can-be-solved-by-gurobi/78959 "2022-04-04T07:44:04Z")

</div>

Hi, I have an optimization with a piece-wise defined objective as follows: using JuMP, Ipopt using Gurobi T\_fc = \[0, 185, 348, 515, 658, 830\] R\_fc = \[0.1803, 0.1978, 0.2033, 0.2092, 0.2157, 0.2254\] const R0 = R\_fc\[1\] …

---

## [Method to find previous output in vscode julia repl](https://discourse.julialang.org/t/method-to-find-previous-output-in-vscode-julia-repl/78911)

<div class="topic-metadata">

**Author:** [@jisutich](https://discourse.julialang.org/u/jisutich)\
**Replies:** 4\
**Last updated:** [April 4, 2022, 7:16am UTC](https://discourse.julialang.org/t/method-to-find-previous-output-in-vscode-julia-repl/78911 "2022-04-04T07:16:43Z")

</div>

Hi, I am using vscode to run my julia code. I use @time to know how long my code needs to run, something like 815.511743 seconds (5.52 G allocations: 573.809 GiB, 5.88% gc time). But when I try to find the total time of…

---

## [Multithreading and "silent errors"](https://discourse.julialang.org/t/multithreading-and-silent-errors/78983)

<div class="topic-metadata">

**Author:** [@unis](https://discourse.julialang.org/u/unis)\
**Replies:** 1\
**Last updated:** [April 4, 2022, 6:39am UTC](https://discourse.julialang.org/t/multithreading-and-silent-errors/78983 "2022-04-04T06:39:43Z")

</div>

Consider the following MWE: using Base.Threads: @spawn function f() error("Some error") end function g() while true sleep(1) end end @info "Initialize multi-threaded processing ($(Threads.nthreads…

---

## [@spawnat with SlurmClusterManager](https://discourse.julialang.org/t/spawnat-with-slurmclustermanager/78930)

<div class="topic-metadata">

**Author:** [@andrew-saydjari](https://discourse.julialang.org/u/andrew-saydjari)\
**Replies:** 3\
**Last updated:** [April 4, 2022, 6:10am UTC](https://discourse.julialang.org/t/spawnat-with-slurmclustermanager/78930 "2022-04-04T06:10:00Z")

</div>

My basic problem is that I have a large matrix I would like all of my workers to read from (no need for write), and I want all of those workers to be across many nodes (a multinode SLURM allocation). If there is a better…

---

## [Using NLsolve to get solution to symbolic system of equations](https://discourse.julialang.org/t/using-nlsolve-to-get-solution-to-symbolic-system-of-equations/78982)

<div class="topic-metadata">

**Author:** [@Zack\_Wolf](https://discourse.julialang.org/u/Zack_Wolf)\
**Replies:** 3\
**Last updated:** [April 4, 2022, 5:28am UTC](https://discourse.julialang.org/t/using-nlsolve-to-get-solution-to-symbolic-system-of-equations/78982 "2022-04-04T05:28:45Z")

</div>

Hi, I have two symbolic equations I obtained using the Symbolic package. I want to solve for the two variables “b” and “m”. The equations are both set equal to zero. They are nonlinear, so I’m assuming that using NLsolv…

---

## [Outer constructor method is failing](https://discourse.julialang.org/t/outer-constructor-method-is-failing/78979)

<div class="topic-metadata">

**Author:** [@Sijun](https://discourse.julialang.org/u/Sijun)\
**Replies:** 3\
**Last updated:** [April 4, 2022, 4:51am UTC](https://discourse.julialang.org/t/outer-constructor-method-is-failing/78979 "2022-04-04T04:51:19Z")

</div>

I don’t really understand why in the following code Payload(;a, b) = Payload(a=a, b=b, c=Float64\[\]) fails. It looks a legitimate expression to me. module Test Base.@kwdef mutable struct Payload a::Int b::String…

---

## [A very simple question about for loop in julia](https://discourse.julialang.org/t/a-very-simple-question-about-for-loop-in-julia/78978)

<div class="topic-metadata">

**Author:** [@tjk](https://discourse.julialang.org/u/tjk)\
**Replies:** 3\
**Last updated:** [April 4, 2022, 4:21am UTC](https://discourse.julialang.org/t/a-very-simple-question-about-for-loop-in-julia/78978 "2022-04-04T04:21:18Z")

</div>

I have the following very simple codes (Julia 1.5.0): #test\_for.jl a = 100 for i=1:10 a = a+1 end b = a println("a=",a," b=",b) # I want to get a =110 and b=110 When I executed the script, julia says variable ‘a’ is n…

---

## [Doc2Vec in Julia](https://discourse.julialang.org/t/doc2vec-in-julia/78907)

<div class="topic-metadata">

**Author:** [@Salvatore\_Cosentino](https://discourse.julialang.org/u/Salvatore_Cosentino)\
**Replies:** 2\
**Last updated:** [April 4, 2022, 3:42am UTC](https://discourse.julialang.org/t/doc2vec-in-julia/78907 "2022-04-04T03:42:57Z")

</div>

Hello everybody. I would like one of students to start learning Julia and move from Python. The project is working on uses Gensim module for Python, which allows for modelling semantic NLP problems. Specifically he is…

---

## [Processing multiple large zipped csv files](https://discourse.julialang.org/t/processing-multiple-large-zipped-csv-files/78957)

<div class="topic-metadata">

**Author:** [@thedacheng](https://discourse.julialang.org/u/thedacheng)\
**Replies:** 2\
**Last updated:** [April 4, 2022, 3:38am UTC](https://discourse.julialang.org/t/processing-multiple-large-zipped-csv-files/78957 "2022-04-04T03:38:40Z")

</div>

I am trying to process multiple large zipped csv files. Memory consumption is my main concern at the moment. It seems CSV.File always load everything in memory, so I am using CSV.Rows to iterate through processing. I enc…

---

## [Confused about package loading](https://discourse.julialang.org/t/confused-about-package-loading/78860)

<div class="topic-metadata">

**Author:** [@Sijun](https://discourse.julialang.org/u/Sijun)\
**Replies:** 6\
**Last updated:** [April 4, 2022, 3:36am UTC](https://discourse.julialang.org/t/confused-about-package-loading/78860 "2022-04-04T03:36:26Z")

</div>

My understanding is that Julia visits each of the locations defined in LOAD\_PATH to load package X until it finds one by the name. So if the default LOAD\_PATH is julia\> LOAD\_PATH 3-element Vector{String}: "@" "@v#.#" …

---

## [How does \`kwargs...\` pass into another function?](https://discourse.julialang.org/t/how-does-kwargs-pass-into-another-function/78976)

<div class="topic-metadata">

**Author:** [@zengfung](https://discourse.julialang.org/u/zengfung)\
**Replies:** 1\
**Last updated:** [April 4, 2022, 3:30am UTC](https://discourse.julialang.org/t/how-does-kwargs-pass-into-another-function/78976 "2022-04-04T03:30:08Z")

</div>

Hi all, I’m trying to understand the parsing of keyword arguments in Julia functions. In the following code snippet, I created foo1() which takes in 2 keyword arguments, and bar1() which takes in keyword arguments to pa…

---

## [Extrapolation of a NeuralODE using \`DiffEqFlux\`](https://discourse.julialang.org/t/extrapolation-of-a-neuralode-using-diffeqflux/78964)

<div class="topic-metadata">

**Author:** [@00krishna](https://discourse.julialang.org/u/00krishna)\
**Replies:** 2\
**Last updated:** [April 4, 2022, 1:33am UTC](https://discourse.julialang.org/t/extrapolation-of-a-neuralode-using-diffeqflux/78964 "2022-04-04T01:33:45Z")

</div>

Hey folks. So I have trained a NeuralODE using DiffEqFlux, meaning that I have optimized the parameters of a neural network to solve this ODE. I have a dataset that spans 31 years with yearly measurements, and I trained …

---

## [Plot image at (x,y) location on scatter plot](https://discourse.julialang.org/t/plot-image-at-x-y-location-on-scatter-plot/78928)

<div class="topic-metadata">

**Author:** [@afishy](https://discourse.julialang.org/u/afishy)\
**Replies:** 3\
**Last updated:** [April 4, 2022, 1:42am UTC](https://discourse.julialang.org/t/plot-image-at-x-y-location-on-scatter-plot/78928 "2022-04-04T01:42:55Z")

</div>

Let’s say I’ve done some clustering on my data (like in the image below) and want to show a representative image (i.e. an MxN matrix) from that cluster overlaid at an (x,y) coordinate near that cluster’s center. Is this …

---

## [Possible to convert ND arrays to nested arrays "in place"?](https://discourse.julialang.org/t/possible-to-convert-nd-arrays-to-nested-arrays-in-place/78968)

<div class="topic-metadata">

**Author:** [@jinml](https://discourse.julialang.org/u/jinml)\
**Replies:** 1\
**Last updated:** [April 4, 2022, 12:00am UTC](https://discourse.julialang.org/t/possible-to-convert-nd-arrays-to-nested-arrays-in-place/78968 "2022-04-04T00:00:01Z")

</div>

I know I can reinterpret an array of SVector as an ND array as follows: julia\> SA=\[@SVector rand(2) for \_=1:100\]; julia\> A=reinterpret(reshape,Float64,SA); julia\> @show SA\[1\],A\[:,1\]; (SA\[1\], A\[:, 1\]) = (\[0.01565087031…

---

## [Apply LinearTransformation to a Rectangle](https://discourse.julialang.org/t/apply-lineartransformation-to-a-rectangle/78926)

<div class="topic-metadata">

**Author:** [@vshesh](https://discourse.julialang.org/u/vshesh)\
**Replies:** 1\
**Last updated:** [April 3, 2022, 8:28pm UTC](https://discourse.julialang.org/t/apply-lineartransformation-to-a-rectangle/78926 "2022-04-03T20:28:55Z")

</div>

I have represented a box as a 4 col x 2 row matrix something like bbox = \[0 0 ; 50 0; 50 100; 0 100\] I have a few of these boxes and I want to rotate them by a certain angle. I create a LinearMap(RotMatrix(deg2rad(an…

---

## [Implementing r's stan\_glm() in Julia](https://discourse.julialang.org/t/implementing-rs-stan-glm-in-julia/78916)

<div class="topic-metadata">

**Author:** [@charperflow](https://discourse.julialang.org/u/charperflow)\
**Replies:** 5\
**Last updated:** [April 3, 2022, 7:56pm UTC](https://discourse.julialang.org/t/implementing-rs-stan-glm-in-julia/78916 "2022-04-03T19:56:55Z")

</div>

I am working through “Regression and Other Stories” for a class. All of the examples are done in R and I have been trying to recreate them in Julia for practice. For the most part it has been no problem, however, I am h…

---

## [Operations on type paramteres](https://discourse.julialang.org/t/operations-on-type-paramteres/78954)

<div class="topic-metadata">

**Author:** [@Mohamed\_AbdElrahman](https://discourse.julialang.org/u/Mohamed_AbdElrahman)\
**Replies:** 2\
**Last updated:** [April 3, 2022, 7:46pm UTC](https://discourse.julialang.org/t/operations-on-type-paramteres/78954 "2022-04-03T19:46:16Z")

</div>

Is there is an easy way to do something like this struct TensorField{T,ND,NC} \<: AbstractArray{T,ND+NC} end I need to define a scaler/vector/tensor field in 1D/2D/3D and I don’t want to define a type for each dimension…

---

## [Code speed decreases when loop number increases](https://discourse.julialang.org/t/code-speed-decreases-when-loop-number-increases/78920)

<div class="topic-metadata">

**Author:** [@jisutich](https://discourse.julialang.org/u/jisutich)\
**Replies:** 18\
**Last updated:** [April 3, 2022, 7:11pm UTC](https://discourse.julialang.org/t/code-speed-decreases-when-loop-number-increases/78920 "2022-04-03T19:11:50Z")

</div>

Hi I am using a small code to generate some results. Now I want to take the average of different realizations. So I simply add a more for loop with loop number Nr. But I find that when I increase Nr, the code speed beco…

---

## [Help me in julia plots](https://discourse.julialang.org/t/help-me-in-julia-plots/78891)

<div class="topic-metadata">

**Author:** [@Lamis\_Njeh](https://discourse.julialang.org/u/Lamis_Njeh)\
**Replies:** 18\
**Last updated:** [April 3, 2022, 7:04pm UTC](https://discourse.julialang.org/t/help-me-in-julia-plots/78891 "2022-04-03T19:04:24Z")

</div>

how could I make a heatmap in julia ?

---

## [Julia v1.8.0-beta3 and v1.6.6 LTS are now available](https://discourse.julialang.org/t/julia-v1-8-0-beta3-and-v1-6-6-lts-are-now-available/78820)

<div class="topic-metadata">

**Author:** [@ararslan](https://discourse.julialang.org/u/ararslan)\
**Replies:** 5\
**Last updated:** [April 3, 2022, 5:56pm UTC](https://discourse.julialang.org/t/julia-v1-8-0-beta3-and-v1-6-6-lts-are-now-available/78820 "2022-04-03T17:56:46Z")

</div>

The Julia developers are pleased to announce two new releases: v1.6.6, the sixth patch release in the 1.6 LTS series, and v1.8.0-beta3, the third beta version for the upcoming 1.8 stable series. You can download binaries…

---

## [Find function in Julai 1.7 -- still supported?](https://discourse.julialang.org/t/find-function-in-julai-1-7-still-supported/78950)

<div class="topic-metadata">

**Author:** [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Replies:** 2\
**Last updated:** [April 3, 2022, 5:55pm UTC](https://discourse.julialang.org/t/find-function-in-julai-1-7-still-supported/78950 "2022-04-03T17:55:15Z")

</div>

Hello, I would like to find the element of a vectos above a certain threshold. I am trying with: a = \[ 1 2 3 4 3 5 3 6 7 8 9 3 \] find( x-\>(x == 3), a) find(a .== 3 but julia\> find( x-\>(x == 3), a) ERROR: UndefVarErro…

---

## [Turing: problem using MCMCthreads()](https://discourse.julialang.org/t/turing-problem-using-mcmcthreads/78906)

<div class="topic-metadata">

**Author:** [@mcreel](https://discourse.julialang.org/u/mcreel)\
**Replies:** 8\
**Last updated:** [April 3, 2022, 4:12pm UTC](https://discourse.julialang.org/t/turing-problem-using-mcmcthreads/78906 "2022-04-03T16:12:15Z")

</div>

I am getting an error when trying to use MCMCthreads() for sampling. The following code works fine: chain = sample(MSM(m, S, model), MH(:θt =\> AdvancedMH.RandomWalkProposal(MvNormal(zeros(size(m,1)), tuning\*Σp))), …

---

## [Need help in solving my assignment](https://discourse.julialang.org/t/need-help-in-solving-my-assignment/78945)

<div class="topic-metadata">

**Author:** [@habeebadeyemi](https://discourse.julialang.org/u/habeebadeyemi)\
**Replies:** 9\
**Last updated:** [April 3, 2022, 3:28pm UTC](https://discourse.julialang.org/t/need-help-in-solving-my-assignment/78945 "2022-04-03T15:28:36Z")

</div>

Hi everyone, I have a linear regression task to be completed using flux package. Any one to help . Problem 1. Consider the real estate dataset in Algor\_Bruce | Contributor | Kaggle real-estate-price-prediction. Your t…

---

## [Performance difference among three CUDA kernels with same results](https://discourse.julialang.org/t/performance-difference-among-three-cuda-kernels-with-same-results/78923)

<div class="topic-metadata">

**Author:** [@Chiil](https://discourse.julialang.org/u/Chiil)\
**Replies:** 8\
**Last updated:** [April 3, 2022, 3:23pm UTC](https://discourse.julialang.org/t/performance-difference-among-three-cuda-kernels-with-same-results/78923 "2022-04-03T15:23:41Z")

</div>

I wrote a small test program to learn a bit more of CUDA.jl. I find it hard to understand why the test3! function is so much slower than test1! and test2!, especially because this is the way one would write a CUDA kernel…

---

## [\[ANN\] SIAMFANLEquations.jl: Nonlinear solvers and book project](https://discourse.julialang.org/t/ann-siamfanlequations-jl-nonlinear-solvers-and-book-project/51196)

<div class="topic-metadata">

**Author:** [@ctkelley](https://discourse.julialang.org/u/ctkelley)\
**Replies:** 22\
**Last updated:** [April 3, 2022, 2:32pm UTC](https://discourse.julialang.org/t/ann-siamfanlequations-jl-nonlinear-solvers-and-book-project/51196 "2022-04-03T14:32:00Z")

</div>

I just registered GitHub - ctkelley/SIAMFANLEquations.jl: This is a Julia package for a book project. This is a suite of nonlinear solvers, test problems, and examples. This package supports my book project Solving No…

---

## [Where is sparse ldlt?](https://discourse.julialang.org/t/where-is-sparse-ldlt/78929)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 2\
**Last updated:** [April 3, 2022, 1:18pm UTC](https://discourse.julialang.org/t/where-is-sparse-ldlt/78929 "2022-04-03T13:18:55Z")

</div>

The manual says it is in “CHOLMOD library from SuiteSparse” ( Linear Algebra · The Julia Language). I cannot find it there: julia\> SuiteSparse.CHOLMOD. …

---

## [NamedTuple, how to assign values?](https://discourse.julialang.org/t/namedtuple-how-to-assign-values/78933)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 4\
**Last updated:** [April 3, 2022, 11:05am UTC](https://discourse.julialang.org/t/namedtuple-how-to-assign-values/78933 "2022-04-03T11:05:10Z")

</div>

Hello! Suppose I have a line as such: varNames = NamedTuple{(:key,:offset,:type,:ncol), Tuple{String,Int,DataType,Int}} The typeof this is: typeof(varNames) DataType Then my question is; how do I insert values into,…

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

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