You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def ref(data, n: int):
if n < len(data):
res = []
if n >= 0:
res[:n] = [float('nan')] * n
res[n:] = data[:-n]
else:
res[n:] = [float('nan')] * abs(n)
res[:n] = data[-n:]
else:
res = data
return np.array(res)
REF(price,N)N只能是整数,如果N是序列,该如何处理?
The text was updated successfully, but these errors were encountered: