|
| Tensor | cytnx::zeros (const cytnx_uint64 &Nelem, const unsigned int &dtype=Type.Double, const int &device=Device.cpu) |
| | create an rank-1 Tensor with all the elements are initialized with zero.
|
| |
| Tensor | cytnx::zeros (const std::vector< cytnx_uint64 > &Nelem, const unsigned int &dtype=Type.Double, const int &device=Device.cpu) |
| | create an Tensor with all the elements are initialized with zero.
|
| |
| Tensor | cytnx::ones (const cytnx_uint64 &Nelem, const unsigned int &dtype=Type.Double, const int &device=Device.cpu) |
| | create an rank-1 Tensor with all the elements are initialized with one.
|
| |
| Tensor | cytnx::ones (const std::vector< cytnx_uint64 > &Nelem, const unsigned int &dtype=Type.Double, const int &device=Device.cpu) |
| | create an Tensor with all the elements are initialized with one.
|
| |
| Tensor | cytnx::identity (const cytnx_uint64 &Dim, const unsigned int &dtype=Type.Double, const int &device=Device.cpu) |
| | create an square rank-2 Tensor with all diagonal to be one.
|
| |
| Tensor | cytnx::eye (const cytnx_uint64 &Dim, const unsigned int &dtype=Type.Double, const int &device=Device.cpu) |
| | create an square rank-2 Tensor with all diagonal to be one.
|
| |
| 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 an rank-1 Tensor with elements defined in range [start,end) with assigned step-size
|
| |
| Tensor | cytnx::arange (const cytnx_int64 &Nelem) |
| | create an rank-1 Tensor with incremental unsigned integer elements start with [0,Nelem)
|
| |
| 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) |
| |