Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions dask-xfails.txt
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,3 @@ array_api_tests/test_special_cases.py::test_unary[acosh(real(x_i) is +0 and imag
array_api_tests/test_dlpack.py::test_dlpack_device
array_api_tests/test_dlpack.py::test_dunder_dlpack
array_api_tests/test_dlpack.py::test_from_dlpack

# reshape copy=False code path assigns to the .shape attribute
array_api_tests/test_manipulation_functions.py::test_reshape
14 changes: 13 additions & 1 deletion src/array_api_compat/dask/array/_aliases.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,19 @@ def arange(
ones_like = get_xp(da)(_aliases.ones_like)
zeros = get_xp(da)(_aliases.zeros)
zeros_like = get_xp(da)(_aliases.zeros_like)
reshape = get_xp(da)(_aliases.reshape)
def reshape(
x: Array,
/,
shape: tuple[int, ...],
*,
copy: py_bool | None = None,
**kwargs: object,
) -> Array:
if copy is True:
x = x.copy()
return da.reshape(x, shape, **kwargs)


matrix_transpose = get_xp(da)(_aliases.matrix_transpose)
vecdot = get_xp(da)(_aliases.vecdot)
nonzero = get_xp(da)(_aliases.nonzero)
Expand Down
Loading