# enp.compat

[[[Source]]](https://github.com/google/etils/tree/main/etils/enp/compat.py)

```{eval-rst}
.. automodule:: etils.enp.compat
  :no-members:
```

## Symbols


### Function

|  |  |
--- | ---
[enp.compat.astype](astype) | `x.astype(dtype)`.
[enp.compat.concat](concat) | `xnp.concatenate(x, axis=axis)`.
[enp.compat.det](det) | Like `np.linalg.det` but auto-support jnp, tnp, np.
[enp.compat.dtype_np_to_torch](dtype_np_to_torch) | Returns the torch dtype for the given numpy dtype.
[enp.compat.dtype_torch_to_np](dtype_torch_to_np) | Returns the numpy dtype for the given torch dtype.
[enp.compat.expand_dims](expand_dims) | `xnp.expand_dims(x, axis=axis)`.
[enp.compat.inv](inv) | Like `np.linalg.inv` but auto-support jnp, tnp, np.
[enp.compat.is_array_xnp](is_array_xnp) | `isinstance(x, xnp.Array)`.
[enp.compat.norm](norm) | Like `np.linalg.norm` but auto-support jnp, tnp, np.
[enp.compat.round](round) | `x.round()` for jnp, tnp, np, otrch.

### Attribute

|  |  |
--- | ---
[enp.compat.lazy](lazy) | 

```{toctree}
:hidden:

astype
concat
det
dtype_np_to_torch
dtype_torch_to_np
expand_dims
inv
is_array_xnp
lazy
norm
round
```