Backport 1.8 3806

Backport #3806: ` [fix] Check for errors in PyArray_CanCastTypeto DEPRECATE`.