TST: for ndim arg
CLN: updated to use ndim arg