summaryrefslogtreecommitdiff
path: root/doc/release
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2019-08-18 21:09:32 -0500
committerEric Wieser <wieser.eric@gmail.com>2019-09-14 12:57:02 -0700
commit49916f66479d7a6b14087f39e06290941e07596d (patch)
tree8696e868c5041051d8e2fbbcc77237631336fe29 /doc/release
parent31ffdecf07d18ed4dbb66b171cb0f998d4b190fa (diff)
downloadnumpy-49916f66479d7a6b14087f39e06290941e07596d.tar.gz
API: Do not return None from recfunctions.drop_fields
This return value was not documented and did not make any sense. There's no reason to have a special case here.
Diffstat (limited to 'doc/release')
-rw-r--r--doc/release/upcoming_changes/14510.compatibility.rst10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/release/upcoming_changes/14510.compatibility.rst b/doc/release/upcoming_changes/14510.compatibility.rst
new file mode 100644
index 000000000..cd686a63b
--- /dev/null
+++ b/doc/release/upcoming_changes/14510.compatibility.rst
@@ -0,0 +1,10 @@
+`numpy.lib.recfunctions.drop_fields` can no longer return ``None``
+------------------------------------------------------------------
+If ``drop_fields`` is used to drop all fields, previously the array would
+be completely discarded and ``None`` returned. Now it returns an array of the
+same shape as the input, but with no fields. The old behavior can be retained
+with::
+
+ dropped_arr = drop_fields(arr, ['a', 'b'])
+ if dropped_arr.dtype.names == ():
+ dropped_arr = None