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

Function test_dot_nan

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

Source from the content-addressed store, hash-verified

4973
4974
4975def test_dot_nan():
4976 # Test that nan inputs match pandas' behavior
4977 s1 = pd.Series([1, 2, 3, 4])
4978 dask_s1 = dd.from_pandas(s1, npartitions=1)
4979
4980 s2 = pd.Series([np.nan, np.nan, np.nan, np.nan])
4981 dask_s2 = dd.from_pandas(s2, npartitions=1)
4982
4983 df = pd.DataFrame({"one": s1, "two": s2})
4984 dask_df = dd.from_pandas(df, npartitions=1)
4985
4986 assert_eq(s1.dot(s2), dask_s1.dot(dask_s2))
4987 assert_eq(s2.dot(df), dask_s2.dot(dask_df))
4988
4989
4990def 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