More important Ndarray object properties in an array of numpy:
Ndarray.ndim: The number of dimensions (that is, the number of array axes) of the array, equal to the rank. The most common are two-dimensional arrays (matrices). ndarray.itemsize: The byte size of each element in the array. For example, an array with an element type of Float64 Itemsiz property value of 8 (float64 consumes 64 bits, each byte is 8, so 64/8, takes 8 bytes), and An array with an element type of complex32 the Item property is 4 (32/8).
inch Python float32: Standard single-precision floating-point number, float64: Standard double-precision floating-point number compatible with double C.
Single-precision type (float) and double type (double):
The range of float is -2^128 ~ +2^128, i.e. -3.4*1038~3.4*1038, 32 bits of binary bits.
Accuracy: Valid digital 6~7,2^23 = 8388608, total 7 bits, which means there can be up to 7 significant digits.
The double range is -2^1024 ~ +2^1024, or -1.7*10308~1.7*10308, bits number 64 bits.
Accuracy: Valid number 15~16,2^52 = 4503599627370496, total 16 digits, valid number is 15~16 bit
Float
8bits (digital digit) 2^7=128
23bits (tail digit)
Double
11bits (digital digit) 2^10=1024
52bits (tail digit)
Np.arange ():
Dtype (data type):
Astype ():
* * 2 multiplication sign is the exponentiation. Like 2**4, the result is 2 of 4, and the result is 16.
The usage of RANDN ():
1, in []: arr = Randn (5, 3)
2, in []: arr = Np.random.randn (5, 4)
< data analysis using Python > Note 2