diff --git a/recipes/cnpy/all/test_package/example1.cpp b/recipes/cnpy/all/test_package/example1.cpp index 725b235ebc7be..f4dafb6298173 100644 --- a/recipes/cnpy/all/test_package/example1.cpp +++ b/recipes/cnpy/all/test_package/example1.cpp @@ -1,20 +1,15 @@ #include #include -#include - #include"cnpy.h" int main() { - const int Nx = 128; - const int Ny = 64; - const int Nz = 32; - - std::vector> data(Nx*Ny*Nz); - for(int i = 0;i < Nx*Ny*Nz;i++) data[i] = std::complex(rand(),rand()); + const size_t Nx = 16; + const size_t Ny = 16; + const size_t Nz = 16; + std::vector data(Nx*Ny*Nz); + for(int i = 0;i < Nx*Ny*Nz;i++) data[i] = rand(); cnpy::npy_save("arr1.npy",&data[0],{Nz,Ny,Nx},"w"); cnpy::NpyArray arr = cnpy::npy_load("arr1.npy"); - std::complex* loaded_data = arr.data>(); - return EXIT_SUCCESS; }