Skip to content

Commit

Permalink
ARROW-80: Handle len call for pre-init arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
xhochy committed Mar 27, 2016
1 parent d3cb6b4 commit 6208d7d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/pyarrow/array.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ cdef class Array:
return '{0}\n{1}'.format(type_format, values)

def __len__(self):
return self.sp_array.get().length()
if self.sp_array.get():
return self.sp_array.get().length()
else:
return 0

def isnull(self):
raise NotImplemented
Expand Down

0 comments on commit 6208d7d

Please sign in to comment.