An example with numpy.array::

    >>> from arrayterator import arrayterator
    >>> import numpy
    >>> a = numpy.arange(10)
    >>> a.shape = (1,2,5)
    >>> print a
    [[[0 1 2 3 4]
      [5 6 7 8 9]]]
    >>> it = arrayterator(a, nrecs=3)
    >>> for block in it:
    ...     print block[:]
    [0 1 2]
    [3 4]
    [5 6 7]
    [8 9]
    >>> for value in it.flat:
    ...     print value
    0
    1
    2
    3
    4
    5
    6
    7
    8
    9

Checking if the iterator returns the 1D data::

    >>> b = numpy.arange(10000)
    >>> b.shape = (100,100)
    >>> it = arrayterator(b, nrecs=11)  # read 11 values at a time
    >>> assert numpy.all(b.flat == numpy.concatenate(list(it)))

We can also specify the region to iterate over by slicing the
arrayterator object::

    >>> it2 = it[0:2,0:2]
    >>> for value in it2.flat:
    ...     print value
    0
    1
    100
    101
    
    >>> it3 = it2[0,:]
    >>> for value in it3.flat:
    ...     print value
    0
    1

Checking that it works with steps other than 1::

    >>> a = numpy.arange(64)
    >>> a.shape = (8,8)
    >>> b = arrayterator(a, 3)
    >>> c = b[1::2,1::2]
    >>> for i in c:
    ...     print list(i)
    [9, 11, 13]
    [12]
    [17, 19, 21]
    [20]
    [25, 27, 29]
    [28]
