pub fn try_from_iter<T, I>(iter: I) -> Result<Self, Error>
    where
        T: ToPrimitive,
        I: IntoIterator<Item = T>,
    {
        let mut histogram = Self::tf_default();
        iter.into_iter().try_for_each(|value| -> Result<_> {
            let value = <f64 as NumCast>::from(value)
                .ok_or_else(|| Error::invalid_argument("invalid value"))?;
            histogram.try_add_one(value)?;
            Ok(())
        })?;
        Ok(histogram)
    }
/// Create a histogram from an iterator of values, with TensorFlow's default bucket limits.
Create a histogram from an iterator of values, with TensorFlow's default bucket limits.
Create a histogram from an iterator of values with TensorFlow ' s default bucket limits .
pub fn try_from_iter<T, I>(iter: I) -> Result<Self, Error>
    where
        T: ToPrimitive,
        I: IntoIterator<Item = T>,
    {
        let mut histogram = Self::tf_default();
        iter.into_iter().try_for_each(|value| -> Result<_> {
            let value = <f64 as NumCast>::from(value)
                .ok_or_else(|| Error::invalid_argument("invalid value"))?;
            histogram.try_add_one(value)?;
            Ok(())
        })?;
        Ok(histogram)
    }
pub fn try_from_iter < T , I > ( iter : I ) -> Result < Self , Error > where T : ToPrimitive , I : IntoIterator < Item = T > , { let mut histogram = Self :: tf_default ( ) ; iter . into_iter ( ) . try_for_each ( | value | -> Result < _ > { let value = < f64 as NumCast > :: from ( value ) . ok_or_else ( | | Error :: invalid_argument ( " " ) ) ? ; histogram . try_add_one ( value ) ? ; Ok ( ( ) ) } ) ? ; Ok ( histogram ) }
Create a histogram from an iterator of values, with TensorFlow's default bucket limits.
Create a histogram from an iterator of values with TensorFlow ' s default bucket limits .
iter
I
iter
I