Numpy is the core library for scientific computing in Python. It provides a high-performance multidimensional array object, and tools for working with these arrays. If you are already familiar with MATLAB, you might find this tutorial useful to get started with Numpy.
Array
numpy数组是一个由相同类型的值组成的网格,并由非负整数元组进行索引。
维数是数组的秩;数组的形状是一个整数元组,给出了数组在每个维度上的大小。
我们可以从嵌套的Python列表中初始化numpy数组,并使用方括号访问元素:
- 初始化: