>>> import numpy as np
>>> x = sp.array([1,3,7])
>>> x -= 0.3
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
numpy.core._exceptions._UFuncOutputCastingError: Cannot cast ufunc 'subtract' output from dtype('float64') to dtype('int64') with casting rule 'same_kind'
>>> x = x-0.3
としてやれば文句は言わない
あるいは,float にしてやれば文句は言わない
>>> x = np.array([1,3,7], dtype=float)
>>> x -= 0.3