Replacing the numpy views with true type casts.

Views do not change the underlying data and thus do not work with
custom C code that expects raw data of the correct type.