Typing helper (varipeps.typing)

Typing helper for the module

varipeps.typing.Tensor

Typing object for a numpy or jax tensor

alias of ndarray | Array

varipeps.typing.is_int(a: Any) bool[source]

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[source]

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