With more recent versions of numpy, which are more strict about casting, the above error pops up, which probably indicates a deeper issue?