<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def minimum_image(self):
 """Align the system according to the minimum image convention"""

        if self.box_vectors is None:
            raise ValueError('No periodic vectors defined')
        else:
            self.r_array = minimum_image(self.r_array, self.box_vectors.diagonal())
        
        return self