Test that methods using ._data preserve ExplicitlyIndexed arrays. Regression test for methods that should use ._data instead of .data to avoid loading lazy arrays into memory.
()
| 3272 | |
| 3273 | |
| 3274 | def test_explicitly_indexed_array_preserved() -> None: |
| 3275 | """Test that methods using ._data preserve ExplicitlyIndexed arrays. |
| 3276 | |
| 3277 | Regression test for methods that should use ._data instead of .data |
| 3278 | to avoid loading lazy arrays into memory. |
| 3279 | """ |
| 3280 | arr = IndexableArray(np.array([1, 2, 3])) |
| 3281 | var = Variable(["x"], arr) |
| 3282 | result = var.drop_encoding() |
| 3283 | assert isinstance(result._data, indexing.ExplicitlyIndexed) |
nothing calls this directly
no test coverage detected
searching dependent graphs…