def inherit(self, new_array):
        """
        Converts a generic numpy ndarray into an MRSData instance by copying
        its own MRS specific parameters. This is useful when performing some
        processing on the MRSData object gives a bare NDArray result.

        :param new_array: the ndarray to be converted to MRSData
        :return: a new MRSData instance with data from new_array and parameters from self.
        """
        cast_array = new_array.view(MRSData)
        cast_array._dt = self.dt
        cast_array._f0 = self.f0
        cast_array._te = self.te
        cast_array.ppm0 = self.ppm0
        cast_array.voxel_dimensions = self.voxel_dimensions
        cast_array.transform = self.transform
        cast_array.metadata = self.metadata
        return cast_array
Converts a generic numpy ndarray into an MRSData instance by copying
        its own MRS specific parameters. This is useful when performing some
        processing on the MRSData object gives a bare NDArray result.

        :param new_array: the ndarray to be converted to MRSData
        :return: a new MRSData instance with data from new_array and parameters from self.