[repetition.Arbitrary] fix zero-sized bounds
This commit is contained in:
parent
5f91bd9c6c
commit
feb5d87cf4
1 changed files with 2 additions and 0 deletions
|
|
@ -397,6 +397,8 @@ class Arbitrary(Repetition):
|
|||
Returns:
|
||||
`[[x_min, y_min], [x_max, y_max]]` or `None`
|
||||
"""
|
||||
if self.displacements.size == 0:
|
||||
return None
|
||||
xy_min = numpy.min(self.displacements, axis=0)
|
||||
xy_max = numpy.max(self.displacements, axis=0)
|
||||
return numpy.array((xy_min, xy_max))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue