CartesianProdΒΆ

Performs cartesian product of the given sequence of tensors.

Abstract Signature:

CartesianProd(tensors: List[Tensor])

PyTorch

API: torch.cartesian_prod
Strategy: Direct Mapping

JAX (Core)

API: jax.numpy.meshgrid
Strategy: Macro 'jnp.stack(jnp.meshgrid(*{tensors}, indexing='ij'), -1).reshape(-1, len({tensors}))'

NumPy

API: numpy.meshgrid
Strategy: Macro 'np.stack(np.meshgrid(*{tensors}, indexing='ij'), -1).reshape(-1, len({tensors}))'