grassmann_number ======================================== .. py:class:: grassmanntn.arith.grassmann_number(data,generator) An object representing a Grassmann number. .. note:: This is a class definition function. To define a new Grassmann variable, use `set_anticommutative() `__ instead. **Parameters:** - **data:** ``numpy.ndarray`` A vector containing all the coefficients. :math:`C_{i_1i_2\cdots i_n}` (vectorized). - **generator:** a list of ``str`` A list of symbols for Grassmann generators :math:`\theta_1,\theta_2,\cdots,\theta_n`. **Returns:** - **out:** `grassmann_number `__ A Grassmann number :math:`\psi=\sum_{i_1,i_2,\cdots,i_n}C_{i_1i_2\cdots i_n}\theta_1^{i_1},\theta_2^{i_2},\cdots,\theta_n^{i_n}`. Attributes ++++++++++ - **size:** ``int`` Returns the size of the Grassmann algebra containing this variable. - **basis:** ``list`` Returns an ordered list of ``str`` representing the generators. For data protection, this list is not modifiable. Unary and binary operations +++++++++++++++++++++++++++ - **Addition**: `+` and `+` Returns the sum of two Grassmann numbers (or scalars). - **Multiplication**: `*` and `*` Returns a multiplication of two Grassmann numbers (or scalars). This is **not** commutative in general! - **Subtraction**: `-` and `-` Returns the difference of two Grassmann numbers (or scalars). - **Scalar division**: `/` Returns the divisiion of `` by a scalar. - **Power**: `^` Raising to a power of some integer. Real and complex powers are not supported. - **Exponentiation**: `^` Returns `exp(log()*)`. The base `` can be any non-Grassmann scalar. - **Unary plus**: `+` Returns `` - **Negation**: `-` Returns `(-1)*` Methods +++++++ - **is_grassmann()**: Returns `True` if it contains Grassmann numbers (even or odd). - **is_even()**: Returns `True` if every term is Grassmann even. - **is_odd()**: Returns `True` if every term is Grassmann odd. - **get_coeff(basis=`None`)**: See `get_coeff() `__.