AttributeError: module 'numpy' has no attribute 'int'.
Problem cause
This is due to the use of np.int in the mord library, while NumPy has deprecated and removed the np.int alias in version 1.20 and above, using the native int type of Python instead.
Open the "threshold_based.py" file and find the following code:
"_y = np.array(y).astype(np.int)"
And
"pred = np.sum(tmp < 0, axis=0).astype(np.int)"
Change it to:
"_y = np.array(y).astype(int)"
And
"pred = np.sum(tmp < 0, axis=0).astype(int)"
AttributeError: module 'numpy' has no attribute 'int'.
Problem cause
This is due to the use of np.int in the mord library, while NumPy has deprecated and removed the np.int alias in version 1.20 and above, using the native int type of Python instead.
Open the "threshold_based.py" file and find the following code:
"_y = np.array(y).astype(np.int)"
And
"pred = np.sum(tmp < 0, axis=0).astype(np.int)"
Change it to:
"_y = np.array(y).astype(int)"
And
"pred = np.sum(tmp < 0, axis=0).astype(int)"