MCPcopy Create free account
hub / github.com/NVIDIA/FasterTransformer / npy_load

Method npy_load

examples/cpp/xlnet/cnpy.cpp:362–374  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

360}
361
362cnpy::NpyArray cnpy::npy_load(std::string fname)
363{
364 FILE* fp = fopen(fname.c_str(), "rb");
365
366 // if(!fp) throw std::runtime_error("npy_load: Unable to open file "+fname);
367 NpyArray arr;
368 if (fp) {
369 arr = load_the_npy_file(fp);
370 fclose(fp);
371 }
372
373 return arr;
374}

Callers

nothing calls this directly

Calls 1

load_the_npy_fileFunction · 0.85

Tested by

no test coverage detected