Skip to content

Commit 8a10af6

Browse files
committed
Require std feature
1 parent 5de5286 commit 8a10af6

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/numeric/impl_numeric.rs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -426,26 +426,27 @@ where
426426
/// use ndarray::{array};
427427
///
428428
/// let a = array![
429-
/// [1., 2.],
430-
/// [3., 4.],
429+
/// [1, 2],
430+
/// [3, 4],
431431
/// ];
432-
/// assert_eq!(a.pow(2.), array![
433-
/// [1., 4.],
434-
/// [9., 16.],
432+
/// assert_eq!(a.pow(2), array![
433+
/// [1, 4],
434+
/// [9, 16],
435435
/// ]);
436436
/// ```
437437
/// ```
438438
/// use ndarray::{array};
439439
///
440440
/// let a = array![
441-
/// [1., 4.],
442-
/// [9., 16.],
441+
/// [1, 4],
442+
/// [9, 16],
443443
/// ];
444444
/// assert_eq!(a.pow(0.5), array![
445-
/// [1., 2.],
446-
/// [3., 4.],
445+
/// [1, 2],
446+
/// [3, 4],
447447
/// ]);
448448
/// ```
449+
#[cfg(feature = "std")]
449450
pub fn pow<B>(&self, pow: B) -> Array<<A as Pow<B>>::Output, D>
450451
where
451452
A: Pow<B> + Clone,

0 commit comments

Comments
 (0)