Skip to content

Commit 99140c7

Browse files
author
Christopher Doris
committed
fix elsize bug
1 parent ae08843 commit 99140c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Wrap/PyArray.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ Base.IndexStyle(::Type{PyArray{T,N,F}}) where {T,N,F} =
588588
Base.unsafe_convert(::Type{Ptr{T}}, x::PyArray{T}) where {T} =
589589
pyarray_get_R(T) == T ? Ptr{T}(x.ptr) : error("")
590590

591-
Base.elsize(::Type{PyArray{T}}) where {T} = pyarray_get_R(T) == T ? sizeof(T) : error("")
591+
Base.elsize(::Type{<:PyArray{T}}) where {T} = pyarray_get_R(T) == T ? sizeof(T) : error("")
592592

593593
function Base.strides(x::PyArray{T}) where {T}
594594
R = pyarray_get_R(T)

0 commit comments

Comments
 (0)