1use ndarray::ArrayD;
4use serde::{Serialize, Deserialize};
5use thiserror::Error;
6
7pub type Tensor = ArrayD<f32>;
8
9#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
10pub struct NodeId(pub usize);
11
12#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
13pub struct ArrowId(pub usize);
14
15#[derive(Debug, Error)]
16pub enum UbiqError {
17 #[error("dimension mismatch: {0}")]
18 Dim(String),
19 #[error("graph error: {0}")]
20 Graph(String),
21 #[error("unsupported: {0}")]
22 Unsupported(String),
23}
24
25pub type Result<T> = std::result::Result<T, UbiqError>;