OpenVINO™ is an open source toolkit for optimizing and deploying AI inference
C++ aicomputer-visiondeep-learningdeploy-aidiffusion-modelsgenerative-aigood-first-issueinferencellm-inferencenatural-language-processingnlpopenvinooptimize-aiperformance-boostrecommendation-systemspeech-recognitionstable-diffusiontransformersyolo
[PyOV] Fix deprecation warnings from numpy in tests (#29170)
Anastasia Kuporosovaa8aba4e104f0
diff --git a/src/bindings/python/tests/test_runtime/test_async_infer_request.py b/src/bindings/python/tests/test_runtime/test_async_infer_request.pyindex 67dc73eea40..2a66552facc 100644--- a/src/bindings/python/tests/test_runtime/test_async_infer_request.py+++ b/src/bindings/python/tests/test_runtime/test_async_infer_request.py@@ -223,7 +223,7 @@ def test_array_like_input_async_infer_queue(device, share_inputs):def __init__(self, array) -> None:self.data = array- def __array__(self):+ def __array__(self, dtype=None, copy=None):return self.datajobs = 8@@ -364,7 +364,7 @@ def test_array_like_input_async(device, share_inputs):def __init__(self, array) -> None:self.data = array- def __array__(self):+ def __array__(self, dtype=None, copy=None):return np.array(self.data)_, request, _, input_data = generate_abs_compiled_model_with_data(device, Type.f32, np.single)diff --git a/src/bindings/python/tests/test_runtime/test_sync_infer_request.py b/src/bindings/python/tests/test_runtime/test_sync_infer_request.pyindex 192823086d2..ead3c61aba1 100644--- a/src/bindings/python/tests/test_runtime/test_sync_infer_request.py+++ b/src/bindings/python/tests/test_runtime/test_sync_infer_request.py@@ -563,7 +563,7 @@ def test_array_like_input_request(device, share_inputs):def __init__(self, array) -> None:self.data = array- def __array__(self):+ def __array__(self, dtype=None, copy=None):return np.array(self.data)_, request, _, input_data = generate_abs_compiled_model_with_data(device, Type.f32, np.single)diff --git a/src/bindings/python/tests/test_utils/test_data_dispatch.py b/src/bindings/python/tests/test_utils/test_data_dispatch.pyindex 58a7ac23501..275579efe65 100644--- a/src/bindings/python/tests/test_utils/test_data_dispatch.py+++ b/src/bindings/python/tests/test_utils/test_data_dispatch.py@@ -195,7 +195,7 @@ class FakeTensor():def __init__(self, array):self.array = array- def __array__(self):+ def __array__(self, dtype=None, copy=None):return self.array