Home > Article > Backend Development > What does python axis mean?
python axis means: 1. [axis=0] expresses columns, [axis=1] expresses rows; 2. The operation of equation [axis=i] is performed along the direction of change of the i-th dimension.
python axis means:
axis=0 expression column
axis=1 When expressing line
, remember axis=i
, and the operation is performed along the direction of change of the i-th dimension;
For a 4*3*2*3 array:
axis=0, only the subscript of the 0th dimension changes during operation and the others remain unchanged.
axis=1, only the subscript of the 1st dimension changes during operation and the others remain unchanged.
axis=2, only the subscript of the 2nd dimension changes during operation and the others remain unchanged.
axis=3, only the subscript of the 3rd dimension changes during operation and the others remain unchanged.
Related learning recommendations: python video
The above is the detailed content of What does python axis mean?. For more information, please follow other related articles on the PHP Chinese website!