Skip to content
Snippets Groups Projects
Commit 18ab6246 authored by Stephan Seitz's avatar Stephan Seitz
Browse files

Implement TypedSymbol.is_integer

parent b68e174e
No related merge requests found
......@@ -127,6 +127,13 @@ class TypedSymbol(sp.Symbol):
def __getnewargs__(self):
return self.name, self.dtype
@property
def is_integer(self):
if hasattr(self.dtype, 'numpy_dtype'):
return np.issubdtype(self.dtype.numpy_dtype, np.integer)
else:
return False
def create_type(specification):
"""Creates a subclass of Type according to a string or an object of subclass Type.
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment