NumPy - Array Data Types
Which of the following converts an array of integers to a boolean array where zero becomes False and non-zero becomes True?
astype().astype(bool) to convert integers to booleanastype(bool) converts zeros to False and non-zeros to True.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions