I have tried the top two solutions here and the bottom solution since it dealt with numpy but nothing worked.
I wanted to take 80.0 divided each element of my array name that a new array dx.
import numpy
L = 80.0
N = []
for n in range(-4, 10):
N.append(str(2 ** N))
N = np.array([N])
This is the set up. So what I have tried is:
dx = L / N
dx = map(lambda x: L / x, N) dx = np.array([dx])
Lastly, keeping N as a list and keeping N as a numpy array and doing
dx = [x / N for x in N] dx = np.array([dx])
Unfortunately, I haven't been able to find a post that helped or anything in the documentation. What can I do to achieve the desired result?