示例#1
0
def imax(L, x2):
    a = []
    b = []
    if len(L) != 0:
        for i in L:
            a.append(x2[i])
        for j in L:
            if max(a) == x2[j]:
                b.append(j)
        return (b[0])
示例#2
0
def maxvalinlist(L):
    b = []
    c = []
    for i in range(0, len(L) - 1):
        if L[i + 1] - L[i] < 10:
            b.append(L[i])
        else:
            c.append(b)
            b = []
    return (c)
示例#3
0
def index(L, v):
    b = []
    for i in range(0, len(L)):
        if L[i] > v:
            b.append(i)
    return (b)
示例#4
0
            minpoint2.append(k)
            minvalue2.append(min(d))
            break
minpoint2 = np.array(minpoint2)
minvalue2 = np.array(minvalue2)
#plt.subplot(5,1,3)
#plt.scatter(minpoint2,minvalue2,color = 'blue',alpha =1,s=6)
x2 += 2
cak = []
vcak = []
for i in aka:
    a = []
    b = []
    for ju in range(i + 9, i + 15):
        a.append(ju)
        b.append(x2[ju])
    for iu in a:
        if x2[iu] == min(b):
            cak.append(iu)
            vcak.append(x2[iu])
            break
cak = np.array(cak)
vcak = np.array(vcak)
vcak -= 2
vcak *= -1 * (vcak)

#print(cak)
#    print(b)
print(len(cak))
print(len(minpoint))
#print(aka)