[까칠한 에러#3]TypeError: only length-1 arrays can be converted to Python scalars

nØthing specia¡|2018년 5월 24일
Posts

[까칠한 에러#3]TypeError: only length-1 arrays can be converted to Python scalars

nØthing specia¡|2018년 5월 24일

예전에 겪은 에러인데, 참고삼아 기록을....TypeError: only length-1 arrays can be converted to Python scalars [CODE]import scipy.stats as sp import numpy as np import matplotlib.pyplot as plt from math import * x=np.linspace(0,3,200) mu=0 sigma0=[0.25,0.5,1] color=['blue','red','green'] target=[(1.2,1.3),(1.7,0.4),(0.18,0.7)] start=[(1.8,1.4),(1.9,0.6),(0.18,1.6)] for i in range(len(sigma0)): sigma=