code: def minimum_image( self, r1, r2 ):
          
          delta_r = r2 - r1
          delta_r = np.array( [ x - math.copysign( 1.0, x ) if abs(x) > 0.5 else x for x in delta_r ] )
          return( delta_r )
docs: Find the minimum image vector from point r1 to point r2.
  
          Args:
              r1 (np.array): fractional coordinates of point r1.
              r2 (np.array): fractional coordinates of point r2.
  
          Returns:
              (np.array): the fractional coordinate vector from r1 to the nearest image of r2.