def test_basic(self):
     dts = zip(['i1', 'i2', 'i4', 'i8', 'u1', 'u2', 'u4', 'u8'], [
         np.int8, np.int16, np.int32, np.int64, np.uint8, np.uint16,
         np.uint32, np.uint64
     ])
     for dt1, dt2 in dts:
         assert_equal(iinfo(dt1).min, iinfo(dt2).min)
         assert_equal(iinfo(dt1).max, iinfo(dt2).max)
     self.assertRaises(ValueError, iinfo, 'f4')
Example #2
0
 def test_basic(self):
     dts = zip(
         ["i1", "i2", "i4", "i8", "u1", "u2", "u4", "u8"],
         [np.int8, np.int16, np.int32, np.int64, np.uint8, np.uint16, np.uint32, np.uint64],
     )
     for dt1, dt2 in dts:
         assert_equal(iinfo(dt1).min, iinfo(dt2).min)
         assert_equal(iinfo(dt1).max, iinfo(dt2).max)
     self.assertRaises(ValueError, iinfo, "f4")
 def check_basic(self):
     dts = zip(['i1', 'i2', 'i4', 'i8',
                'u1', 'u2', 'u4', 'u8'],
               [N.int8, N.int16, N.int32, N.int64,
                N.uint8, N.uint16, N.uint32, N.uint64])
     for dt1, dt2 in dts:
         assert_equal(iinfo(dt1).min, iinfo(dt2).min)
         assert_equal(iinfo(dt1).max, iinfo(dt2).max)
     self.assertRaises(ValueError, iinfo, 'f4')
 def test_unsigned_max(self):
     types = np.sctypes['uint']
     for T in types:
         assert_equal(iinfo(T).max, T(-1))
Example #5
0
def test_instances():
    iinfo(10)
    finfo(3.0)
Example #6
0
 def test_unsigned_max(self):
     types = np.sctypes["uint"]
     for T in types:
         assert_equal(iinfo(T).max, T(-1))
 def check_unsigned_max(self):
     types = N.sctypes['uint']
     for T in types:
         assert_equal(iinfo(T).max, T(-1))
Example #8
0
def test_instances():
    iinfo(10)
    finfo(3.0)
Example #9
0
 def check_unsigned_max(self):
     types = N.sctypes['uint']
     for T in types:
         assert_equal(iinfo(T).max, T(-1))