Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions python/mxnet/ndarray/ndarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@
from . import broadcast_add, broadcast_mul, transpose, broadcast_not_equal, broadcast_power
from . import broadcast_sub, broadcast_div, broadcast_to, broadcast_equal, cast_storage
from . import broadcast_greater, broadcast_greater_equal, broadcast_lesser, broadcast_lesser_equal
from . import zeros_like, slice
from . import zeros_like, slice, broadcast_minimum, broadcast_maximum, broadcast_mod
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to not import all these operators into namespace? Can we from . import op instead?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

op.py is not the module for holding backend ops. So I think from . import op does not help here?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only had luck doing wildcard import for this in #7584

Copy link
Copy Markdown
Contributor Author

@reminisce reminisce Aug 24, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@szha Is wildcard import encouraged in this case? I thought about using wildcard import also, but didn't adopt it in the end.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@reminisce usually that's discouraged. however in my case I was adding many ops, and the import list gets long.


__all__ = ["NDArray", "concatenate", "_DTYPE_NP_TO_MX", "_DTYPE_MX_TO_NP", "_GRAD_REQ_MAP",
"ones", "add", "arange", "divide", "equal", "full", "greater", "greater_equal",
"imdecode", "lesser", "lesser_equal", "maximum", "minimum", "moveaxis",
"imdecode", "lesser", "lesser_equal", "maximum", "minimum", "moveaxis", "modulo",
"multiply", "negative", "not_equal", "onehot_encode", "power", "subtract",
"true_divide", "waitall", "_new_empty_handle"]

Expand Down
Loading