Currently, when reading (or writing) an NPZ file and the type descriptor is not as expected, the error message only shows the descriptor that's in the NPZ file:
|
ReadNpyError::WrongDescriptor(desc) => { |
|
write!(f, "incorrect descriptor ({}) for this type", desc) |
|
} |
This could be extended by , expected ({}) showing what descriptor was expected.
I don't know if every place in the code that produces a WrongDescriptor error also knows what the expected descriptor is though. So not sure how feasible this request is.
Currently, when reading (or writing) an NPZ file and the type descriptor is not as expected, the error message only shows the descriptor that's in the NPZ file:
ndarray-npy/src/npy/mod.rs
Lines 488 to 490 in 169c116
This could be extended by
, expected ({})showing what descriptor was expected.I don't know if every place in the code that produces a
WrongDescriptorerror also knows what the expected descriptor is though. So not sure how feasible this request is.