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

Simplify has_np_pythran

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