def run_it(self, encoder, decoder, type, func, args, shape):

        array = numpy.zeros(shape, type)


        count = 0
        for x in numpy.nditer(array, flags=['refs_ok'], op_flags=['readwrite']):
            count +=1
            x[...] = func(*args)

        tic = time.time()
        msg = packb(array, default=encoder)
        new_array = unpackb(msg,object_hook=decoder)
        toc = tic - time.time()

        print 'Binary Size: "%d", Time: %s' % (len(msg), toc)

        assert_true((array == new_array).all())

        if type is not 'object':
            # Do a second check - based on sha1...
            assert_equals(sha1(array.tostring()), sha1(new_array.tostring()))
dataset/ETHPy150Open ooici/pyon/pyon/core/interceptor/test/test_msgpack_numpy_hook.py/PackRunBase.run_it/swapped operands of `-`