Jul-02-2020, 02:55 PM
I have a numpy array created like below for a graph. It graphs a unit box.
Having some trouble figuring out if I can slice a numpy array to do the addition I need.
My question is how do I add, say 1 to each x element and 3 to each y element?
Thanks in advance,
- oliver
np.array([[x, y] for x in np.arange(0, 1.01, .01) for y in np.arange(0, 1.01, .01)])I want to transform this "box" with a new numpy array so the new box appears elsewhere on the graph.
Having some trouble figuring out if I can slice a numpy array to do the addition I need.
My question is how do I add, say 1 to each x element and 3 to each y element?
Thanks in advance,
- oliver