Skip to content

Commit 0555ab9

Browse files
committed
Skip empty subgrids in FkTable::table
1 parent 591cdcf commit 0555ab9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pineappl/src/fk_table.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,11 @@ impl FkTable {
132132
let mut idx = vec![0; dim.len()];
133133
let mut result = ArrayD::zeros(dim);
134134

135-
for ((_, bin, channel), subgrid) in self.grid().subgrids().indexed_iter() {
135+
for ((_, bin, channel), subgrid) in
136+
self.grid().subgrids().indexed_iter().filter(|(_, subgrid)|
137+
// skip empty subgrids, because they have no node values
138+
!subgrid.is_empty())
139+
{
136140
let indices: Vec<Vec<_>> = self
137141
.grid
138142
.convolutions()

0 commit comments

Comments
 (0)