Skip to content

Commit

Permalink
Fix pyo3 bindings.
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentMazare committed Feb 13, 2024
1 parent 3830dfb commit 70153cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions candle-pyo3/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -938,8 +938,8 @@ impl PyTensor {

/// Detach the tensor from the computation graph.
/// &RETURNS&: Tensor
fn detach(&self) -> PyResult<Self> {
Ok(PyTensor(self.0.detach().map_err(wrap_err)?))
fn detach(&self) -> Self {
PyTensor(self.0.detach())
}

/// Returns a copy of the tensor.
Expand Down

0 comments on commit 70153cc

Please sign in to comment.