diff --git a/pyapr/reconstruction/APRSlicer.py b/pyapr/reconstruction/APRSlicer.py index b0b1a30..d7abd18 100644 --- a/pyapr/reconstruction/APRSlicer.py +++ b/pyapr/reconstruction/APRSlicer.py @@ -67,6 +67,10 @@ def shape(self): def ndim(self): return 3 + def __array__(self): + # allows things like np.max(APRSlicer) + return np.array(self.parts) + def astype(self, typespec): parts = type(type_to_particles(typespec))(np.array(self.parts).astype(typespec)) dtype = typespec