From 137f39e1d3ba01e9aea52fd26ab28ed2cca2d2a3 Mon Sep 17 00:00:00 2001 From: Pavel Esir Date: Fri, 7 Jul 2023 13:41:53 +0200 Subject: [PATCH] [MO] fix np.copy error for older numpy versions (#18305) * fix issue with copy in older numpy versions * assigment instead of copy --------- Co-authored-by: Roman Kazantsev --- tools/mo/openvino/tools/mo/back/preprocessing.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/mo/openvino/tools/mo/back/preprocessing.py b/tools/mo/openvino/tools/mo/back/preprocessing.py index 5c46545d3c3..2e3f523c38b 100644 --- a/tools/mo/openvino/tools/mo/back/preprocessing.py +++ b/tools/mo/openvino/tools/mo/back/preprocessing.py @@ -6,9 +6,6 @@ import logging as log from openvino.tools.mo.utils.error import Error from openvino.tools.mo.utils.utils import refer_to_faq_msg - -import numpy as np - from openvino.preprocess import PrePostProcessor # pylint: disable=no-name-in-module,import-error # pylint: disable=no-name-in-module,import-error from openvino.runtime import Model, Layout, PartialShape, layout_helpers @@ -25,7 +22,7 @@ def update_mean_scale_to_dict(input_nodes: list, mean_scale_val, scale): if len(mean_scale_val) != len(input_nodes): raise Error('Numbers of inputs and mean/scale values do not match. ' + refer_to_faq_msg(61)) - data = np.copy(mean_scale_val) + data = mean_scale_val mean_scale_val = {} for idx, node in enumerate(input_nodes): names_list = list(node.get_tensor().get_names())