diff options
author | Pearu Peterson <pearu.peterson@gmail.com> | 2021-09-01 11:43:05 +0300 |
---|---|---|
committer | Pearu Peterson <pearu.peterson@gmail.com> | 2021-09-01 11:43:05 +0300 |
commit | f3fd6273fee44d1cc1aba502cf56aaea4b59d22c (patch) | |
tree | 3d57229f6a1c6c4af2f81d5cef5f0eb94ddd1bfd /numpy/f2py | |
parent | 96e63aaf5c2720c4adc6c4440f2732ee6a73b260 (diff) | |
download | numpy-f3fd6273fee44d1cc1aba502cf56aaea4b59d22c.tar.gz |
Add stacklevel to warn call.
Diffstat (limited to 'numpy/f2py')
-rw-r--r-- | numpy/f2py/symbolic.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/numpy/f2py/symbolic.py b/numpy/f2py/symbolic.py index d303da0a0..b71a87a76 100644 --- a/numpy/f2py/symbolic.py +++ b/numpy/f2py/symbolic.py @@ -482,7 +482,9 @@ class Expr: index = index, if len(index) > 1: warnings.warn( - f'C-index should be a single expression but got `{index}`') + f'C-index should be a single expression but got `{index}`', + category=warnings.SyntaxWarning, + stacklevel=1) return Expr(Op.INDEXING, (self,) + index) def substitute(self, symbols_map): |