src/python.rs

changeset 6
aefacd832408
parent 3
fbdee8e4a78d
--- 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<Loc<$N, $F>, $F> {
+            type Target = $name;
+            type Error = PyErr;
+            type Output = Bound<'py, $name>;
+
+            fn into_pyobject(self, py: Python<'py>) -> Result<Self::Output, Self::Error> {
+                Bound::new(py, $name { inner: self.clone() })
+            }
+        }
+
         impl<'py> IntoPyObject<'py> for DiscreteMeasure<Loc<$N, $F>, $F> {
             type Target = $name;
             type Error = PyErr;

mercurial