Skip to content

Commit f3fd627

Browse files
committed
Add stacklevel to warn call.
1 parent 96e63aa commit f3fd627

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

numpy/f2py/symbolic.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,9 @@ def __getitem__(self, index):
482482
index = index,
483483
if len(index) > 1:
484484
warnings.warn(
485-
f'C-index should be a single expression but got `{index}`')
485+
f'C-index should be a single expression but got `{index}`',
486+
category=warnings.SyntaxWarning,
487+
stacklevel=1)
486488
return Expr(Op.INDEXING, (self,) + index)
487489

488490
def substitute(self, symbols_map):

0 commit comments

Comments
 (0)