>>> import warnings
>>> warnings.simplefilter('always')
>>> 'x'*np.float64(3.5)
__main__:1: DeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
'xxx'
It would be a warning from numpy, not Python. That comes from numpy/core/src/multiarray/conversion_utils.c and was added 2013-04-13 , which would be for NumPy 1.8, I believe.
I use R predominantly, so forgive the lack of adequate Python-ese.
Is this behavior because numpy overloads the multiplication operation with a string as string repetition and then implicitly casts the float64 down to an integer of 3? I'm curious why this behavior manifests. When I get a chance I'll test 'xyz'*np.float(3.5)