DiagIndicesΒΆ
Return the indices to access the main diagonal of an array.
Abstract Signature:
DiagIndices(n: int, ndim: int = 2)
PyTorch
API:
βStrategy: Macro '(torch.arange({n}),) * {ndim}'
Keras
API:
βStrategy: Custom / Partial
TensorFlow
API:
βStrategy: Custom / Partial
Apple MLX
API:
βStrategy: Custom / Partial