ExTorch.Scalar
(extorch v0.3.0)
Copy Markdown
An ExTorch.Scalar is any singular value that can be stored in a ExTorch.Tensor.
Summary
Types
An scalar list is a list that either contains scalars or scalar lists.
Scalar or scalar list type specifier.
A scalar consists of any value that can be stored in an ExTorch.Tensor struct.
Types
@type scalar_list() :: [t() | [scalar_list()]]
An scalar list is a list that either contains scalars or scalar lists.
@type scalar_or_list() :: t() | scalar_list() | tuple()
Scalar or scalar list type specifier.
@type t() :: number() | :nan | :inf | :ninf | ExTorch.Complex.t()
A scalar consists of any value that can be stored in an ExTorch.Tensor struct.
It can be:
- Any number, floating or integer.
- The special floating point values :nan, :inf and :ninf, which represent the Not-A-Number, positive infinity and negative infinity, respectively.
- A complex value represented by the
ExTorch.Complexstruct.