From 55e69a2ef520d56de96a8cc728f731639ac90bcb Mon Sep 17 00:00:00 2001 From: Wes McKinney Date: Sat, 5 Mar 2016 23:23:23 -0800 Subject: [PATCH] Typed array stubs --- python/arrow/array.pxd | 49 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/python/arrow/array.pxd b/python/arrow/array.pxd index 07e7fd335b3d6..52f6d2082de8b 100644 --- a/python/arrow/array.pxd +++ b/python/arrow/array.pxd @@ -16,9 +16,56 @@ # under the License. from arrow.includes.common cimport shared_ptr -from arrow.includes.arrow cimport CArray +from arrow.includes.arrow cimport CArray, LogicalType cdef class Array: cdef: shared_ptr[CArray] sp_array CArray* array + + def __len__(self): + return self.array.length() + + +cdef class BooleanArray(Array): + pass + + +cdef class NumericArray(Array): + pass + + +cdef class Int8Array(NumericArray): + pass + + +cdef class UInt8Array(NumericArray): + pass + + +cdef class Int16Array(NumericArray): + pass + + +cdef class UInt16Array(NumericArray): + pass + + +cdef class Int32Array(NumericArray): + pass + + +cdef class UInt32Array(NumericArray): + pass + + +cdef class Int64Array(NumericArray): + pass + + +cdef class UInt64Array(NumericArray): + pass + + +cdef class StringArray(NumericArray): + pass