fix: correct shape mismatch error message

This commit is contained in:
Carson M.
2026-03-11 14:32:08 -05:00
parent 14e9d29f49
commit aaec1a437e

View File

@@ -344,7 +344,7 @@ macro_rules! impl_to_shape {
Err(Error::new_with_code(
ErrorCode::InvalidArgument,
format!(
"Cannot create a tensor from raw data; shape {:?} ({} elements) is larger than the length of the data provided ({} elements)",
"Cannot create a tensor from raw data; shape {:?} ({} elements) is different from the length of the data provided ({} elements)",
v,
v.num_elements(),
expected_size