pub fn validate_shape(shape: &[usize]) -> PyResult<()>
Validate that a shape is valid (all dimensions > 0)