This `append` will get expensive in space and time on large tables, plus there is a cast expense when feeding it into scipy. Can `indptr` be preallocated with `indptr = np.empty(len(keep) + 1, dtype=np.int32)`?