Changed the C API to multidim.