8#include <initializer_list>
33 Tensor
zeros(
const std::vector<cytnx_uint64> &Nelem,
const unsigned int &dtype=
Type.Double,
const int &device=
Device.cpu);
85 Tensor
ones(
const std::vector<cytnx_uint64> &Nelem,
const unsigned int &dtype=
Type.Double,
const int &device=
Device.cpu);
Definition Accessor.hpp:12
Device_class Device
Definition Device.cpp:105
double cytnx_double
Definition Type.hpp:20
Tensor 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)
Definition Generator.cpp:73
Tensor arange(const cytnx_int64 &Nelem)
create an rank-1 Tensor with incremental unsigned integer elements start with [0,Nelem)
Definition Generator.cpp:68
Tensor 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.
Definition Generator.cpp:23
uint64_t cytnx_uint64
Definition Type.hpp:22
int64_t cytnx_int64
Definition Type.hpp:25
Tensor 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.
Definition Generator.cpp:10
Type_class Type
Definition Type.cpp:137
Tensor 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.
Definition Generator.cpp:34
Tensor 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.
Definition Generator.cpp:38