diff options
author | Pierre Glaser <pierreglaser@msn.com> | 2018-10-10 14:45:20 +0200 |
---|---|---|
committer | Pierre Glaser <pierreglaser@msn.com> | 2018-10-10 19:54:36 +0200 |
commit | 64a855f421d7b50dd29e5e09c69d285eddfb6d1c (patch) | |
tree | 631514b2c70b76e59428446130f1d7e7aa127c21 /numpy/core/numeric.py | |
parent | 9942b71a6782a850cf59462a3a9ceec39e741880 (diff) | |
download | numpy-64a855f421d7b50dd29e5e09c69d285eddfb6d1c.tar.gz |
ENH implement __reduce_ex__ for np.ndarray and pickle protocol 5
Diffstat (limited to 'numpy/core/numeric.py')
-rw-r--r-- | numpy/core/numeric.py | 4 |
1 files changed, 4 insertions, 0 deletions
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. |