def test_atleast_2d(self):
        np.testing.assert_equal(atleast_2d([[1], [2], [3]]),
                                self.res)

        atleast_2d([[1], [2], [3]])
 def test_atleast_1d(self):
     np.testing.assert_equal(atleast_2d([1, 2, 3]),
                             self.res)
 def test_atleast_0d(self):
     np.testing.assert_equal(atleast_2d(1),
                             np.array([[1]]))
示例#4
0
    def test_atleast_2d(self):
        np.testing.assert_equal(atleast_2d([[1], [2], [3]]), self.res)

        atleast_2d([[1], [2], [3]])
示例#5
0
 def test_atleast_1d(self):
     np.testing.assert_equal(atleast_2d([1, 2, 3]), self.res)
示例#6
0
 def test_atleast_0d(self):
     np.testing.assert_equal(atleast_2d(1), np.array([[1]]))