KeepCountScalar

Trait KeepCountScalar 

Source
pub trait KeepCountScalar: Scalar + ToPrimitive { }
Expand description

Scalar types accepted as keep_counts in Tensor::zero_trailing_by_counts.

Implemented for f32 and f64.

§Examples

use tenferro_tensor::KeepCountScalar;

fn accepts_keep_counts<T: KeepCountScalar>() {}
accepts_keep_counts::<f32>();
accepts_keep_counts::<f64>();

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl KeepCountScalar for f32

Available on non-crate feature cuda only.
Source§

impl KeepCountScalar for f64

Available on non-crate feature cuda only.

Implementors§