some array2d extensions functions