# Latest

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

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

**Page:** 905

---

## [PhysicsInformedNN: sampling strategy for pde\_loss evaluation on pre-defined could points](https://discourse.julialang.org/t/physicsinformednn-sampling-strategy-for-pde-loss-evaluation-on-pre-defined-could-points/88238)

<div class="topic-metadata">

**Author:** [@LeoCott](https://discourse.julialang.org/u/LeoCott)\
**Replies:** 1\
**Last updated:** [October 4, 2022, 10:01pm UTC](https://discourse.julialang.org/t/physicsinformednn-sampling-strategy-for-pde-loss-evaluation-on-pre-defined-could-points/88238 "2022-10-04T22:01:27Z")

</div>

Hello all, I am trying to solve an inverse problem with NeuralPDE as presented in the documentation here. I am wondering if it was possible to define a sampling strategy to evaluate the pde\_loss of the NeuralPDE.Physic…

---

## [Solving nonlinear equation with an embedded matrix equation](https://discourse.julialang.org/t/solving-nonlinear-equation-with-an-embedded-matrix-equation/88240)

<div class="topic-metadata">

**Author:** [@yhchang96](https://discourse.julialang.org/u/yhchang96)\
**Replies:** 1\
**Last updated:** [October 4, 2022, 9:54pm UTC](https://discourse.julialang.org/t/solving-nonlinear-equation-with-an-embedded-matrix-equation/88240 "2022-10-04T21:54:52Z")

</div>

I want to find the solution to a nonlinear equation of the form u\_{xx} + f(u,\\lambda) + p= 0 where the unknowns are u(x) and the constant p. There is an addition volume constraint \\int u(x)dx=1. For the leading order pro…

---

## [GRAPE's method in Quantum Control (GRAPE.jl)](https://discourse.julialang.org/t/grapes-method-in-quantum-control-grape-jl/88208)

<div class="topic-metadata">

**Author:** [@saba](https://discourse.julialang.org/u/saba)\
**Replies:** 6\
**Last updated:** [October 4, 2022, 9:45pm UTC](https://discourse.julialang.org/t/grapes-method-in-quantum-control-grape-jl/88208 "2022-10-04T21:45:21Z")

</div>

Hi. I’m working with QuantumControl.jl and I’m trying to learn about GRAPE method in this package. There is an example of Optimization of a State-to-State Transfer in a Two-Level-System. I can run this code but I need t…

---

## [Q: Using Metatheory.jl for code optimization](https://discourse.julialang.org/t/q-using-metatheory-jl-for-code-optimization/88201)

<div class="topic-metadata">

**Author:** [@Audrius-St](https://discourse.julialang.org/u/Audrius-St)\
**Replies:** 0\
**Last updated:** [October 4, 2022, 2:20am UTC](https://discourse.julialang.org/t/q-using-metatheory-jl-for-code-optimization/88201 "2022-10-04T02:20:28Z")

</div>

Hello, After going through the rather terse Metatheory.jl documentation, there are a number of concepts that are novel and unfamilair to me, so I’m unable to discern if the package can do the following: It is possible …

---

## [Check the solution based on the factorization Matrices of KLU](https://discourse.julialang.org/t/check-the-solution-based-on-the-factorization-matrices-of-klu/88180)

<div class="topic-metadata">

**Author:** [@Amro](https://discourse.julialang.org/u/Amro)\
**Replies:** 6\
**Last updated:** [October 4, 2022, 8:27pm UTC](https://discourse.julialang.org/t/check-the-solution-based-on-the-factorization-matrices-of-klu/88180 "2022-10-04T20:27:57Z")

</div>

I am trying to play with KLU matrices based on KLU.jl. However, I am having false instead of true when I am comparing Q\*((P\*A\*Q)\\P\*b) == A\\b. Could you please correct me given that the below A and b are taken from my rea…

---

## [\[ANN\] SPEFiles.jl a package to read Teledyne Princeton Instruments' Lightfield SPE Files](https://discourse.julialang.org/t/ann-spefiles-jl-a-package-to-read-teledyne-princeton-instruments-lightfield-spe-files/88253)

<div class="topic-metadata">

**Author:** [@klafyvel](https://discourse.julialang.org/u/klafyvel)\
**Replies:** 0\
**Last updated:** [October 4, 2022, 8:08pm UTC](https://discourse.julialang.org/t/ann-spefiles-jl-a-package-to-read-teledyne-princeton-instruments-lightfield-spe-files/88253 "2022-10-04T20:08:09Z")

</div>

I am very happy to announce the release of SPEFiles.jl, a package to read Lightfield SPE files. Lightfield is software that is used by spectroscopists to control spectrometers. SPEFiles.jl provides a pure Julia reader o…

---

## [Arithmetic performance of expression](https://discourse.julialang.org/t/arithmetic-performance-of-expression/88196)

<div class="topic-metadata">

**Author:** [@Jojo](https://discourse.julialang.org/u/Jojo)\
**Replies:** 11\
**Last updated:** [October 4, 2022, 8:01pm UTC](https://discourse.julialang.org/t/arithmetic-performance-of-expression/88196 "2022-10-04T20:01:56Z")

</div>

Hello!, Recently I’ve noticed that Julia performs better when I don’t associate the terms in a expression im using in a for loop. Why is (1), faster than (2)? According to @btime (2) is 0.3 seconds slower than (1) aft…

---

## [Questions about vector](https://discourse.julialang.org/t/questions-about-vector/88153)

<div class="topic-metadata">

**Author:** [@zhangchunyong](https://discourse.julialang.org/u/zhangchunyong)\
**Replies:** 5\
**Last updated:** [October 4, 2022, 7:15pm UTC](https://discourse.julialang.org/t/questions-about-vector/88153 "2022-10-04T19:15:41Z")

</div>

a=\[\[1\],\[1,2\],\[2,1\],\[2,5\],\[111,3\],\[4,1\]\] 6-element Vector{Vector{Int64}}: \[1\] \[1, 2\] \[2, 1\] \[2, 5\] \[111, 3\] \[4, 1\] I want to get the index which of them contain a element named 1,but 111 is not allowed.I want to re…

---

## [SVD solver for Sparse Matrices](https://discourse.julialang.org/t/svd-solver-for-sparse-matrices/88246)

<div class="topic-metadata">

**Author:** [@nosewitz](https://discourse.julialang.org/u/nosewitz)\
**Replies:** 7\
**Last updated:** [October 4, 2022, 6:23pm UTC](https://discourse.julialang.org/t/svd-solver-for-sparse-matrices/88246 "2022-10-04T18:23:18Z")

</div>

I want to use singular value decomposition on large sparse matrices (18,000 x 8,000) and while the built-in LinearAlgebra function does the trick, it does not operate on the SparseMatrix type. My current solution is just…

---

## [10 times more compilation time than expected](https://discourse.julialang.org/t/10-times-more-compilation-time-than-expected/88017)

<div class="topic-metadata">

**Author:** [@Brian1](https://discourse.julialang.org/u/Brian1)\
**Replies:** 10\
**Last updated:** [October 4, 2022, 5:38pm UTC](https://discourse.julialang.org/t/10-times-more-compilation-time-than-expected/88017 "2022-10-04T17:38:58Z")

</div>

There is my old version codes: struct A a::Vector{Float64} n::Int end test\_func(a::A) = begin a\_vec,a\_n = a.a,a.n for i = 1 : size(a\_vec,1) a\_vec\[i\] + a\_n end end; a1 = A(rand(1000\_000),1) …

---

## [ERROR: KeyError: key :args not found](https://discourse.julialang.org/t/error-keyerror-key-args-not-found/88233)

<div class="topic-metadata">

**Author:** [@Kumail\_Haider](https://discourse.julialang.org/u/Kumail_Haider)\
**Replies:** 2\
**Last updated:** [October 4, 2022, 5:25pm UTC](https://discourse.julialang.org/t/error-keyerror-key-args-not-found/88233 "2022-10-04T17:25:10Z")

</div>

Can someone help me with this? julia\> using Graphs, GraphPlot julia\> using Symbolics, Statistics, LinearAlgebra julia\> using Plots, LaTeXStrings julia\> @variables p 1-element Vector{Num}: p julia\> A=\[1 2+p 3+p; 2…

---

## [How to efficiently determine if a column of a matrix is made of integers](https://discourse.julialang.org/t/how-to-efficiently-determine-if-a-column-of-a-matrix-is-made-of-integers/88217)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 6\
**Last updated:** [October 4, 2022, 5:18pm UTC](https://discourse.julialang.org/t/how-to-efficiently-determine-if-a-column-of-a-matrix-is-made-of-integers/88217 "2022-10-04T17:18:41Z")

</div>

Which is the most efficient way to determine if the columns of a matrix are all integers, e.g. a = \[1 1.5 2; 10 3.1 3\] columns 1 and 3 ? Note that if I would have defined a = Any\[1 1.5 2; 10 3.1 3\] I could have used j…

---

## [NamedTuple constructor syntax](https://discourse.julialang.org/t/namedtuple-constructor-syntax/88220)

<div class="topic-metadata">

**Author:** [@jlbosse](https://discourse.julialang.org/u/jlbosse)\
**Replies:** 2\
**Last updated:** [October 4, 2022, 4:27pm UTC](https://discourse.julialang.org/t/namedtuple-constructor-syntax/88220 "2022-10-04T16:27:58Z")

</div>

If I define a NamedTuple type like this MyTupleType = NamedTuple{(:a, :b), Tuple{Float64, String}} # or equivalently MyTupleType = @NamedTuple{a::Float64, b::String} I can use this to construct new named tuples with m…

---

## [Potential performance regressions in Julia 1.8 for special un-precompiled type dispatches and how to fix them](https://discourse.julialang.org/t/potential-performance-regressions-in-julia-1-8-for-special-un-precompiled-type-dispatches-and-how-to-fix-them/86359)

<div class="topic-metadata">

**Author:** [@sloede](https://discourse.julialang.org/u/sloede)\
**Replies:** 25\
**Last updated:** [October 4, 2022, 4:02pm UTC](https://discourse.julialang.org/t/potential-performance-regressions-in-julia-1-8-for-special-un-precompiled-type-dispatches-and-how-to-fix-them/86359 "2022-10-04T16:02:53Z")

</div>

TL;DR With Julia 1.8.0 (as opposed to Julia 1.7.3), for OrdinaryDiffEq v6.24.0 and Trixi.jl v0.4.44, we observe that package installation time increased by 20-50% package loading time increased by 30-50% compilation ti…

---

## [Could not load symbol with ccall](https://discourse.julialang.org/t/could-not-load-symbol-with-ccall/88231)

<div class="topic-metadata">

**Author:** [@ovt](https://discourse.julialang.org/u/ovt)\
**Replies:** 2\
**Last updated:** [October 4, 2022, 2:02pm UTC](https://discourse.julialang.org/t/could-not-load-symbol-with-ccall/88231 "2022-10-04T14:02:24Z")

</div>

I’m trying to call this function #include \<stdlib.h\> #include \<stdio.h\> #include \<time.h\> #include \<math.h\> #include \<string.h\> #define datatype double /\* type of the elements in y \*/ static void simplexproj\_Condat(da…

---

## [How to extract sub-matrices (or their indexes) of Block Diagonal Matrix?](https://discourse.julialang.org/t/how-to-extract-sub-matrices-or-their-indexes-of-block-diagonal-matrix/88188)

<div class="topic-metadata">

**Author:** [@Amro](https://discourse.julialang.org/u/Amro)\
**Replies:** 5\
**Last updated:** [October 4, 2022, 1:17pm UTC](https://discourse.julialang.org/t/how-to-extract-sub-matrices-or-their-indexes-of-block-diagonal-matrix/88188 "2022-10-04T13:17:53Z")

</div>

Is there a function in Julia to return(extract) the sub-matrices (or their indexes) from Block Diagonal Matrix similar to here Extract matrices from a Block Diagonal Matrix?? For example, I need to return A\[1:3,1:3\], A\[…

---

## [How do you make an arbitrarily nested for loop?](https://discourse.julialang.org/t/how-do-you-make-an-arbitrarily-nested-for-loop/88225)

<div class="topic-metadata">

**Author:** [@AwesomeQuest](https://discourse.julialang.org/u/AwesomeQuest)\
**Replies:** 2\
**Last updated:** [October 4, 2022, 12:39pm UTC](https://discourse.julialang.org/t/how-do-you-make-an-arbitrarily-nested-for-loop/88225 "2022-10-04T12:39:10Z")

</div>

Say you have an array of ranges rngs = \[10:-1:0, 10:-4:2, 10:-3:1\]. How would you make a nested loop equivalent to inds = zeros(length(rngs)) for inds\[1\] in rngs\[1\], inds\[2\] in rngs\[2\], inds\[3\] in rngs\[3\] But for an a…

---

## [Questions about XAM.jl](https://discourse.julialang.org/t/questions-about-xam-jl/86665)

<div class="topic-metadata">

**Author:** [@zhangchunyong](https://discourse.julialang.org/u/zhangchunyong)\
**Replies:** 8\
**Last updated:** [October 4, 2022, 2:12am UTC](https://discourse.julialang.org/t/questions-about-xam-jl/86665 "2022-10-04T02:12:51Z")

</div>

When I used Julia’s package called XAM.jl,I was convinced that it was extraordinarily fast. But when I aligned the reads to the genome and then generated a bam file, how do I restore sequenced reads to undeleted and un…

---

## [\[Translating\] from Pascal to Julia](https://discourse.julialang.org/t/translating-from-pascal-to-julia/88184)

<div class="topic-metadata">

**Author:** [@fabbius69](https://discourse.julialang.org/u/fabbius69)\
**Replies:** 24\
**Last updated:** [October 4, 2022, 11:34am UTC](https://discourse.julialang.org/t/translating-from-pascal-to-julia/88184 "2022-10-04T11:34:06Z")

</div>

is it possible to have similar code in julia? thanks “type lo=array\[1…5,1…10\]of smallint; nom=string\[25\]; lot=record num:lo; ind:smallint; anno:smallint; mese:string\[15\]; end; fi=file of lot; var f2,f3:fi;”

---

## [Makie - more idiomatic way to link x-axes of columns and y-axes of rows](https://discourse.julialang.org/t/makie-more-idiomatic-way-to-link-x-axes-of-columns-and-y-axes-of-rows/88224)

<div class="topic-metadata">

**Author:** [@cripcate](https://discourse.julialang.org/u/cripcate)\
**Replies:** 0\
**Last updated:** [October 4, 2022, 11:26am UTC](https://discourse.julialang.org/t/makie-more-idiomatic-way-to-link-x-axes-of-columns-and-y-axes-of-rows/88224 "2022-10-04T11:26:37Z")

</div>

Hello everyone. I am trying to create a grid of axes, plot some data into each of them, and then link all the y-axes of each row of plots and all x-axes of each column of plots. The reason for this is that I want to plo…

---

## [Too many allocations for this couple of small functions](https://discourse.julialang.org/t/too-many-allocations-for-this-couple-of-small-functions/88170)

<div class="topic-metadata">

**Author:** [@daviddoij](https://discourse.julialang.org/u/daviddoij)\
**Replies:** 4\
**Last updated:** [October 4, 2022, 9:00am UTC](https://discourse.julialang.org/t/too-many-allocations-for-this-couple-of-small-functions/88170 "2022-10-04T09:00:49Z")

</div>

Hi there, newbie here solved Project Euler #4 problem with Julia and, althogh the timing is good, I got too many allocations (around 100k) for such a small program. I’ve tried with explicit types in the variables and d…

---

## [LiDAR point cloud projects?](https://discourse.julialang.org/t/lidar-point-cloud-projects/22087)

<div class="topic-metadata">

**Author:** [@Crghilardi](https://discourse.julialang.org/u/Crghilardi)\
**Replies:** 17\
**Last updated:** [October 4, 2022, 8:18am UTC](https://discourse.julialang.org/t/lidar-point-cloud-projects/22087 "2022-10-04T08:18:30Z")

</div>

I wanted to start a discussion to find others that are using Julia for LiDAR point cloud analysis and what the current state of packages is. To summarize my findings so far: LasIO and LazIO seem to be the most current…

---

## [On arrays with inline elements (vs pointer indirection)](https://discourse.julialang.org/t/on-arrays-with-inline-elements-vs-pointer-indirection/88211)

<div class="topic-metadata">

**Author:** [@torrance](https://discourse.julialang.org/u/torrance)\
**Replies:** 6\
**Last updated:** [October 4, 2022, 8:03am UTC](https://discourse.julialang.org/t/on-arrays-with-inline-elements-vs-pointer-indirection/88211 "2022-10-04T08:03:48Z")

</div>

I was answering another question here and realised how shaky my knowledge of Julia array storage is, regarding inline storage. Somewhere (?) I read that if your struct is isbits and immutable, it can be stored directly …

---

## [Unable to run an example code using DataStructures.jl](https://discourse.julialang.org/t/unable-to-run-an-example-code-using-datastructures-jl/88204)

<div class="topic-metadata">

**Author:** [@Alejandro\_Quiaro\_San](https://discourse.julialang.org/u/Alejandro_Quiaro_San)\
**Replies:** 1\
**Last updated:** [October 4, 2022, 7:54am UTC](https://discourse.julialang.org/t/unable-to-run-an-example-code-using-datastructures-jl/88204 "2022-10-04T07:54:27Z")

</div>

I am trying to run a simple example code from the DataStructures.jl package but I get an error. data = collect(enumerate(\["foo", "bar", "baz"\])) h1 = BinaryHeap(data) # Standard lexicographic ordering for tuples first(…

---

## [Vectors with elements of same type but different parametric type](https://discourse.julialang.org/t/vectors-with-elements-of-same-type-but-different-parametric-type/88190)

<div class="topic-metadata">

**Author:** [@DanielVandH](https://discourse.julialang.org/u/DanielVandH)\
**Replies:** 5\
**Last updated:** [October 4, 2022, 7:19am UTC](https://discourse.julialang.org/t/vectors-with-elements-of-same-type-but-different-parametric-type/88190 "2022-10-04T07:19:20Z")

</div>

I need to work with a set of points that might each have a different type. Consider as a rough example: abstract type AbstractLabel end struct LabelA \<: AbstractLabel end struct LabelB \<: AbstractLabel end struct LabelC…

---

## [Julia 1.6.7 LTS Pkg.add("Gtk") on Windows 10](https://discourse.julialang.org/t/julia-1-6-7-lts-pkg-add-gtk-on-windows-10/88213)

<div class="topic-metadata">

**Author:** [@Pilbum](https://discourse.julialang.org/u/Pilbum)\
**Replies:** 0\
**Last updated:** [October 4, 2022, 7:18am UTC](https://discourse.julialang.org/t/julia-1-6-7-lts-pkg-add-gtk-on-windows-10/88213 "2022-10-04T07:18:56Z")

</div>

I am trying to install Gtk, but got an error message as below. ERROR: Unable to automatically install ‘adwaita\_icon\_theme’ from ‘C:\\Users\\me.julia\\packages\\adwaita\_icon\_theme\_jll\\YjPmX\\Artifacts.toml’ Stacktrace: I am…

---

## [Data Scientist in Earth System Science](https://discourse.julialang.org/t/data-scientist-in-earth-system-science/88210)

<div class="topic-metadata">

**Author:** [@fabiangans](https://discourse.julialang.org/u/fabiangans)\
**Replies:** 0\
**Last updated:** [October 4, 2022, 6:45am UTC](https://discourse.julialang.org/t/data-scientist-in-earth-system-science/88210 "2022-10-04T06:45:29Z")

</div>

I want to share a job opportunity based in Jena, Germany. https://www.bgc-jena.mpg.de/en/career/38-2022 A nice opportunity for Julia enthusiasts, since most of the day-to-day work will be coding Julia. Feel free to rea…

---

## [Fail to call for Matlab 2022b through "MATLAB.jl"](https://discourse.julialang.org/t/fail-to-call-for-matlab-2022b-through-matlab-jl/88200)

<div class="topic-metadata">

**Author:** [@lionisxn](https://discourse.julialang.org/u/lionisxn)\
**Replies:** 0\
**Last updated:** [October 4, 2022, 2:07am UTC](https://discourse.julialang.org/t/fail-to-call-for-matlab-2022b-through-matlab-jl/88200 "2022-10-04T02:07:53Z")

</div>

I often call for matlab in Julia for some comparison purposes. Everything goes well in MATLAB 2021B. However, it crashed after I upgraded MATLAB to the new version of 2022b in Windows 11. I have rebuilt the package in Ju…

---

## [Optimising function for broadcast](https://discourse.julialang.org/t/optimising-function-for-broadcast/87918)

<div class="topic-metadata">

**Author:** [@Lincoln\_Hannah](https://discourse.julialang.org/u/Lincoln_Hannah)\
**Replies:** 9\
**Last updated:** [October 4, 2022, 4:25am UTC](https://discourse.julialang.org/t/optimising-function-for-broadcast/87918 "2022-10-04T04:25:29Z")

</div>

function f( a, b ) c = 2a b + c end f.( 1, 1:100 ) I believe c = 2a will be calculated 100 times (every iteration of the broadcast). Is there a way to have c evaluated once and cached ? without r…

---

## [ANN: New package SnoopPrecompile](https://discourse.julialang.org/t/ann-new-package-snoopprecompile/84778)

<div class="topic-metadata">

**Author:** [@tim.holy](https://discourse.julialang.org/u/tim.holy)\
**Replies:** 32\
**Last updated:** [September 30, 2022, 3:10pm UTC](https://discourse.julialang.org/t/ann-new-package-snoopprecompile/84778 "2022-09-30T15:10:21Z")

</div>

EDIT: SnoopPrecompile has been replaced by PrecompileTools. I’m pleased to announce the availability of SnoopPrecompile, a new package that can help reduce latency particularly on Julia 1.8 and higher. The concept of th…

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

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