1. Preliminary study on NumPy
With Python in the development of ArcGIS, more and more contact with the NumPy, from now on the previous NumPy notes sorted out, slowly released. For a friend in need of reference.
Why need NumPy
The list container, which can be used as an array, is provided in Python. However, the elements in the list can be any object, so a pointer to the object is saved in the list, in order to save a simple list [1,2,3]. You need three pointers and three integer objects. This structure is obviously not efficient for numerical operations.
Python also provides an array module, but it supports only one-dimensional arrays, does not support multidimensional arrays, and does not have various operational functions. Thus it is not suitable for numerical operations.
and the emergence of numpy make up for these deficiencies. (--Excerpt from Zhang Jo's "Python Science Calculations")
NumPy Foundation
The NumPy Foundation section has two main elements, as follows:
An array object (ndarray,n-dimensional array object) of arbitrary dimensions (ufunc,universal function Object)
This section first introduces the basic concepts of array objects, and the next section describes their properties and the use of corresponding functions. Later articles will introduce common function objects.
Array
In NumPy, an array object (Ndarray, n-dimensional array object) of any dimension is the most basic content. The Ndarray is made up of two parts:
The actual data held;
Meta-data describing the data (metadata)
The next section first introduces the NumPy array, then introduces the common function object, and finally introduces some advanced properties.
Not to be continued ...