Skip to content
Snippets Groups Projects
Unverified Commit d859cd8a authored by Alexandru Fikl's avatar Alexandru Fikl
Browse files

complain if unflattened strides do not match

parent 1d914ab3
No related branches found
No related tags found
No related merge requests found
......@@ -582,6 +582,12 @@ def unflatten(
"functionality that is not implemented in the array "
f"context '{type(actx).__name__}'") from exc
if hasattr(template_subary, "strides"):
if template_subary.strides != subary.strides:
raise ValueError(
f"strides do not match template: got {subary.strides}, "
f"expected {template_subary.strides}")
return subary
else:
return deserialize_container(template_subary, [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment