Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
fix cpplint
Browse files Browse the repository at this point in the history
  • Loading branch information
gyshi committed Sep 11, 2019
1 parent 29a0104 commit 97353df
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/mxnet/numpy/multiarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -1520,13 +1520,15 @@ def _full(self, value):
"""
return _mx_nd_np.full(self.shape, value, ctx=self.context, dtype=self.dtype, out=self)

# pylint: disable=redefined-outer-name
def _scatter_set_nd(self, value_nd, indices):
"""
This is added as an ndarray class method in order to support polymorphism in NDArray and numpy.ndarray indexing
"""
return _npi.scatter_set_nd(
lhs=self, rhs=value_nd, indices=indices, shape=self.shape, out=self
)
# pylint: enable=redefined-outer-name

@property
def shape(self):
Expand Down Expand Up @@ -3810,6 +3812,7 @@ def var(a, axis=None, dtype=None, out=None, ddof=0, keepdims=None):
return _npi.var(a, axis=axis, dtype=dtype, ddof=ddof, keepdims=keepdims, out=out)


# pylint: disable=redefined-outer-name
@set_module('mxnet.numpy')
def indices(dimensions, dtype=_np.int32, ctx=None):
"""Return an array representing the indices of a grid.
Expand Down Expand Up @@ -3869,3 +3872,4 @@ def indices(dimensions, dtype=_np.int32, ctx=None):
extract the required elements directly with ``x[:2, :3]``.
"""
return _mx_nd_np.indices(dimensions=dimensions, dtype=dtype, ctx=ctx)
# pylint: enable=redefined-outer-name

0 comments on commit 97353df

Please sign in to comment.