mirror of
https://github.com/huggingface/candle.git
synced 2025-06-19 11:56:45 +00:00
Apply rustfmt.
This commit is contained in:
@ -1,15 +1,13 @@
|
|||||||
|
use pyo3::exceptions::PyValueError;
|
||||||
use pyo3::prelude::*;
|
use pyo3::prelude::*;
|
||||||
use pyo3::{
|
|
||||||
exceptions::PyValueError,
|
|
||||||
};
|
|
||||||
|
|
||||||
use ::candle::{Tensor, Device::Cpu};
|
use ::candle::{Device::Cpu, Tensor};
|
||||||
|
|
||||||
pub fn wrap_err(err: ::candle::Error) -> PyErr {
|
pub fn wrap_err(err: ::candle::Error) -> PyErr {
|
||||||
PyErr::new::<PyValueError, _>(format!("{err:?}"))
|
PyErr::new::<PyValueError, _>(format!("{err:?}"))
|
||||||
}
|
}
|
||||||
|
|
||||||
#[pyclass(name="Tensor")]
|
#[pyclass(name = "Tensor")]
|
||||||
struct PyTensor(Tensor);
|
struct PyTensor(Tensor);
|
||||||
|
|
||||||
impl std::ops::Deref for PyTensor {
|
impl std::ops::Deref for PyTensor {
|
||||||
|
Reference in New Issue
Block a user