Forgive me if this is off topic; I haven't been following this closely
and I haven't used scipy.sparse. But there are some very reasonable
cases where you might want to fill sparse data with a value other than
0:

* The sparseness is missing data, and 0 is not the same as NA
* Better compression: figure out which value is most common in the
data and make that the default that gets filled. E.g. how many fingers
a person has.

Neal

On Tue, Aug 27, 2019 at 3:46 PM Rok Mihevc <rok.mih...@gmail.com> wrote:
>
> On Tue, Aug 27, 2019 at 11:05 PM Wes McKinney <wesmck...@gmail.com> wrote:
>
> > I don't think this has been discussed. I think the SparseTensor
> > discussions have been intended to reach compatibility with "sparse
> > matrix" projects like scipy.sparse. pandas's "SparseArray" objects are
> > a distinct thing -- I don't know many examples of sparse matrices with
> > fill values other than 0
>
>
> The reason for implementing fill_value would be the case where user wants
> another value to be '0' and it's practical for the SparseTensor object to
> keep that value for them. I am not sure how common would such a case be and
> since scipy.sparse is time tested I'd agree with compatibility as the
> current goal.

Reply via email to