Integer handling

There was a similar problem for reading. The buffer was allocated as "np.int" which prevented me from reading 32-bit integer data. I've changed it to explicitly allocate a np.int32 buffer instead which appears to do the right thing.