xtensor
xtensor copied to clipboard
xt::load_npy is unable to load zero-dimension .npy files on Windows 10
Loading the attached npy file, (float32, c-style) zero_dimensions.zip on Windows 10, the following occurs:
in line 532, xnpy.hpp: class std::runtime_error: This npy_file has already been cast.
If i dig deeper:
In line 703, xnpy.hpp: m_buffer is set to nullptr by detail::load_npy_file. That causes load_npy to throw an error:
I think the problem lies in the xt::detail::parse_header function. But I didn't have time to go deeper.
Best wishes, Gebdadendo
This works on Ubuntu 20.0.4.