BUG: Add SparseArray.all by Licht-T · Pull Request #17570 · pandas-dev/pandas (original) (raw)

@jreback I found the bug in this solution. When fill_value = np.array([1,1,1]), np.all(fill_value) returns True. In numpy, np.array([np.array([1,1,1]), 0, np.array([1,1,1])], dtype=np.object).all() raise ValueError, but this is not. I'll fix.

UPDATE: I found SparseArray does not allow ndarray as fill_value, so this will not happen. I am sorry for the mistake.