Skip to content

Commit

Permalink
Define Base.dataids method for FixedSizeArrays
Browse files Browse the repository at this point in the history
  • Loading branch information
giordano committed Oct 7, 2024
1 parent c14fbe8 commit 23259ba
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/FixedSizeArrays.jl
Original file line number Diff line number Diff line change
Expand Up @@ -392,4 +392,11 @@ function collect_as(::Type{T}, iterator) where {T<:FixedSizeArray}
collect_as_fsa_checked(iterator, spec, dim_count, len_stat)::T
end

if isdefined(Base, :dataids)
# This is an internal, non-public function which is nevertheless needed to
# get good performance in some cases (e.g. broadcasting):
# <https://github.com/JuliaArrays/FixedSizeArrays.jl/issues/63>.
Base.dataids(a::FixedSizeArray) = Base.dataids(a.mem)
end

end # module FixedSizeArrays

0 comments on commit 23259ba

Please sign in to comment.