示例#1
0
    def test_translate(self):
        # an axis with labels having the object dtype
        a = Axis(np.array(["a0", "a1"], dtype=object), 'a')

        self.assertEqual(a.index('a1'), 1)
        self.assertEqual(a.index('a1 >> A1'), 1)
示例#2
0
def test_index():
    # an axis with labels having the object dtype
    a = Axis(np.array(["a0", "a1"], dtype=object), 'a')
    assert a.index('a1') == 1
    assert a.index('a1 >> A1') == 1
示例#3
0
文件: test_axis.py 项目: liam2/larray
def test_translate():
    # an axis with labels having the object dtype
    a = Axis(np.array(["a0", "a1"], dtype=object), 'a')
    assert a.index('a1') == 1
    assert a.index('a1 >> A1') == 1