def testQuadrant2x2ArrayQ4(self): ''' 2x2 array symmetrizes properly input quadrant 4 ''' array = np.array([[0, 1], [2, 3]]) arrayfull = np.array([[3, 2, 3], [1, 0, 1], [3, 2, 3]]) testarray = coord_transforms.expand_quadrant_symmetry(array, 4) np.testing.assert_array_almost_equal(arrayfull, testarray)
def testQuadrant3x3ArrayQ4(self): ''' 3x3 array symmetrizes properly input quadrant 4 ''' array = np.array([[0, 1, 2], [3, 4, 5], [6, 7, 8]]) arrayfull = np.array([ [8, 7, 6, 7, 8], [5, 4, 3, 4, 5], [2, 1, 0, 1, 2], [5, 4, 3, 4, 5], [8, 7, 6, 7, 8]]) testarray = coord_transforms.expand_quadrant_symmetry(array, 4) np.testing.assert_array_almost_equal(arrayfull, testarray)