Commit 18ab6246 authored by Stephan Seitz's avatar Stephan Seitz
Browse files

Implement TypedSymbol.is_integer

parent b68e174e
......@@ -127,6 +127,13 @@ class TypedSymbol(sp.Symbol):
def __getnewargs__(self):
return, self.dtype
def is_integer(self):
if hasattr(self.dtype, 'numpy_dtype'):
return np.issubdtype(self.dtype.numpy_dtype, np.integer)
return False
def create_type(specification):
"""Creates a subclass of Type according to a string or an object of subclass Type.
Supports Markdown
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