I want to write a data string to a numpy array. Pseudo Code:
d=numpy.zeros(10,dtype=numpy.character)
d[1:6]='hello'
Example result:
d=
array(['', 'h', 'e', 'l', 'l', 'o', '', '', '', ''],
dtype='|S1')
How can this be done with numpy most naturally and efficiently? I don't want for loops, generators, or anything iterative, can it be done with one command as with the pseudo code?