Skip to content

Commit 51d5ea0

Browse files
committed
Add dpnp_array.compress method
1 parent a488d96 commit 51d5ea0

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

dpnp/dpnp_array.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,14 @@ def clip(self, min=None, max=None, out=None, **kwargs):
786786

787787
return dpnp.clip(self, min, max, out=out, **kwargs)
788788

789-
# 'compress',
789+
def compress(self, condition, axis=None, out=None):
790+
"""
791+
Select slices of an array along a given axis.
792+
793+
Refer to :obj:`dpnp.compress` for full documentation.
794+
"""
795+
796+
return dpnp.compress(condition, self, axis=axis, out=out)
790797

791798
def conj(self):
792799
"""

0 commit comments

Comments
 (0)