Skip to content

Commit

Permalink
Fix in {Op}Assign trait implementations for Array
Browse files Browse the repository at this point in the history
  • Loading branch information
9prady9 committed Feb 24, 2017
1 parent 5fcd1e5 commit 2b21048
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/arith/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -450,8 +450,9 @@ macro_rules! arith_assign_func {
#[allow(unused_variables)]
fn $fn_name(&mut self, rhs: Array) {
let mut idxrs = Indexer::new();
idxrs.set_index(&Seq::<f32>::default(), 0, Some(false));
idxrs.set_index(&Seq::<f32>::default(), 1, Some(false));
for n in 0..self.numdims() {
idxrs.set_index(&Seq::<f32>::default(), n, Some(false));
}
let tmp = assign_gen(self as &Array, &idxrs,
& $func(self as &Array, &rhs, false));
mem::replace(self, tmp);
Expand Down

0 comments on commit 2b21048

Please sign in to comment.