Typing helper (varipeps.typing)

Typing helper for the module

varipeps.typing.Tensor = numpy.ndarray | jax.Array

Typing object for a numpy or jax tensor

varipeps.typing.is_int(a: Any) bool

Test if object is a integer.

Parameters:

a – Object to be tested

Returns:

True if object is a integer. False otherwise.

Return type:

bool

varipeps.typing.is_tensor(a: Any) bool

Test if object is a numpy or jax tensor

Parameters:

a – Object to be tested

Returns:

True if object is a numpy or jax.ndarray. False otherwise.

Return type:

bool