Skip to content

Commit

Permalink
further data casting fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeroen Doornbos committed Oct 11, 2024
1 parent 9373f9e commit 1b43793
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openwfs/devices/slm/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 1b43793

Please sign in to comment.