using 0 as default for dim to array index cpp wrapper