diff options
Diffstat (limited to 'numpy')
| -rw-r--r-- | numpy/add_newdocs.py | 16 | ||||
| -rw-r--r-- | numpy/core/src/multiarray/scalartypes.c.src | 2 |
2 files changed, 9 insertions, 9 deletions
diff --git a/numpy/add_newdocs.py b/numpy/add_newdocs.py index d0c7c6104..740396ff3 100644 --- a/numpy/add_newdocs.py +++ b/numpy/add_newdocs.py @@ -823,24 +823,24 @@ add_newdoc('numpy.core.multiarray', 'empty', add_newdoc('numpy.core.multiarray', 'empty_like', """ - empty_like(a, dtype=None, order='K', subok=True) + empty_like(prototype, dtype=None, order='K', subok=True) Return a new array with the same shape and type as a given array. Parameters ---------- - a : array_like - The shape and data-type of `a` define these same attributes of the - returned array. + prototype : array_like + The shape and data-type of `prototype` define these same attributes + of the returned array. dtype : data-type, optional Overrides the data type of the result. .. versionadded:: 1.6.0 order : {'C', 'F', 'A', or 'K'}, optional Overrides the memory layout of the result. 'C' means C-order, - 'F' means F-order, 'A' means 'F' if ``a`` is Fortran contiguous, - 'C' otherwise. 'K' means match the layout of ``a`` as closely - as possible. + 'F' means F-order, 'A' means 'F' if ``prototype`` is Fortran + contiguous, 'C' otherwise. 'K' means match the layout of ``prototype`` + as closely as possible. .. versionadded:: 1.6.0 subok : bool, optional. @@ -852,7 +852,7 @@ add_newdoc('numpy.core.multiarray', 'empty_like', ------- out : ndarray Array of uninitialized (arbitrary) data with the same - shape and type as `a`. + shape and type as `prototype`. See Also -------- diff --git a/numpy/core/src/multiarray/scalartypes.c.src b/numpy/core/src/multiarray/scalartypes.c.src index f1329e066..f9af33491 100644 --- a/numpy/core/src/multiarray/scalartypes.c.src +++ b/numpy/core/src/multiarray/scalartypes.c.src @@ -3071,7 +3071,7 @@ void_arrtype_new(PyTypeObject *type, PyObject *args, PyObject *NPY_UNUSED(kwds)) if (PyErr_Occurred() || (memu > NPY_MAX_INT)) { PyErr_Clear(); PyErr_Format(PyExc_OverflowError, - "size cannot be greater than %d", + "size must be non-negative and not greater than %d", (int) NPY_MAX_INT); return NULL; } |
