We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 46b2596 commit c9a3843Copy full SHA for c9a3843
Cargo.toml
@@ -16,6 +16,7 @@ rust-version = "1.80"
16
numpy = "0.23.0"
17
ndarray = "0.16.1"
18
curve-sampling = { version = "0.5", optional = true, git = "https://github.com/Chris00/rust-curve-sampling.git" }
19
+num-complex = { version = "0.4.6", optional = true }
20
21
[dependencies.pyo3]
22
version = "0.23.3"
src/lib.rs
@@ -810,6 +810,14 @@ impl CoordXY for [f64; 2] {
810
fn y(&self) -> f64 { self[1] }
811
}
812
813
+#[cfg(feature = "num-complex")]
814
+impl CoordXY for num_complex::Complex64 {
815
+ #[inline]
816
+ fn x(&self) -> f64 { self.re }
817
818
+ fn y(&self) -> f64 { self.im }
819
+}
820
+
821
impl<'a, I> XYFrom<'a, I>
822
where I: IntoIterator,
823
<I as IntoIterator>::Item: CoordXY {
0 commit comments