Yeah, I think it would be wrong anyway (because of casting), I was just thinking out loud...

The if contradicts the one that is in your current version right above it, which means dtype is always NULL. Maybe you could change the comment to something more specific: The ufunc does not support void/structured types, so these need to be handled specifically.