Below is my code:
import numpy as np
row_length = 5
col_length = 3
x = np.empty([row_length,col_length],dtype=str)
x[1,2]='ddd'
print(x)
and the result is:
[['' '' '']
['' '' 'd']
['' '' '']
['' '' '']
['' '' '']]
why? The result I expected is:
[['' '' '']
['' '' 'ddd']
['' '' '']
['' '' '']
['' '' '']]
Who can tell me how to fix it?