File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -305,22 +305,25 @@ def validate_values_for_numba(obj: Series | DataFrame) -> None:
305
305
if isinstance (obj , Series ):
306
306
if not is_numeric_dtype (obj .dtype ):
307
307
raise ValueError (
308
- f"Series must have numeric dtype. Found '{ dtype } '."
308
+ f"Series must have a numeric dtype. "
309
+ f"Found '{ dtype } ' instead"
309
310
)
310
311
if is_extension_array_dtype (obj .dtype ):
311
312
raise ValueError (
312
- f"Series uses extension array dtype, not supported by Numba."
313
+ f"Series is backed by an extension array, "
314
+ f"which is not supported by the numba engine."
313
315
)
314
316
else :
315
317
for colname , dtype in obj .dtypes .items ():
316
318
if not is_numeric_dtype (dtype ):
317
319
raise ValueError (
318
- f"Column { colname } must have numeric dtype. Found '{ dtype } '."
320
+ f"Column { colname } must have a numeric dtype. "
321
+ f"Found '{ dtype } ' instead"
319
322
)
320
323
if is_extension_array_dtype (dtype ):
321
324
raise ValueError (
322
- f"Column { colname } uses extension array dtype , "
323
- " not supported by Numba ."
325
+ f"Column { colname } is backed by an extension array, "
326
+ f"which is not supported by the numba engine ."
324
327
)
325
328
326
329
@staticmethod
You can’t perform that action at this time.
0 commit comments