yes, will change that back - I was just trying to make this handle n-dimensional arrays. Have fixed this another way now (using `flatten`). One should do this properly at some stage using `nditer`, but that can be done later.