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