diff options
| -rw-r--r-- | numpy/core/src/multiarray/arraytypes.c.src | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/numpy/core/src/multiarray/arraytypes.c.src b/numpy/core/src/multiarray/arraytypes.c.src index 81c0862d7..e135fee1d 100644 --- a/numpy/core/src/multiarray/arraytypes.c.src +++ b/numpy/core/src/multiarray/arraytypes.c.src @@ -291,7 +291,10 @@ static int if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, "NumPy will stop allowing conversion of out-of-bound " "Python integers to integer arrays. The conversion " - "of %.100R to %S will fail in the future.", + "of %.100R to %S will fail in the future.\n" + "For the old behavior, usually:\n" + " np.array(value).astype(dtype)`\n" + "will give the desired result (the cast overflows).", obj, descr) < 0) { Py_DECREF(descr); return -1; |
