Cosmetic changes.

This commit is contained in:
laurent
2023-06-19 21:30:03 +01:00
parent 26d6288eb6
commit bcae61b7f2
3 changed files with 33 additions and 4 deletions

View File

@ -1,6 +1,12 @@
use crate::{Error, Result};
pub struct Shape(pub(crate) Vec<usize>);
impl std::fmt::Debug for Shape {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{:?}", &self.dims())
}
}
impl From<&[usize; 1]> for Shape {
fn from(dims: &[usize; 1]) -> Self {
Self(dims.to_vec())