I have a rank-1 numpy.array of which I want to make a boxplot. However, I want to exclude all values equal to zero in the array. Currently, I solved this by loo
numpy.array
For a NumPy array a, you can use
a
a[a != 0]
to extract the values not equal to zero.