| 4135 | |
| 4136 | |
| 4137 | def test_no_chunks_2d(): |
| 4138 | X = np.arange(24).reshape((4, 6)) |
| 4139 | x = da.from_array(X, chunks=(2, 2)) |
| 4140 | x._chunks = ((np.nan, np.nan), (np.nan, np.nan, np.nan)) |
| 4141 | |
| 4142 | with warnings.catch_warnings(): |
| 4143 | warnings.simplefilter("ignore", RuntimeWarning) # divide by zero |
| 4144 | assert_eq(da.log(x), np.log(X)) |
| 4145 | assert_eq(x.T, X.T) |
| 4146 | assert_eq(x.sum(axis=0, keepdims=True), X.sum(axis=0, keepdims=True)) |
| 4147 | assert_eq(x.sum(axis=1, keepdims=True), X.sum(axis=1, keepdims=True)) |
| 4148 | assert_eq(x.dot(x.T + 1), X.dot(X.T + 1)) |
| 4149 | |
| 4150 | |
| 4151 | def test_no_chunks_yes_chunks(): |