# HG changeset patch # User Tuomo Valkonen # Date 1772100009 18000 # Node ID aefacd832408fdb4f906016a528242aa274b0b7b # Parent e781c543e22891532d235f389ca4f204a8185c33 Add more pyo3 interfaces diff -r e781c543e228 -r aefacd832408 src/python.rs --- a/src/python.rs Sat Jan 24 19:24:29 2026 -0500 +++ b/src/python.rs Thu Feb 26 05:00:09 2026 -0500 @@ -130,6 +130,16 @@ } } + impl<'a, 'py> IntoPyObject<'py> for &'a DiscreteMeasure, $F> { + type Target = $name; + type Error = PyErr; + type Output = Bound<'py, $name>; + + fn into_pyobject(self, py: Python<'py>) -> Result { + Bound::new(py, $name { inner: self.clone() }) + } + } + impl<'py> IntoPyObject<'py> for DiscreteMeasure, $F> { type Target = $name; type Error = PyErr;