Open lukas-weber opened 8 months ago
Yeah we don't support those as ScalarTypes
. I'm not sure what would be the best approach here. Technically Dual
is a struct and should be a CompoundData, but since it's <: Real
we can't handle it.
(x5
also fails with structs that are not <: Real
)
Maybe a sensible default would be to consider structs scalar unless they are AbstractArrays (since if they are not, it is not clear how to get elements from them anyway).
Maybe anything coming in via setindex!
that is not an AbstractArray
or a Tuple
should be considered a scalar?
Hi,
I recently noticed that
datatype()
now works for all kinds of Julia structs! That’s such an awesome feature, allowing me to simplify my code a lot.There is one remaining issue for me though. If you want to write a scalar dataset, this works fine with normal numbers and
Complex
However,
x5
andx6
fail with the error