I've got two variables: dim and terms. I'd like to use these variables to define an array. For example,
- If
dim=2andterms=4, I'd likem=np.zeros((4,4)) - If
dim=3andterms=4, I'd likem=np.zeros((4,4,4)) - If
dim=3andterms=3, I'd likem=np.zeros((3,3,3))
I tried defining the argument using a string but it doesn't accept that.