IntegerConstant3D#

class cherab.lhd.emc3.cython.intfunction.IntegerConstant3D#

Bases: IntegerFunction3D

Wraps a scalar constant with a IntegerFunction3D object.

This class allows a numeric Python scalar, such as an integer, to interact with cython code that requires a IntegerFunction3D object. The scalar must be convertible to integer. The value of the scalar constant will be returned independent of the arguments the function is called with.

This class is intended to be used to transparently wrap python objects that are passed via constructors or methods into cython optimised code. It is not intended that the users should need to directly interact with these wrapping objects. Constructors and methods expecting a IntegerFunction3D object should be designed to accept a generic python object and then test that object to determine if it is an instance of IntegerFunction3D. If the object is not a IntegerFunction3D object it should be wrapped using this class for internal use.

Parameters:
valueint

The constant value to be returned by the function.

See also

autowrap_intfunction3d

Methods

__call__

Evaluate the function f(x, y, z)