pub fn shape_to_py_tuple( shape: &[usize], py: Python<'_>, ) -> PyResult<Py<PyTuple>>
Convert Rust shape Vec to Python tuple