enp.get_np_module

Contents

enp.get_np_module#

etils.enp.get_np_module(array: Array, *, strict: bool = True)[source]#

Returns the numpy module associated with the given array.

Parameters:
  • array – Either tf, jax or numpy array.

  • strict – If False, default to np.array if the array can’t be infered ( to support array-like: list, tuple,…)

Returns:

The numpy module.