def __init__(self, typ, n, coeffs=[]): """ The constructor is meant to be called from constructors of subclasses of Func1. See: Polynomial, Gaussian, Arrhenius, Fourier, Const, PeriodicFunction """ self.n = n self.coeffs = asarray(coeffs, 'd') self._func_id = _cantera.func_new(typ, n, self.coeffs)
def __init__(self, typ, n, coeffs=[]): """ The constructor is meant to be called from constructors of subclasses of Func1. See: Polynomial, Gaussian, Arrhenius, Fourier, Const, PeriodicFunction """ self.n = n self._own = 1 self._func_id = 0 self._typ = typ self.coeffs = asarray(coeffs,'d') self._func_id = _cantera.func_new(typ, n, self.coeffs)
def __init__(self, typ, n, coeffs=[]): """ The constructor is meant to be called from constructors of subclasses of Func1: :class:`Polynomial`, :class:`Gaussian`, :class:`Arrhenius`, :class:`Fourier`, :class:`Const`, :class:`PeriodicFunction`. """ self.n = n self._own = 1 self._func_id = 0 self._typ = typ if _cantera.nummod == 'numpy': self.coeffs = array(coeffs, dtype=float, ndmin=1) else: self.coeffs = asarray(coeffs, 'd') self._func_id = _cantera.func_new(typ, n, self.coeffs)
def __init__(self, typ, n, coeffs=[]): """ The constructor is meant to be called from constructors of subclasses of Func1: :class:`Polynomial`, :class:`Gaussian`, :class:`Arrhenius`, :class:`Fourier`, :class:`Const`, :class:`PeriodicFunction`. """ self.n = n self._own = 1 self._func_id = 0 self._typ = typ if _cantera.nummod == "numpy": self.coeffs = array(coeffs, dtype=float, ndmin=1) else: self.coeffs = asarray(coeffs, "d") self._func_id = _cantera.func_new(typ, n, self.coeffs)