5 int limit =
MIN(IntV.
Len(), n);
7 for (
int i=0; i < limit; i++) {
8 IntNumpyVecOut[i] = IntV[i];
16 int limit =
MIN(FltV.
Len(), n);
18 for (
int i=0; i < limit; i++) {
19 FltNumpyVecOut[i] =
static_cast<float>(FltV[i]);
26 for (
int i = 0; i < n; ++i) {
27 IntV[i] = IntNumpyVecIn[i];
34 for (
int i = 0; i < n; ++i) {
35 FltV[i] = FltNumpyVecIn[i];
Main namespace for all the Snap global entities.
TSizeTy Len() const
Returns the number of elements in the vector.
void NumpyToTIntV(TIntV &IntV, int *IntNumpyVecIn, int n)
Converts NumpyArray to TIntV.
void TFltVToNumpy(TFltV &FltV, float *FltNumpyVecOut, int n)
Converts TFltV to Numpy array.
void NumpyToTFltV(TFltV &FltV, float *FltNumpyVecIn, int n)
Converts NumpyArray to TFltV.
void TIntVToNumpy(TIntV &IntV, int *IntNumpyVecOut, int n)
Converts TIntV to Numpy array.
Vector is a sequence TVal objects representing an array that can change in size.