Searched refs:IntPairs (Results 1 - 2 of 2) sorted by relevance

/gem5/ext/pybind11/tests/
H A Dtest_sequences_and_iterators.py16 assert list(m.IntPairs([(1, 2), (3, 4), (0, 5)]).nonzero()) == [(1, 2), (3, 4)]
17 assert list(m.IntPairs([(1, 2), (2, 0), (0, 3), (4, 5)]).nonzero()) == [(1, 2)]
18 assert list(m.IntPairs([(0, 3), (1, 2), (3, 4)]).nonzero()) == []
20 assert list(m.IntPairs([(1, 2), (3, 4), (0, 5)]).nonzero_keys()) == [1, 3]
21 assert list(m.IntPairs([(1, 2), (2, 0), (0, 3), (4, 5)]).nonzero_keys()) == [1]
22 assert list(m.IntPairs([(0, 3), (1, 2), (3, 4)]).nonzero_keys()) == []
25 it = m.IntPairs([(0, 0)]).nonzero()
30 it = m.IntPairs([(0, 0)]).nonzero_keys()
H A Dtest_sequences_and_iterators.cpp259 class IntPairs { class
261 IntPairs(std::vector<std::pair<int, int>> data) : data_(std::move(data)) {} function in class:IntPairs
266 py::class_<IntPairs>(m, "IntPairs")
268 .def("nonzero", [](const IntPairs& s) {
271 .def("nonzero_keys", [](const IntPairs& s) {

Completed in 7 milliseconds