You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's a better practice in Julia to represent sizes or parameters as tuple instead of vector/array because 1) Tuple is static and immutable 2) Julia has a lot of optimization on Tuple to reduce its overhead.
For this reason, it's better to change the type annotation of down to Tuple or NTuple{3, Integer}, and give a deprecation for AbstractVector:
If you still plan to support AbstractVector, then it could be Union{Tuple, AbstractVector{<:Integer}} in this case. BTW, it's not generic to write AbstractVector{Int}, it should be AbstractVector{<:Integer}
I just accidentally run into this case when setting up benchmark CI, there might be many others in MIRT.
The text was updated successfully, but these errors were encountered:
It's a better practice in Julia to represent sizes or parameters as tuple instead of vector/array because 1) Tuple is static and immutable 2) Julia has a lot of optimization on Tuple to reduce its overhead.
For this reason, it's better to change the type annotation of
down
toTuple
orNTuple{3, Integer}
, and give a deprecation forAbstractVector
:MIRT.jl/src/utility/downsample.jl
Lines 100 to 104 in abb2fff
If you still plan to support AbstractVector, then it could be
Union{Tuple, AbstractVector{<:Integer}}
in this case. BTW, it's not generic to writeAbstractVector{Int}
, it should beAbstractVector{<:Integer}
I just accidentally run into this case when setting up benchmark CI, there might be many others in MIRT.
The text was updated successfully, but these errors were encountered: