(self)
| 1572 | |
| 1573 | @pytest.mark.skipif(not HAS_REFCOUNT, reason="Python lacks refcounts") |
| 1574 | def test_take_refcount(self): |
| 1575 | # ticket #939 |
| 1576 | a = np.arange(16, dtype=float).reshape((4, 4)) |
| 1577 | lut = np.ones((5 + 3, 4), float) |
| 1578 | rgba = np.empty(shape=a.shape + (4,), dtype=lut.dtype) |
| 1579 | c1 = sys.getrefcount(rgba) |
| 1580 | try: |
| 1581 | lut.take(a, axis=0, mode='clip', out=rgba) |
| 1582 | except TypeError: |
| 1583 | pass |
| 1584 | c2 = sys.getrefcount(rgba) |
| 1585 | assert_equal(c1, c2) |
| 1586 | |
| 1587 | def test_fromfile_tofile_seeks(self): |
| 1588 | # tofile/fromfile used to get (#1610) the Python file handle out of sync |
nothing calls this directly
no test coverage detected