diff options
author | Anthony Barbier <anthony.barbier@arm.com> | 2017-11-10 16:27:32 +0000 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:35:24 +0000 |
commit | 87f21cd39639118293b51fa776d30aa7722917bd (patch) | |
tree | 9a29853b9dd1d8b4dd289334bcab14fc1bc09725 /tests | |
parent | 5edbd1c5dce43b66f30c903797a91e39369c5b62 (diff) | |
download | ComputeLibrary-87f21cd39639118293b51fa776d30aa7722917bd.tar.gz |
COMPMID-556 Updated libnpy.hpp
Change-Id: I380a11f41ca2158de1dd0a6339ed9c884feb8f69
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/95385
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Reviewed-by: Michalis Spyrou <michalis.spyrou@arm.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/AssetsLibrary.h | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/tests/AssetsLibrary.h b/tests/AssetsLibrary.h index c2eee8b616..6eb1e3c5f4 100644 --- a/tests/AssetsLibrary.h +++ b/tests/AssetsLibrary.h @@ -673,30 +673,12 @@ void AssetsLibrary::fill_layer_data(T &&tensor, std::string name) const { throw framework::FileNotFound("Could not load npy file: " + path); } - // Check magic bytes and version number - unsigned char v_major = 0; - unsigned char v_minor = 0; - npy::read_magic(stream, &v_major, &v_minor); - - // Read header - std::string header; - if(v_major == 1 && v_minor == 0) - { - header = npy::read_header_1_0(stream); - } - else if(v_major == 2 && v_minor == 0) - { - header = npy::read_header_2_0(stream); - } - else - { - ARM_COMPUTE_ERROR("Unsupported file format version"); - } + std::string header = npy::read_header(stream); // Parse header bool fortran_order = false; std::string typestr; - npy::ParseHeader(header, typestr, &fortran_order, shape); + npy::parse_header(header, typestr, fortran_order, shape); // Check if the typestring matches the given one std::string expect_typestr = get_typestring(tensor.data_type()); |