diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2019-08-18 21:09:32 -0500 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2019-09-14 12:57:02 -0700 |
commit | 49916f66479d7a6b14087f39e06290941e07596d (patch) | |
tree | 8696e868c5041051d8e2fbbcc77237631336fe29 /numpy/lib/tests/test_recfunctions.py | |
parent | 31ffdecf07d18ed4dbb66b171cb0f998d4b190fa (diff) | |
download | numpy-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 'numpy/lib/tests/test_recfunctions.py')
-rw-r--r-- | numpy/lib/tests/test_recfunctions.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/numpy/lib/tests/test_recfunctions.py b/numpy/lib/tests/test_recfunctions.py index 0c839d486..f9355c2e1 100644 --- a/numpy/lib/tests/test_recfunctions.py +++ b/numpy/lib/tests/test_recfunctions.py @@ -91,8 +91,10 @@ class TestRecFunctions(object): control = np.array([(1,), (4,)], dtype=[('a', int)]) assert_equal(test, control) + # dropping all fields results in an array with no fields test = drop_fields(a, ['a', 'b']) - assert_(test is None) + control = np.array([(), ()], dtype=[]) + assert_equal(test, control) def test_rename_fields(self): # Test rename fields |