# Latest

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

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

**Page:** 559

---

## [OrdinaryDiffEq solve: "TypeError in setfield!" when using MVector](https://discourse.julialang.org/t/ordinarydiffeq-solve-typeerror-in-setfield-when-using-mvector/105960)

<div class="topic-metadata">

**Author:** [@laikq](https://discourse.julialang.org/u/laikq)\
**Replies:** 0\
**Last updated:** [November 8, 2023, 4:20pm UTC](https://discourse.julialang.org/t/ordinarydiffeq-solve-typeerror-in-setfield-when-using-mvector/105960 "2023-11-08T16:20:53Z")

</div>

I get an error TypeError: in setfield!, expected Tuple{LinearAlgebra.LU{Float64, Matrix{Float64}, Vector{Int64}}, Base.RefValue{Int64}}, got a value of type Tuple{LinearAlgebra.LU{Float64, StaticArraysCore.MMatrix{4, 4…

---

## [Help fixing a huge amount of rerecompilation time when using ODBC.jl](https://discourse.julialang.org/t/help-fixing-a-huge-amount-of-rerecompilation-time-when-using-odbc-jl/105946)

<div class="topic-metadata">

**Author:** [@Ronis\_BR](https://discourse.julialang.org/u/Ronis_BR)\
**Replies:** 6\
**Last updated:** [November 8, 2023, 6:06pm UTC](https://discourse.julialang.org/t/help-fixing-a-huge-amount-of-rerecompilation-time-when-using-odbc-jl/105946 "2023-11-08T18:06:17Z")

</div>

Hi! We use everyday the ODBC.jl package to fetch satellite telemetries from our database and perform some automatic analysis. However, since Julia v1.9, we are experiencing a huge precompilation time. The first SQL exec…

---

## [Smith Normal Form?](https://discourse.julialang.org/t/smith-normal-form/105477)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 3\
**Last updated:** [November 8, 2023, 5:44pm UTC](https://discourse.julialang.org/t/smith-normal-form/105477 "2023-11-08T17:44:40Z")

</div>

Does anyone have knowledge of packages for Smith Normal Form (e.g., SmithNormalForm.jl)? I did a simple test of SmithNormalForm.jl: Apart from the example in the GitHub page,… function smith seems to work: rectangula…

---

## [How to determine if a point given is within a line (two points)](https://discourse.julialang.org/t/how-to-determine-if-a-point-given-is-within-a-line-two-points/105896)

<div class="topic-metadata">

**Author:** [@Chamika\_Kasun](https://discourse.julialang.org/u/Chamika_Kasun)\
**Replies:** 12\
**Last updated:** [November 8, 2023, 5:41pm UTC](https://discourse.julialang.org/t/how-to-determine-if-a-point-given-is-within-a-line-two-points/105896 "2023-11-08T17:41:27Z")

</div>

I have got a line with two points and a single point. I need to check whether the single point is between the line (i.e. between the two points) given, including the two points given. How do I do that using Julia. …

---

## [Scope when using the if-else-end](https://discourse.julialang.org/t/scope-when-using-the-if-else-end/105920)

<div class="topic-metadata">

**Author:** [@atBNE](https://discourse.julialang.org/u/atBNE)\
**Replies:** 4\
**Last updated:** [November 8, 2023, 4:48pm UTC](https://discourse.julialang.org/t/scope-when-using-the-if-else-end/105920 "2023-11-08T16:48:52Z")

</div>

This program fails. Knowing that “if… does not introduce a new scope”, how to repair it? a = 1 while a \>0 local a print("n, 1=next "); a = parse(Int, readline() ) if a == 1 u = u + 1 # this line #7 is f…

---

## [Boundary conditions (?) in MethodOfLines.jl PDE](https://discourse.julialang.org/t/boundary-conditions-in-methodoflines-jl-pde/91725)

<div class="topic-metadata">

**Author:** [@sdwfrost](https://discourse.julialang.org/u/sdwfrost)\
**Replies:** 23\
**Last updated:** [November 8, 2023, 4:36pm UTC](https://discourse.julialang.org/t/boundary-conditions-in-methodoflines-jl-pde/91725 "2023-11-08T16:36:14Z")

</div>

Hi everyone, I’m trying out the new capability to deal with integrals in MethodOfLines.jl (in the new main, v0.7.6). I’m trying to simply expand an ODE example into a PDE. For those of you interested, the ODE is a simpl…

---

## [Efficient computation of largest eigenvalue](https://discourse.julialang.org/t/efficient-computation-of-largest-eigenvalue/105933)

<div class="topic-metadata">

**Author:** [@VictorSeven](https://discourse.julialang.org/u/VictorSeven)\
**Replies:** 9\
**Last updated:** [November 8, 2023, 3:48pm UTC](https://discourse.julialang.org/t/efficient-computation-of-largest-eigenvalue/105933 "2023-11-08T15:48:20Z")

</div>

For some numerical simulations I run, I need to construct a matrix and obtain its leading eigenvalue. I will make use of both of them. I was using the LinearAlgebra package, and computing the leading eigenvalue as maxim…

---

## [Images.jl spacing, orientation](https://discourse.julialang.org/t/images-jl-spacing-orientation/105955)

<div class="topic-metadata">

**Author:** [@Jakub\_Mitura](https://discourse.julialang.org/u/Jakub_Mitura)\
**Replies:** 3\
**Last updated:** [November 8, 2023, 3:41pm UTC](https://discourse.julialang.org/t/images-jl-spacing-orientation/105955 "2023-11-08T15:41:41Z")

</div>

Hello in the Quickstart of the Images.jl there is a sentence The AxisArrays package supports rich and efficient operations on such arrays, and can be useful to keep track of not just pixel spacing but the orientation c…

---

## [Retrieve element from a set](https://discourse.julialang.org/t/retrieve-element-from-a-set/105658)

<div class="topic-metadata">

**Author:** [@odddot](https://discourse.julialang.org/u/odddot)\
**Replies:** 9\
**Last updated:** [November 8, 2023, 3:38pm UTC](https://discourse.julialang.org/t/retrieve-element-from-a-set/105658 "2023-11-08T15:38:51Z")

</div>

Hi, I want to do something that may be impossible to do. It is not very important (I have possible workarounds), but I am curious… I have a struct that represents an edge, defined as: struct Edge{I\<Integer} e::Tup…

---

## [Is a parametric Collection trait useful?](https://discourse.julialang.org/t/is-a-parametric-collection-trait-useful/105941)

<div class="topic-metadata">

**Author:** [@Sebastiaan](https://discourse.julialang.org/u/Sebastiaan)\
**Replies:** 5\
**Last updated:** [November 8, 2023, 3:29pm UTC](https://discourse.julialang.org/t/is-a-parametric-collection-trait-useful/105941 "2023-11-08T15:29:49Z")

</div>

I’ve been writing Julia for a while, and I find that I often want to have a function dispatch on the type that’s in a collection, where I don’t really care what type of collection is used, be it a set or a vector or a tu…

---

## [How to learn Julia for Bioinformatics?](https://discourse.julialang.org/t/how-to-learn-julia-for-bioinformatics/105870)

<div class="topic-metadata">

**Author:** [@Mohit](https://discourse.julialang.org/u/Mohit)\
**Replies:** 7\
**Last updated:** [November 8, 2023, 3:24pm UTC](https://discourse.julialang.org/t/how-to-learn-julia-for-bioinformatics/105870 "2023-11-08T15:24:10Z")

</div>

Hello ; I have did my masters in Bioinformatics but so moved to the experimental Neuroscience 12 years ago. I would like to return back to Bioinformatics and thought that it would be great to start learning modern Bioi…

---

## [How to display project dependencies in a tree?](https://discourse.julialang.org/t/how-to-display-project-dependencies-in-a-tree/79567)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 11\
**Last updated:** [November 8, 2023, 3:17pm UTC](https://discourse.julialang.org/t/how-to-display-project-dependencies-in-a-tree/79567 "2023-11-08T15:17:10Z")

</div>

Using the package manager I can display the direct dependencies of my package: (KiteModels) pkg\> st Project KiteModels v0.2.2 Status \`~/repos/KiteModels/Project.toml\` \[39dd38d3\] Dierckx v0.5.2 \[ffbed154\] …

---

## [Last slots available for "GPU programming with Julia" course with Tim Besard and Sam Omlin](https://discourse.julialang.org/t/last-slots-available-for-gpu-programming-with-julia-course-with-tim-besard-and-sam-omlin/105953)

<div class="topic-metadata">

**Author:** [@samo](https://discourse.julialang.org/u/samo)\
**Replies:** 0\
**Last updated:** [November 8, 2023, 2:41pm UTC](https://discourse.julialang.org/t/last-slots-available-for-gpu-programming-with-julia-course-with-tim-besard-and-sam-omlin/105953 "2023-11-08T14:41:08Z")

</div>

---

## [Last slots available for "GPU programming with Julia" course with Tim Besard and Samuel Omlin](https://discourse.julialang.org/t/last-slots-available-for-gpu-programming-with-julia-course-with-tim-besard-and-samuel-omlin/105952)

<div class="topic-metadata">

**Author:** [@samo](https://discourse.julialang.org/u/samo)\
**Replies:** 0\
**Last updated:** [November 8, 2023, 2:35pm UTC](https://discourse.julialang.org/t/last-slots-available-for-gpu-programming-with-julia-course-with-tim-besard-and-samuel-omlin/105952 "2023-11-08T14:35:32Z")

</div>

Last slots available for “GPU programming with Julia” course with Tim Besard and myself at the Swiss National Supercomputing Centre (registration deadline Monday, November 13):

---

## [PhD Position in Climate, Clouds, Causal Graphs with Julia](https://discourse.julialang.org/t/phd-position-in-climate-clouds-causal-graphs-with-julia/105942)

<div class="topic-metadata">

**Author:** [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Replies:** 0\
**Last updated:** [November 8, 2023, 12:50pm UTC](https://discourse.julialang.org/t/phd-position-in-climate-clouds-causal-graphs-with-julia/105942 "2023-11-08T12:50:09Z")

</div>

Hi all, I’d like to advertise here my first ever funded PhD position. Please feel free to forward it to interested students that have some background in one of: climate, timeseries analysis, nonlinear dynamics, and prog…

---

## [Trying to pass a variable to @df df plot(variable,](https://discourse.julialang.org/t/trying-to-pass-a-variable-to-df-df-plot-variable/105906)

<div class="topic-metadata">

**Author:** [@stefkuypers](https://discourse.julialang.org/u/stefkuypers)\
**Replies:** 3\
**Last updated:** [November 8, 2023, 8:55am UTC](https://discourse.julialang.org/t/trying-to-pass-a-variable-to-df-df-plot-variable/105906 "2023-11-08T08:55:04Z")

</div>

I’m trying to get the following code working but can’t figure out what I need to do. function plot\_type\_wealth(dataframe) type\_vector = \[:Supplier, :Consumer\] label\_vector = \["Supplier" "Consumer"\] @df data…

---

## [Makie: Coordinates of objects in the "scene" coordinates?](https://discourse.julialang.org/t/makie-coordinates-of-objects-in-the-scene-coordinates/105907)

<div class="topic-metadata">

**Author:** [@ryofurue](https://discourse.julialang.org/u/ryofurue)\
**Replies:** 2\
**Last updated:** [November 8, 2023, 7:42am UTC](https://discourse.julialang.org/t/makie-coordinates-of-objects-in-the-scene-coordinates/105907 "2023-11-08T07:42:43Z")

</div>

This is a continuation of the thread that I link at the end of this message. There I went off topic and so I thought it’s wiser to start a new thread instead of posting further questions there. My question is, how do y…

---

## [Interrupting wait(Threads.Event())](https://discourse.julialang.org/t/interrupting-wait-threads-event/105047)

<div class="topic-metadata">

**Author:** [@ettersi](https://discourse.julialang.org/u/ettersi)\
**Replies:** 14\
**Last updated:** [November 8, 2023, 6:41am UTC](https://discourse.julialang.org/t/interrupting-wait-threads-event/105047 "2023-11-08T06:41:18Z")

</div>

I want to wait for a Threads.Event() for at most 1 second, then I want to move on regardless of whether the event was notified or not. The following works, but it leaks a Task and a dummy event every time I do this. eve…

---

## [Tons of nodes in the Policy Graph, SDDP.jl package](https://discourse.julialang.org/t/tons-of-nodes-in-the-policy-graph-sddp-jl-package/103426)

<div class="topic-metadata">

**Author:** [@Sorooshsa](https://discourse.julialang.org/u/Sorooshsa)\
**Replies:** 20\
**Last updated:** [November 8, 2023, 1:33am UTC](https://discourse.julialang.org/t/tons-of-nodes-in-the-policy-graph-sddp-jl-package/103426 "2023-11-08T01:33:24Z")

</div>

Hello everyone, Lately, I’ve been working on a hydropower expansion problem using the SDDP method and the SDDP.jl tools. Here are the most important things to understand about this problem: The horizon plan is for 5 …

---

## [Deps.jl fie is missing when installing GMT julia package](https://discourse.julialang.org/t/deps-jl-fie-is-missing-when-installing-gmt-julia-package/105803)

<div class="topic-metadata">

**Author:** [@Chamika\_Kasun](https://discourse.julialang.org/u/Chamika_Kasun)\
**Replies:** 17\
**Last updated:** [November 8, 2023, 12:36am UTC](https://discourse.julialang.org/t/deps-jl-fie-is-missing-when-installing-gmt-julia-package/105803 "2023-11-08T00:36:37Z")

</div>

I’m getting following error, when I tried to install the GMT package into global packages. Failed to precompile GMT \[5752ebe1-31b9-557e-87aa-f909b540aa54\] to /Users/cbandara/.julia/compiled/v1.6/GMT/jl\_rcWYt7. ERROR: Lo…

---

## [How to plot a 2D array as in Python?](https://discourse.julialang.org/t/how-to-plot-a-2d-array-as-in-python/74324)

<div class="topic-metadata">

**Author:** [@Shivam\_Jha](https://discourse.julialang.org/u/Shivam_Jha)\
**Replies:** 2\
**Last updated:** [November 8, 2023, 12:26am UTC](https://discourse.julialang.org/t/how-to-plot-a-2d-array-as-in-python/74324 "2023-11-08T00:26:27Z")

</div>

import matplotlib.pyplot as plt import numpy as np N = 64 # resolution N x 3N boxsizeX = 0.5 boxsizeY = 1.5 dx = boxsizeX / N vol = dx\*\*2 xlin = np.linspace(0.5\*dx, boxs…

---

## [Slow L-BFGS code](https://discourse.julialang.org/t/slow-l-bfgs-code/105917)

<div class="topic-metadata">

**Author:** [@yhuang](https://discourse.julialang.org/u/yhuang)\
**Replies:** 5\
**Last updated:** [November 7, 2023, 10:08pm UTC](https://discourse.julialang.org/t/slow-l-bfgs-code/105917 "2023-11-07T22:08:38Z")

</div>

I’m customizing Burer-Monteiro method on a specific problem, which involves solving many subproblems using L-BFGS. However, I noticed that my L-BFGS runs slow. The critical operation of computing the descent direction i…

---

## [Syntax for dispatching on subtypes](https://discourse.julialang.org/t/syntax-for-dispatching-on-subtypes/105871)

<div class="topic-metadata">

**Author:** [@f.ij](https://discourse.julialang.org/u/f.ij)\
**Replies:** 10\
**Last updated:** [November 7, 2023, 10:30pm UTC](https://discourse.julialang.org/t/syntax-for-dispatching-on-subtypes/105871 "2023-11-07T22:30:51Z")

</div>

If I have a type with multiple subtypes, and I want to dispatch on one of the types I usually type: struct Foo{A,B,...} ... end function somefunc(f::F{A, SomeSubtype,C,...}) where {A,C,...} ... end This becomes …

---

## [\[ANN\] PkgHelpers: Freeze or lower\_bound your package versions](https://discourse.julialang.org/t/ann-pkghelpers-freeze-or-lower-bound-your-package-versions/105831)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 19\
**Last updated:** [November 7, 2023, 9:52pm UTC](https://discourse.julialang.org/t/ann-pkghelpers-freeze-or-lower-bound-your-package-versions/105831 "2023-11-07T21:52:42Z")

</div>

I created a package that makes reproducable research easier. It provides the functions freeze(Pkg) and lower\_bound(), that adds the current versions of your environment to your Project.toml file. See: PkgHelpers It com…

---

## [Should \`conj\` always materialize the result?](https://discourse.julialang.org/t/should-conj-always-materialize-the-result/105911)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 2\
**Last updated:** [November 7, 2023, 9:51pm UTC](https://discourse.julialang.org/t/should-conj-always-materialize-the-result/105911 "2023-11-07T21:51:42Z")

</div>

The docstring for conj states that conj(A::AbstractArray) Return an array containing the complex conjugate of each entry in array A. Equivalent to \`conj.(A)\`, except that when \`eltype(A) \<: Real\` \`A\` is returned w…

---

## [Constructing Markov Transition Frequency Matrix with DataFrames](https://discourse.julialang.org/t/constructing-markov-transition-frequency-matrix-with-dataframes/54890)

<div class="topic-metadata">

**Author:** [@samerb](https://discourse.julialang.org/u/samerb)\
**Replies:** 7\
**Last updated:** [November 7, 2023, 9:47pm UTC](https://discourse.julialang.org/t/constructing-markov-transition-frequency-matrix-with-dataframes/54890 "2023-11-07T21:47:43Z")

</div>

I am cross-posting this question from StackOverflow since that seems a bit slow. I want to use Julia DataFrames to construct a 3x3 Markov transition matrix i.e. a frequency matrix that tells me the likelihood of transit…

---

## [How to efficiently find columns of the matrix which are the same?](https://discourse.julialang.org/t/how-to-efficiently-find-columns-of-the-matrix-which-are-the-same/105873)

<div class="topic-metadata">

**Author:** [@dgsob](https://discourse.julialang.org/u/dgsob)\
**Replies:** 10\
**Last updated:** [November 7, 2023, 9:39pm UTC](https://discourse.julialang.org/t/how-to-efficiently-find-columns-of-the-matrix-which-are-the-same/105873 "2023-11-07T21:39:24Z")

</div>

Hi all, I was trying to optimize my naive code I wrote for an algorithm I’m working on, and I’ve found this part takes up the most runtime: num\_of\_the\_same\_columns = 0 num\_of\_columns = size(matrix, 2) for column\_i…

---

## [Shortcut to type |\>?](https://discourse.julialang.org/t/shortcut-to-type/47012)

<div class="topic-metadata">

**Author:** [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)\
**Replies:** 11\
**Last updated:** [November 7, 2023, 8:53pm UTC](https://discourse.julialang.org/t/shortcut-to-type/47012 "2023-11-07T20:53:01Z")

</div>

The piping operator |\> is very useful, especially when working in the REPL. However I do not find it convenient to type, it requires some finger gymnastic and it’s not very fast. Maybe it is the case because I have a fre…

---

## [Convert a non-allocating distance transform algorithm to GPU using KernelAbstractions.jl](https://discourse.julialang.org/t/convert-a-non-allocating-distance-transform-algorithm-to-gpu-using-kernelabstractions-jl/105726)

<div class="topic-metadata">

**Author:** [@Dale\_James\_Black](https://discourse.julialang.org/u/Dale_James_Black)\
**Replies:** 7\
**Last updated:** [November 7, 2023, 7:21pm UTC](https://discourse.julialang.org/t/convert-a-non-allocating-distance-transform-algorithm-to-gpu-using-kernelabstractions-jl/105726 "2023-11-07T19:21:33Z")

</div>

Hello. I have been hacking away at this for a few weeks now and still can’t figure out what is going on. I have a non-allocating 1D distance transform (Felzenswalb algorithm) that is easy to parallelize, as you can see …

---

## [Function inside struct allocates when referenced](https://discourse.julialang.org/t/function-inside-struct-allocates-when-referenced/105785)

<div class="topic-metadata">

**Author:** [@izod2](https://discourse.julialang.org/u/izod2)\
**Replies:** 25\
**Last updated:** [November 7, 2023, 4:41pm UTC](https://discourse.julialang.org/t/function-inside-struct-allocates-when-referenced/105785 "2023-11-07T16:41:16Z")

</div>

In the example below, if box1 is passed as an argument to calcA, then calling its function box1.func leads to allocation. However, if box1.func is passed as a direct argument to calcB, then there is no allocation. Can …

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

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