-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Using ArrayInterface v5.05
and StaticArrays v1.42
:
julia> import ArrayInterface as Arr
julia> using StaticArrays
julia> Arr.known_size(SArray{Tuple{2,3}})
(6,)
julia> Arr.size(StaticArray{Tuple{2,3}})
(static(6),)
Are those the intended results? I expected (2, 3)
and (static(2), static(3))
, respectively. (Though, things work fine for instances of StaticArrays
.)
I think what is happening is that IteratorSize(::Type{<:StaticArray})
is defaulting to HasLength()
while it might better off be HasShape{N}()
, so the wrong method gets called at some point. If that's the case, perhaps its also worth opening a bug report on StaticArrays
.
Also, should ArrayInterface.size
produce an error if given a Type
as an argument? What should be the behavior if one of the dimensions is unknown?
Metadata
Metadata
Assignees
Labels
No labels