Source

Numpy Toy Box / getsetcarray / test_getset.py

Full commit
from getsetcarray import *
import numpy

gs = GetSetCArray()

gs.np1d = numpy.arange(5)
gs.np2d = numpy.arange(4).reshape(2,2)
gs.np3d = numpy.arange(8).reshape(2,2,2)

gs.np1d = numpy.arange(5)
gs.np2d = numpy.arange(4).reshape(2,2)
gs.np3d = numpy.arange(8).reshape(2,2,2)

try: 
    gs.np1d = numpy.arange(10)[::2]
except ValueError:
    print "successfully got ValueError"