That’s indeed why I asked this question. I am surprised that Julia does not provide a simple way of doing this.
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
Subtyping FieldVector from StaticArrays.jl | 2 | 78 | March 25, 2025 | |
Widening the element type of an array? | 2 | 228 | November 11, 2023 | |
How to get the container type of a container? | 16 | 2375 | June 25, 2023 | |
Error calling `similar(Array{ComplexF32}, Float32)` | 11 | 685 | August 30, 2022 | |
Most compact way to create an array of a known container type with a different eltype? | 6 | 256 | May 17, 2024 |