(self)
| 5849 | assert_array_equal(x, np.eye(3)) |
| 5850 | |
| 5851 | def test_0d_shape(self): |
| 5852 | # to it multiple times to test it does not break alloc cache gh-9216 |
| 5853 | for i in range(10): |
| 5854 | x = np.empty((1,)) |
| 5855 | x.resize(()) |
| 5856 | assert_equal(x.shape, ()) |
| 5857 | assert_equal(x.size, 1) |
| 5858 | x = np.empty(()) |
| 5859 | x.resize((1,)) |
| 5860 | assert_equal(x.shape, (1,)) |
| 5861 | assert_equal(x.size, 1) |
| 5862 | |
| 5863 | def test_invalid_arguments(self): |
| 5864 | assert_raises(TypeError, np.eye(3).resize, 'hi') |
nothing calls this directly
no test coverage detected