From e50bfff55cc1030ce3d0c34fbb0dd123b1b242e8 Mon Sep 17 00:00:00 2001 From: "Huang, Guangtai" Date: Tue, 30 Jul 2019 15:29:41 +0800 Subject: [PATCH] fix error in pylint --- python/mxnet/ndarray/numpy/_op.py | 2 +- python/mxnet/symbol/numpy/_symbol.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/mxnet/ndarray/numpy/_op.py b/python/mxnet/ndarray/numpy/_op.py index e1598b9a329b..93846dd5ddb9 100644 --- a/python/mxnet/ndarray/numpy/_op.py +++ b/python/mxnet/ndarray/numpy/_op.py @@ -667,7 +667,7 @@ def take(a, indices, axis=None, mode='clip', out=None): array([[4., 3.], [5., 7.]]) """ - if mode != 'wrap' and mode != 'clip': + if mode not in ('wrap', 'clip'): raise NotImplementedError( "function take does not support mode '{}'".format(mode)) return _npi.take(a, indices, axis, mode, out) diff --git a/python/mxnet/symbol/numpy/_symbol.py b/python/mxnet/symbol/numpy/_symbol.py index fa1cc3d1bc12..186d093f04cf 100644 --- a/python/mxnet/symbol/numpy/_symbol.py +++ b/python/mxnet/symbol/numpy/_symbol.py @@ -1313,7 +1313,7 @@ def take(a, indices, axis=None, mode='clip', out=None): - Only ndarray or scalar ndarray is accepted as valid input. - 'raise' mode is not supported. """ - if mode != 'wrap' and mode != 'clip': + if mode not in ('wrap', 'clip'): raise NotImplementedError( "function take does not support mode '{}'".format(mode)) return _npi.take(a, indices, axis, mode, out)