Skip to content

Commit 5a9461d

Browse files
authored
[Py OV] Add np.number support to ops8.constant type hints (#32346)
### Details: - Add np.number support to ops8.constant type hints - Remove unused imports
1 parent 19a5830 commit 5a9461d

File tree

7 files changed

+1
-8
lines changed

7 files changed

+1
-8
lines changed

src/bindings/python/src/openvino/opset1/ops.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ def concat(nodes: list[NodeInput], axis: int, name: Optional[str] = None) -> Nod
333333

334334
@nameable_op
335335
def constant(
336-
value: NumericData,
336+
value: Union[NumericData, np.number, bool, np.bool_, list],
337337
dtype: Union[NumericType, Type] = None,
338338
name: Optional[str] = None,
339339
) -> Constant:

src/bindings/python/src/openvino/opset10/ops.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
NodeInput,
1414
as_nodes,
1515
as_node,
16-
make_constant_node,
1716
)
1817

1918
_get_node_factory_opset4 = partial(_get_node_factory, "opset4")

src/bindings/python/src/openvino/opset2/ops.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
get_dtype,
3131
get_element_type,
3232
get_element_type_str,
33-
make_constant_node,
3433
)
3534

3635
_get_node_factory_opset2 = partial(_get_node_factory, "opset2")

src/bindings/python/src/openvino/opset3/ops.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
from openvino.utils.node_factory import NodeFactory, _get_node_factory
2121
from openvino.utils.types import (
2222
NodeInput,
23-
NumericData,
2423
NumericType,
2524
ScalarData,
2625
TensorShape,

src/bindings/python/src/openvino/opset4/ops.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
from openvino.utils.node_factory import NodeFactory, _get_node_factory
2121
from openvino.utils.types import (
2222
NodeInput,
23-
NumericData,
2423
NumericType,
2524
ScalarData,
2625
TensorShape,

src/bindings/python/src/openvino/opset5/ops.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
from openvino.utils.node_factory import NodeFactory, _get_node_factory
2121
from openvino.utils.types import (
2222
NodeInput,
23-
NumericData,
2423
NumericType,
2524
ScalarData,
2625
TensorShape,

src/bindings/python/src/openvino/opset7/ops.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
from openvino.utils.node_factory import NodeFactory, _get_node_factory
2020
from openvino.utils.types import (
2121
NodeInput,
22-
NumericData,
2322
NumericType,
2423
ScalarData,
2524
TensorShape,
@@ -28,7 +27,6 @@
2827
get_dtype,
2928
get_element_type,
3029
get_element_type_str,
31-
make_constant_node,
3230
)
3331

3432
_get_node_factory_opset7 = partial(_get_node_factory, "opset7")

0 commit comments

Comments
 (0)