def fit_fr(self, data, *args, **kwds):
 (loc0, scale0) = lmap(kwds.get, ['loc', 'scale'], [0.0, 1.0])
 Narg = len(args)
 if ((Narg == 0) and hasattr(self, '_fitstart')):
  x0 = self._fitstart(data)
 elif (Narg > self.numargs):
  raise ValueError('Too many input arguments.')
 else:
  args += ((1.0,) * (self.numargs - Narg))
  x0 = (args + (loc0, scale0))
 if ('frozen' in kwds):
  frmask = np.array(kwds['frozen'])
  if (len(frmask) != (self.numargs + 2)):
   raise ValueError('Incorrect number of frozen arguments.')
  else:
   x0 = np.array(x0)[np.isnan(frmask)]
 else:
  frmask = None
 return optimize.fmin(self.nnlf_fr, x0, args=(np.ravel(data), frmask), disp=0)

def fit_fr ( self , data , * args , ** kwds ) : ( loc0 , scale0 ) = lmap ( kwds . get , [ 'loc' , 'scale' ] , [ 0.0 , 1.0 ] ) Narg = len ( args ) if ( ( Narg == 0 ) and hasattr ( self , '_fitstart' ) ) : x0 = self . _fitstart ( data ) elif ( Narg > self . numargs ) : raise ValueError ( 'Too many input arguments.' ) else : args += ( ( 1.0 , ) * ( self . numargs - Narg ) ) x0 = ( args + ( loc0 , scale0 ) ) if ( 'frozen' in kwds ) : frmask = np . array ( kwds [ 'frozen' ] ) if ( len ( frmask ) != ( self . numargs + 2 ) ) : raise ValueError ( 'Incorrect number of frozen arguments.' ) else : x0 = np . array ( x0 ) [ np . isnan ( frmask ) ] else : frmask = None return optimize . fmin ( self . nnlf_fr , x0 , args = ( np . ravel ( data ) , frmask ) , disp = 0 )
estimate distribution parameters by mle taking some parameters as fixed parameters data : array .