test_general.py 文件源码

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

项目:marvin 作者: sdss 项目源码 文件源码
def test_pix_lower(self, galaxy):
        """Tests mode='pix', xyorig='lower'."""

        coords = [[0, 0],
                  [5, 3],
                  [10, 10],
                  [1.5, 2.5],
                  [0.4, 0.25]]

        expected = [[0, 0],
                    [3, 5],
                    [10, 10],
                    [2, 2],
                    [0, 0]]

        cubeCoords = convertCoords(coords, mode='pix', shape=galaxy.shape,
                                   xyorig='lower')
        pytest.approx(cubeCoords, np.array(expected))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号