mxnet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] szha commented on a change in pull request #10347: [MXNET-257] Do not copy when casting as same type
Date Sun, 01 Apr 2018 23:41:56 GMT
szha commented on a change in pull request #10347: [MXNET-257] Do not copy when casting as
same type
URL: https://github.com/apache/incubator-mxnet/pull/10347#discussion_r178471936
 
 

 ##########
 File path: python/mxnet/ndarray/sparse.py
 ##########
 @@ -179,19 +179,27 @@ def asnumpy(self):
         """
         return self.tostype('default').asnumpy()
 
-    def astype(self, dtype):
+    def astype(self, dtype, copy=True):
         """Returns a copy of the array after casting to a specified type.
         Parameters
         ----------
         dtype : numpy.dtype or str
             The type of the returned array.
+        copy : bool
+            Default `True`. By default, astype always returns a newly
+            allocated ndarray on the same context. If this is set to
+            False, and the dtype requirement is satisfied,
 
 Review comment:
   It's unclear what the `dtype requirement` here is from the doc. Please fix.

----------------------------------------------------------------
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

Mime
View raw message