|
| Tensor | cytnx::zeros (const cytnx_uint64 &Nelem, const unsigned int &dtype=Type.Double, const int &device=Device.cpu) |
| | Create a rank-1 Tensor with all elements initialized to zero.
|
| |
| Tensor | cytnx::zeros (const std::vector< cytnx_uint64 > &Nelem, const unsigned int &dtype=Type.Double, const int &device=Device.cpu) |
| | Create a Tensor with all elements initialized to zero.
|
| |
| Tensor | cytnx::identity (const cytnx_uint64 &Dim, const unsigned int &dtype=Type.Double, const int &device=Device.cpu) |
| | Create a square rank-2 Tensor with the diagonal initialized to one and all other elements set to zero.
|
| |
| Tensor | cytnx::eye (const cytnx_uint64 &Dim, const unsigned int &dtype=Type.Double, const int &device=Device.cpu) |
| | Create a square rank-2 Tensor with the diagonal initialized to one and all other elements set to zero.
|
| |
| Tensor | cytnx::ones (const cytnx_uint64 &Nelem, const unsigned int &dtype=Type.Double, const int &device=Device.cpu) |
| | Create a rank-1 Tensor with all elements initialized to one.
|
| |
| Tensor | cytnx::ones (const std::vector< cytnx_uint64 > &Nelem, const unsigned int &dtype=Type.Double, const int &device=Device.cpu) |
| | Create a Tensor with all elements initialized to one.
|
| |
| Tensor | cytnx::arange (const cytnx_int64 &Nelem) |
| | Create a rank-1 Tensor with incremental unsigned integer elements in the range [0,Nelem).
|
| |
| Tensor | cytnx::arange (const cytnx_double &start, const cytnx_double &end, const cytnx_double &step=1, const unsigned int &dtype=Type.Double, const int &device=Device.cpu) |
| | Create a rank-1 Tensor with incremental elements in the range [start,end) with given step-size step between elements.
|
| |
| Tensor | cytnx::linspace (const cytnx_double &start, const cytnx_double &end, const cytnx_uint64 &Nelem, const bool &endpoint=true, const unsigned int &dtype=Type.Double, const int &device=Device.cpu) |
| |