Writing the push! options for ArrayInterface its apparent that to prove push! we need multiple test objects, and to accept one of them passing as enough to satisfiy the interface. So a Vector would pass, but a Matrix would not, but Array generally would still pass becuase push! is only expected to work for Vector.
we can use any and all to define how the results of multiple test objects are combined. Like:
push = A -> ndims(A) == 1 ? last(push!(A, first(A))) == A, false => any
Writing the
push!
options forArrayInterface
its apparent that to provepush!
we need multiple test objects, and to accept one of them passing as enough to satisfiy the interface. So a Vector would pass, but a Matrix would not, but Array generally would still pass becuase push! is only expected to work for Vector.we can use
any
andall
to define how the results of multiple test objects are combined. Like:all
would be assumed for most cases.