Ticket #3966: ode-cython.patch

File ode-cython.patch, 1.1 kB (added by jason, 4 months ago)
  • a/sage/gsl/ode.pyx

    old new  
    257257         It is possible to pass a compiled function by deriving from the class ode_sysem and overloading c_f and c_j with C functions that 
    258258         specify the system. The following will work in notebook 
    259259 
    260          %pyrex  
     260         %cython 
    261261         cimport sage.gsl.ode 
    262262         import sage.gsl.ode 
    263263         include 'gsl.pxi' 
     
    393393         T= gsl_odeiv_step_rk4imp 
    394394      elif self.algorithm == "bsimp": 
    395395         T = gsl_odeiv_step_bsimp 
    396          if self.jacobian==None: 
     396         if not type and self.jacobian==None: 
    397397            raise TypeError,"The jacobian must be provided for the implicit Burlisch-Stoer method" 
    398398      elif self.algorithm == "gear1": 
    399399         T = gsl_odeiv_step_gear1