diff --git a/pandas/native.pxd b/pandas/native.pxd index caf3d2d96..429993804 100644 --- a/pandas/native.pxd +++ b/pandas/native.pxd @@ -27,7 +27,7 @@ cdef extern from "": pass -cdef extern from "pandas/status.h" namespace "pandas" nogil: +cdef extern from "pandas/common.h" namespace "pandas" nogil: # We can later add more of the common status factory methods as needed cdef Status Status_OK "Status::OK"() @@ -44,28 +44,30 @@ cdef extern from "pandas/status.h" namespace "pandas" nogil: c_bool IsUnknownError() c_bool IsNotImplemented() -cdef extern from "pandas/api.h" namespace "pandas": +cdef extern from "pandas/api.h" namespace "pandas::DataType": enum TypeId: - TypeId_NA " pandas::DataType::NA" - TypeId_UINT8 " pandas::DataType::UINT8" - TypeId_UINT16 " pandas::DataType::UINT16" - TypeId_UINT32 " pandas::DataType::UINT32" - TypeId_UINT64 " pandas::DataType::UINT64" - TypeId_INT8 " pandas::DataType::INT8" - TypeId_INT16 " pandas::DataType::INT16" - TypeId_INT32 " pandas::DataType::INT32" - TypeId_INT64 " pandas::DataType::INT64" - TypeId_BOOL " pandas::DataType::BOOL" - TypeId_FLOAT " pandas::DataType::FLOAT" - TypeId_DOUBLE " pandas::DataType::DOUBLE" - TypeId_PYOBJECT " pandas::DataType::PYOBJECT" - TypeId_CATEGORY " pandas::DataType::CATEGORY" - TypeId_TIMESTAMP " pandas::DataType::TIMESTAMP" - TypeId_TIMESTAMP_TZ " pandas::DataType::TIMESTAMP_TZ" + TypeId_NA " pandas::DataType::TypeId::NA" + TypeId_UINT8 " pandas::DataType::TypeId::UINT8" + TypeId_UINT16 " pandas::DataType::TypeId::UINT16" + TypeId_UINT32 " pandas::DataType::TypeId::UINT32" + TypeId_UINT64 " pandas::DataType::TypeId::UINT64" + TypeId_INT8 " pandas::DataType::TypeId::INT8" + TypeId_INT16 " pandas::DataType::TypeId::INT16" + TypeId_INT32 " pandas::DataType::TypeId::INT32" + TypeId_INT64 " pandas::DataType::TypeId::INT64" + TypeId_BOOL " pandas::DataType::TypeId::BOOL" + TypeId_FLOAT32 " pandas::DataType::TypeId::FLOAT32" + TypeId_FLOAT64 " pandas::DataType::TypeId::FLOAT64" + TypeId_PYOBJECT " pandas::DataType::TypeId::PYOBJECT" + TypeId_CATEGORY " pandas::DataType::TypeId::CATEGORY" + TypeId_TIMESTAMP " pandas::DataType::TypeId::TIMESTAMP" + TypeId_TIMESTAMP_TZ " pandas::DataType::TypeId::TIMESTAMP_TZ" + +cdef extern from "pandas/api.h" namespace "pandas": cdef cppclass DataType: - TypeId type + TypeId type() DataType() @@ -116,8 +118,8 @@ cdef extern from "pandas/api.h" namespace "pandas": TypeId type_id() size_t length() - object GetValue(size_t i) - void SetValue(size_t i, object val) + object GetItem(size_t i) + void SetItem(size_t i, object val) cdef cppclass CCategoryArray" pandas::CategoryArray"(CArray): pass diff --git a/pandas/native.pyx b/pandas/native.pyx index 12a1cdef2..b700dedbe 100644 --- a/pandas/native.pyx +++ b/pandas/native.pyx @@ -209,7 +209,7 @@ cdef class Array: cdef inline _getitem(self, size_t i): if i >= self.ap.length(): raise IndexError('Out of bounds: %d' % i) - return self.ap.GetValue(i) + return self.ap.GetItem(i) def __setitem__(self, i, val): cdef: @@ -226,7 +226,7 @@ cdef class Array: cdef inline _setitem(self, size_t i, object val): if i >= self.ap.length(): raise IndexError('Out of bounds: %d' % i) - self.ap.SetValue(i, val) + self.ap.SetItem(i, val) def slice(self, start, end): pass @@ -251,7 +251,7 @@ cdef class Float32Array(FloatingArray): cdef class BooleanArray(Array): cdef: - lp.cBooleanArray* inst + lp.CBooleanArray* inst cdef init(self, const ArrayPtr& arr): Array.init(self, arr) @@ -265,7 +265,7 @@ cdef Array wrap_array(const lp.ArrayPtr& arr): cdef: Array result - if arr.get().type_enum() == lp.TypeId_CATEGORY: + if arr.get().type_id() == lp.TypeId_CATEGORY: result = CategoryArray() else: result = Array() @@ -280,7 +280,7 @@ cdef PandasType wrap_type(const lp.TypePtr& sp_type): lp.DataType* type = sp_type.get() PandasType result - if type.type == lp.TypeId_CATEGORY: + if type.type() == lp.TypeId_CATEGORY: result = Category() else: result = PandasType() diff --git a/src/pandas/array-test.cc b/src/pandas/array-test.cc index b2868db45..04acf5ba9 100644 --- a/src/pandas/array-test.cc +++ b/src/pandas/array-test.cc @@ -40,7 +40,7 @@ class TestArray : public ::testing::Test { TEST_F(TestArray, Attrs) { DoubleType ex_type; ASSERT_TRUE(array_->type()->Equals(ex_type)); - ASSERT_EQ(DataType::DOUBLE, array_->type_id()); + ASSERT_EQ(DataType::FLOAT64, array_->type_id()); ASSERT_EQ(values_.size(), array_->length()); } diff --git a/src/pandas/array.h b/src/pandas/array.h index ada03d7bf..a22076f55 100644 --- a/src/pandas/array.h +++ b/src/pandas/array.h @@ -92,4 +92,6 @@ class ArrayView { int64_t length_; }; +using ArrayPtr = std::shared_ptr; + } // namespace pandas diff --git a/src/pandas/dispatch.cc b/src/pandas/dispatch.cc index 15c65b26e..5cced21d2 100644 --- a/src/pandas/dispatch.cc +++ b/src/pandas/dispatch.cc @@ -22,8 +22,8 @@ Status primitive_type_from_enum(DataType::TypeId tp_enum, DataType** out) { MAKE_TYPE_CASE(DataType::UINT16, UInt16); MAKE_TYPE_CASE(DataType::UINT32, UInt32); MAKE_TYPE_CASE(DataType::UINT64, UInt64); - MAKE_TYPE_CASE(DataType::FLOAT, Float); - MAKE_TYPE_CASE(DataType::DOUBLE, Double); + MAKE_TYPE_CASE(DataType::FLOAT32, Float); + MAKE_TYPE_CASE(DataType::FLOAT64, Double); MAKE_TYPE_CASE(DataType::BOOL, Boolean); MAKE_TYPE_CASE(DataType::PYOBJECT, PyObject); default: diff --git a/src/pandas/numpy_interop.cc b/src/pandas/numpy_interop.cc index 15b43c17b..2e46c730c 100644 --- a/src/pandas/numpy_interop.cc +++ b/src/pandas/numpy_interop.cc @@ -50,8 +50,8 @@ Status numpy_type_num_to_pandas(int type_num, DataType::TypeId* pandas_type) { TYPE_MAP_CASE(UINT16, UINT16); TYPE_MAP_CASE(UINT32, UINT32); TYPE_MAP_CASE(UINT64, UINT64); - TYPE_MAP_CASE(FLOAT32, FLOAT); - TYPE_MAP_CASE(FLOAT64, DOUBLE); + TYPE_MAP_CASE(FLOAT32, FLOAT32); + TYPE_MAP_CASE(FLOAT64, FLOAT64); TYPE_MAP_CASE(BOOL, BOOL); TYPE_MAP_CASE(OBJECT, PYOBJECT); default: diff --git a/src/pandas/type.cc b/src/pandas/type.cc index 31241aefa..458c10689 100644 --- a/src/pandas/type.cc +++ b/src/pandas/type.cc @@ -28,4 +28,17 @@ std::string TimestampType::ToString() const { return ss.str(); } +// Constexpr numeric type names +constexpr const char* UInt8Type::NAME; +constexpr const char* Int8Type::NAME; +constexpr const char* UInt16Type::NAME; +constexpr const char* Int16Type::NAME; +constexpr const char* UInt32Type::NAME; +constexpr const char* Int32Type::NAME; +constexpr const char* UInt64Type::NAME; +constexpr const char* Int64Type::NAME; +constexpr const char* FloatType::NAME; +constexpr const char* DoubleType::NAME; +constexpr const char* BooleanType::NAME; + } // namespace pandas diff --git a/src/pandas/type.h b/src/pandas/type.h index bef14d9c1..a185f58f2 100644 --- a/src/pandas/type.h +++ b/src/pandas/type.h @@ -32,10 +32,10 @@ class DataType { BOOL = 9, // 4-byte floating point value - FLOAT = 10, + FLOAT32 = 10, // 8-byte floating point value - DOUBLE = 11, + FLOAT64 = 11, // PyObject* PYOBJECT = 12, @@ -94,72 +94,96 @@ class PANDAS_EXPORT PyObjectType : public DataType { std::string ToString() const override; }; -template -class PANDAS_EXPORT PrimitiveType : public DataType { +template +class PANDAS_EXPORT NumericType : public DataType { public: - PrimitiveType() : DataType(Derived::type_enum) {} + using c_type = C_TYPE; + static constexpr DataType::TypeId type_id = TYPE_ID; + static constexpr size_t size = SIZE; - std::string ToString() const override { - return std::string(static_cast(this)->name()); - } + NumericType() : DataType(type_id) {} + + std::string ToString() const override { return std::string(DERIVED::NAME); } + + static std::shared_ptr SINGLETON; }; -#define PRIMITIVE_DECL(TYPENAME, C_TYPE, ENUM, SIZE, NAME) \ - public: \ - typedef C_TYPE c_type; \ - static constexpr DataType::TypeId type_enum = DataType::ENUM; \ - static constexpr size_t size = SIZE; \ - \ - explicit TYPENAME() : PrimitiveType() {} \ - \ - static const char* name() { return NAME; } +template +std::shared_ptr NumericType::SINGLETON( + std::move(std::make_shared())); + +class PANDAS_EXPORT NullType : public DataType { + public: + NullType() : DataType(DataType::TypeId::NA) {} -class PANDAS_EXPORT NullType : public PrimitiveType { - PRIMITIVE_DECL(NullType, void, NA, 0, "null"); + std::string ToString() const override { return std::string("null"); } }; -class PANDAS_EXPORT UInt8Type : public PrimitiveType { - PRIMITIVE_DECL(UInt8Type, uint8_t, UINT8, 1, "uint8"); +class PANDAS_EXPORT UInt8Type + : public NumericType { + public: + constexpr static const char* NAME = "uint8"; }; -class PANDAS_EXPORT Int8Type : public PrimitiveType { - PRIMITIVE_DECL(Int8Type, int8_t, INT8, 1, "int8"); +class PANDAS_EXPORT Int8Type + : public NumericType { + public: + constexpr static const char* NAME = "int8"; }; -class PANDAS_EXPORT UInt16Type : public PrimitiveType { - PRIMITIVE_DECL(UInt16Type, uint16_t, UINT16, 2, "uint16"); +class PANDAS_EXPORT UInt16Type + : public NumericType { + public: + constexpr static const char* NAME = "uint16"; }; -class PANDAS_EXPORT Int16Type : public PrimitiveType { - PRIMITIVE_DECL(Int16Type, int16_t, INT16, 2, "int16"); +class PANDAS_EXPORT Int16Type + : public NumericType { + public: + constexpr static const char* NAME = "int16"; }; -class PANDAS_EXPORT UInt32Type : public PrimitiveType { - PRIMITIVE_DECL(UInt32Type, uint32_t, UINT32, 4, "uint32"); +class PANDAS_EXPORT UInt32Type + : public NumericType { + public: + constexpr static const char* NAME = "uint32"; }; -class PANDAS_EXPORT Int32Type : public PrimitiveType { - PRIMITIVE_DECL(Int32Type, int32_t, INT32, 4, "int32"); +class PANDAS_EXPORT Int32Type + : public NumericType { + public: + constexpr static const char* NAME = "int32"; }; -class PANDAS_EXPORT UInt64Type : public PrimitiveType { - PRIMITIVE_DECL(UInt64Type, uint64_t, UINT64, 8, "uint64"); +class PANDAS_EXPORT UInt64Type + : public NumericType { + public: + constexpr static const char* NAME = "uint64"; }; -class PANDAS_EXPORT Int64Type : public PrimitiveType { - PRIMITIVE_DECL(Int64Type, int64_t, INT64, 8, "int64"); +class PANDAS_EXPORT Int64Type + : public NumericType { + public: + constexpr static const char* NAME = "int64"; }; -class PANDAS_EXPORT FloatType : public PrimitiveType { - PRIMITIVE_DECL(FloatType, float, FLOAT, 4, "float"); +class PANDAS_EXPORT FloatType + : public NumericType { + public: + constexpr static const char* NAME = "float32"; }; -class PANDAS_EXPORT DoubleType : public PrimitiveType { - PRIMITIVE_DECL(DoubleType, double, DOUBLE, 8, "double"); +class PANDAS_EXPORT DoubleType + : public NumericType { + public: + constexpr static const char* NAME = "float64"; }; -class PANDAS_EXPORT BooleanType : public PrimitiveType { - PRIMITIVE_DECL(BooleanType, uint8_t, BOOL, 1, "bool"); +class PANDAS_EXPORT BooleanType + : public NumericType { + public: + constexpr static const char* NAME = "bool"; }; } // namespace pandas diff --git a/src/pandas/types/numeric.cc b/src/pandas/types/numeric.cc index 38a1770c1..467a162de 100644 --- a/src/pandas/types/numeric.cc +++ b/src/pandas/types/numeric.cc @@ -3,6 +3,7 @@ #include "pandas/types/numeric.h" +#include #include #include #include @@ -15,148 +16,122 @@ namespace pandas { -template -static inline std::shared_ptr get_type_singleton() { - return nullptr; -} - -#define MAKE_TYPE_SINGLETON(NAME) \ - static const auto k##NAME = std::make_shared(); \ - template <> \ - inline std::shared_ptr get_type_singleton() { \ - return k##NAME; \ - } +// ---------------------------------------------------------------------- +// Generic numeric class -MAKE_TYPE_SINGLETON(Int8); -MAKE_TYPE_SINGLETON(UInt8); -MAKE_TYPE_SINGLETON(Int16); -MAKE_TYPE_SINGLETON(UInt16); -MAKE_TYPE_SINGLETON(Int32); -MAKE_TYPE_SINGLETON(UInt32); -MAKE_TYPE_SINGLETON(Int64); -MAKE_TYPE_SINGLETON(UInt64); -MAKE_TYPE_SINGLETON(Float); -MAKE_TYPE_SINGLETON(Double); +template +NumericArray::NumericArray( + const DataTypePtr& type, int64_t length, const std::shared_ptr& data) + : Array(type, length), data_(data) {} -// ---------------------------------------------------------------------- -// Floating point base class +template +auto NumericArray::data() const -> const T* { + return reinterpret_cast(data_->data()); +} -FloatingArray::FloatingArray( - const TypePtr type, int64_t length, const std::shared_ptr& data) - : NumericArray(type, length), data_(data) {} +template +auto NumericArray::mutable_data() const -> T* { + auto mutable_buf = static_cast(data_.get()); + return reinterpret_cast(mutable_buf->mutable_data()); +} // ---------------------------------------------------------------------- -// Specific implementations +// Floating point class template -FloatingArrayImpl::FloatingArrayImpl( - int64_t length, const std::shared_ptr& data) - : FloatingArray(get_type_singleton(), length, data) {} +FloatingArray::FloatingArray(int64_t length, const std::shared_ptr& data) + : NumericArray(TYPE::SINGLETON, length, data) {} template -int64_t FloatingArrayImpl::GetNullCount() { +int64_t FloatingArray::GetNullCount() { // TODO(wesm) return 0; } template -PyObject* FloatingArrayImpl::GetItem(int64_t i) { +PyObject* FloatingArray::GetItem(int64_t i) { return NULL; } template -Status FloatingArrayImpl::Copy( +Status FloatingArray::Copy( int64_t offset, int64_t length, std::shared_ptr* out) const { size_t itemsize = sizeof(typename TYPE::c_type); std::shared_ptr copied_data; - RETURN_NOT_OK(data_->Copy(offset * itemsize, length * itemsize, &copied_data)); + RETURN_NOT_OK(this->data_->Copy(offset * itemsize, length * itemsize, &copied_data)); - *out = std::make_shared>(length, copied_data); + *out = std::make_shared>(length, copied_data); return Status::OK(); } template -Status FloatingArrayImpl::SetItem(int64_t i, PyObject* val) { +Status FloatingArray::SetItem(int64_t i, PyObject* val) { return Status::OK(); } template -bool FloatingArrayImpl::owns_data() const { - return data_.use_count() == 1; +bool FloatingArray::owns_data() const { + return this->data_.use_count() == 1; } // Instantiate templates -template class FloatingArrayImpl; -template class FloatingArrayImpl; +template class FloatingArray; +template class FloatingArray; // ---------------------------------------------------------------------- -// Any integer - -IntegerArray::IntegerArray( - const TypePtr type, int64_t length, const std::shared_ptr& data) - : NumericArray(type, length), data_(data), valid_bits_(nullptr) {} - -IntegerArray::IntegerArray(const TypePtr type, int64_t length, - const std::shared_ptr& data, const std::shared_ptr& valid_bits) - : NumericArray(type, length), data_(data), valid_bits_(valid_bits) {} - -int64_t IntegerArray::GetNullCount() { - // TODO(wesm) - // return nulls_.set_count(); - return 0; -} +// Types integers // ---------------------------------------------------------------------- // Typed integers template -IntegerArrayImpl::IntegerArrayImpl( - int64_t length, const std::shared_ptr& data) - : IntegerArray(get_type_singleton(), length, data) {} +IntegerArray::IntegerArray(int64_t length, const std::shared_ptr& data) + : IntegerArray(length, data, nullptr) {} template -const typename TYPE::c_type* IntegerArrayImpl::data() const { - return reinterpret_cast(data_->data()); -} +IntegerArray::IntegerArray(int64_t length, const std::shared_ptr& data, + const std::shared_ptr& valid_bits) + : NumericArray(TYPE::SINGLETON, length, data), valid_bits_(valid_bits) {} template -typename TYPE::c_type* IntegerArrayImpl::mutable_data() const { - auto mutable_buf = static_cast(data_.get()); - return reinterpret_cast(mutable_buf->mutable_data()); +int64_t IntegerArray::GetNullCount() { + // TODO(wesm) + // return nulls_.set_count(); + return 0; } template -PyObject* IntegerArrayImpl::GetItem(int64_t i) { +PyObject* IntegerArray::GetItem(int64_t i) { if (valid_bits_ && BitUtil::BitNotSet(valid_bits_->data(), i)) { Py_INCREF(py::NA); return py::NA; } - return PyLong_FromLongLong(data()[i]); + return PyLong_FromLongLong(this->data()[i]); } template -bool IntegerArrayImpl::owns_data() const { - bool owns_data = data_.use_count() == 1; +bool IntegerArray::owns_data() const { + bool owns_data = this->data_.use_count() == 1; if (valid_bits_) { owns_data &= valid_bits_.use_count() == 1; } return owns_data; } template -Status IntegerArrayImpl::Copy( +Status IntegerArray::Copy( int64_t offset, int64_t length, std::shared_ptr* out) const { size_t itemsize = sizeof(typename TYPE::c_type); std::shared_ptr copied_data; std::shared_ptr copied_valid_bits; - RETURN_NOT_OK(data_->Copy(offset * itemsize, length * itemsize, &copied_data)); + RETURN_NOT_OK(this->data_->Copy(offset * itemsize, length * itemsize, &copied_data)); if (valid_bits_) { - RETURN_NOT_OK(CopyBitmap(data_, offset, length, &copied_valid_bits)); + RETURN_NOT_OK(CopyBitmap(this->data_, offset, length, &copied_valid_bits)); } - *out = std::make_shared>(length, copied_data); + *out = std::make_shared>(length, copied_data); return Status::OK(); } @@ -170,8 +145,8 @@ static Status PyObjectToInt64(PyObject* obj, int64_t* out) { } template -Status IntegerArrayImpl::SetItem(int64_t i, PyObject* val) { - if (!data_->is_mutable()) { +Status IntegerArray::SetItem(int64_t i, PyObject* val) { + if (!this->data_->is_mutable()) { // TODO(wesm): copy-on-write? return Status::Invalid("Underlying buffer is immutable"); } @@ -184,7 +159,7 @@ Status IntegerArrayImpl::SetItem(int64_t i, PyObject* val) { if (py::is_na(val)) { if (!valid_bits_) { // TODO: raise Python exception on error status - RETURN_NOT_OK(AllocateValidityBitmap(length_, &valid_bits_)); + RETURN_NOT_OK(AllocateValidityBitmap(this->length_, &valid_bits_)); } auto mutable_bits = static_cast(valid_bits_.get())->mutable_data(); BitUtil::ClearBit(mutable_bits, i); @@ -195,20 +170,20 @@ Status IntegerArrayImpl::SetItem(int64_t i, PyObject* val) { RETURN_NOT_OK(PyObjectToInt64(val, &cval)); // Overflow issues - mutable_data()[i] = cval; + this->mutable_data()[i] = cval; } RETURN_IF_PYERROR(); return Status::OK(); } // Instantiate templates -template class IntegerArrayImpl; -template class IntegerArrayImpl; -template class IntegerArrayImpl; -template class IntegerArrayImpl; -template class IntegerArrayImpl; -template class IntegerArrayImpl; -template class IntegerArrayImpl; -template class IntegerArrayImpl; +template class IntegerArray; +template class IntegerArray; +template class IntegerArray; +template class IntegerArray; +template class IntegerArray; +template class IntegerArray; +template class IntegerArray; +template class IntegerArray; } // namespace pandas diff --git a/src/pandas/types/numeric.h b/src/pandas/types/numeric.h index 1dcd5a16d..b5901102c 100644 --- a/src/pandas/types/numeric.h +++ b/src/pandas/types/numeric.h @@ -11,30 +11,31 @@ namespace pandas { +template class PANDAS_EXPORT NumericArray : public Array { public: + using T = typename TYPE::c_type; + using DataTypePtr = std::shared_ptr; using Array::Array; -}; -class PANDAS_EXPORT IntegerArray : public NumericArray { - public: - int64_t GetNullCount() override; + NumericArray( + const DataTypePtr& type, int64_t length, const std::shared_ptr& data); - protected: - IntegerArray(const TypePtr type, int64_t length, const std::shared_ptr& data); - IntegerArray(const TypePtr type, int64_t length, const std::shared_ptr& data, - const std::shared_ptr& valid_bits); + auto data() const -> const T*; + auto mutable_data() const -> T*; + protected: std::shared_ptr data_; - std::shared_ptr valid_bits_; }; template -class PANDAS_EXPORT IntegerArrayImpl : public IntegerArray { +class PANDAS_EXPORT IntegerArray : public NumericArray { public: - using T = typename TYPE::c_type; + IntegerArray(int64_t length, const std::shared_ptr& data); + IntegerArray(int64_t length, const std::shared_ptr& data, + const std::shared_ptr& valid_bits); - IntegerArrayImpl(int64_t length, const std::shared_ptr& data); + int64_t GetNullCount() override; Status Copy(int64_t offset, int64_t length, std::shared_ptr* out) const override; @@ -43,22 +44,14 @@ class PANDAS_EXPORT IntegerArrayImpl : public IntegerArray { bool owns_data() const override; - const T* data() const; - T* mutable_data() const; -}; - -class PANDAS_EXPORT FloatingArray : public NumericArray { - protected: - FloatingArray(const TypePtr type, int64_t length, const std::shared_ptr& data); - std::shared_ptr data_; + private: + std::shared_ptr valid_bits_; }; template -class PANDAS_EXPORT FloatingArrayImpl : public FloatingArray { +class PANDAS_EXPORT FloatingArray : public NumericArray { public: - using T = typename TYPE::c_type; - - FloatingArrayImpl(int64_t length, const std::shared_ptr& data); + FloatingArray(int64_t length, const std::shared_ptr& data); Status Copy(int64_t offset, int64_t length, std::shared_ptr* out) const override; PyObject* GetItem(int64_t i) override; @@ -67,36 +60,33 @@ class PANDAS_EXPORT FloatingArrayImpl : public FloatingArray { int64_t GetNullCount() override; bool owns_data() const override; - - const T* data() const; - T* mutable_data() const; }; -using FloatArray = FloatingArrayImpl; -using DoubleArray = FloatingArrayImpl; +using FloatArray = FloatingArray; +using DoubleArray = FloatingArray; -using Int8Array = IntegerArrayImpl; -using UInt8Array = IntegerArrayImpl; +using Int8Array = IntegerArray; +using UInt8Array = IntegerArray; -using Int16Array = IntegerArrayImpl; -using UInt16Array = IntegerArrayImpl; +using Int16Array = IntegerArray; +using UInt16Array = IntegerArray; -using Int32Array = IntegerArrayImpl; -using UInt32Array = IntegerArrayImpl; +using Int32Array = IntegerArray; +using UInt32Array = IntegerArray; -using Int64Array = IntegerArrayImpl; -using UInt64Array = IntegerArrayImpl; +using Int64Array = IntegerArray; +using UInt64Array = IntegerArray; // Only instantiate these templates once -extern template class PANDAS_EXPORT IntegerArrayImpl; -extern template class PANDAS_EXPORT IntegerArrayImpl; -extern template class PANDAS_EXPORT IntegerArrayImpl; -extern template class PANDAS_EXPORT IntegerArrayImpl; -extern template class PANDAS_EXPORT IntegerArrayImpl; -extern template class PANDAS_EXPORT IntegerArrayImpl; -extern template class PANDAS_EXPORT IntegerArrayImpl; -extern template class PANDAS_EXPORT IntegerArrayImpl; -extern template class PANDAS_EXPORT FloatingArrayImpl; -extern template class PANDAS_EXPORT FloatingArrayImpl; +extern template class PANDAS_EXPORT IntegerArray; +extern template class PANDAS_EXPORT IntegerArray; +extern template class PANDAS_EXPORT IntegerArray; +extern template class PANDAS_EXPORT IntegerArray; +extern template class PANDAS_EXPORT IntegerArray; +extern template class PANDAS_EXPORT IntegerArray; +extern template class PANDAS_EXPORT IntegerArray; +extern template class PANDAS_EXPORT IntegerArray; +extern template class PANDAS_EXPORT FloatingArray; +extern template class PANDAS_EXPORT FloatingArray; } // namespace pandas