()
| 357 | |
| 358 | |
| 359 | def test_empty_indices(): |
| 360 | darr = da.indices(tuple(), chunks=tuple()) |
| 361 | nparr = np.indices(tuple()) |
| 362 | assert darr.shape == nparr.shape |
| 363 | assert darr.dtype == nparr.dtype |
| 364 | assert_eq(darr, nparr) |
| 365 | |
| 366 | darr = da.indices(tuple(), float, chunks=tuple()) |
| 367 | nparr = np.indices(tuple(), float) |
| 368 | assert darr.shape == nparr.shape |
| 369 | assert darr.dtype == nparr.dtype |
| 370 | assert_eq(darr, nparr) |
| 371 | |
| 372 | darr = da.indices((0,), float, chunks=(1,)) |
| 373 | nparr = np.indices((0,), float) |
| 374 | assert darr.shape == nparr.shape |
| 375 | assert darr.dtype == nparr.dtype |
| 376 | assert_eq(darr, nparr) |
| 377 | |
| 378 | darr = da.indices((0, 1, 2), float, chunks=(1, 1, 2)) |
| 379 | nparr = np.indices((0, 1, 2), float) |
| 380 | assert darr.shape == nparr.shape |
| 381 | assert darr.dtype == nparr.dtype |
| 382 | assert_eq(darr, nparr) |
| 383 | |
| 384 | |
| 385 | def test_indices(): |
nothing calls this directly
no test coverage detected