Skip to content

Commit e5cb5bd

Browse files
Extend vsum workaround to additional collection types
1 parent 6626b0e commit e5cb5bd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/vsum.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ julia> vsum(A, dims=2)
2424
7
2525
```
2626
"""
27-
vsum(A::StridedArray; dim=:, dims=:, multithreaded=False()) = _vsum(A, dim, dims, multithreaded)
27+
vsum(A::AbstractArray{N,T}; dim=:, dims=:, multithreaded=False()) where {N,T}= _vsum(A, dim, dims, multithreaded)
28+
vsum(A::NTuple{N,T}; dim=:, dims=:, multithreaded=False()) where {N,T} = _vsum(A, dim, dims, multithreaded)
2829
_vsum(A, ::Colon, ::Colon, multithreaded) = _vsum(A, :, multithreaded)
2930
_vsum(A, ::Colon, region, multithreaded) = _vsum(A, region, multithreaded)
3031
_vsum(A, region, ::Colon, multithreaded) = reducedims(_vsum(A, region, multithreaded), region)

0 commit comments

Comments
 (0)