Skip to content
Snippets Groups Projects
Commit 43b1ea05 authored by Yaman Umuroglu's avatar Yaman Umuroglu
Browse files

[DataType] add is_integer

parent 58e694a7
No related branches found
No related tags found
No related merge requests found
......@@ -125,3 +125,8 @@ class DataType(Enum):
def signed(self):
"""Return whether this DataType can represent negative numbers."""
return self.min() < 0
def is_integer(self):
"""Return whether this DataType represents integer values only."""
# only FLOAT32 is noninteger for now
return self != DataType.FLOAT32
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment