use super::models::CellNd; use crate::core::error::Result; use crate::core::tensor::Tensor; /// Grows a seed pattern into a cell, deepened to its fractal past level one. /// /// # Errors /// /// Errors when the pattern's rank is not N, or the level is below one. pub fn grow(pattern: Tensor, level: usize) -> Result> { let mut cell = CellNd::::new(pattern)?; if level > 1 { cell = cell.fractal(level)?; } Ok(cell) }