mrkn commented on a change in pull request #7477: URL: https://github.com/apache/arrow/pull/7477#discussion_r443982716
########## File path: python/pyarrow/tensor.pxi ########## @@ -339,6 +350,15 @@ shape: {0.shape}""".format(self) def non_zero_length(self): return self.stp.non_zero_length() + @property + def has_canonical_format(self): + cdef: + _CSparseCOOIndexPtr csi + + csi = dynamic_cast[_CSparseCOOIndexPtr](self.stp.sparse_index().get()) Review comment: The reason is that I couldn't find normal Cython's cast when I wrote this code. Thank you for telling me. ---------------------------------------------------------------- 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