Numpy中array与ndarray的区别
Well, np.array is just a conveniencefunction to create an ndarray, it is not a class itself.
You can also create an array usingnp.ndarray, but it is not the recommended way. From the docstring ofnp.ndarray:
Arrays should beconstructed using array, zeros or empty ... The parameters given here refer toa low-level method (ndarray(...)) for instantiating an array.
numpy.array is a function that returns anumpy.ndarray. There is no object type numpy.array.
Numpy中arrays与matrices的区别
![](https://i-blog.csdnimg.cn/blog_migrate/d6d89b9221d7d216e5f33a232a811acb.png)
同时可以参考:
![](https://i-blog.csdnimg.cn/blog_migrate/61823c619c708812aeb38ad25c78dbd3.png)