Skip to content

Commit

Permalink
Swap map_or for unwrap_or
Browse files Browse the repository at this point in the history
  • Loading branch information
felixhekhorn committed Sep 2, 2024
1 parent 72af22e commit 5117ea1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions pineappl_py/src/grid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,10 +280,10 @@ impl PyGrid {
self.grid
.convolve(
&mut lumi_cache,
&order_mask.map_or(vec![], |b| b.to_vec()),
&bin_indices.map_or(vec![], |c| c.to_vec()),
&channel_mask.map_or(vec![], |d| d.to_vec()),
&xi.map_or(vec![(1.0, 1.0)], |m| m),
&order_mask.unwrap_or(vec![]),
&bin_indices.unwrap_or(vec![]),
&channel_mask.unwrap_or(vec![]),
&xi.unwrap_or(vec![(1.0, 1.0)]),
)
.into_pyarray_bound(py)
}
Expand Down Expand Up @@ -347,10 +347,10 @@ impl PyGrid {
self.grid
.convolve(
&mut lumi_cache,
&order_mask.map_or(vec![], |b| b.to_vec()),
&bin_indices.map_or(vec![], |c| c.to_vec()),
&channel_mask.map_or(vec![], |d| d.to_vec()),
&xi.map_or(vec![(1.0, 1.0)], |m| m),
&order_mask.unwrap_or(vec![]),
&bin_indices.unwrap_or(vec![]),
&channel_mask.unwrap_or(vec![]),
&xi.unwrap_or(vec![(1.0, 1.0)]),
)
.into_pyarray_bound(py)
}
Expand Down

0 comments on commit 5117ea1

Please sign in to comment.