added .compressed() to np.ma flattening