def iterexpand(arry, extra):
for d in range(arry.ndim, arry.ndim+extra):<EOL><INDENT>arry = expand_dims(arry, axis=d)<EOL><DEDENT>return arry<EOL>
Expand dimensions by iteratively append empty axes.

Parameters
----------
arry : ndarray
    The original array

extra : int
    The number of empty axes to append