File tree Expand file tree Collapse file tree 3 files changed +16
-1
lines changed Expand file tree Collapse file tree 3 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,7 @@ pandas 0.8.2
85
85
- Support StaticTzInfo in DatetimeIndex infrastructure (#1692)
86
86
- Allow MultiIndex setops with length-0 other type indexes (#1727)
87
87
- Fix handling of DatetimeIndex in DataFrame.to_records (#1720)
88
+ - Fix handling of general objects in isnull on which bool(...) fails (#1749)
88
89
89
90
pandas 0.8.1
90
91
============
Original file line number Diff line number Diff line change @@ -58,7 +58,10 @@ cdef inline is_array(object o):
58
58
59
59
60
60
cdef inline bint _checknull(object val):
61
- return not cnp.PyArray_Check(val) and (val is None or val != val)
61
+ try :
62
+ return bool (val is None or val != val)
63
+ except ValueError :
64
+ return False
62
65
63
66
cdef inline bint _checknan(object val):
64
67
return not cnp.PyArray_Check(val) and val != val
Original file line number Diff line number Diff line change @@ -1020,6 +1020,17 @@ def test_repr(self):
1020
1020
rep_str = repr (ser )
1021
1021
self .assert_ ("Name: 0" in rep_str )
1022
1022
1023
+ def test_repr_bool_fails (self ):
1024
+ s = Series ([DataFrame (np .random .randn (2 ,2 )) for i in range (5 )])
1025
+
1026
+ import sys
1027
+
1028
+ buf = StringIO ()
1029
+ sys .stderr = buf
1030
+ # it works (with no Cython exception barf)!
1031
+ repr (s )
1032
+ sys .stderr = sys .__stderr__
1033
+ self .assertEquals (buf .getvalue (), '' )
1023
1034
1024
1035
def test_timeseries_repr_object_dtype (self ):
1025
1036
index = Index ([datetime (2000 , 1 , 1 ) + timedelta (i )
You can’t perform that action at this time.
0 commit comments