Skip to content

Commit

Permalink
modification function broadcast_shape
Browse files Browse the repository at this point in the history
  • Loading branch information
chachaleo committed Oct 24, 2023
1 parent b308a01 commit e89fbd6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/operators/tensor/helpers.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ fn broadcast_shape(mut shape1: Span<usize>, mut shape2: Span<usize>) -> Span<usi
let mut dim1 = 1;
let mut dim2 = 1;

match shape1.pop_back() {
match shape1.pop_front() {
Option::Some(item) => {
dim1 = *item;
},
Expand All @@ -287,7 +287,7 @@ fn broadcast_shape(mut shape1: Span<usize>, mut shape2: Span<usize>) -> Span<usi
}
};

match shape2.pop_back() {
match shape2.pop_front() {
Option::Some(item) => {
dim2 = *item;
},
Expand All @@ -302,7 +302,7 @@ fn broadcast_shape(mut shape1: Span<usize>, mut shape2: Span<usize>) -> Span<usi
result.append(broadcasted_dim);
};

return result.reverse().span();
return result.span();
}


Expand Down

0 comments on commit e89fbd6

Please sign in to comment.