numrs/ops/elementwise/binary/
pow.rs

1use crate::array::{Array, DTypeValue};
2use crate::llo::ElementwiseKind;
3use anyhow::Result;
4
5/// Elementwise power with automatic type promotion
6/// 
7/// Returns an Array with the promoted dtype.
8#[inline(always)]
9pub fn pow<T1, T2>(a: &Array<T1>, b: &Array<T2>) -> Result<Array>
10where
11    T1: DTypeValue,
12    T2: DTypeValue,
13{
14    let dyn_result = crate::ops::promotion_wrappers::binary_promoted(a, b, ElementwiseKind::Pow, "pow")?;
15    dyn_result.into_typed()
16}