I want to create an array and display it's contents and append a new item however I am encountering an error:
C:\Users\Dylan Galea\Desktop\Modelling and CS>python numpy.py
Traceback (most recent call last):
File "numpy.py", line 1, in <module>
import numpy as np
File "C:\Users\Dylan Galea\Desktop\Modelling and CS\numpy.py", line 2, in <module>
x=np.array([1,2,3,4])
AttributeError: module 'numpy' has no attribute 'array'
My code is:
import numpy as np
x=np.array([1,2,3,4])
x=np.append([x,[5],0])
print(x)