Private
Public Access
1
0

ix to loc

This commit is contained in:
Sander Roosendaal
2020-07-16 14:26:57 +02:00
parent b25b600c64
commit f38bd1a50f
2 changed files with 5 additions and 5 deletions

View File

@@ -319,13 +319,13 @@ def getmaxwattinterval(tt,ww,i):
# indexmaxpos = indexmax.get_loc(indexmax)
indexmaxpos = indexmax
try:
t_0 = tt.ix[indexmaxpos]
t_1 = tt.ix[indexmaxpos-i]
deltas = tt.ix[indexmaxpos-i:indexmaxpos].diff().dropna()
t_0 = tt.loc[indexmaxpos]
t_1 = tt.loc[indexmaxpos-i]
deltas = tt.loc[indexmaxpos-i:indexmaxpos].diff().dropna()
testres = 1.0e-3*deltas.max() < 30.
if testres:
deltat = 1.0e-3*(t_0-t_1)
wmax = w_roll.ix[indexmaxpos]
wmax = w_roll.loc[indexmaxpos]
#if wmax > 800 or wmax*5.0e-4*deltat > 800.0:
# wmax = 0
else: