just something I bumped into and wasn't aware of >>> aa array([ 1., 1., 1., 1., 1.]) >>> aa.astype(int) array([0, 1, 0, 0, 0]) >>> aa - 1 array([ -2.22044605e-16, 2.22044605e-16, -2.22044605e-16, -3.33066907e-16, -3.33066907e-16]) >>> np.round(aa).astype(int) array([1, 1, 1, 1, 1]) Josef