def _one_step(mu, u):
 if (np.abs(mu).max() > 1.0):
  return 1.0
 _compose_linear_fitting_data(mu, u)
 (u['uu'], u['sing'], u['vv']) = linalg.svd(u['M'])
 u['resi'][:] = u['y'][:]
 for p in range((u['nfit'] - 1)):
  dot = np.dot(u['uu'][p], u['y'])
  for k in range((u['nterms'] - 1)):
   u['resi'][k] = (u['resi'][k] - (u['uu'][(p, k)] * dot))
 return np.dot(u['resi'], u['resi'])

def _one_step ( mu , u ) : if ( np . abs ( mu ) . max ( ) > 1.0 ) : return 1.0 _compose_linear_fitting_data ( mu , u ) ( u [ 'uu' ] , u [ 'sing' ] , u [ 'vv' ] ) = linalg . svd ( u [ 'M' ] ) u [ 'resi' ] [ : ] = u [ 'y' ] [ : ] for p in range ( ( u [ 'nfit' ] - 1 ) ) : dot = np . dot ( u [ 'uu' ] [ p ] , u [ 'y' ] ) for k in range ( ( u [ 'nterms' ] - 1 ) ) : u [ 'resi' ] [ k ] = ( u [ 'resi' ] [ k ] - ( u [ 'uu' ] [ ( p , k ) ] * dot ) ) return np . dot ( u [ 'resi' ] , u [ 'resi' ] )
evaluate the residual sum of squares fit for one set of mu values .