def test_iinfo_long_values(self):
for code in 'bBhH':
res = np.array(np.iinfo(code).max + 1, dtype=code)
tgt = np.iinfo(code).min
assert_(res == tgt)
for code in np.typecodes['AllInteger']:
res = np.array(np.iinfo(code).max, dtype=code)
tgt = np.iinfo(code).max
assert_(res == tgt)
for code in np.typecodes['AllInteger']:
res = np.typeDict[code](np.iinfo(code).max)
tgt = np.iinfo(code).max
assert_(res == tgt)
test_scalarmath.py 文件源码
python
阅读 30
收藏 0
点赞 0
评论 0
评论列表
文章目录