From 29ddefecb6246357d1f5eedcbba6282cf781a493 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Thu, 7 May 2020 10:31:12 +0000 Subject: [PATCH] Fixing issue #16655 reshape() error message --- python/mxnet/numpy/multiarray.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/mxnet/numpy/multiarray.py b/python/mxnet/numpy/multiarray.py index be34554dae93..6eb474ee2a64 100644 --- a/python/mxnet/numpy/multiarray.py +++ b/python/mxnet/numpy/multiarray.py @@ -1435,8 +1435,8 @@ def reshape(self, *args, **kwargs): # pylint: disable=arguments-differ raise TypeError('function takes at most 1 keyword argument') if len(kwargs) == 1: if 'order' not in kwargs: - raise TypeError('{} is an invalid keyword argument for this function' - .format(list(kwargs.keys())[0])) # python3.6 - TypeError: 'dict_keys' object does not support indexing + raise TypeError("'{}' is an invalid keyword argument for this function" + .format(list(kwargs.keys())[0])) order = kwargs.pop('order', 'C') if order != 'C': raise NotImplementedError('only supports C-order,'