| 161 | } |
| 162 | |
| 163 | void 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 | |
| 177 | uint16_t GetHeaderLen(char *data) { |
| 178 | std::string header = std::string(data); |
no test coverage detected