Tensor Creation Routines#
From shape or value#
Return a new tensor of given shape and type, filled with ones. |
|
Return a new tensor of given shape and type, filled with zeros. |
|
Return a new tensor of given shape and type, without initializing entries. |
|
Return a new tensor with the same shape and type as a given tensor. |
|
Return a new tensor of given shape and type, filled with fill_value. |
|
Return a full tensor with the same shape and type as a given tensor. |
From existing data#
Create a tensor. |
|
Convert the input to an array. |
Building matrices#
Extract a diagonal or construct a diagonal tensor. |
|
Create a two-dimensional tensor with the flattened input as a diagonal. |
|
Lower triangle of a tensor. |
|
Upper triangle of a tensor. |
Numerical ranges#
Return evenly spaced values within a given interval. |
|
Return evenly spaced numbers over a specified interval. |
|
Return coordinate matrices from coordinate vectors. |
|
Construct a multi-dimensional "meshgrid". |
|
Construct a multi-dimensional "meshgrid". |