File tree Expand file tree Collapse file tree 3 files changed +14
-1
lines changed
Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -529,6 +529,7 @@ Bug Fixes
529529- Fixed a bug with the `info ` repr not honoring the `display.max_info_columns ` setting (:issue: `6939 `)
530530- Bug ``PeriodIndex `` string slicing with out of bounds values (:issue: `5407 `)
531531- 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 `)
532533
533534pandas 0.13.1
534535-------------
Original file line number Diff line number Diff line change @@ -213,7 +213,7 @@ def _isnull_ndarraylike(obj):
213213 else :
214214 result = np .empty (shape , dtype = bool )
215215 vec = lib .isnullobj (values .ravel ())
216- result [: ] = vec .reshape (shape )
216+ result [... ] = vec .reshape (shape )
217217
218218 elif dtype in _DATELIKE_DTYPES :
219219 # this is the NaT pattern
Original file line number Diff line number Diff line change @@ -135,6 +135,18 @@ def test_isnull_datetime():
135135 assert (mask [0 ])
136136 assert (not mask [1 :].any ())
137137
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+
138150def test_downcast_conv ():
139151 # test downcasting
140152
You can’t perform that action at this time.
0 commit comments