Yes, that's why I added the first if statement in this method. First checks if the objects have the same class, otherwise it returns False.

On May 1, 2014, at 9:30 AM, teravest <notifications@github.com> wrote:

> In biom/table.py:
> 
> > @@ -444,60 +491,77 @@ def descriptive_equality(self, other):
> >              return "Observation metadata are not the same"
> >          if self.sample_metadata != other.sample_metadata:
> >              return "Sample metadata are not the same"
> > -        if not self._data_equality(other):
> > +        if not self._data_equality(other._data):
> >              return "Data elements are not the same"
> >  
> >          return "Tables appear equal"
> >  
> >      def __eq__(self, other):
> I noticed when fixing the tests that if the underlying datatpye is numpy.ndarray the eq function thorws an exception. Do we want to protect against this?
> Traceback (most recent call last):
> File "/Users/emte4531/teravest/biom-format/tests/test_table.py", line 743, in test_ne
> self.assertTrue(self.null1 != array([]))
> File "/Users/emte4531/teravest/biom-format/biom/table.py", line 547, in ne
> return not (self == other)
> File "/Users/emte4531/teravest/biom-format/biom/table.py", line 500, in eq
> if np.any(self.observation_ids != other.observation_ids):
> AttributeError: 'numpy.ndarray' object has no attribute 'observation_ids'
> 
> —
> Reply to this email directly or view it on GitHub.
>