You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/01/04 00:22:18 UTC

[GitHub] piiswrong closed pull request #9293: Make numpy functions return Symbol instead of numpy object array

piiswrong closed pull request #9293: Make numpy functions return Symbol instead of numpy object array
URL: https://github.com/apache/incubator-mxnet/pull/9293
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/python/mxnet/symbol/symbol.py b/python/mxnet/symbol/symbol.py
index 22212b0bdb..98c7086c8e 100644
--- a/python/mxnet/symbol/symbol.py
+++ b/python/mxnet/symbol/symbol.py
@@ -56,6 +56,9 @@ class Symbol(SymbolBase):
     # pylint: disable=no-member
     __slots__ = []
 
+    # Make numpy functions return Symbol instead of numpy object array
+    __array_priority__ = 1000.0
+
     def __repr__(self):
         """Gets a string representation of the symbol."""
         name = self.name


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services