MaskIndicesΒΆ

Return the indices to access (n, n) arrays, given a masking function.

Abstract Signature:

MaskIndices(n: int, mask_func: Callable, k: int = 0)

PyTorch

API: β€”
Strategy: Plugin (numpy_fallback)

JAX (Core)

API: jax.numpy.mask_indices
Strategy: Direct Mapping

NumPy

API: numpy.mask_indices
Strategy: Direct Mapping

Keras

API: β€”
Strategy: Plugin (numpy_fallback)

TensorFlow

API: β€”
Strategy: Plugin (numpy_fallback)

Apple MLX

API: β€”
Strategy: Plugin (numpy_fallback)

Flax NNX

API: jax.numpy.mask_indices
Strategy: Direct Mapping

PaxML / Praxis

API: jax.numpy.mask_indices
Strategy: Direct Mapping