MCPcopy Create free account
hub / github.com/NVIDIA/DALI / CheckNpyVersion

Function CheckNpyVersion

dali/util/numpy.cc:163–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

161}
162
163void CheckNpyVersion(char *token) {
164 int api_version = token[6];
165 if (api_version != 1) {
166 static int unrecognized_version = [&]() {
167 std::string actual_version =
168 (api_version == 2 || api_version == 3) ? "higher" : "unrecognized";
169 DALI_WARN(make_string(
170 "Expected file in NPY file format version 1. The provided file uses ", actual_version,
171 " version. Please note, DALI does not support structured NumPy arrays."));
172 return 0;
173 }();
174 }
175}
176
177uint16_t GetHeaderLen(char *data) {
178 std::string header = std::string(data);

Callers 2

ParseODirectHeaderFunction · 0.85
ParseHeaderFunction · 0.85

Calls 1

make_stringFunction · 0.50

Tested by

no test coverage detected