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:
305305 if isinstance (obj , Series ):
306306 if not is_numeric_dtype (obj .dtype ):
307307 raise ValueError (
308- f"Series must have numeric dtype. Found '{ dtype } '."
308+ f"Series must have a numeric dtype. "
309+ f"Found '{ dtype } ' instead"
309310 )
310311 if is_extension_array_dtype (obj .dtype ):
311312 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."
313315 )
314316 else :
315317 for colname , dtype in obj .dtypes .items ():
316318 if not is_numeric_dtype (dtype ):
317319 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"
319322 )
320323 if is_extension_array_dtype (dtype ):
321324 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 ."
324327 )
325328
326329 @staticmethod
You can’t perform that action at this time.
0 commit comments