-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@mxnet-label-bot add [Numpy, pr-awaiting-review] |
python/mxnet/util.py
Outdated
|
||
def set_np_shape(active): | ||
""" | ||
Turns on/off NumPy shape semantics. This is turned off by default for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
document what numpy shape semantics means.
|
||
def is_np_shape(): | ||
""" | ||
Checks whether the NumPy shape semantics is currently turned on. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
6fe08c2
to
ba992c2
Compare
* Change np_compat to np_shape * Fix scala * Fix pylint * Add examples and fix documentation * Fix doc * More doc * Rename np_compat to np_shape in test_operatory.py * Rename in ndarray.cc
* \param prev returns the previous status before this set | ||
* \return 0 when success, -1 when failure happens | ||
*/ | ||
MXNET_DLL int MXSetIsNumpyCompatible(int is_np_comp, int* prev); | ||
MXNET_DLL int MXSetIsNumpyShape(int is_np_shape, int* prev); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changes how array format is expected when loading from disk. It would be good to document this on the function call. If NumpyShape is on, then Loading ndarray will fail. Just happened to me now. I think this is a side effect which should be clearly documented, or can we add additional arguments to Load with the different semantics?
Description
This PR renames
np_compat
tonp_shape
for being more specific, since it only affects the shape inference logic. This needs to be merged to 1.5 release.Checklist
Essentials
Please feel free to remove inapplicable items for your PR.