예제 #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)
예제 #2
0
 def test_isnumber_float(self):
     self.assertTrue(utils.isnumber(19.))
예제 #3
0
 def test_isnumber_cplx(self):
     self.assertTrue(utils.isnumber(19. + 1j))
예제 #4
0
 def test_isnumber_int(self):
     self.assertTrue(utils.isnumber(19))