From 1b43793854c7848ecdb44a554e85cb622fabc12b Mon Sep 17 00:00:00 2001 From: Jeroen Doornbos Date: Fri, 11 Oct 2024 10:57:37 +0200 Subject: [PATCH] further data casting fix --- openwfs/devices/slm/geometry.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openwfs/devices/slm/geometry.py b/openwfs/devices/slm/geometry.py index 3e492b7..7a6754e 100644 --- a/openwfs/devices/slm/geometry.py +++ b/openwfs/devices/slm/geometry.py @@ -40,8 +40,8 @@ def __init__(self, vertices: ArrayLike, indices: ArrayLike): vertices (np.ndarray): The vertices of the geometry. See class documentation for details. indices (np.ndarray): The indices of the geometry. See class documentation for details. """ - self._vertices = np.array(vertices, dtype=np.float32, copy=False) - self._indices = np.array(indices, dtype=np.uint16, copy=False) + self._vertices = np.asarray(vertices, dtype=np.float32) + self._indices = np.asarray(indices, dtype=np.uint16) if self._vertices.ndim != 2 or self._vertices.shape[1] != 4: raise ValueError("Vertices should be a 2-D array with 4 columns")