Commit 779d5db1 authored by Adrien Guinet's avatar Adrien Guinet

Simplify has_np_pythran

parent c5257236
......@@ -16,13 +16,10 @@ except ImportError:
# Pythran/Numpy specific operations
def has_np_pythran(env):
while env is not None:
directives = getattr(env, 'directives', None)
if directives and directives.get('np_pythran', False):
return True
env = env.outer_scope
if env is None:
return False
directives = getattr(env, 'directives', None)
return (directives and directives.get('np_pythran', False))
@cython.ccall
def is_pythran_supported_dtype(type_):
......
Markdown is supported
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