()
| 1141 | |
| 1142 | |
| 1143 | def test_elemwise_on_scalars(): |
| 1144 | nx = np.arange(10, dtype=np.int64) |
| 1145 | ny = np.arange(10, dtype=np.int32) |
| 1146 | nz = nx.sum() * ny |
| 1147 | |
| 1148 | dx = from_array(nx, chunks=(5,)) |
| 1149 | dy = from_array(ny, chunks=(5,)) |
| 1150 | dz = dx.sum() * dy |
| 1151 | |
| 1152 | if NUMPY_GE_200: |
| 1153 | assert_eq(dz, nz) |
| 1154 | else: |
| 1155 | # Dask 0-d arrays do not behave like numpy scalars for type promotion |
| 1156 | assert_eq(dz, nz, check_dtype=False) |
| 1157 | assert nz.dtype == np.int32 |
| 1158 | assert dz.dtype == np.int64 |
| 1159 | assert dz.compute().dtype == np.int64 |
| 1160 | |
| 1161 | |
| 1162 | def test_elemwise_with_ndarrays(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…