Esempio n. 1
0
 def a(self, other):
     try:
         if self.__array_priority__ < other.__array_priority__:
             return NotImplemented
     except AttributeError:
         pass
     if isnumber(other):
         a, b = self, other
     else:
         a, b = make_same_dims(self, self.__class__(other))
     return func(a, b)
Esempio n. 2
0
 def test_isnumber_float(self):
     self.assertTrue(utils.isnumber(19.))
Esempio n. 3
0
 def test_isnumber_cplx(self):
     self.assertTrue(utils.isnumber(19. + 1j))
Esempio n. 4
0
 def test_isnumber_int(self):
     self.assertTrue(utils.isnumber(19))