Skip to content

Commit 7f500d1

Browse files
committed
fix: convert one-element array to float properly
1 parent 9dac12f commit 7f500d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

optiland/surfaces/surface_factory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def _configure_cs(self, index, **kwargs):
155155
elif index == 1:
156156
z = 0 # first surface, always at zero
157157
else:
158-
z = float(self._surface_group.positions[index-1]) + \
158+
z = float(self._surface_group.positions[index-1].item()) + \
159159
self.last_thickness
160160

161161
# self.last_thickness = thickness

0 commit comments

Comments
 (0)