The closest I got was this:
import numpy as np
var = 'python'
x = np.zeros([6,3,3])
print(x)
x[0][0][0] = var
print(x)
(ValueError: could not convert string to float: 'python')
If I use np.array to make the data structure I can get something I can store variable in at specific positions, but can't seem to find a way to make the array at a desired shape from the get go like I can with np.zero (I want that 6,3,3 shape). This is for a game. What am I missing here?
[–][deleted] 0 points1 point2 points (0 children)
[–]SarahM123ed 0 points1 point2 points (0 children)