diff options
| author | Sebastian Berg <sebastianb@nvidia.com> | 2022-10-06 17:26:59 +0200 |
|---|---|---|
| committer | Sebastian Berg <sebastianb@nvidia.com> | 2022-10-06 17:26:59 +0200 |
| commit | fb44bd1eb505181a9dffecd4b578e8b5494a298f (patch) | |
| tree | ba38978201936a5f70b2f178b7150c33a5c6a88c /numpy | |
| parent | 0ca3a6d11f27eb1561811c0b72ce1998655e1ee5 (diff) | |
| download | numpy-fb44bd1eb505181a9dffecd4b578e8b5494a298f.tar.gz | |
DOC: Extend out-of-bound python integer deprecation warning
Diffstat (limited to 'numpy')
| -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; |
