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

Function test_dot_nan

dask/dataframe/tests/test_dataframe.py:4936–4948  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4934
4935
4936def test_dot_nan():
4937 # Test that nan inputs match pandas' behavior
4938 s1 = pd.Series([1, 2, 3, 4])
4939 dask_s1 = dd.from_pandas(s1, npartitions=1)
4940
4941 s2 = pd.Series([np.nan, np.nan, np.nan, np.nan])
4942 dask_s2 = dd.from_pandas(s2, npartitions=1)
4943
4944 df = pd.DataFrame({"one": s1, "two": s2})
4945 dask_df = dd.from_pandas(df, npartitions=1)
4946
4947 assert_eq(s1.dot(s2), dask_s1.dot(dask_s2))
4948 assert_eq(s2.dot(df), dask_s2.dot(dask_df))
4949
4950
4951def test_use_of_weakref_proxy():

Callers

nothing calls this directly

Calls 2

assert_eqFunction · 0.90
dotMethod · 0.45

Tested by

no test coverage detected