Skip to content

Commit efc93f3

Browse files
authored
Merge branch 'master' into impl_item
2 parents 2453e37 + 770042e commit efc93f3

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

doc/reference/ndarray.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ Array conversion
134134

135135
dpnp.ndarray.item
136136
dpnp.ndarray.tolist
137-
dpnp.ndarray.itemset
138137
dpnp.ndarray.tostring
139138
dpnp.ndarray.tobytes
140139
dpnp.ndarray.tofile

dpnp/dpnp_array.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,8 +1102,6 @@ def item(self, *args):
11021102
# for large arrays using `asnumpy()`
11031103
return self.asnumpy().item(*args)
11041104

1105-
# 'itemset',
1106-
11071105
@property
11081106
def itemsize(self):
11091107
"""Size of one array element in bytes."""
@@ -1208,8 +1206,6 @@ def ndim(self):
12081206

12091207
return self._array_obj.ndim
12101208

1211-
# 'newbyteorder',
1212-
12131209
def nonzero(self):
12141210
"""
12151211
Return the indices of the elements that are non-zero.

tests/test_arraypad.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,10 @@ def test_pad_empty_dim_valid(self, mode):
432432
a_dp = dpnp.array(a_np)
433433
expected = numpy.pad(a_np, [(0,), (2,), (1,)], mode)
434434
result = dpnp.pad(a_dp, [(0,), (2,), (1,)], mode)
435-
assert_dtype_allclose(result, expected)
435+
assert result.shape == expected.shape
436+
if mode == "constant":
437+
# In "empty" mode, arrays are uninitialized and comparing may fail
438+
assert_dtype_allclose(result, expected)
436439

437440
@pytest.mark.parametrize(
438441
"mode",

0 commit comments

Comments
 (0)