prysm.mathops

A submodule which imports and exports math functions from different libraries.

The intend is to make the backend for prysm interoperable, allowing users to utilize more high performance engines if they have them installed, or fall back to more widely available options in the case that they do not.

prysm.mathops.sign(x)

Sign of a number. Note only works for single values, not arrays.

prysm.mathops.kronecker(i, j)

Kronecker delta function, 1 if i = j, otherwise 0.

prysm.mathops.gamma(n, m)

Gamma function.

class prysm.mathops.MathEngine(source=<module 'numpy' from '/home/docs/checkouts/readthedocs.org/user_builds/prysm/envs/v0.18/lib/python3.7/site-packages/numpy/__init__.py'>)

Bases: object

An engine allowing an interchangeable backend for mathematical functions.

change_backend(backend)

Run when changing the backend.