def _pos_neg_csr_arrays(data, indices):
    """helper to split a data vector into positive and negative components"""
    pos_data, neg_data = [], []
    pos_indices, neg_indices = [], []
    for i in range(len(data)):
        d = data[i]
        if d > 0:
            pos_data.append(d)
            pos_indices.append(indices[i])
        elif d < 0:
            neg_data.append(d)
            neg_indices.append(indices[i])
    return pos_data, pos_indices, neg_data, neg_indices