def deriv(self, du: 'Variable') -> ('ValuedObj', Undefined): assert not inloop() if __debug__: from .variable import Variable assert isinstance( du, Variable ), 'Can only take derivative with regards to Variable, not {}'.format( type(du)) return complete(self._aderiv(du))
def d(self, du: 'Variable') -> 'UnseededFunction': assert not inloop() if __debug__: from .variable import Variable assert isinstance( du, Variable ), 'Can only take derivative with regards to Variable, not {}'.format( type(du)) from .derivative import Derivative return complete(Derivative._a_get_deriv(self, du))
def fget(self) -> (Any, Undefined): assert not inloop() return complete(self._avalue)
def __round__(self, digits: int) -> (int, float): assert not inloop() return complete(self.__around__())
def __invert__(self) -> 'SeededOperator': assert not inloop() return complete(self.__ainvert__())
def fget(self): assert False, "don't use non-async functions!" return complete(self._afunc)
def __int__(self) -> int: assert not inloop() return complete(self.__aint__())
def hasvalue(self) -> bool: assert not inloop() return complete(self._ahasvalue)
def __delattr__(self, name): assert not inloop() return complete(self.__adelattr__(name))
def __call__(self, *args, **kwargs): assert not inloop() return complete(self.__acall__(*args, **kwargs))
def __eq__(self, other: Any) -> bool: assert not inloop() return complete(self.__aeq__(other))
def __repr__(self) -> str: assert not inloop() return complete(self.__arepr__())
def __truediv__(self, other: 'Derivative') -> 'UnseededFunction': assert not inloop() if not isinstance(other, Derivative): return super().__truediv__(self, other) return complete(self.__atruediv__(other))
def isconst(self, du: 'Variable') -> bool: assert not inloop() return complete(self._aisconst(du))
def fset(self, val: Any) -> None: assert not inloop() return complete(self._avalue_setter(val))
def fdel(self) -> None: assert not inloop() return complete(self._avalue_deleter())
def __new__(cls, *args, **kwargs): assert not inloop() assert isinstance(cls, type) return complete(cls.__anew__(cls, *args, **kwargs))
def __bool__(self) -> bool: assert not inloop() return complete(self.__aabs__())
def __init__(self, *args, **kwargs): assert not inloop() return complete(self.__ainit__(*args, **kwargs))
def __float__(self) -> float: assert not inloop() return complete(self.__afloat__())
rv = f.future(r.value) return await _domethod('__le__', lv.result(), rv.result()) await opers['__ale__']._afunc_setter(wrap_func) async def wrap_func(l, r): async with finish() as f: lv = f.future(l.value) rv = f.future(r.value) return await _domethod('__gt__', lv.result(), rv.result()) await opers['__agt__']._afunc_setter(wrap_func) async def wrap_func(x): return await _domethod('__neg__', await x._avalue) await opers['__aneg__']._afunc_setter(wrap_func) async def wrap_func(x): return await _domethod('__pos__', await x._avalue) await opers['__apos__']._afunc_setter(wrap_func) async def wrap_func(x): return await _domethod('__invert__', await x._avalue) await opers['__ainvert__']._afunc_setter(wrap_func) complete(main())
def fset(self, val): assert False, "don't use non-async functions!" return complete(self._afunc_setter(val))
csc.deriv_w_args = derive # ensure_future: async lambda async def derive(du, a): return sec(a) * tan(a) * await a._aderiv(du) #await sec.deriv_w_args = derive # ensure_future: async lambda async def derive(du, a): return -csc(a)**2 * await a._aderiv(du) #await cot.deriv_w_args = derive # ensure_future: async lambda async def derive(du, a): return await a._aderiv(du) / a #await ln.deriv_w_args = derive async def derive(du, a): return .5 * a**-.5 * await a._aderiv(du) sqrt.deriv_w_args = derive del derive return locals() __all__ = tuple(str(x) for x in complete(main()))
def __rsub__(self, other: Any) -> 'SeededOperator': assert not inloop() return complete(self.__arsub__(other))
def __complex__(self) -> complex: assert not inloop() return complete(self.__acomplex__())