Porting to Python 3
Fix unpacking of data in blocks

For some reason, when iterating over an array of type short the yielded
blocks had type float32. Fixed to enforce that each block has the same
type as the original data.