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
Updates ProtectedArray to work with latest NumPy versions.
At (or around) NumPy version 1.16, it only allows ndarrays that
*own* data to set their 'writeable' flag. ProtectedArray used the
writeable flag to be able to return read-only 'views' of a
ProtectedArray and avoid copying when unnecessary. The NumPy update
disallows read-only views, as views (I think) don't own their
memory by construction. This commit updates ProtectedArray to only
set the writable=True flag on a returned *copy* that might be
expected to be a view into the base ProtectedArray. This makes
the ProtectedArray less memory efficient (as it adds copying) but
this should retain the old behavior and restore compatibility with
NumPy.
0 commit comments