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
it looks like we are deliberately accepting np.ndarray subclasses, but I think we should special case rejecting np.matrix as a known bad-case. WDYT @ev-br ?
Ouch. Reject all ndarray subclasses, I'd say? Maybe , just maybe, whitelist np.memmap. actually not even that, not until someone checks it, someone who uses it (scikit-learn?). Other than memmap, just plain ndarray /whatever is needed for numpy scalars , np.generic.
Activity
lucascolley commentedon Feb 11, 2026
also
it looks like we are deliberately accepting
np.ndarraysubclasses, but I think we should special case rejectingnp.matrixas a known bad-case. WDYT @ev-br ?ev-br commentedon Feb 11, 2026
Ouch. Reject all ndarray subclasses, I'd say? Maybe , just maybe, whitelist np.memmap. actually not even that, not until someone checks it, someone who uses it (scikit-learn?). Other than memmap, just plain ndarray /whatever is needed for numpy scalars , np.generic.
lucascolley commentedon Feb 11, 2026
could you send a PR or would you prefer to review?
ev-br commentedon Feb 12, 2026
Feel free to beat me up sending the PR :-).
ev-br commentedon Apr 28, 2026
Sent a fix in gh-423, could you double-check it fixes the issue for you Lucas?