Skip to content

Commit 57a5d93

Browse files
add check for np.integer
1 parent 315ed9b commit 57a5d93

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

keras/src/backend/openvino/numpy.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1323,13 +1323,15 @@ def repeat(x, repeats, axis=None):
13231323
x = ov_opset.reshape(x, const_neg_1, special_zero=False)
13241324
axis = 0
13251325

1326-
if isinstance(repeats, (int, np.integer)) or (
1326+
if isinstance(repeats, (int, np.integer, np.intege)) or (
13271327
isinstance(repeats, np.ndarray)
13281328
and repeats.ndim == 1
13291329
and repeats.size == 1
13301330
):
13311331
repeats_val = (
1332-
int(repeats) if isinstance(repeats, np.ndarray) else repeats
1332+
int(repeats)
1333+
if isinstance(repeats, (np.integer, np.ndarray))
1334+
else repeats
13331335
)
13341336
dim_len = ov_opset.gather(
13351337
ov_opset.shape_of(x, Type.i32),

0 commit comments

Comments
 (0)