Skip to content

Commit

Permalink
Use mapv_inplace in python code
Browse files Browse the repository at this point in the history
  • Loading branch information
magnusuMET authored and gauteh committed Aug 12, 2024
1 parent 93ccf7d commit b1abf36
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/python/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use crate::idx;
use crate::prelude::*;

#[pymodule]
fn hidefix(_py: Python, m: &PyModule) -> PyResult<()> {
fn hidefix(m: &Bound<'_, PyModule>) -> PyResult<()> {
m.add_class::<Index>()?;
Ok(())
}
Expand Down Expand Up @@ -164,7 +164,7 @@ impl Dataset {
let arr = arr.downcast::<PyArrayDyn<T>>().unwrap();

let mut v = unsafe { arr.as_array_mut() };
v.par_mapv_inplace(|v| if v == cond { fv } else { v });
v.mapv_inplace(|v| if v == cond { fv } else { v });
}
}

Expand Down

0 comments on commit b1abf36

Please sign in to comment.