Skip to content

Commit

Permalink
BUG: Added missing stacklevel
Browse files Browse the repository at this point in the history
  • Loading branch information
madphysicist committed Jan 8, 2022
1 parent 89efa96 commit 3fd48e9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion numpy/core/defchararray.py
Expand Up @@ -1551,7 +1551,8 @@ def slice_(a, start, stop=None, step=None, chunksize=None):
if str(e) == 'ndarray is not contiguous':
warnings.warn('A contiguous base array could not be found. '
'A slice of a copy will be returned. '
'Writeback to the original array will not work.')
'Writeback to the original array will not work.',
stacklevel=2)
a = a.copy()
newarray = ndarray(buffer=a, offset=newoffset,
shape=newshape, strides=newstrides,
Expand Down

0 comments on commit 3fd48e9

Please sign in to comment.