- inital transforms code
This commit is contained in:
1 parent
6913e65420
commit
4074770fd3
7 files changed
+90
-16
No files matched your search
+14
@@ -4,6 +4,8 @@ use crate::error::Error;
|
||||
use crate::metadata::Metadata;
|
||||
use crate::readers::{Dimensions, DynReader, Frame, Reader};
|
||||
use crate::stats::MinMax;
|
||||
#[cfg(feature = "transforms")]
|
||||
use crate::transforms::Transforms;
|
||||
use indexmap::IndexMap;
|
||||
use itertools::{Itertools, iproduct};
|
||||
use ndarray::{
|
||||
@@ -88,6 +90,8 @@ pub struct View<D: Dimension, R: Reader = DynReader> {
|
||||
axes: Vec<Axis>,
|
||||
operations: IndexMap<Axis, Operation>,
|
||||
dimensionality: PhantomData<D>,
|
||||
#[cfg(feature = "transforms")]
|
||||
transforms: Transforms,
|
||||
}
|
||||
|
||||
impl<D, R> Hash for View<D, R>
|
||||
@@ -114,6 +118,8 @@ impl<D: Dimension, R: Reader> View<D, R> {
|
||||
axes,
|
||||
operations: IndexMap::new(),
|
||||
dimensionality: PhantomData,
|
||||
#[cfg(feature = "transforms")]
|
||||
transforms: Transforms::default(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -177,6 +183,8 @@ impl<D: Dimension, R: Reader> View<D, R> {
|
||||
axes,
|
||||
operations: IndexMap::new(),
|
||||
dimensionality: PhantomData,
|
||||
#[cfg(feature = "transforms")]
|
||||
transforms: Transforms::default(),
|
||||
})
|
||||
}
|
||||
|
||||
@@ -227,6 +235,8 @@ impl<D: Dimension, R: Reader> View<D, R> {
|
||||
axes: self.axes,
|
||||
operations: self.operations,
|
||||
dimensionality: PhantomData,
|
||||
#[cfg(feature = "transforms")]
|
||||
transforms: Transforms::default(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -240,6 +250,8 @@ impl<D: Dimension, R: Reader> View<D, R> {
|
||||
axes: self.axes,
|
||||
operations: self.operations,
|
||||
dimensionality: PhantomData,
|
||||
#[cfg(feature = "transforms")]
|
||||
transforms: Transforms::default(),
|
||||
})
|
||||
} else {
|
||||
Err(Error::DimensionalityMismatch(d, self.ndim()))
|
||||
@@ -251,6 +263,8 @@ impl<D: Dimension, R: Reader> View<D, R> {
|
||||
axes: self.axes,
|
||||
operations: self.operations,
|
||||
dimensionality: PhantomData,
|
||||
#[cfg(feature = "transforms")]
|
||||
transforms: Transforms::default(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user