, , int32, int, int64 .., TypeError. , - float64 float32 .., exp ,
In [12]: b
Out[12]: array([1, 2, 3, 4, 5], dtype=int32)
In [13]: np.exp(b, b)
--------------------------------------------------------------------------
TypeError: ufunc 'exp' output (typecode 'd') could not be coerced to provided
output parameter (typecode 'i') according to the casting rule ''same_kind''
Casting exp:
In [14]: b = b.astype(np.float64, copy=False)
In [15]: b
Out[15]: array([ 1., 2., 3., 4., 5.], dtype=float64)
In [16]: np.exp(b, b)
Out[16]: array([ 2.718, 7.389, 20.086, 54.598, 148.413], dtype=float64)