From 086505a350af8b7bb054726f19e7381cdb4d839b Mon Sep 17 00:00:00 2001 From: Jim Turner Date: Thu, 20 Sep 2018 19:04:33 -0400 Subject: [PATCH] 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` * `Mul` --- src/numeric/impl_numeric.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/numeric/impl_numeric.rs b/src/numeric/impl_numeric.rs index 906021341..bd01488a6 100644 --- a/src/numeric/impl_numeric.rs +++ b/src/numeric/impl_numeric.rs @@ -6,18 +6,14 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::ops::Add; -use libnum::{self, Zero, Float}; +use std::ops::{Add, Div}; +use libnum::{self, One, Zero, Float}; use itertools::free::enumerate; use imp_prelude::*; use numeric_util; -use { - LinalgScalar, - FoldWhile, - Zip, -}; +use {FoldWhile, Zip}; /// Numerical methods for arrays. impl ArrayBase @@ -105,7 +101,7 @@ impl ArrayBase /// ); /// ``` pub fn mean_axis(&self, axis: Axis) -> Array - where A: LinalgScalar, + where A: Clone + Zero + One + Add + Div, D: RemoveAxis, { let n = self.len_of(axis);