Improve consistency of ndarray members

This commit is contained in:
Jan Petykiewicz 2020-05-11 18:49:30 -07:00
commit fa8fc52dd6
6 changed files with 9 additions and 9 deletions

View file

@ -49,7 +49,7 @@ class Label:
if val.size != 2:
raise PatternError('Offset must be convertible to size-2 ndarray')
self._offset = val.flatten()
self._offset = val.flatten().astype(float)
# layer property
@property
@ -83,7 +83,7 @@ class Label:
self.unlock()
self.identifier = ()
self.string = string
self.offset = numpy.array(offset, dtype=float)
self.offset = numpy.array(offset, dtype=float, copy=True)
self.layer = layer
self.locked = locked