Returns a 1-dimensional slice whose elements are equal to its indices.
Returns a 1-dimensional slice whose elements are equal to its indices.
Create a diagonal 2-dimensional slice from a 1-dimensional slice.
Construct new uninitialized slice of element type E and shape(length ...).
Construct new empty slice having the same element type and shape to given slice.
Returns a double eye slice.
Returns a square slice of element type E with ones on the main diagonal and zeros elsewhere.
Construct new slice having the same element type and shape to given slice.
Returns a slice with evenly spaced numbers over an interval.
Returns a slice with numbers evenly spaced over a log scale.
Construct a new slice, filled with ones, of element type E and shape(lengths ...).
Construct new ones slice having the same element type and shape to given slice.
An alternate, 1-dimensional version of iota (and different API).
Construct a new slice, filled with zeroes, of element type E and shape(lengths ...).
Construct new zeroes slice having the same element type and shape to given slice.
Extract the diagonal of a 2-dimensional slice.
Construct a new slice with ones along a diagonal and zeroes elsewhere of element type E.
Various slice creation (e.g., zeros, ones, zeros_like, diag)