mrkn commented on a change in pull request #7477:
URL: https://github.com/apache/arrow/pull/7477#discussion_r443928439



##########
File path: python/pyarrow/tensor.pxi
##########
@@ -199,7 +202,13 @@ shape: {0.shape}""".format(self)
             for x in dim_names:
                 c_dim_names.push_back(tobytes(x))
 
-        coords = np.vstack([obj.row, obj.col]).T
+        row = obj.row
+        col = obj.col
+        if obj.has_canonical_format:

Review comment:
       The attribute [actually 
exists](https://github.com/scipy/scipy/blob/master/scipy/sparse/coo.py#L137) 
but not documented.  It may be an internal attribute, but it does not have `_` 
prefix, so I detect it can be used.  I need to refer this attribute to 
recognize whether or not a given SciPy's coo_matrix has canonical format.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to