pub fn sub_datetime_promoted<D>(
a: &Array<DateTime64, D>,
unit_a: TimeUnit,
b: &Array<DateTime64, D>,
unit_b: TimeUnit,
) -> Result<(Array<Timedelta64, D>, TimeUnit), FerrayError>where
D: Dimension,Expand description
Element-wise datetime[unit_a] - datetime[unit_b] โ timedelta[finer].
Both operands are rescaled to TimeUnit::finer(unit_a, unit_b) before
the per-element subtraction. Returns (result, target_unit).
ยงErrors
Returns FerrayError::ShapeMismatch if the shapes differ.