A generator function to return slices of an array over a given dimension:  iterdim()

This is an addition to numeric.py to generalize the iterator behavior of ndarrays over any dimension.

Currently, using an ndarray as an interator returns slices of an array over the 0th dimension; this allows for use over any valid dimension and works for arrays of ndim >=1

example use:

    import numpy as np
    a = np.ones((100,10,3))
    for a_slice in np.iterdim(a, 2):
        print a_slice.shape

will return:

    (100,10)
    (100,10)
    (100,10)

It has been pointed out to me that one could use `np.rollaxis()` to build an iterator of the same functionality, but this is distinct in that it returns a pure iterator, rather than a re-ordered array that can be iterated over in the manner desired.

As this is my first PR to numpy, any advice or comments are welcome.  I've added tests (a first for me, as well) which all pass and seem to capture the behavior well.  One nice feature to add would be to include this as a method to ndarray, but that is currently a bit more complicated than I know how to do.

Thanks

-ag
andrew.giessel@gmail.com
@andrewgiessel