MCPcopy
hub / github.com/scikit-learn/scikit-learn / test_asarray_with_order

Function test_asarray_with_order

sklearn/utils/tests/test_array_api.py:196–204  ·  view source on GitHub ↗

Test _asarray_with_order passes along order for NumPy arrays.

(array_api)

Source from the content-addressed store, hash-verified

194
195@pytest.mark.parametrize("array_api", ["numpy", "array_api_strict"])
196def 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(

Callers

nothing calls this directly

Calls 1

_asarray_with_orderFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…