() is a function that calculates the difference between the maximum and minimum values and is used as follows:
import numpy as np a = ([(0, 20, 5), (0, 20, 5)]) print('Raw data\n'a) print('Calculate \n for all data', ()) print('axis=0,in line direction,i.e. each column\n', (axis=0)) # By row direction, i.e., each column print('axis=1,By column direction,That is, each line\n', (axis=1)) # By column direction,That is, each line
Run results:
raw data [[ 9 12 11 6 8] [19 5 0 7 14]] Calculated for all data 19 axis=0,in line direction,i.e. each column [10 7 11 1 6] axis=1,By column direction,That is, each line [ 6 19]
The above this talk about Python3 () the difference between the maximum value and the minimum value is all I have to share with you, I hope to give you a reference, and I hope you support me more.