MCPcopy Create free account
hub / github.com/dask/dask / test_tokenize_numpy_matrix

Function test_tokenize_numpy_matrix

dask/tests/test_tokenize.py:1049–1056  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1047@pytest.mark.skipif("not np")
1048@pytest.mark.filterwarnings("ignore:the matrix:PendingDeprecationWarning")
1049def test_tokenize_numpy_matrix():
1050 rng = np.random.RandomState(1234)
1051 a = np.asmatrix(rng.rand(100))
1052 b = a.copy()
1053 assert check_tokenize(a) == check_tokenize(b)
1054
1055 b[:10] = 1
1056 assert check_tokenize(a) != check_tokenize(b)
1057
1058
1059@pytest.mark.skipif("not sp")

Callers

nothing calls this directly

Calls 3

check_tokenizeFunction · 0.85
RandomStateMethod · 0.45
copyMethod · 0.45

Tested by

no test coverage detected