From 64a855f421d7b50dd29e5e09c69d285eddfb6d1c Mon Sep 17 00:00:00 2001 From: Pierre Glaser Date: Wed, 10 Oct 2018 14:45:20 +0200 Subject: ENH implement __reduce_ex__ for np.ndarray and pickle protocol 5 --- numpy/core/numeric.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'numpy/core/numeric.py') diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py index 7c9e41299..56ac69424 100644 --- a/numpy/core/numeric.py +++ b/numpy/core/numeric.py @@ -1934,6 +1934,10 @@ def fromfunction(function, shape, **kwargs): return function(*args, **kwargs) +def _frombuffer(buf, dtype, shape, order): + return frombuffer(buf, dtype=dtype).reshape(shape, order=order) + + def isscalar(num): """ Returns True if the type of `num` is a scalar type. -- cgit v1.2.1