Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement dpnp.einsum #1779

Merged
merged 8 commits into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from 7 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
1 change: 1 addition & 0 deletions .github/workflows/conda-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ env:
third_party/cupy/linalg_tests/test_norms.py
third_party/cupy/linalg_tests/test_product.py
third_party/cupy/linalg_tests/test_solve.py
third_party/cupy/linalg_tests/test_einsum.py
third_party/cupy/logic_tests/test_comparison.py
third_party/cupy/logic_tests/test_truth.py
third_party/cupy/manipulation_tests/test_basic.py
Expand Down
8 changes: 4 additions & 4 deletions dpnp/dpnp_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -580,14 +580,14 @@ def astype(self, dtype, order="K", casting="unsafe", subok=True, copy=True):
If it is False and no cast happens, then this method returns the array itself.
Otherwise, a copy is returned.
casting : {'no', 'equiv', 'safe', 'same_kind', 'unsafe'}, optional
Controls what kind of data casting may occur. Defaults to 'unsafe' for backwards compatibility.

Controls what kind of data casting may occur.
Defaults to ``'unsafe'`` for backwards compatibility.
- 'no' means the data types should not be cast at all.
- 'equiv' means only byte-order changes are allowed.
- 'safe' means only casts which can preserve values are allowed.
- 'same_kind' means only safe casts or casts within a kind, like float64 to float32, are allowed.
- 'same_kind' means only safe casts or casts within a kind, like
float64 to float32, are allowed.
- 'unsafe' means any data conversions may be done.

copy : bool, optional
By default, ``astype`` always returns a newly allocated array. If
this is set to ``False``, and the `dtype`, `order`, and `subok`
Expand Down
2 changes: 1 addition & 1 deletion dpnp/dpnp_iface.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ def check_supported_arrays_type(*arrays, scalar_type=False, all_scalars=False):
f"An array must be any of supported type, but got {type(a)}"
)

if len(arrays) > 1 and not (all_scalars or any_is_array):
if len(arrays) > 0 and not (all_scalars or any_is_array):
raise TypeError(
"At least one input must be of supported array type, "
"but got all scalars."
Expand Down
Loading
Loading