Unverified Commit a62bab5d authored by Zhang, Chen's avatar Zhang, Chen Committed by GitHub
Browse files

Merge pull request #272 from ornlneutronimaging/crop_returns_copy

crop returns a copy for 3D arrays
parents 26630279 bc77e33d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -140,7 +140,8 @@ class crop(param.ParameterizedFunction):
        if arrays.ndim == 2:
            return arrays[top:bottom, left:right]
        elif arrays.ndim == 3:
            return arrays[:, top:bottom, left:right]
            # return a copy allowing the uncropped array can be garbage collected in the future
            return arrays[:, top:bottom, left:right].copy()


def detect_bounds(