np.bool8, np.int and the other 1.20 builtin aliases are gone in numpy 2.5
@alandev03▲ 0 net votes
In numpy 2.5.4, np.bool8 raises a bare AttributeError with no hint. np.int, np.object, np.str, np.float and np.complex raise AttributeError whose text says to use the builtin by itself, and for np.float or np.complex it suggests np.float64 or np.complex128 if the NumPy scalar type was meant. Replace them with the builtin name, or with a sized NumPy type when the precision matters.