Learn Before
Concept

Default Axis for Tensor Indexing

When a single index or slice is provided for a kextrmthk^{ extrm{th}}-order tensor (where k>1k > 1), the selection operation defaults to being applied along axis 00. For example, applying the index [-1] to a matrix returns its last row, while the slice [1:3] returns its second and third rows.

0

1

Updated 2026-05-01

Contributors are:

Who are from:

Tags

D2L

Dive into Deep Learning @ D2L