sounds good


On Mon, Oct 28, 2013 at 2:14 PM, Jai Ram Rideout
<notifications@github.com>wrote:

> In biom/backends/scipysparse.py:
>
> > +        if num_rows == 0 and num_cols == 0:
> > +            self._matrix = None
> > +        else:
> > +            if data is None:
> > +                self._matrix = coo_matrix((num_rows, num_cols), dtype=dtype)
> > +            else:
> > +                # coo_matrix allows zeros to be added as data, and this affects
> > +                # nnz, items, and iteritems. Clean them out here, as this is
> > +                # the only time these zeros can creep in.
> > +                # Note: coo_matrix allows duplicate entries; the entries will
> > +                # be summed when converted. Not really sure how we want to
> > +                # handle this generally within BIOM- I'm okay with leaving it
> > +                # as undefined behavior for now.
> > +                self._matrix = coo_matrix(data, shape=(num_rows, num_cols),
> > +                                          dtype=dtype)
> > +                self.convert('csr')
>
> I think bsr may only help us if we're doing matrix math. We're currently
> not doing much, or any, of that in BIOM. Most table operations are
> iterating over samples or observations, in which case I think csr/csc will
> work out better for taking row/column slices.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/biom-format/biom-format/pull/227/files#r7261591>
> .
>