exprel class¶
(Shortest import: from brian2.core.functions import exprel)
-
class
brian2.core.functions.
exprel
(**kwargs)[source]¶ Bases:
sympy.core.function.Function
Represents
(exp(x) - 1)/x
.The benefit of using
exprel(x)
over(exp(x) - 1)/x
is that the latter is prone to cancellation under finite precision arithmetic when x is close to zero, and cannot be evaluated when x is equal to zero.Methods
eval
(arg)Returns a canonical form of cls applied to arguments args.
fdiff
([argindex])Returns the first derivative of this function.
Details
-
classmethod
eval
(arg)[source]¶ Returns a canonical form of cls applied to arguments args.
The eval() method is called when the class cls is about to be instantiated and it should return either some simplified instance (possible of some other class), or if the class cls should be unmodified, return None.
-
classmethod
Tutorials and examples using this¶
Example COBAHH
Example IF_curve_Hodgkin_Huxley
Example frompapers/Wang_Buszaki_1996
Example advanced/float_32_64_benchmark
Example advanced/exprel_function
Example compartmental/hh_with_spikes
Example compartmental/lfp