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

[Numpy] Bug of arr.sum() in latest master #18123

@sxjscience

Description

@sxjscience

Reproducible example:

import mxnet as mx
mx.npx.set_np() 
a = mx.np.ones((10, 10)) 
a.sum() 

Error

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-1-adde00e335fe> in <module>
      2 mx.npx.set_np()
      3 a = mx.np.ones((10, 10))
----> 4 a.sum()

~/mxnet/python/mxnet/numpy/multiarray.py in sum(self, axis, dtype, out, keepdims)
   1781     def sum(self, axis=None, dtype=None, out=None, keepdims=False):  # pylint: disable=arguments-differ
   1782         """Return the sum of the array elements over the given axis."""
-> 1783         return _mx_np_op.sum(self, axis=axis, dtype=dtype, out=out, keepdims=keepdims)
   1784 
   1785     def nansum(self, *args, **kwargs):

AttributeError: module 'mxnet.numpy._op' has no attribute 'sum'

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions