Exemplo n.º 1
0
    def test_bin_c(self):
        bins = range(2, 8)
        y = np.array([[7, 5, 6], [2, 3, 5], [7, 2, 2], [3, 6, 7], [6, 3, 4],
                      [6, 7, 4], [6, 5, 6], [4, 6, 7], [4, 6, 3], [3, 2, 7]])

        expected = np.array([[5, 3, 4], [0, 1, 3], [5, 0, 0], [1, 4, 5],
                             [4, 1, 2], [4, 5, 2], [4, 3, 4], [2, 4, 5],
                             [2, 4, 1], [1, 0, 5]])
        np.testing.assert_array_equal(expected, binC(y, bins))
Exemplo n.º 2
0
    def test_bin_c(self):
        bins = range(2, 8)
        y = np.array([[7, 5, 6], [2, 3, 5], [7, 2, 2], [3, 6, 7], [6, 3, 4],
                      [6, 7, 4], [6, 5, 6], [4, 6, 7], [4, 6, 3], [3, 2, 7]])

        expected = np.array([[5, 3, 4], [0, 1, 3], [5, 0, 0], [1, 4, 5],
                             [4, 1, 2], [4, 5, 2], [4, 3, 4], [2, 4, 5],
                             [2, 4, 1], [1, 0, 5]])
        np.testing.assert_array_equal(expected, binC(y, bins))