File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ rust-version = "1.80"
1616numpy = " 0.23.0"
1717ndarray = " 0.16.1"
1818curve-sampling = { version = " 0.5" , optional = true , git = " https://github.com/Chris00/rust-curve-sampling.git" }
19+ num-complex = { version = " 0.4.6" , optional = true }
1920
2021[dependencies .pyo3 ]
2122version = " 0.23.3"
Original file line number Diff line number Diff line change @@ -810,6 +810,14 @@ impl CoordXY for [f64; 2] {
810810 fn y ( & self ) -> f64 { self [ 1 ] }
811811}
812812
813+ #[ cfg( feature = "num-complex" ) ]
814+ impl CoordXY for num_complex:: Complex64 {
815+ #[ inline]
816+ fn x ( & self ) -> f64 { self . re }
817+ #[ inline]
818+ fn y ( & self ) -> f64 { self . im }
819+ }
820+
813821impl < ' a , I > XYFrom < ' a , I >
814822where I : IntoIterator ,
815823 <I as IntoIterator >:: Item : CoordXY {
You can’t perform that action at this time.
0 commit comments