let tarray_dim = function | None -> None | Some aflat -> try Some(Int64.to_int aflat.arr_size) with _ -> None