numpy常用用法总结
numpy 简介 numpy的存在使得python拥有强大的矩阵计算能力,不亚于matlab。 官方文档( https://docs.scipy.org/doc/numpy-dev/user/quickstart.html ) 各种用法介绍 首先是numpy中的数据类型,ndarray类型,和标准库中的array.array并不一样。 ndarray的一些属性 ndarray.ndim the number of axes (dimensions) of the array. In the Python world, the number of dimensions is referred to as rank. ndarray.shape the dimensions of the array. This is a tuple of integers indicating the size of the array in each dimension. For a matrix with n rows and m columns, shape will be (n,m). The length of the shape tuple is therefore the rank, or number of dimensions, ndim. ndarray.size the