本文整理汇总了Python中matplotlib.cbook.dmp函数的典型用法代码示例。如果您正苦于以下问题:Python dmp函数的具体用法?Python dmp怎么用?Python dmp使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dmp函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_rgba
def test_rgba(self):
actual = dmp(self.arr3, self.arr_rgba)
ind = [0, 1, 5]
expected = (self.arr3.take(ind).compressed(),
self.arr_rgba.take(ind, axis=0))
assert_array_equal(actual[0], expected[0])
assert_array_equal(actual[1], expected[1])
示例2: test_datetime
def test_datetime(self):
actual = dmp(self.arr_dt, self.arr3)
ind = [0, 1, 5]
expected = (self.arr_dt2.take(ind),
self.arr3.take(ind).compressed())
assert_array_equal(actual[0], expected[0])
assert_array_equal(actual[1], expected[1])
示例3: test_rgba
def test_rgba(self):
actual = dmp(self.arr3, self.arr_rgba)
ind = [0, 1, 5]
expected = (self.arr3.take(ind).compressed(),
self.arr_rgba.take(ind, axis=0))
self.assert_(np.all(actual[0] == expected[0]) and
np.all(actual[1] == expected[1]))
示例4: test_datetime
def test_datetime(self):
actual = dmp(self.arr_dt, self.arr3)
ind = [0, 1, 5]
expected = (self.arr_dt2.take(ind),
self.arr3.take(ind).compressed())
self.assert_(np.all(actual[0] == expected[0]) and
np.all(actual[1] == expected[1]))
示例5: test_rgba
def test_rgba(self):
actual = dmp(self.arr3, self.arr_rgba)
ind = [0, 1, 5]
expected = (self.arr3[ind].compressed(), self.arr_rgba[ind])
assert_array_equal(actual[0], expected[0])
assert_array_equal(actual[1], expected[1])
示例6: test_string_seq
def test_string_seq(self):
actual = dmp(self.arr_s, self.arr1)
ind = [0, 1, 2, 5]
expected = (self.arr_s2[ind], self.arr2[ind])
assert_array_equal(actual[0], expected[0])
assert_array_equal(actual[1], expected[1])
示例7: test_bad_first_arg
def test_bad_first_arg(self):
with pytest.raises(ValueError):
dmp('a string', self.arr0)
示例8: test_bad_first_arg
def test_bad_first_arg(self):
dmp('a string', self.arr0)