Skip to content

Commit d01fd00

Browse files
committed
array2d_to_qpolygonf: use np.asarray for NumPy V2 compat.
1 parent c152cd1 commit d01fd00

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

qwt/plot_curve.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ def array2d_to_qpolygonf(xdata, ydata):
9494
buffer = polyline.data()
9595
buffer.setsize(16 * size) # 16 bytes per point: 8 bytes per X,Y value (float64)
9696
memory = np.frombuffer(buffer, np.float64)
97-
memory[: (size - 1) * 2 + 1 : 2] = np.array(xdata, dtype=np.float64, copy=False)
98-
memory[1 : (size - 1) * 2 + 2 : 2] = np.array(ydata, dtype=np.float64, copy=False)
97+
memory[: (size - 1) * 2 + 1 : 2] = np.asarray(xdata, dtype=np.float64)
98+
memory[1 : (size - 1) * 2 + 2 : 2] = np.asarray(ydata, dtype=np.float64)
9999
return polyline
100100

101101

0 commit comments

Comments
 (0)