# Latest

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

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

**Page:** 656

---

## [Compile-time type filtering from a tuple - is it possible?](https://discourse.julialang.org/t/compile-time-type-filtering-from-a-tuple-is-it-possible/101090)

<div class="topic-metadata">

**Author:** [@anicusan](https://discourse.julialang.org/u/anicusan)\
**Replies:** 5\
**Last updated:** [July 3, 2023, 4:29pm UTC](https://discourse.julialang.org/t/compile-time-type-filtering-from-a-tuple-is-it-possible/101090 "2023-07-03T16:29:39Z")

</div>

Hi all, I am developing a library where I would like to split some structs into, say, two categories based on their type; this is better shown as a minimal example: abstract type Vowel end abstract type Consonant end …

---

## [How to do in-place least square \`\\\`?](https://discourse.julialang.org/t/how-to-do-in-place-least-square/101131)

<div class="topic-metadata">

**Author:** [@yhchang96](https://discourse.julialang.org/u/yhchang96)\
**Replies:** 5\
**Last updated:** [July 3, 2023, 4:09pm UTC](https://discourse.julialang.org/t/how-to-do-in-place-least-square/101131 "2023-07-03T16:09:20Z")

</div>

Suppose I want to solve the least square problem, I can just do x = A \\ b where A is a ‘tall’ matrix. Is there an in-place version for this? If I’m not mistaken it just performs a QR factorization behind the scene to sol…

---

## [How to use an anonymous function with juliacall in python](https://discourse.julialang.org/t/how-to-use-an-anonymous-function-with-juliacall-in-python/101132)

<div class="topic-metadata">

**Author:** [@vrige\_me](https://discourse.julialang.org/u/vrige_me)\
**Replies:** 6\
**Last updated:** [July 3, 2023, 3:50pm UTC](https://discourse.julialang.org/t/how-to-use-an-anonymous-function-with-juliacall-in-python/101132 "2023-07-03T15:50:56Z")

</div>

I am new to julia and juliacall and i would like to use the following code in julia in python exploiting juliacall: sort(collect(countmap(x)), by = tuple -\> last(tuple), rev=true) In my code i didn’t know how to conver…

---

## [R package JuliaCall does not work with Julia v1.9.1](https://discourse.julialang.org/t/r-package-juliacall-does-not-work-with-julia-v1-9-1/101134)

<div class="topic-metadata">

**Author:** [@\_stla](https://discourse.julialang.org/u/_stla)\
**Replies:** 3\
**Last updated:** [July 3, 2023, 3:44pm UTC](https://discourse.julialang.org/t/r-package-juliacall-does-not-work-with-julia-v1-9-1/101134 "2023-07-03T15:44:32Z")

</div>

Hello, In order to use the R package JuliaCall, one firstly had to run the command julia\_setup() in R. This command executes some Julia scripts. But it does not work. We get this error: julia\> ENV\["R\_HOME"\] = "C:/Users…

---

## [Pendulum with dry friction](https://discourse.julialang.org/t/pendulum-with-dry-friction/101123)

<div class="topic-metadata">

**Author:** [@lieskjur](https://discourse.julialang.org/u/lieskjur)\
**Replies:** 1\
**Last updated:** [July 3, 2023, 3:41pm UTC](https://discourse.julialang.org/t/pendulum-with-dry-friction/101123 "2023-07-03T15:41:02Z")

</div>

Hi, I have decided to implement dry friction into one of my simulation models. As a first step, I created a simple example of a pendulum that I would like to share. I am already using DifferentialEquations.jl for my pr…

---

## [Need a function similar to python struct.unpack](https://discourse.julialang.org/t/need-a-function-similar-to-python-struct-unpack/100991)

<div class="topic-metadata">

**Author:** [@jjgomezcadenas](https://discourse.julialang.org/u/jjgomezcadenas)\
**Replies:** 12\
**Last updated:** [July 3, 2023, 3:15pm UTC](https://discourse.julialang.org/t/need-a-function-similar-to-python-struct-unpack/100991 "2023-07-03T15:15:23Z")

</div>

Hello everybody. I need to read binary file from a specific module (HydraHarp) which comes with python and matlab codes for decoding the file. The python code uses extensively the struct.unapck functions. For example: …

---

## [MethodError in 1D Lennard-Jones fluid simulation](https://discourse.julialang.org/t/methoderror-in-1d-lennard-jones-fluid-simulation/101126)

<div class="topic-metadata">

**Author:** [@rolenzo](https://discourse.julialang.org/u/rolenzo)\
**Replies:** 2\
**Last updated:** [July 3, 2023, 2:58pm UTC](https://discourse.julialang.org/t/methoderror-in-1d-lennard-jones-fluid-simulation/101126 "2023-07-03T14:58:08Z")

</div>

Hello people, I’m super new to Julia (\*) and as a starter I am simulating a 1D Lennard-Jones fluid. To do so I’m integrating Newton’s equations with periodic boundary conditions using second order velocity verlet. I tes…

---

## [FINAL DAY: Complete 2023 Julia User & Developer Survey today, Monday July 3](https://discourse.julialang.org/t/final-day-complete-2023-julia-user-developer-survey-today-monday-july-3/101130)

<div class="topic-metadata">

**Author:** [@ahclaster](https://discourse.julialang.org/u/ahclaster)\
**Replies:** 0\
**Last updated:** [July 3, 2023, 2:39pm UTC](https://discourse.julialang.org/t/final-day-complete-2023-julia-user-developer-survey-today-monday-july-3/101130 "2023-07-03T14:39:42Z")

</div>

Today is the last day to complete the 2023 Julia User & Developer Survey. Please click here to complete.

---

## [Gitlab ci cache julia packages](https://discourse.julialang.org/t/gitlab-ci-cache-julia-packages/8639)

<div class="topic-metadata">

**Author:** [@Wikunia](https://discourse.julialang.org/u/Wikunia)\
**Replies:** 1\
**Last updated:** [July 3, 2023, 2:36pm UTC](https://discourse.julialang.org/t/gitlab-ci-cache-julia-packages/8639 "2023-07-03T14:36:20Z")

</div>

I have my own private gitlab server but probably this is general gitlab stuff. How can I cache my julia packages which are dependencies of the package I want to test? If I run Pkg.test("PkgName") everything gets saved …

---

## [ForwardDiff on CDF for Beta distribution](https://discourse.julialang.org/t/forwarddiff-on-cdf-for-beta-distribution/101110)

<div class="topic-metadata">

**Author:** [@matvil](https://discourse.julialang.org/u/matvil)\
**Replies:** 3\
**Last updated:** [July 3, 2023, 1:44pm UTC](https://discourse.julialang.org/t/forwarddiff-on-cdf-for-beta-distribution/101110 "2023-07-03T13:44:04Z")

</div>

I am trying to autodiff a function that depends on the CDF for a Beta distribution, but I get an error since this function depends on rmath, which only accepts Float64, not Reals, which I understand is required for Dual …

---

## [Reduce Interpolating data size for initial guess](https://discourse.julialang.org/t/reduce-interpolating-data-size-for-initial-guess/101116)

<div class="topic-metadata">

**Author:** [@PatrickeTownsend](https://discourse.julialang.org/u/PatrickeTownsend)\
**Replies:** 3\
**Last updated:** [July 3, 2023, 1:00pm UTC](https://discourse.julialang.org/t/reduce-interpolating-data-size-for-initial-guess/101116 "2023-07-03T13:00:03Z")

</div>

Hello, I hope someone can help me with this. I have a 1x721 data vector with initial guesses, but i need to adjust it to just 200 nodes, is it possible to adjust the vector size by interpolating and reducing its size? …

---

## [Convert Packed Image Format into Planar Format without Dependency](https://discourse.julialang.org/t/convert-packed-image-format-into-planar-format-without-dependency/100784)

<div class="topic-metadata">

**Author:** [@RoyiAvital](https://discourse.julialang.org/u/RoyiAvital)\
**Replies:** 7\
**Last updated:** [July 3, 2023, 1:03pm UTC](https://discourse.julialang.org/t/convert-packed-image-format-into-planar-format-without-dependency/100784 "2023-07-03T13:03:01Z")

</div>

I am loading images using FileIO.jl. I want to convert the output into a Planar Format of the appropriate element type. I want to achieve this without any farther dependencies, so channelview() as in Most idomatic way …

---

## [\[ANN\] SatelliteToolbox.jl v0.11](https://discourse.julialang.org/t/ann-satellitetoolbox-jl-v0-11/101122)

<div class="topic-metadata">

**Author:** [@Ronis\_BR](https://discourse.julialang.org/u/Ronis_BR)\
**Replies:** 0\
**Last updated:** [July 3, 2023, 12:49pm UTC](https://discourse.julialang.org/t/ann-satellitetoolbox-jl-v0-11/101122 "2023-07-03T12:49:30Z")

</div>

Hi everyone! I tagged v0.11 of SatelliteToolbox.jl. This version provides the biggest modification in the ecosystem since its launch. Now that Amazonia-1 is working perfectly, I had a time window to perform breaking cha…

---

## [Number of primes below a given number](https://discourse.julialang.org/t/number-of-primes-below-a-given-number/58709)

<div class="topic-metadata">

**Author:** [@HexSpin](https://discourse.julialang.org/u/HexSpin)\
**Replies:** 51\
**Last updated:** [July 3, 2023, 11:39am UTC](https://discourse.julialang.org/t/number-of-primes-below-a-given-number/58709 "2023-07-03T11:39:08Z")

</div>

I wish to find the number of primes below a given number, e.g. there are 25 primes below 100. It appears primes.jl does not do this and I can’t seem to locate a package to do so (at least not one compatible with OSX). …

---

## [Detection of constant, weak signals](https://discourse.julialang.org/t/detection-of-constant-weak-signals/101022)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 11\
**Last updated:** [July 3, 2023, 11:12am UTC](https://discourse.julialang.org/t/detection-of-constant-weak-signals/101022 "2023-07-03T11:12:50Z")

</div>

I have the following problem: I have signal u(t), which can be sinus function, but I could also use any other function as exitation signal. I have a system which has a gain k between -1 and 1 and adds a strong noise …

---

## [How to split a vector of complex into a real and an imag vector](https://discourse.julialang.org/t/how-to-split-a-vector-of-complex-into-a-real-and-an-imag-vector/101053)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 12\
**Last updated:** [July 3, 2023, 10:55am UTC](https://discourse.julialang.org/t/how-to-split-a-vector-of-complex-into-a-real-and-an-imag-vector/101053 "2023-07-03T10:55:42Z")

</div>

I have the following example: julia\> a=1+2im 1 + 2im julia\> A=a\*ones(3) 3-element Vector{ComplexF64}: 1.0 + 2.0im 1.0 + 2.0im 1.0 + 2.0im How can I can convert A into two vectors, a vector of the real values and a …

---

## [Adding test-specific dependencies](https://discourse.julialang.org/t/adding-test-specific-dependencies/101100)

<div class="topic-metadata">

**Author:** [@algunion](https://discourse.julialang.org/u/algunion)\
**Replies:** 5\
**Last updated:** [July 3, 2023, 9:55am UTC](https://discourse.julialang.org/t/adding-test-specific-dependencies/101100 "2023-07-03T09:55:56Z")

</div>

The Pkg documentation related to adding test-specific dependencies mentions the addition of the required packages under \[extras\] and \[target\] in the following way: \[extras\] Markdown = "d6f4376e-aef5-505a-96c1-9c02739460…

---

## [Sync'ing Julia packages between multiple machines](https://discourse.julialang.org/t/syncing-julia-packages-between-multiple-machines/101081)

<div class="topic-metadata">

**Author:** [@ryofurue](https://discourse.julialang.org/u/ryofurue)\
**Replies:** 6\
**Last updated:** [July 3, 2023, 9:05am UTC](https://discourse.julialang.org/t/syncing-julia-packages-between-multiple-machines/101081 "2023-07-03T09:05:16Z")

</div>

Suppose you use multiple machines and personally manage your Julia environment. What do you do to sync packages between those machines? I’m not a “developer” and I don’t need serious version control at all. I’m happy w…

---

## [Solving A\*x=b in Nemo](https://discourse.julialang.org/t/solving-a-x-b-in-nemo/101051)

<div class="topic-metadata">

**Author:** [@blociss](https://discourse.julialang.org/u/blociss)\
**Replies:** 7\
**Last updated:** [July 3, 2023, 7:30am UTC](https://discourse.julialang.org/t/solving-a-x-b-in-nemo/101051 "2023-07-03T07:30:06Z")

</div>

Let A = \[1 0 0; 0 1 1; 0 3 0; 0 0 1\] a matrix of type 4×3 Matrix{QQFieldElem}: and Q=\[2 ,-3 , 1, 1\] of type 4-element Vector{QQFieldElem}: My goal is to compute A \\setminus Q but I got error MethodError: no m…

---

## [Allocations for type assertions](https://discourse.julialang.org/t/allocations-for-type-assertions/101104)

<div class="topic-metadata">

**Author:** [@motabbara](https://discourse.julialang.org/u/motabbara)\
**Replies:** 4\
**Last updated:** [July 3, 2023, 7:14am UTC](https://discourse.julialang.org/t/allocations-for-type-assertions/101104 "2023-07-03T07:14:50Z")

</div>

In the below code snippet something::ConcreteType = mydict\[key\] ###mydict = Dict{String,AbstractType}() the LLVM IR shows a call to ijl\_gc\_pool\_alloc and from the labelling, it looks like that’s part of the type assert…

---

## [1x1 Matrix automatically converted to number](https://discourse.julialang.org/t/1x1-matrix-automatically-converted-to-number/101106)

<div class="topic-metadata">

**Author:** [@mzaffalon](https://discourse.julialang.org/u/mzaffalon)\
**Replies:** 3\
**Last updated:** [July 3, 2023, 6:57am UTC](https://discourse.julialang.org/t/1x1-matrix-automatically-converted-to-number/101106 "2023-07-03T06:57:36Z")

</div>

I would like julia\> \[1; 0\]' \* \[1 0; 0 2\] \* \[1; 0\] 1 to return a 1x1 Matrix. Is there a more convenient syntax than julia\> Matrix(transpose(\[1; 0\])) \* \[1 0; 0 2\] \* \[1; 0\] 1-element Vector{Int64}: 1 which still does n…

---

## [JuMP: save SOL file for MILP](https://discourse.julialang.org/t/jump-save-sol-file-for-milp/101101)

<div class="topic-metadata">

**Author:** [@Stuart\_Rogers](https://discourse.julialang.org/u/Stuart_Rogers)\
**Replies:** 3\
**Last updated:** [July 3, 2023, 2:52am UTC](https://discourse.julialang.org/t/jump-save-sol-file-for-milp/101101 "2023-07-03T02:52:11Z")

</div>

If JuMP solves a MILP using a solver like HiGHS, SCIP, COPT, etc., is it possible to save the solution in a SOL (.sol) file?

---

## [Calculating Third (and Higher) Derivatives: ReverseDiff gives 0s while ForwardDiff works](https://discourse.julialang.org/t/calculating-third-and-higher-derivatives-reversediff-gives-0s-while-forwarddiff-works/101095)

<div class="topic-metadata">

**Author:** [@HappyQuokka](https://discourse.julialang.org/u/HappyQuokka)\
**Replies:** 1\
**Last updated:** [July 3, 2023, 2:14am UTC](https://discourse.julialang.org/t/calculating-third-and-higher-derivatives-reversediff-gives-0s-while-forwarddiff-works/101095 "2023-07-03T02:14:33Z")

</div>

I am trying to calculate the third derivative (tensor). ForwardDiff seems to work but is incredibly slow, also for lower orders. ReverseDiff, while fast for lower derivatives, doesn’t seem to work for third derivatives o…

---

## [Been testing example of Neural ODE code with Julia 1.85. i get error ComponentArray](https://discourse.julialang.org/t/been-testing-example-of-neural-ode-code-with-julia-1-85-i-get-error-componentarray/100276)

<div class="topic-metadata">

**Author:** [@ak47](https://discourse.julialang.org/u/ak47)\
**Replies:** 18\
**Last updated:** [July 2, 2023, 11:53pm UTC](https://discourse.julialang.org/t/been-testing-example-of-neural-ode-code-with-julia-1-85-i-get-error-componentarray/100276 "2023-07-02T23:53:00Z")

</div>

''Lux, DiffEqFlux, DifferentialEquations, Optimization, OptimizationOptimJL, Random, Plots,ComponentArrays rng = Random.default\_rng() u0 = Float32\[2.0; 0.0\] datasize = 30 tspan = (0.0f0, 1.5f0) tsteps = range(tspan\[…

---

## [Creating a Neural ODE in Lux that explicitly depends on time](https://discourse.julialang.org/t/creating-a-neural-ode-in-lux-that-explicitly-depends-on-time/101062)

<div class="topic-metadata">

**Author:** [@George\_Stepaniants](https://discourse.julialang.org/u/George_Stepaniants)\
**Replies:** 4\
**Last updated:** [July 2, 2023, 10:03pm UTC](https://discourse.julialang.org/t/creating-a-neural-ode-in-lux-that-explicitly-depends-on-time/101062 "2023-07-02T22:03:24Z")

</div>

Hello, I am very excited to use Lux for Neural ODE training but am having trouble understanding how to extend neural ODEs to accept time t as an argument. I noticed this thread: DiffEqFlux with time as additional input…

---

## [Problem with Data frame output in Quarto](https://discourse.julialang.org/t/problem-with-data-frame-output-in-quarto/101091)

<div class="topic-metadata">

**Author:** [@paddingDuck](https://discourse.julialang.org/u/paddingDuck)\
**Replies:** 0\
**Last updated:** [July 2, 2023, 8:37pm UTC](https://discourse.julialang.org/t/problem-with-data-frame-output-in-quarto/101091 "2023-07-02T20:37:40Z")

</div>

Hello everyone! I have been using Julia for some time and have tried different ways to code. So far I liked Pluto, but wanted to try something else as well. Since I am coming from R, I wanted to try Quarto with Julia in …

---

## [LogNormal calculation of standard deviation gets two different answers](https://discourse.julialang.org/t/lognormal-calculation-of-standard-deviation-gets-two-different-answers/101080)

<div class="topic-metadata">

**Author:** [@Soldalma](https://discourse.julialang.org/u/Soldalma)\
**Replies:** 5\
**Last updated:** [July 2, 2023, 6:34pm UTC](https://discourse.julialang.org/t/lognormal-calculation-of-standard-deviation-gets-two-different-answers/101080 "2023-07-02T18:34:39Z")

</div>

I noticed that calculating the standard deviation of a LogNormal distribution directly or from a very large sample yields quite different results. This is not true for the mean. mulog = -12.0 sdlog = 3.0 dist = Distrib…

---

## [Plots: precision of numeric labels, default \`xformatter\`, or . .](https://discourse.julialang.org/t/plots-precision-of-numeric-labels-default-xformatter-or/101085)

<div class="topic-metadata">

**Author:** [@ryofurue](https://discourse.julialang.org/u/ryofurue)\
**Replies:** 0\
**Last updated:** [July 2, 2023, 4:54pm UTC](https://discourse.julialang.org/t/plots-precision-of-numeric-labels-default-xformatter-or/101085 "2023-07-02T16:54:16Z")

</div>

Basically I want to adjust the number of the significant digits in the numeric labels on the x axis: using Plots using StrFormat x = 0:1e5:8e6 y = rand(Float64, length(x)) plot(x,y) # -\> 2.0 × 10^6 plot(x,y; xformatter=…

---

## [Apple silicon Gtk.jl error](https://discourse.julialang.org/t/apple-silicon-gtk-jl-error/101084)

<div class="topic-metadata">

**Author:** [@Nichtigott](https://discourse.julialang.org/u/Nichtigott)\
**Replies:** 0\
**Last updated:** [July 2, 2023, 4:45pm UTC](https://discourse.julialang.org/t/apple-silicon-gtk-jl-error/101084 "2023-07-02T16:45:55Z")

</div>

I encountered an error while testing the official case using Gtk.jl The code is as follows using Gtk win = GtkWindow("A new window") g = GtkGrid() a = GtkEntry() # a widget for entering text set\_gtk\_property!(a, :tex…

---

## [Failure to compile to .exe "LoadError: ArgumentError: Package Base does not have Decimals in its dependencies:"](https://discourse.julialang.org/t/failure-to-compile-to-exe-loaderror-argumenterror-package-base-does-not-have-decimals-in-its-dependencies/101073)

<div class="topic-metadata">

**Author:** [@archon](https://discourse.julialang.org/u/archon)\
**Replies:** 4\
**Last updated:** [July 2, 2023, 2:52pm UTC](https://discourse.julialang.org/t/failure-to-compile-to-exe-loaderror-argumenterror-package-base-does-not-have-decimals-in-its-dependencies/101073 "2023-07-02T14:52:16Z")

</div>

I’m an apprentice for development working with C# and a few months ago I have been playing around with basics of Julia whenever I have some free time. I am still learning. I decided to start a small project calculating t…

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

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