You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/03/01 10:15:00 UTC

[jira] [Commented] (ARROW-2232) [Python] pyarrow.Tensor constructor segfaults

    [ https://issues.apache.org/jira/browse/ARROW-2232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16381796#comment-16381796 ] 

ASF GitHub Bot commented on ARROW-2232:
---------------------------------------

pitrou commented on a change in pull request #1682: ARROW-2232: [Python] pyarrow.Tensor constructor segfaults
URL: https://github.com/apache/arrow/pull/1682#discussion_r171513562
 
 

 ##########
 File path: python/pyarrow/array.pxi
 ##########
 @@ -497,10 +497,15 @@ cdef class Tensor:
         self.type = pyarrow_wrap_data_type(self.tp.type())
 
     def __repr__(self):
+        if self.tp is NULL:
 
 Review comment:
   Having `__repr__` raise isn't really nice, because it breaks debugging. It would be better to return something like `<invalid pyarrow.Tensor>`. Also you probably want to protect other methods, and raise there if the object isn't initialized.

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


> [Python] pyarrow.Tensor constructor segfaults
> ---------------------------------------------
>
>                 Key: ARROW-2232
>                 URL: https://issues.apache.org/jira/browse/ARROW-2232
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Python
>    Affects Versions: 0.8.0
>            Reporter: Phillip Cloud
>            Assignee: Phillip Cloud
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 0.9.0
>
>
> {{pa.Tensor()}}, {{pa.Tensor([])}}, and {{pa.Tensor([1.0])}} all crash the interpreter.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)