@@ -89,7 +89,13 @@ def copy_to_readonly_numpy_array_or_list(v, kind=None, force_numeric=False):
89
89
90
90
# u: unsigned int, i: signed int, f: float
91
91
numeric_kinds = {"u" , "i" , "f" }
92
- kind_default_dtypes = {"u" : "uint32" , "i" : "int32" , "f" : "float64" , "O" : "object" , "U" : "U" }
92
+ kind_default_dtypes = {
93
+ "u" : "uint32" ,
94
+ "i" : "int32" ,
95
+ "f" : "float64" ,
96
+ "O" : "object" ,
97
+ "U" : "U" ,
98
+ }
93
99
94
100
# Handle pandas Series and Index objects
95
101
if pd and isinstance (v , (pd .Series , pd .Index )):
@@ -191,7 +197,7 @@ def is_homogeneous_array(v):
191
197
if v_numpy .shape == ():
192
198
return False
193
199
else :
194
- return True # v_numpy.dtype.kind in ["u", "i", "f", "M", "U"]
200
+ return True # v_numpy.dtype.kind in ["u", "i", "f", "M", "U"]
195
201
return False
196
202
197
203
@@ -1320,7 +1326,11 @@ def validate_coerce(self, v, should_raise=True):
1320
1326
pass
1321
1327
elif self .array_ok and is_homogeneous_array (v ):
1322
1328
v = copy_to_readonly_numpy_array_or_list (v )
1323
- if not isinstance (v , list ) and self .numbers_allowed () and v .dtype .kind in ["u" , "i" , "f" ]:
1329
+ if (
1330
+ not isinstance (v , list )
1331
+ and self .numbers_allowed ()
1332
+ and v .dtype .kind in ["u" , "i" , "f" ]
1333
+ ):
1324
1334
# Numbers are allowed and we have an array of numbers.
1325
1335
# All good
1326
1336
pass
0 commit comments