I have following code:
x = array([-273.0, -176.4, -79.8, 16.9, 113.5, 210.1, 306.8, 403.4, 500.0])
y = array([2.25927498e-53, 2.56028619e-03, 8.64512988e-01, 6.27456769e+00, 1.73894734e+01,
3.29052124e+01, 5.14612316e+01, 7.20531200e+01, 9.40718450e+01])
but array() is not recognized by the IDE, so I figure the code is using some sorta method to wrap numpy.array. So I added
import numpy.array as array
on the top, and the IDE is no longer complaining about using array(). However, when I run this code, I got
ModuleNotFoundError: No module named 'numpy.array'
So how do I use array() like a buildin function?
import numpy as npandnp.array(...).arrayis function in thenumpymodule. It can be imported by name or with the*, but thenp.array(...)syntax is clearer and widely used.