Skip to content

Commit abe42cc

Browse files
committed
BasePlot.add_item_with_z_offset: fix DeprecationWarning: Conversion of an array with ndim > 0 to a scalar
1 parent 0357eab commit abe42cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plotpy/plot/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1322,7 +1322,7 @@ def add_item_with_z_offset(self, item: itf.IBasePlotItem, zoffset: int) -> None:
13221322
zlist = sorted(
13231323
[_it.z() for _it in self.items if _it.z() >= zoffset] + [zoffset - 1]
13241324
)
1325-
dzlist = np.argwhere(np.diff(zlist) > 1)
1325+
dzlist = np.argwhere(np.diff(zlist) > 1).flatten()
13261326
if len(dzlist) == 0:
13271327
z = max(zlist) + 1
13281328
else:

0 commit comments

Comments
 (0)