Skip to content

Commit d4b9801

Browse files
committed
Relax bounds on .mean_axis()
This removes the `LinalgScalar` bound on the element type for `.mean_axis()`. This transitively removes the following unnecessary bounds: * `'static` * `Copy` * `Sub<Output=A>` * `Mul<Output=A>`
1 parent 843c5a8 commit d4b9801

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/numeric/impl_numeric.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,14 @@
66
// option. This file may not be copied, modified, or distributed
77
// except according to those terms.
88

9-
use std::ops::Add;
10-
use libnum::{self, Zero, Float};
9+
use std::ops::{Add, Div};
10+
use libnum::{self, One, Zero, Float};
1111
use itertools::free::enumerate;
1212

1313
use imp_prelude::*;
1414
use numeric_util;
1515

16-
use {
17-
LinalgScalar,
18-
FoldWhile,
19-
Zip,
20-
};
16+
use {FoldWhile, Zip};
2117

2218
/// Numerical methods for arrays.
2319
impl<A, S, D> ArrayBase<S, D>
@@ -105,7 +101,7 @@ impl<A, S, D> ArrayBase<S, D>
105101
/// );
106102
/// ```
107103
pub fn mean_axis(&self, axis: Axis) -> Array<A, D::Smaller>
108-
where A: LinalgScalar,
104+
where A: Clone + Zero + One + Add<Output=A> + Div<Output=A>,
109105
D: RemoveAxis,
110106
{
111107
let n = self.len_of(axis);

0 commit comments

Comments
 (0)