Skip to content

Commit 7949448

Browse files
committed
fix multiple transposes going through boxes
1 parent f714644 commit 7949448

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed

src/algorithm/monadic/mod.rs

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,15 +1171,7 @@ impl Value {
11711171
Value::Byte(b) => b.transpose_depth(depth, amnt),
11721172
Value::Complex(c) => c.transpose_depth(depth, amnt),
11731173
Value::Char(c) => c.transpose_depth(depth, amnt),
1174-
Value::Box(b) => {
1175-
if depth == b.rank() {
1176-
for b in b.data.as_mut_slice() {
1177-
b.0.transpose();
1178-
}
1179-
} else {
1180-
b.transpose_depth(depth, amnt);
1181-
}
1182-
}
1174+
Value::Box(b) => b.transpose_depth(depth, amnt),
11831175
}
11841176
}
11851177
/// Like transpose, but the axes are reversed instead of rotated
@@ -1189,15 +1181,7 @@ impl Value {
11891181
Value::Byte(b) => b.retropose_depth(depth),
11901182
Value::Complex(c) => c.retropose_depth(depth),
11911183
Value::Char(c) => c.retropose_depth(depth),
1192-
Value::Box(b) => {
1193-
if depth == b.rank() {
1194-
for b in b.data.as_mut_slice() {
1195-
b.0.retropose_depth(0);
1196-
}
1197-
} else {
1198-
b.retropose_depth(depth);
1199-
}
1200-
}
1184+
Value::Box(b) => b.retropose_depth(depth),
12011185
}
12021186
}
12031187
}

0 commit comments

Comments
 (0)