I am using:
Python 2.7.10 (default, Oct 14 2015, 16:09:02) [GCC 5.2.1 20151010] on linux2
- numpy 1.10.1
Linux wojtek-dell 3.13.0-66-generic #108-Ubuntu SMP Wed Oct 7 15:20:27 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Given this snippet:
import numpy as np
arr = np.array(['12', '34'])
np.place(arr, np.array([False, True]), '9')
print arr
I would imagine that arr will equal ['12' '9'], but instead it is ['12' '94'].
Similar code with numpy.putmaskgives expected ['12' '9'].
Is this a designed behaviour of numpy.place?