You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When running the script with NumPy 1.20+, an AttributeError occurs due to the removal of np.object.
This happens in the number_encode_features() function when checking column data types:
ifresult.dtypes[column] ==np.object:
Since np.object was deprecated in NumPy 1.20 and completely removed in later versions, this check causes an error.
To reproduce
Use a Python environment with NumPy 1.20 or later.
Run the script that calls number_encode_features().
The following error will be raised:
AttributeError: module 'numpy' has no attribute 'object'
Logs
When executing the script, a FutureWarning might appear before the error occurs:
/tmp/ipykernel_596/1535508334.py:8: FutureWarning: In the future `np.object` will be defined as the corresponding NumPy scalar.
if result.dtypes[column] == np.object:
Then, the script will fail with:
/tmp/ipykernel_596/1535508334.py:8: FutureWarning: In the future `np.object` will be defined as the corresponding NumPy scalar.
if result.dtypes[column] == np.object:
AttributeError: module 'numpy' has no attribute 'object'.
`np.object` was a deprecated alias for the builtin `object`. To avoid this error in existing code, use `object` by itself.
The text was updated successfully, but these errors were encountered:
Link to the notebook
bias-detection-explanability/fairness_and_explainability.ipynb
Describe the bug
When running the script with NumPy 1.20+, an
AttributeError
occurs due to the removal ofnp.object
.This happens in the
number_encode_features()
function when checking column data types:Since np.object was deprecated in NumPy 1.20 and completely removed in later versions, this check causes an error.
To reproduce
number_encode_features()
.Logs
When executing the script, a FutureWarning might appear before the error occurs:
Then, the script will fail with:
The text was updated successfully, but these errors were encountered: