plotter.py 文件源码

python
阅读 34 收藏 0 点赞 0 评论 0

项目:tfplus 作者: renmengye 项目源码 文件源码
def calc_row_col(self, num_ex, num_items):
        num_rows_per_ex = int(np.ceil(num_items / self.max_num_col))
        if num_items > self.max_num_col:
            num_col = self.max_num_col
            num_row = num_rows_per_ex * num_ex
        else:
            num_row = num_ex
            num_col = num_items

        def calc(ii, jj):
            col = jj % self.max_num_col
            row = num_rows_per_ex * ii + int(jj / self.max_num_col)

            return row, col

        return num_row, num_col, calc
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号