<output id="ilehw"><bdo id="ilehw"><nobr id="ilehw"></nobr></bdo></output>
        <dl id="ilehw"><font id="ilehw"></font></dl>
          1. python报错The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

            情深不及哈士奇 发布于 03/27 17:43
            阅读 218
            收藏 0
            投影法做字符切割的一段程序,像素比较的时候会报错是为什么
            def projection_line(array_vals, minimun_val, minimun_range):
                start_i = None
                end_i = None
                line_ranges = []
                '''
                for index, item in enumerate(list1):
                print index, item  
                '''
                for i, val in enumerate(array_vals):
                    # 黑色像素起点
                    if val > minimun_val and start_i is None:
                        start_i = i
                    # 黑色像素区间
                    elif val > minimun_val and start_i is not None:
                        pass
                    # 黑色像素终点
                    elif val < minimun_val and start_i is not None:
                        # 黑色像素的长度
                        if i - start_i >= minimun_range:
                            end_i = i
                            #print(end_i - start_i)
                            # 记录此段黑色像素起始点
                            line_ranges.append((start_i, end_i))
                            start_i = None
                            end_i = None
                    # 白色像素区域
                    elif val < minimun_val and start_i is None:
                        pass
                    else:
                        raise ValueError("cannot parse this case...")
                return line_ranges

            报错信息:if val > minimun_val and start_i is None:
            ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

            加载中
            返回顶部
            顶部
            广东快乐十分实时开奖

                  <output id="ilehw"><bdo id="ilehw"><nobr id="ilehw"></nobr></bdo></output>
                  <dl id="ilehw"><font id="ilehw"></font></dl>

                            <output id="ilehw"><bdo id="ilehw"><nobr id="ilehw"></nobr></bdo></output>
                            <dl id="ilehw"><font id="ilehw"></font></dl>
                              1. 浙江快乐12开奖结果走势图 网球比分153045 欢乐升级找朋友什么时候包场 代玩好运快3犯法么 双色球中六个红球的方法 七乐彩正文 铁算盘六肖中特 30选5最近一期开奖 河北20选5玩法 辽宁11选5几点开始 广东快乐十分中奖宝典 腾讯分分彩全天计划全天网页版 篮球胜分差考虑让分么 白小姐二肖中特期期准一 双色球2019054开机分析