元组索引必须是整数或切片,而不是元组[关闭]

问题描述 投票:0回答:0
for i,img in enumerate((image,reference,matched)):
  for c,c_color in enumerate(('red','green','blue')):
    img_hist,bins=exposure.histogram(img[...,c],source_range='dtype')
    axes[1,2].plot(bins,img_hist/img_hist.max())
    img_cdf,bins=exposure.cumulative_distribution(img[...,c])
    axes[c,i].plot(bins,img_cdf)
    axes[c,0].set_ylabel(c_color)



每当我运行上面的代码时,它都会给我以下错误 元组索引必须是整数或切片,而不是元组

python tuples slice indices
© www.soinside.com 2019 - 2024. All rights reserved.