(self)
| 1584 | |
| 1585 | @pytest.mark.skipif(not HAS_REFCOUNT, reason="Python lacks refcounts") |
| 1586 | def test_take_refcount(self): |
| 1587 | # ticket #939 |
| 1588 | a = np.arange(16, dtype=float) |
| 1589 | a.shape = (4, 4) |
| 1590 | lut = np.ones((5 + 3, 4), float) |
| 1591 | rgba = np.empty(shape=a.shape + (4,), dtype=lut.dtype) |
| 1592 | c1 = sys.getrefcount(rgba) |
| 1593 | try: |
| 1594 | lut.take(a, axis=0, mode='clip', out=rgba) |
| 1595 | except TypeError: |
| 1596 | pass |
| 1597 | c2 = sys.getrefcount(rgba) |
| 1598 | assert_equal(c1, c2) |
| 1599 | |
| 1600 | def test_fromfile_tofile_seeks(self): |
| 1601 | # On Python 3, tofile/fromfile used to get (#1610) the Python |
nothing calls this directly
no test coverage detected