parameters: (self,expr,varorder=None,defaultsize=1)
return_statement: return fv,varorder
docstring: Given an expression expr, return (f,varorder),
          where f is an equivalent 1-argument Python function that takes a list of numbers or numpy array.
          The order of variables that should be provided to f in this tuple is returned in varorder.
  
          If vector variables are not given size hints, then they are assumed to have defaultsize.
docstring_summary: Given an expression expr, return (f,varorder),
          where f is an equivalent 1-argument Python function that takes a list of numbers or numpy array.
          The order of variables that should be provided to f in this tuple is returned in varorder.
docstring_tokens: Given an expression expr return ( f varorder ) where f is an equivalent 1 - argument Python function that takes a list of numbers or numpy array . The order of variables that should be provided to f in this tuple is returned in varorder .
function: def makeFlatFunction(self,expr,varorder=None,defaultsize=1):
          """Given an expression expr, return (f,varorder),
          where f is an equivalent 1-argument Python function that takes a list of numbers or numpy array.
          The order of variables that should be provided to f in this tuple is returned in varorder.
  
          If vector variables are not given size hints, then they are assumed to have defaultsize.
          """
          f,varorder = self.makePyFunction(expr,varorder)
          indices = self.getFlatVarRanges(varorder,defaultsize)
          def fv(x):
              arglist = []
              for i,v in enumerate(varorder):
                  if v.type.char in 'AM':
                      arglist.append(x[indices[i]:indices[i+1]].reshape(v.size))
                  elif v.type.char == 'V':
                      arglist.append(x[indices[i]:indices[i+1]])
                  else:
                      arglist.append(x[indices[i]])
              #print "makeFlatFunction lambda function: Extracted arguments",arglist,"from",x
              #print "Evaluating expression",expr
              return f(*arglist)
          return fv,varorder
function_tokens: def makeFlatFunction ( self , expr , varorder = None , defaultsize = 1 ) : f , varorder = self . makePyFunction ( expr , varorder ) indices = self . getFlatVarRanges ( varorder , defaultsize ) def fv ( x ) : arglist = [ ] for i , v in enumerate ( varorder ) : if v . type . char in 'AM' : arglist . append ( x [ indices [ i ] : indices [ i + 1 ] ] . reshape ( v . size ) ) elif v . type . char == 'V' : arglist . append ( x [ indices [ i ] : indices [ i + 1 ] ] ) else : arglist . append ( x [ indices [ i ] ] ) #print "makeFlatFunction lambda function: Extracted arguments",arglist,"from",x #print "Evaluating expression",expr return f ( * arglist ) return fv , varorder