File tree 3 files changed +14
-1
lines changed
3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -529,6 +529,7 @@ Bug Fixes
529
529
- Fixed a bug with the `info ` repr not honoring the `display.max_info_columns ` setting (:issue: `6939 `)
530
530
- Bug ``PeriodIndex `` string slicing with out of bounds values (:issue: `5407 `)
531
531
- Fixed a memory error in the hashtable implementation/factorizer on resizing of large tables (:issue: `7157 `)
532
+ - Bug in ``isnull `` when applied to 0-dimensional object arrays (:issue: `7176 `)
532
533
533
534
pandas 0.13.1
534
535
-------------
Original file line number Diff line number Diff line change @@ -213,7 +213,7 @@ def _isnull_ndarraylike(obj):
213
213
else :
214
214
result = np .empty (shape , dtype = bool )
215
215
vec = lib .isnullobj (values .ravel ())
216
- result [: ] = vec .reshape (shape )
216
+ result [... ] = vec .reshape (shape )
217
217
218
218
elif dtype in _DATELIKE_DTYPES :
219
219
# this is the NaT pattern
Original file line number Diff line number Diff line change @@ -135,6 +135,18 @@ def test_isnull_datetime():
135
135
assert (mask [0 ])
136
136
assert (not mask [1 :].any ())
137
137
138
+
139
+ class TestIsNull (tm .TestCase ):
140
+ def test_0d_array (self ):
141
+ self .assertTrue (isnull (np .array (np .nan )))
142
+ self .assertFalse (isnull (np .array (0.0 )))
143
+ self .assertFalse (isnull (np .array (0 )))
144
+ # test object dtype
145
+ self .assertTrue (isnull (np .array (np .nan , dtype = object )))
146
+ self .assertFalse (isnull (np .array (0.0 , dtype = object )))
147
+ self .assertFalse (isnull (np .array (0 , dtype = object )))
148
+
149
+
138
150
def test_downcast_conv ():
139
151
# test downcasting
140
152
You can’t perform that action at this time.
0 commit comments