Skip to content

Commit 2be6a33

Browse files
jmh5309il
authored andcommitted
Improving zip strides error message
The way the strides error message work is that two slices could have the same strides when packed and it could trigger. Just making the error message more clear that the slices need to have the same strides when unpacked.
1 parent a39c541 commit 2be6a33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/mir/ndslice/topology.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2481,7 +2481,7 @@ auto zip
24812481
static assert(isSlice!S == packs, "zip: all Slices must have the same shape packs");
24822482
assert(slices[i + 1]._lengths == slices[0]._lengths, "zip: all slices must have the same lengths");
24832483
static if (sameStrides)
2484-
assert(slices[i + 1].unpack.strides == slices[0].unpack.strides, "zip: all slices must have the same strides");
2484+
assert(slices[i + 1].unpack.strides == slices[0].unpack.strides, "zip: all slices must have the same strides when unpacked");
24852485
}
24862486
static if (!sameStrides && minElem(staticMap!(kindOf, Slices)) != Contiguous)
24872487
{

0 commit comments

Comments
 (0)