Hola! Cuando ejecuto el código en vscode me aparece un warning en la línea pressureDifferenceList[j] = abs(noLeakPressureList[j] - currentPressureArray[j]) Se puede evitar de alguna forma?
def localiseLeak(filePath, currentTime):
global noLeakDF
df0 = pd.read_excel(filePath, skiprows=3, nrows=9)
df0 = df0['psi ']
#making a list of excel sheet's pressures
currentPressureArray = np.zeros(10, dtype=float)
for i in range(9):
currentPressureArray[i] = df0[i]
currentPressureArray[9] = float(currentTime)
for i in range(6):
iterTime = float(noLeakDF['Time'][i])
if (currentTime==iterTime):
noLeakPressureList = noLeakDF.iloc[i]
pressureDifferenceList = np.zeros(9, dtype=float)
for j in range(9):
pressureDifferenceList[j] = abs(noLeakPressureList[j] - currentPressureArray[j])
index_max = np.argmax(pressureDifferenceList)
return float(noLeakDF.columns[index_max].split(' ')[1])
Estoy usando python 3.11.9, pandas 2.1.4, numpy 1.26.4