Change casting type for ufunc operands