I am trying plot a graph with a numpy array but the error occur in plt.plot(s,s).
import numpy as np
import matplotlib.pyplot as plt
def npArrDefine():
np.array=[]
s=np.array
for i in range(10):
s.append(i+3)
plt.plot(s,s)
plt.axis([0,5,0,20])
plt.show()
npArrDefine()
s=np.arraynp.arrayconstructor and somehow expecting that it has anappendmethod. That makes no sense. This also makes no sense:np.array = [].