From 70153ccec459f6ef0bb740b0c3a129d404a73193 Mon Sep 17 00:00:00 2001 From: laurent Date: Tue, 13 Feb 2024 12:51:17 +0100 Subject: [PATCH] Fix pyo3 bindings. --- candle-pyo3/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/candle-pyo3/src/lib.rs b/candle-pyo3/src/lib.rs index ca40687607..7b9a741340 100644 --- a/candle-pyo3/src/lib.rs +++ b/candle-pyo3/src/lib.rs @@ -938,8 +938,8 @@ impl PyTensor { /// Detach the tensor from the computation graph. /// &RETURNS&: Tensor - fn detach(&self) -> PyResult { - Ok(PyTensor(self.0.detach().map_err(wrap_err)?)) + fn detach(&self) -> Self { + PyTensor(self.0.detach()) } /// Returns a copy of the tensor.