This fixes an issue where numpy guessed type mismatched with the given dtype. For example, int64 VS uint64.