summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorJay Bourque <jay.bourque@continuum.io>2012-07-17 11:59:56 -0500
committerJay Bourque <jay.bourque@continuum.io>2012-07-17 16:05:10 -0500
commit781468b5938ce1a79804613b222063d81e99963d (patch)
tree62688944345a990cb9e059790d27e70706be7750 /numpy
parenta32325d1d5fc5e23622db5027a6dd35d42193e95 (diff)
downloadnumpy-781468b5938ce1a79804613b222063d81e99963d.tar.gz
Updated reference docs for DeprecationWarning
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/src/multiarray/arrayobject.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/numpy/core/src/multiarray/arrayobject.c b/numpy/core/src/multiarray/arrayobject.c
index 4a219e70e..f0e9e36a5 100644
--- a/numpy/core/src/multiarray/arrayobject.c
+++ b/numpy/core/src/multiarray/arrayobject.c
@@ -694,10 +694,11 @@ array_might_be_written(PyArrayObject *obj)
{
const char *msg =
"Numpy has detected that you (may be) writing to an array returned\n"
- "by numpy.diagonal or by selecting multiple fields in a structured\n"
+ "by numpy.diagonal or by selecting multiple fields in a record\n"
"array. This code will likely break in the next numpy release --\n"
- "see numpy.diagonal or structured array docs for details. The quick\n"
- "fix is to make an explicit copy (e.g., do arr.diagonal().copy()).";
+ "see numpy.diagonal or arrays.indexing reference docs for details.\n"
+ "The quick fix is to make an explicit copy (e.g., do\n"
+ "arr.diagonal().copy() or arr[['f0','f1']].copy()).";
if (PyArray_FLAGS(obj) & NPY_ARRAY_WARN_ON_WRITE) {
if (DEPRECATE_FUTUREWARNING(msg) < 0) {
return -1;