Skip to content

Commit

Permalink
reflect changes to python interface
Browse files Browse the repository at this point in the history
  • Loading branch information
Radonirinaunimi committed May 30, 2024
1 parent 1962fe2 commit 95b3bc3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
8 changes: 5 additions & 3 deletions pineappl/src/grid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1385,6 +1385,7 @@ impl Grid {
}

/// TODO: Fix to account for the different EKOs
/// TODO: Does the info have to be different?
/// Converts this `Grid` into an [`FkTable`] using an evolution kernel operator (EKO) given as
/// `operator`. The dimensions and properties of this operator must be described using `info`.
/// The parameter `order_mask` can be used to include or exclude orders from this operation,
Expand All @@ -1398,14 +1399,15 @@ impl Grid {
#[deprecated(since = "0.7.4", note = "use evolve_with_slice_iter instead")]
pub fn evolve(
&self,
operator: ArrayView5<f64>,
operator_a: ArrayView5<f64>,
operator_b: ArrayView5<f64>,
info: &OperatorInfo,
order_mask: &[bool],
) -> Result<FkTable, GridError> {
self.evolve_with_slice_iter(
info.fac1
.iter()
.zip(operator.axis_iter(Axis(0)))
.zip(operator_a.axis_iter(Axis(0)))
.map(|(&fac1, op)| {
Ok::<_, GridError>((
OperatorSliceInfo {
Expand All @@ -1422,7 +1424,7 @@ impl Grid {
}),
info.fac1
.iter()
.zip(operator.axis_iter(Axis(0)))
.zip(operator_b.axis_iter(Axis(0)))
.map(|(&fac1, op)| {
Ok::<_, GridError>((
OperatorSliceInfo {
Expand Down
1 change: 1 addition & 0 deletions pineappl_py/pineappl/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ def evolve(
self.raw.evolve(
np.array(operator_grid),
operators["q2_ref"],
operators["q2_ref"], # TODO: Modify the input EKO
np.array(operators["inputpids"], dtype=np.int32),
np.array(operators["inputgrid"]),
np.array(q2grid, dtype=np.float64),
Expand Down
6 changes: 4 additions & 2 deletions pineappl_py/src/grid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,8 @@ impl PyGrid {
/// produced FK table
pub fn evolve(
&self,
operator: PyReadonlyArray5<f64>,
operator_a: PyReadonlyArray5<f64>,
operator_b: PyReadonlyArray5<f64>,
fac0: f64,
pids0: PyReadonlyArray1<i32>,
x0: PyReadonlyArray1<f64>,
Expand Down Expand Up @@ -488,7 +489,8 @@ impl PyGrid {
let evolved_grid = self
.grid
.evolve(
operator.as_array(),
operator_a.as_array(),
operator_b.as_array(),
&op_info,
order_mask.as_slice().unwrap(),
)
Expand Down

0 comments on commit 95b3bc3

Please sign in to comment.