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

Function test_dot_nan

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

Source from the content-addressed store, hash-verified

4952
4953
4954def test_dot_nan():
4955 # Test that nan inputs match pandas' behavior
4956 s1 = pd.Series([1, 2, 3, 4])
4957 dask_s1 = dd.from_pandas(s1, npartitions=1)
4958
4959 s2 = pd.Series([np.nan, np.nan, np.nan, np.nan])
4960 dask_s2 = dd.from_pandas(s2, npartitions=1)
4961
4962 df = pd.DataFrame({"one": s1, "two": s2})
4963 dask_df = dd.from_pandas(df, npartitions=1)
4964
4965 assert_eq(s1.dot(s2), dask_s1.dot(dask_s2))
4966 assert_eq(s2.dot(df), dask_s2.dot(dask_df))
4967
4968
4969def 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