Skip to content

Commit dcceaf0

Browse files
committed
Still need this behind feature = "std"
1 parent 25643af commit dcceaf0

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1849,6 +1849,7 @@ mod impl_2d;
18491849
mod impl_dyn;
18501850

18511851
mod numeric;
1852+
#[cfg(feature = "std")]
18521853
pub use crate::numeric::HasAngle;
18531854

18541855
pub mod linalg;

src/numeric/impl_float_maths.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Element-wise methods for ndarray
22

3+
#[cfg(feature = "std")]
34
use num_complex::{Complex32, Complex64};
45
#[cfg(feature = "std")]
56
use num_traits::Float;
@@ -8,6 +9,7 @@ use crate::imp_prelude::*;
89

910
/// Trait for types that can generalize the phase angle (argument)
1011
/// calculation for both real floats and complex numbers.
12+
#[cfg(feature = "std")]
1113
pub trait HasAngle
1214
{
1315
/// The type of the associated angle.
@@ -17,6 +19,7 @@ pub trait HasAngle
1719
fn to_angle(&self) -> Self::Angle;
1820
}
1921

22+
#[cfg(feature = "std")]
2023
impl HasAngle for f32
2124
{
2225
type Angle = Self;
@@ -28,6 +31,7 @@ impl HasAngle for f32
2831
}
2932
}
3033

34+
#[cfg(feature = "std")]
3135
impl HasAngle for f64
3236
{
3337
type Angle = Self;
@@ -39,6 +43,7 @@ impl HasAngle for f64
3943
}
4044
}
4145

46+
#[cfg(feature = "std")]
4247
impl HasAngle for Complex32
4348
{
4449
type Angle = f32;
@@ -50,6 +55,7 @@ impl HasAngle for Complex32
5055
}
5156
}
5257

58+
#[cfg(feature = "std")]
5359
impl HasAngle for Complex64
5460
{
5561
type Angle = f64;
@@ -226,6 +232,7 @@ where
226232
/// # Angle calculation methods for arrays
227233
///
228234
/// Methods for calculating phase angles of complex values in arrays.
235+
#[cfg(feature = "std")]
229236
impl<A, D> ArrayRef<A, D>
230237
where
231238
D: Dimension,

src/numeric/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ mod impl_numeric;
22

33
mod impl_float_maths;
44

5+
#[cfg(feature = "std")]
56
pub use self::impl_float_maths::HasAngle;

0 commit comments

Comments
 (0)