Put overflow detector a bit higher
This commit is contained in:
parent
703fbf5031
commit
1748daab4c
@ -327,12 +327,10 @@ class Measurement:
|
|||||||
with self.file() as f:
|
with self.file() as f:
|
||||||
for block in self.iterBlocks(f):
|
for block in self.iterBlocks(f):
|
||||||
dtype = block.dtype
|
dtype = block.dtype
|
||||||
print(dtype)
|
|
||||||
if dtype.kind == 'i':
|
if dtype.kind == 'i':
|
||||||
# if dtype in ['
|
|
||||||
# minvalue = np.iinfo(dtype).min
|
# minvalue = np.iinfo(dtype).min
|
||||||
maxvalue = np.iinfo(dtype).max
|
maxvalue = np.iinfo(dtype).max
|
||||||
if np.max(np.abs(block)) > maxvalue / 2:
|
if np.max(np.abs(block)) >= 0.9*maxvalue:
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
# Cannot check for floating point values.
|
# Cannot check for floating point values.
|
||||||
|
Loading…
Reference in New Issue
Block a user