Skip to content

Commit

Permalink
Require std feature
Browse files Browse the repository at this point in the history
  • Loading branch information
multimeric committed Aug 3, 2021
1 parent 5de5286 commit 8a10af6
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/numeric/impl_numeric.rs
Original file line number Diff line number Diff line change
Expand Up @@ -426,26 +426,27 @@ where
/// use ndarray::{array};
///
/// let a = array![
/// [1., 2.],
/// [3., 4.],
/// [1, 2],
/// [3, 4],
/// ];
/// assert_eq!(a.pow(2.), array![
/// [1., 4.],
/// [9., 16.],
/// assert_eq!(a.pow(2), array![
/// [1, 4],
/// [9, 16],
/// ]);
/// ```
/// ```
/// use ndarray::{array};
///
/// let a = array![
/// [1., 4.],
/// [9., 16.],
/// [1, 4],
/// [9, 16],
/// ];
/// assert_eq!(a.pow(0.5), array![
/// [1., 2.],
/// [3., 4.],
/// [1, 2],
/// [3, 4],
/// ]);
/// ```
#[cfg(feature = "std")]
pub fn pow<B>(&self, pow: B) -> Array<<A as Pow<B>>::Output, D>
where
A: Pow<B> + Clone,
Expand Down

0 comments on commit 8a10af6

Please sign in to comment.