| 124 | } |
| 125 | |
| 126 | fn sum_whole_masked<T>(&self, direction: &Direction, mask: &[bool]) -> anyhow::Result<Vec<T>> |
| 127 | where |
| 128 | T: num_traits::Float + num_traits::NumCast + AddAssign + std::iter::Sum + Send + Sync, |
| 129 | { |
| 130 | let read_guard = self.0.read_inner(); |
| 131 | let data = read_guard.deref(); |
| 132 | match direction { |
| 133 | Direction::COLUMN => { |
| 134 | match_array_data_apply_function!(data, sum_col_masked, mask) |
| 135 | } |
| 136 | Direction::ROW => { |
| 137 | match_array_data_apply_function!(data, sum_row_masked, mask) |
| 138 | } |
| 139 | } |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | impl ComputeVariance for IMArrayElement { |