| 48 | # TODO(CoW) see https://github.com/pandas-dev/pandas/pull/51082 |
| 49 | @pytest.mark.skip(reason="not implemented with CoW") |
| 50 | def test_dask_ufunc(): |
| 51 | # dask sets "compute.use_numexpr" to False, so catch the current value |
| 52 | # and ensure to reset it afterwards to avoid impacting other tests |
| 53 | olduse = pd.get_option("compute.use_numexpr") |
| 54 | |
| 55 | try: |
| 56 | da = pytest.importorskip("dask.array") |
| 57 | dd = pytest.importorskip("dask.dataframe") |
| 58 | |
| 59 | s = Series([1.5, 2.3, 3.7, 4.0]) |
| 60 | ds = dd.from_pandas(s, npartitions=2) |
| 61 | |
| 62 | result = da.log(ds).compute() |
| 63 | expected = np.log(s) |
| 64 | tm.assert_series_equal(result, expected) |
| 65 | finally: |
| 66 | pd.set_option("compute.use_numexpr", olduse) |
| 67 | |
| 68 | |
| 69 | def test_construct_dask_float_array_int_dtype_match_ndarray(): |