每日小语
山河大地是如来。——虚云和尚
自己敲写
啊哦,报错unsupported operand type(s) for -: 'float' and 'builtin_function_or_method'
import pandas as pd
import numpy as np
arr1=np.random.rand(4,4)
print(arr1)
x=arr1[1]
x=(x-arr1.min)/(arr1.max-arr1.min)
类型不同,更改后,又报错'numpy.ndarray' object is not callable
import pandas as pd
import numpy as np
arr1=np.random.rand(4,4)
print(arr1)
x=arr1[1,2]
x=(x-arr1.min())/(arr1.max()-arr1.min())
1.min要加括号
2.索引方括号