Skip to content

Commit

Permalink
remove special casing for unpack reduce join
Browse files Browse the repository at this point in the history
  • Loading branch information
kaikalii committed Dec 24, 2023
1 parent 413e98e commit 36b0c61
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/algorithm/reduce.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,6 @@ pub fn reduce(env: &mut Uiua) -> UiuaResult {
*xs.shape_mut() = new_shape;
env.push(xs);
}
(Some((Primitive::Join, flipped)), xs) => {
let rows = xs.into_rows().map(|row| {
if env.unpack_boxes() {
row.unpacked()
} else {
row
}
});
let rows: Vec<_> = if flipped {
rows.rev().flat_map(|row| row.into_rows()).collect()
} else {
rows.flat_map(|row| row.into_rows()).collect()
};
env.push(Value::from_row_values(rows, env)?);
}
(Some((prim, flipped)), Value::Num(nums)) => {
if let Err(nums) = reduce_nums(prim, flipped, nums, env) {
return generic_reduce(f, Value::Num(nums), env);
Expand Down

0 comments on commit 36b0c61

Please sign in to comment.