Test _asarray_with_order passes along order for NumPy arrays.
(array_api)
| 194 | |
| 195 | @pytest.mark.parametrize("array_api", ["numpy", "array_api_strict"]) |
| 196 | def test_asarray_with_order(array_api): |
| 197 | """Test _asarray_with_order passes along order for NumPy arrays.""" |
| 198 | xp = pytest.importorskip(array_api) |
| 199 | |
| 200 | X = xp.asarray([1.2, 3.4, 5.1]) |
| 201 | X_new = _asarray_with_order(X, order="F", xp=xp) |
| 202 | |
| 203 | X_new_np = numpy.asarray(X_new) |
| 204 | assert X_new_np.flags["F_CONTIGUOUS"] |
| 205 | |
| 206 | |
| 207 | @pytest.mark.parametrize( |
nothing calls this directly
no test coverage detected
searching dependent graphs…