File tree Expand file tree Collapse file tree 3 files changed +9
-0
lines changed
Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -1849,6 +1849,7 @@ mod impl_2d;
18491849mod impl_dyn;
18501850
18511851mod numeric;
1852+ #[ cfg( feature = "std" ) ]
18521853pub use crate :: numeric:: HasAngle ;
18531854
18541855pub mod linalg;
Original file line number Diff line number Diff line change 11// Element-wise methods for ndarray
22
3+ #[ cfg( feature = "std" ) ]
34use num_complex:: { Complex32 , Complex64 } ;
45#[ cfg( feature = "std" ) ]
56use 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" ) ]
1113pub 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" ) ]
2023impl HasAngle for f32
2124{
2225 type Angle = Self ;
@@ -28,6 +31,7 @@ impl HasAngle for f32
2831 }
2932}
3033
34+ #[ cfg( feature = "std" ) ]
3135impl HasAngle for f64
3236{
3337 type Angle = Self ;
@@ -39,6 +43,7 @@ impl HasAngle for f64
3943 }
4044}
4145
46+ #[ cfg( feature = "std" ) ]
4247impl HasAngle for Complex32
4348{
4449 type Angle = f32 ;
@@ -50,6 +55,7 @@ impl HasAngle for Complex32
5055 }
5156}
5257
58+ #[ cfg( feature = "std" ) ]
5359impl 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" ) ]
229236impl < A , D > ArrayRef < A , D >
230237where
231238 D : Dimension ,
Original file line number Diff line number Diff line change @@ -2,4 +2,5 @@ mod impl_numeric;
22
33mod impl_float_maths;
44
5+ #[ cfg( feature = "std" ) ]
56pub use self :: impl_float_maths:: HasAngle ;
You can’t perform that action at this time.
0 commit comments