objects.py 文件源码

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

项目:prysm 作者: brandondube 项目源码 文件源码
def save(self, path, nbits=8):
        ''' Write the image to a png, jpg, tiff, etc.

        Args:
            path (`string`): path to write the image to.

            nbits (`int`): number of bits in the output image.

        Returns:
            null: no return

        '''
        dat = (self.data * 255).astype(np.uint8)

        if self.synthetic is False:
            # was a real image, need to flip vertically.
            dat = np.flip(dat, axis=0)
        imsave(path, dat)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号