@teravest, try casting to_sparse before pasing that to Table.


On Apr 30, 2014, at 12:54 PM, teravest <notifications@github.com> wrote:

> In biom/table.py:
> 
> > @@ -205,8 +190,19 @@ def _cast_metadata(self):
> >                                           repr(obs_md))
> >  
> >                  default_obs_md.append(d)
> > -            super(Table, self).__setattr__('observation_metadata',
> > -                                           tuple(default_obs_md))
> > +            self.observation_metadata = tuple(default_obs_md)
> > +
> > +    @property
> Hey @ElBrogrammer I am working on test_nnz right now 
> The code looks like this
> 
> def test_nnz(self):
>         """What is your NNZ?"""
>         for m in self.nulls:
>             self.assertEqual(m.nnz, 0)
> 
>         self.assertEqual(self.empty.nnz, 0)
>         self.assertEqual(self.single_ele.nnz, 1)
>         self.assertEqual(self.mat1.nnz, 4)
>         self.assertEqual(self.explicit_zeros.nnz, 4)
> The table.nnz codes is here
> 
> @property
>     def nnz(self):
>         return self._data.nnz
> The problem is that data is a numpy.ndarray does not have an attraibute nnz
> So i get the error
> AttributeError: 'numpy.ndarray' object has no attribute 'nnz'
> 
> Any idea what is going on here?
> 
> —
> Reply to this email directly or view it on GitHub.
>