Fix variables in createBuffer for ndarrays

Small typo :) Thanks!