()
| 422 | |
| 423 | |
| 424 | def test_array_ufunc(): |
| 425 | x = np.arange(24).reshape((4, 6)) |
| 426 | d = da.from_array(x, chunks=(2, 3)) |
| 427 | |
| 428 | for func in [np.sin, np.sum, np.negative, partial(np.prod, axis=0)]: |
| 429 | assert isinstance(func(d), da.Array) |
| 430 | assert_eq(func(d), func(x)) |
| 431 | |
| 432 | |
| 433 | def test_array_ufunc_binop(): |