(self)
| 4625 | assert_(result is output) |
| 4626 | |
| 4627 | def test_round_with_scalar(self): |
| 4628 | # Testing round with scalar/zero dimension input |
| 4629 | # GH issue 2244 |
| 4630 | a = array(1.1, mask=[False]) |
| 4631 | assert_equal(a.round(), 1) |
| 4632 | |
| 4633 | a = array(1.1, mask=[True]) |
| 4634 | assert_(a.round() is masked) |
| 4635 | |
| 4636 | a = array(1.1, mask=[False]) |
| 4637 | output = np.empty(1, dtype=float) |
| 4638 | output.fill(-9999) |
| 4639 | a.round(out=output) |
| 4640 | assert_equal(output, 1) |
| 4641 | |
| 4642 | a = array(1.1, mask=[False]) |
| 4643 | output = array(-9999., mask=[True]) |
| 4644 | a.round(out=output) |
| 4645 | assert_equal(output[()], 1) |
| 4646 | |
| 4647 | a = array(1.1, mask=[True]) |
| 4648 | output = array(-9999., mask=[False]) |
| 4649 | a.round(out=output) |
| 4650 | assert_(output[()] is masked) |
| 4651 | |
| 4652 | def test_identity(self): |
| 4653 | a = identity(5) |
nothing calls this directly
no test coverage detected