use ndarray::ArrayD;
use serde::{Serialize, Deserialize};
use thiserror::Error;
pub type Tensor = ArrayD<f32>;
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub struct NodeId(pub usize);
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub struct ArrowId(pub usize);
#[derive(Debug, Error)]
pub enum UbiqError {
#[error("dimension mismatch: {0}")]
Dim(String),
#[error("graph error: {0}")]
Graph(String),
#[error("unsupported: {0}")]
Unsupported(String),
}
pub type Result<T> = std::result::Result<T, UbiqError>;