def test_get_ratio_heatmap_log(self): data = np.array([[2, 4, 8, 16], [1, 4, 16, 256]]) known = np.array([[0, 1, 2, 3], [0, 2, 4, 8]]) test = get_ratio_heatmap(data, ref_pos=0, log=2) npt.assert_array_equal(test, known)
def test_get_ratio_heatmap(self): data = np.array([[1, 2, 3, 4], [2, 4, 6, 8], [3, 6, 9, 12], [4, 8, 12, 16]]) known = np.array([[0.4, 0.8, 1.2, 1.6], [0.4, 0.8, 1.2, 1.6], [0.4, 0.8, 1.2, 1.6], [0.4, 0.8, 1.2, 1.6]]) test = get_ratio_heatmap(data) npt.assert_array_equal(test, known)