The problem here is that you save your array nowhere. The put function works in place on the array and returns nothing. Since you never give your array a name you can not address it later. So this
one_pos = 5
x = np.zeros(10)
np.put(x, one_pos, 1)
would work, but then you could just use indexing:
one_pos = 5
x = np.zeros(10)
x[one_pos] = 1
In my opinion that would be the correct way to do this if no special reason exists to do this as a one liner. This might also be easier to read and readable code is good code.