[Python-modules-commits] [python-feather-format] 01/03: Import python-feather-format_0.3.1+dfsg1.orig.tar.gz

ChangZhuo Chen czchen at moszumanska.debian.org
Wed Nov 30 03:45:32 UTC 2016


This is an automated email from the git hooks/post-receive script.

czchen pushed a commit to branch master
in repository python-feather-format.

commit 152e66efd32d6c30c21c4f06e0bf2d6e1520e3e7
Author: ChangZhuo Chen (陳昌倬) <czchen at debian.org>
Date:   Fri Nov 25 18:28:50 2016 +0800

    Import python-feather-format_0.3.1+dfsg1.orig.tar.gz
---
 PKG-INFO                         |    2 +-
 feather/__init__.py              |    1 +
 feather/api.py                   |   23 +
 feather/compat.py                |    7 +
 feather/ext.cpp                  | 1251 ++++++++++++++++++++++++--------------
 feather/ext.pyx                  |   46 +-
 feather/interop.h                |   52 +-
 feather/tests/test_reader.py     |  114 +++-
 feather/version.py               |    2 +-
 feather_format.egg-info/PKG-INFO |    2 +-
 setup.py                         |    2 +-
 src/feather/common.h             |    4 +-
 src/feather/io.cc                |    4 +-
 src/feather/status.h             |    2 +-
 src/feather/types.h              |    2 +-
 15 files changed, 1047 insertions(+), 467 deletions(-)

diff --git a/PKG-INFO b/PKG-INFO
index 89dca38..53d64fe 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: feather-format
-Version: 0.3.0
+Version: 0.3.1
 Summary: Python interface to the Apache Arrow-based Feather File Format
 Home-page: http://github.com/wesm/feather
 Author: Wes McKinney
diff --git a/feather/__init__.py b/feather/__init__.py
index 1a608f2..18b3ad4 100644
--- a/feather/__init__.py
+++ b/feather/__init__.py
@@ -16,3 +16,4 @@
 
 from feather.api import read_dataframe, write_dataframe
 from feather.ext import FeatherError, FeatherReader, FeatherWriter
+from feather.version import version as __version__
diff --git a/feather/api.py b/feather/api.py
index dca508d..c7b4a21 100644
--- a/feather/api.py
+++ b/feather/api.py
@@ -15,6 +15,7 @@
 import six
 from distutils.version import LooseVersion
 import pandas as pd
+from feather.compat import pdapi
 
 import feather.ext as ext
 
@@ -28,10 +29,32 @@ def write_dataframe(df, path):
     '''
     writer = ext.FeatherWriter(path)
 
+    if isinstance(df, pd.SparseDataFrame):
+        df = df.to_dense()
+
+    if not df.columns.is_unique:
+        raise ValueError("cannot serialize duplicate column names")
+
     # TODO(wesm): pipeline conversion to Arrow memory layout
     for i, name in enumerate(df.columns):
         col = df.iloc[:, i]
 
+        if pdapi.is_object_dtype(col):
+            inferred_type = pd.lib.infer_dtype(col)
+            msg = ("cannot serialize column {n} "
+                   "named {name} with dtype {dtype}".format(
+                       n=i, name=name, dtype=inferred_type))
+
+            if inferred_type in ['mixed']:
+
+                # allow columns with nulls + an inferable type
+                inferred_type = pd.lib.infer_dtype(col[col.notnull()])
+                if inferred_type in ['mixed']:
+                    raise ValueError(msg)
+
+            elif inferred_type not in ['unicode', 'string']:
+                raise ValueError(msg)
+
         if not isinstance(name, six.string_types):
             name = str(name)
 
diff --git a/feather/compat.py b/feather/compat.py
index 08522be..8cfaee2 100644
--- a/feather/compat.py
+++ b/feather/compat.py
@@ -108,3 +108,10 @@ def guid():
 
 
 integer_types = six.integer_types + (np.integer,)
+
+from distutils.version import LooseVersion
+import pandas
+if LooseVersion(pandas.__version__) < '0.19.0':
+    pdapi = pandas.core.common
+else:
+    pdapi = pandas.api.types
diff --git a/feather/ext.cpp b/feather/ext.cpp
index 2414081..72f3537 100644
--- a/feather/ext.cpp
+++ b/feather/ext.cpp
@@ -806,7 +806,7 @@ typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
  */
 typedef npy_cdouble __pyx_t_5numpy_complex_t;
 
-/* "feather/ext.pyx":59
+/* "feather/ext.pyx":69
  * set_numpy_nan(np.nan)
  * 
  * cdef class FeatherWriter:             # <<<<<<<<<<<<<<
@@ -821,7 +821,7 @@ struct __pyx_obj_7feather_3ext_FeatherWriter {
 };
 
 
-/* "feather/ext.pyx":150
+/* "feather/ext.pyx":163
  * 
  * 
  * cdef class Column:             # <<<<<<<<<<<<<<
@@ -838,7 +838,7 @@ struct __pyx_obj_7feather_3ext_Column {
 };
 
 
-/* "feather/ext.pyx":206
+/* "feather/ext.pyx":230
  * 
  * 
  * cdef class FeatherReader:             # <<<<<<<<<<<<<<
@@ -852,7 +852,7 @@ struct __pyx_obj_7feather_3ext_FeatherReader {
 
 
 
-/* "feather/ext.pyx":59
+/* "feather/ext.pyx":69
  * set_numpy_nan(np.nan)
  * 
  * cdef class FeatherWriter:             # <<<<<<<<<<<<<<
@@ -869,7 +869,7 @@ struct __pyx_vtabstruct_7feather_3ext_FeatherWriter {
 static struct __pyx_vtabstruct_7feather_3ext_FeatherWriter *__pyx_vtabptr_7feather_3ext_FeatherWriter;
 
 
-/* "feather/ext.pyx":150
+/* "feather/ext.pyx":163
  * 
  * 
  * cdef class Column:             # <<<<<<<<<<<<<<
@@ -1010,6 +1010,13 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject
 /* RaiseException.proto */
 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
 
+/* PyObjectCallNoArg.proto */
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
+#else
+#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
+#endif
+
 /* RaiseDoubleKeywords.proto */
 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
 
@@ -1365,6 +1372,7 @@ static PyTypeObject *__pyx_ptype_7feather_3ext_FeatherWriter = 0;
 static PyTypeObject *__pyx_ptype_7feather_3ext_Column = 0;
 static PyTypeObject *__pyx_ptype_7feather_3ext_FeatherReader = 0;
 static PyObject *__pyx_f_7feather_3ext_check_status(feather::Status const &); /*proto*/
+static PyObject *__pyx_f_7feather_3ext_update_mask_with_datatype_nulls(PyObject *, PyObject *); /*proto*/
 static PyObject *__pyx_f_7feather_3ext__unbox_series(PyObject *); /*proto*/
 static PyObject *__pyx_f_7feather_3ext_category_to_pandas( feather::Column *); /*proto*/
 static PyObject *__pyx_f_7feather_3ext_timestamp_to_pandas( feather::Column *); /*proto*/
@@ -1389,12 +1397,14 @@ static const char __pyx_k_i8[] = "i8";
 static const char __pyx_k_np[] = "np";
 static const char __pyx_k_pd[] = "pd";
 static const char __pyx_k_tz[] = "tz";
-static const char __pyx_k__11[] = "*";
+static const char __pyx_k_NaT[] = "NaT";
+static const char __pyx_k_any[] = "any";
 static const char __pyx_k_col[] = "col";
 static const char __pyx_k_doc[] = "__doc__";
 static const char __pyx_k_nan[] = "nan";
 static const char __pyx_k_six[] = "six";
 static const char __pyx_k_utc[] = "utc";
+static const char __pyx_k_iloc[] = "iloc";
 static const char __pyx_k_main[] = "__main__";
 static const char __pyx_k_mask[] = "mask";
 static const char __pyx_k_name[] = "name";
@@ -1405,10 +1415,11 @@ static const char __pyx_k_M8_ns[] = "M8[ns]";
 static const char __pyx_k_codes[] = "codes";
 static const char __pyx_k_dtype[] = "dtype";
 static const char __pyx_k_numpy[] = "numpy";
-static const char __pyx_k_pdcom[] = "pdcom";
+static const char __pyx_k_pdapi[] = "pdapi";
 static const char __pyx_k_range[] = "range";
 static const char __pyx_k_Series[] = "Series";
 static const char __pyx_k_import[] = "__import__";
+static const char __pyx_k_isnull[] = "isnull";
 static const char __pyx_k_module[] = "__module__";
 static const char __pyx_k_pandas[] = "pandas";
 static const char __pyx_k_values[] = "values";
@@ -1435,7 +1446,6 @@ static const char __pyx_k_RuntimeError[] = "RuntimeError";
 static const char __pyx_k_DatetimeIndex[] = "DatetimeIndex";
 static const char __pyx_k_feather_compat[] = "feather.compat";
 static const char __pyx_k_encode_file_path[] = "encode_file_path";
-static const char __pyx_k_pandas_core_common[] = "pandas.core.common";
 static const char __pyx_k_NotImplementedError[] = "NotImplementedError";
 static const char __pyx_k_is_categorical_dtype[] = "is_categorical_dtype";
 static const char __pyx_k_is_datetime64_any_dtype[] = "is_datetime64_any_dtype";
@@ -1454,13 +1464,14 @@ static PyObject *__pyx_kp_u_Format_string_allocated_too_shor;
 static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2;
 static PyObject *__pyx_n_s_IndexError;
 static PyObject *__pyx_kp_s_M8_ns;
+static PyObject *__pyx_n_s_NaT;
 static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor;
 static PyObject *__pyx_n_s_NotImplementedError;
 static PyObject *__pyx_n_s_RuntimeError;
 static PyObject *__pyx_n_s_Series;
 static PyObject *__pyx_n_s_ValueError;
-static PyObject *__pyx_n_s__11;
 static PyObject *__pyx_kp_b__3;
+static PyObject *__pyx_n_s_any;
 static PyObject *__pyx_n_s_asarray;
 static PyObject *__pyx_n_s_categories;
 static PyObject *__pyx_n_s_codes;
@@ -1473,9 +1484,11 @@ static PyObject *__pyx_n_s_feather_compat;
 static PyObject *__pyx_n_s_feather_ext;
 static PyObject *__pyx_n_s_frombytes;
 static PyObject *__pyx_n_s_i8;
+static PyObject *__pyx_n_s_iloc;
 static PyObject *__pyx_n_s_import;
 static PyObject *__pyx_n_s_is_categorical_dtype;
 static PyObject *__pyx_n_s_is_datetime64_any_dtype;
+static PyObject *__pyx_n_s_isnull;
 static PyObject *__pyx_n_s_main;
 static PyObject *__pyx_n_s_mask;
 static PyObject *__pyx_n_s_metaclass;
@@ -1489,9 +1502,8 @@ static PyObject *__pyx_n_s_num_columns;
 static PyObject *__pyx_n_s_numpy;
 static PyObject *__pyx_n_s_ordered;
 static PyObject *__pyx_n_s_pandas;
-static PyObject *__pyx_n_s_pandas_core_common;
 static PyObject *__pyx_n_s_pd;
-static PyObject *__pyx_n_s_pdcom;
+static PyObject *__pyx_n_s_pdapi;
 static PyObject *__pyx_n_s_prepare;
 static PyObject *__pyx_kp_s_prior_column_had_a_different_num;
 static PyObject *__pyx_n_s_pyx_vtable;
@@ -1515,6 +1527,7 @@ static int __pyx_pf_7feather_3ext_6Column___cinit__(struct __pyx_obj_7feather_3e
 static PyObject *__pyx_pf_7feather_3ext_6Column_4name___get__(struct __pyx_obj_7feather_3ext_Column *__pyx_v_self); /* proto */
 static PyObject *__pyx_pf_7feather_3ext_6Column_4type___get__(struct __pyx_obj_7feather_3ext_Column *__pyx_v_self); /* proto */
 static PyObject *__pyx_pf_7feather_3ext_6Column_13user_metadata___get__(struct __pyx_obj_7feather_3ext_Column *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7feather_3ext_6Column_10null_count___get__(struct __pyx_obj_7feather_3ext_Column *__pyx_v_self); /* proto */
 static PyObject *__pyx_pf_7feather_3ext_6Column_2read(struct __pyx_obj_7feather_3ext_Column *__pyx_v_self); /* proto */
 static int __pyx_pf_7feather_3ext_13FeatherReader___cinit__(struct __pyx_obj_7feather_3ext_FeatherReader *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
 static PyObject *__pyx_pf_7feather_3ext_13FeatherReader_8num_rows___get__(struct __pyx_obj_7feather_3ext_FeatherReader *__pyx_v_self); /* proto */
@@ -1525,6 +1538,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
 static PyObject *__pyx_tp_new_7feather_3ext_FeatherWriter(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
 static PyObject *__pyx_tp_new_7feather_3ext_Column(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
 static PyObject *__pyx_tp_new_7feather_3ext_FeatherReader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_int_neg_1;
 static PyObject *__pyx_tuple_;
 static PyObject *__pyx_tuple__2;
 static PyObject *__pyx_tuple__4;
@@ -1535,7 +1549,7 @@ static PyObject *__pyx_tuple__8;
 static PyObject *__pyx_tuple__9;
 static PyObject *__pyx_tuple__10;
 
-/* "feather/ext.pyx":50
+/* "feather/ext.pyx":52
  * 
  * 
  * cdef check_status(const Status& status):             # <<<<<<<<<<<<<<
@@ -1557,7 +1571,7 @@ static PyObject *__pyx_f_7feather_3ext_check_status(feather::Status const &__pyx
   PyObject *__pyx_t_8 = NULL;
   __Pyx_RefNannySetupContext("check_status", 0);
 
-  /* "feather/ext.pyx":51
+  /* "feather/ext.pyx":53
  * 
  * cdef check_status(const Status& status):
  *     if status.ok():             # <<<<<<<<<<<<<<
@@ -1567,7 +1581,7 @@ static PyObject *__pyx_f_7feather_3ext_check_status(feather::Status const &__pyx
   __pyx_t_1 = (__pyx_v_status.ok() != 0);
   if (__pyx_t_1) {
 
-    /* "feather/ext.pyx":52
+    /* "feather/ext.pyx":54
  * cdef check_status(const Status& status):
  *     if status.ok():
  *         return             # <<<<<<<<<<<<<<
@@ -1578,7 +1592,7 @@ static PyObject *__pyx_f_7feather_3ext_check_status(feather::Status const &__pyx
     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
     goto __pyx_L0;
 
-    /* "feather/ext.pyx":51
+    /* "feather/ext.pyx":53
  * 
  * cdef check_status(const Status& status):
  *     if status.ok():             # <<<<<<<<<<<<<<
@@ -1587,7 +1601,7 @@ static PyObject *__pyx_f_7feather_3ext_check_status(feather::Status const &__pyx
  */
   }
 
-  /* "feather/ext.pyx":54
+  /* "feather/ext.pyx":56
  *         return
  * 
  *     cdef string c_message = status.ToString()             # <<<<<<<<<<<<<<
@@ -1596,18 +1610,18 @@ static PyObject *__pyx_f_7feather_3ext_check_status(feather::Status const &__pyx
  */
   __pyx_v_c_message = __pyx_v_status.ToString();
 
-  /* "feather/ext.pyx":55
+  /* "feather/ext.pyx":57
  * 
  *     cdef string c_message = status.ToString()
  *     raise FeatherError(frombytes(c_message))             # <<<<<<<<<<<<<<
  * 
- * set_numpy_nan(np.nan)
+ * cdef update_mask_with_datatype_nulls(mask, values):
  */
-  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_FeatherError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 55, __pyx_L1_error)
+  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_FeatherError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 57, __pyx_L1_error)
   __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_frombytes); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 55, __pyx_L1_error)
+  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_frombytes); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 57, __pyx_L1_error)
   __Pyx_GOTREF(__pyx_t_5);
-  __pyx_t_6 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_c_message); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 55, __pyx_L1_error)
+  __pyx_t_6 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_c_message); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 57, __pyx_L1_error)
   __Pyx_GOTREF(__pyx_t_6);
   __pyx_t_7 = NULL;
   if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
@@ -1620,17 +1634,17 @@ static PyObject *__pyx_f_7feather_3ext_check_status(feather::Status const &__pyx
     }
   }
   if (!__pyx_t_7) {
-    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 55, __pyx_L1_error)
+    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 57, __pyx_L1_error)
     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
     __Pyx_GOTREF(__pyx_t_4);
   } else {
-    __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 55, __pyx_L1_error)
+    __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 57, __pyx_L1_error)
     __Pyx_GOTREF(__pyx_t_8);
     __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
     __Pyx_GIVEREF(__pyx_t_6);
     PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6);
     __pyx_t_6 = 0;
-    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 55, __pyx_L1_error)
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 57, __pyx_L1_error)
     __Pyx_GOTREF(__pyx_t_4);
     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   }
@@ -1646,26 +1660,26 @@ static PyObject *__pyx_f_7feather_3ext_check_status(feather::Status const &__pyx
     }
   }
   if (!__pyx_t_5) {
-    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 55, __pyx_L1_error)
+    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 57, __pyx_L1_error)
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
     __Pyx_GOTREF(__pyx_t_2);
   } else {
-    __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 55, __pyx_L1_error)
+    __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 57, __pyx_L1_error)
     __Pyx_GOTREF(__pyx_t_8);
     __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
     __Pyx_GIVEREF(__pyx_t_4);
     PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_4);
     __pyx_t_4 = 0;
-    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 55, __pyx_L1_error)
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 57, __pyx_L1_error)
     __Pyx_GOTREF(__pyx_t_2);
     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   }
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   __Pyx_Raise(__pyx_t_2, 0, 0, 0);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __PYX_ERR(0, 55, __pyx_L1_error)
+  __PYX_ERR(0, 57, __pyx_L1_error)
 
-  /* "feather/ext.pyx":50
+  /* "feather/ext.pyx":52
  * 
  * 
  * cdef check_status(const Status& status):             # <<<<<<<<<<<<<<
@@ -1690,7 +1704,180 @@ static PyObject *__pyx_f_7feather_3ext_check_status(feather::Status const &__pyx
   return __pyx_r;
 }
 
-/* "feather/ext.pyx":64
+/* "feather/ext.pyx":59
+ *     raise FeatherError(frombytes(c_message))
+ * 
+ * cdef update_mask_with_datatype_nulls(mask, values):             # <<<<<<<<<<<<<<
+ *     datatype_nulls = pd.isnull(values)
+ *     if datatype_nulls.any():
+ */
+
+static PyObject *__pyx_f_7feather_3ext_update_mask_with_datatype_nulls(PyObject *__pyx_v_mask, PyObject *__pyx_v_values) {
+  PyObject *__pyx_v_datatype_nulls = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_t_5;
+  int __pyx_t_6;
+  __Pyx_RefNannySetupContext("update_mask_with_datatype_nulls", 0);
+
+  /* "feather/ext.pyx":60
+ * 
+ * cdef update_mask_with_datatype_nulls(mask, values):
+ *     datatype_nulls = pd.isnull(values)             # <<<<<<<<<<<<<<
+ *     if datatype_nulls.any():
+ *         if mask is None:
+ */
+  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_pd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 60, __pyx_L1_error)
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_isnull); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 60, __pyx_L1_error)
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
+    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+    if (likely(__pyx_t_2)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+      __Pyx_INCREF(__pyx_t_2);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_3, function);
+    }
+  }
+  if (!__pyx_t_2) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 60, __pyx_L1_error)
+    __Pyx_GOTREF(__pyx_t_1);
+  } else {
+    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 60, __pyx_L1_error)
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
+    __Pyx_INCREF(__pyx_v_values);
+    __Pyx_GIVEREF(__pyx_v_values);
+    PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_values);
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 60, __pyx_L1_error)
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_v_datatype_nulls = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "feather/ext.pyx":61
+ * cdef update_mask_with_datatype_nulls(mask, values):
+ *     datatype_nulls = pd.isnull(values)
+ *     if datatype_nulls.any():             # <<<<<<<<<<<<<<
+ *         if mask is None:
+ *             return datatype_nulls
+ */
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_datatype_nulls, __pyx_n_s_any); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 61, __pyx_L1_error)
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+    if (likely(__pyx_t_4)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+      __Pyx_INCREF(__pyx_t_4);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_3, function);
+    }
+  }
+  if (__pyx_t_4) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error)
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  } else {
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error)
+  }
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 61, __pyx_L1_error)
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (__pyx_t_5) {
+
+    /* "feather/ext.pyx":62
+ *     datatype_nulls = pd.isnull(values)
+ *     if datatype_nulls.any():
+ *         if mask is None:             # <<<<<<<<<<<<<<
+ *             return datatype_nulls
+ *         else:
+ */
+    __pyx_t_5 = (__pyx_v_mask == Py_None);
+    __pyx_t_6 = (__pyx_t_5 != 0);
+    if (__pyx_t_6) {
+
+      /* "feather/ext.pyx":63
+ *     if datatype_nulls.any():
+ *         if mask is None:
+ *             return datatype_nulls             # <<<<<<<<<<<<<<
+ *         else:
+ *             return mask | datatype_nulls
+ */
+      __Pyx_XDECREF(__pyx_r);
+      __Pyx_INCREF(__pyx_v_datatype_nulls);
+      __pyx_r = __pyx_v_datatype_nulls;
+      goto __pyx_L0;
+
+      /* "feather/ext.pyx":62
+ *     datatype_nulls = pd.isnull(values)
+ *     if datatype_nulls.any():
+ *         if mask is None:             # <<<<<<<<<<<<<<
+ *             return datatype_nulls
+ *         else:
+ */
+    }
+
+    /* "feather/ext.pyx":65
+ *             return datatype_nulls
+ *         else:
+ *             return mask | datatype_nulls             # <<<<<<<<<<<<<<
+ * 
+ * set_numpy_nan(np.nan)
+ */
+    /*else*/ {
+      __Pyx_XDECREF(__pyx_r);
+      __pyx_t_1 = PyNumber_Or(__pyx_v_mask, __pyx_v_datatype_nulls); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 65, __pyx_L1_error)
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_r = __pyx_t_1;
+      __pyx_t_1 = 0;
+      goto __pyx_L0;
+    }
+
+    /* "feather/ext.pyx":61
+ * cdef update_mask_with_datatype_nulls(mask, values):
+ *     datatype_nulls = pd.isnull(values)
+ *     if datatype_nulls.any():             # <<<<<<<<<<<<<<
+ *         if mask is None:
+ *             return datatype_nulls
+ */
+  }
+
+  /* "feather/ext.pyx":59
+ *     raise FeatherError(frombytes(c_message))
+ * 
+ * cdef update_mask_with_datatype_nulls(mask, values):             # <<<<<<<<<<<<<<
+ *     datatype_nulls = pd.isnull(values)
+ *     if datatype_nulls.any():
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("feather.ext.update_mask_with_datatype_nulls", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_datatype_nulls);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "feather/ext.pyx":74
  *         int64_t num_rows
  * 
  *     def __cinit__(self, object name):             # <<<<<<<<<<<<<<
@@ -1723,7 +1910,7 @@ static int __pyx_pw_7feather_3ext_13FeatherWriter_1__cinit__(PyObject *__pyx_v_s
         else goto __pyx_L5_argtuple_error;
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 64, __pyx_L3_error)
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 74, __pyx_L3_error)
       }
     } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
       goto __pyx_L5_argtuple_error;
@@ -1734,7 +1921,7 @@ static int __pyx_pw_7feather_3ext_13FeatherWriter_1__cinit__(PyObject *__pyx_v_s
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 64, __pyx_L3_error)
+  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 74, __pyx_L3_error)
   __pyx_L3_error:;
   __Pyx_AddTraceback("feather.ext.FeatherWriter.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
@@ -1758,14 +1945,14 @@ static int __pyx_pf_7feather_3ext_13FeatherWriter___cinit__(struct __pyx_obj_7fe
   std::string __pyx_t_5;
   __Pyx_RefNannySetupContext("__cinit__", 0);
 
-  /* "feather/ext.pyx":66
+  /* "feather/ext.pyx":76
  *     def __cinit__(self, object name):
  *         cdef:
  *             string c_name = encode_file_path(name)             # <<<<<<<<<<<<<<
  * 
  *         check_status(TableWriter.OpenFile(c_name, &self.writer))
  */
-  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_encode_file_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __pyx_L1_error)
+  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_encode_file_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 76, __pyx_L1_error)
   __Pyx_GOTREF(__pyx_t_2);
   __pyx_t_3 = NULL;
   if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
@@ -1778,36 +1965,36 @@ static int __pyx_pf_7feather_3ext_13FeatherWriter___cinit__(struct __pyx_obj_7fe
     }
   }
   if (!__pyx_t_3) {
-    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error)
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error)
     __Pyx_GOTREF(__pyx_t_1);
   } else {
-    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 66, __pyx_L1_error)
+    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 76, __pyx_L1_error)
     __Pyx_GOTREF(__pyx_t_4);
     __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
     __Pyx_INCREF(__pyx_v_name);
     __Pyx_GIVEREF(__pyx_v_name);
     PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_name);
-    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error)
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error)
     __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   }
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 66, __pyx_L1_error)
+  __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 76, __pyx_L1_error)
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __pyx_v_c_name = __pyx_t_5;
 
-  /* "feather/ext.pyx":68
+  /* "feather/ext.pyx":78
  *             string c_name = encode_file_path(name)
  * 
  *         check_status(TableWriter.OpenFile(c_name, &self.writer))             # <<<<<<<<<<<<<<
  *         self.num_rows = -1
  * 
  */
-  __pyx_t_1 = __pyx_f_7feather_3ext_check_status(feather::TableWriter::OpenFile(__pyx_v_c_name, (&__pyx_v_self->writer))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __pyx_L1_error)
+  __pyx_t_1 = __pyx_f_7feather_3ext_check_status(feather::TableWriter::OpenFile(__pyx_v_c_name, (&__pyx_v_self->writer))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 78, __pyx_L1_error)
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "feather/ext.pyx":69
+  /* "feather/ext.pyx":79
  * 
  *         check_status(TableWriter.OpenFile(c_name, &self.writer))
  *         self.num_rows = -1             # <<<<<<<<<<<<<<
@@ -1816,7 +2003,7 @@ static int __pyx_pf_7feather_3ext_13FeatherWriter___cinit__(struct __pyx_obj_7fe
  */
   __pyx_v_self->num_rows = -1L;
 
-  /* "feather/ext.pyx":64
+  /* "feather/ext.pyx":74
  *         int64_t num_rows
  * 
  *     def __cinit__(self, object name):             # <<<<<<<<<<<<<<
@@ -1839,7 +2026,7 @@ static int __pyx_pf_7feather_3ext_13FeatherWriter___cinit__(struct __pyx_obj_7fe
   return __pyx_r;
 }
 
-/* "feather/ext.pyx":71
+/* "feather/ext.pyx":81
  *         self.num_rows = -1
  * 
  *     def close(self):             # <<<<<<<<<<<<<<
@@ -1868,7 +2055,7 @@ static PyObject *__pyx_pf_7feather_3ext_13FeatherWriter_2close(struct __pyx_obj_
   PyObject *__pyx_t_2 = NULL;
   __Pyx_RefNannySetupContext("close", 0);
 
-  /* "feather/ext.pyx":72
+  /* "feather/ext.pyx":82
  * 
  *     def close(self):
  *         if self.num_rows < 0:             # <<<<<<<<<<<<<<
@@ -1878,7 +2065,7 @@ static PyObject *__pyx_pf_7feather_3ext_13FeatherWriter_2close(struct __pyx_obj_
   __pyx_t_1 = ((__pyx_v_self->num_rows < 0) != 0);
   if (__pyx_t_1) {
 
-    /* "feather/ext.pyx":73
+    /* "feather/ext.pyx":83
  *     def close(self):
  *         if self.num_rows < 0:
  *             self.num_rows = 0             # <<<<<<<<<<<<<<
@@ -1887,7 +2074,7 @@ static PyObject *__pyx_pf_7feather_3ext_13FeatherWriter_2close(struct __pyx_obj_
  */
     __pyx_v_self->num_rows = 0;
 
-    /* "feather/ext.pyx":72
+    /* "feather/ext.pyx":82
  * 
  *     def close(self):
  *         if self.num_rows < 0:             # <<<<<<<<<<<<<<
@@ -1896,7 +2083,7 @@ static PyObject *__pyx_pf_7feather_3ext_13FeatherWriter_2close(struct __pyx_obj_
  */
   }
 
-  /* "feather/ext.pyx":74
+  /* "feather/ext.pyx":84
  *         if self.num_rows < 0:
  *             self.num_rows = 0
  *         self.writer.get().SetNumRows(self.num_rows)             # <<<<<<<<<<<<<<
@@ -1905,18 +2092,18 @@ static PyObject *__pyx_pf_7feather_3ext_13FeatherWriter_2close(struct __pyx_obj_
  */
   __pyx_v_self->writer.get()->SetNumRows(__pyx_v_self->num_rows);
 
-  /* "feather/ext.pyx":75
+  /* "feather/ext.pyx":85
  *             self.num_rows = 0
  *         self.writer.get().SetNumRows(self.num_rows)
  *         check_status(self.writer.get().Finalize())             # <<<<<<<<<<<<<<
  * 
  *     def write_array(self, object name, object col, object mask=None):
  */
-  __pyx_t_2 = __pyx_f_7feather_3ext_check_status(__pyx_v_self->writer.get()->Finalize()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 75, __pyx_L1_error)
+  __pyx_t_2 = __pyx_f_7feather_3ext_check_status(__pyx_v_self->writer.get()->Finalize()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error)
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "feather/ext.pyx":71
+  /* "feather/ext.pyx":81
  *         self.num_rows = -1
  * 
  *     def close(self):             # <<<<<<<<<<<<<<
@@ -1937,7 +2124,7 @@ static PyObject *__pyx_pf_7feather_3ext_13FeatherWriter_2close(struct __pyx_obj_
   return __pyx_r;
 }
 
-/* "feather/ext.pyx":77
+/* "feather/ext.pyx":87
  *         check_status(self.writer.get().Finalize())
  * 
  *     def write_array(self, object name, object col, object mask=None):             # <<<<<<<<<<<<<<
@@ -1977,7 +2164,7 @@ static PyObject *__pyx_pw_7feather_3ext_13FeatherWriter_5write_array(PyObject *_
         case  1:
         if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_col)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("write_array", 0, 2, 3, 1); __PYX_ERR(0, 77, __pyx_L3_error)
+          __Pyx_RaiseArgtupleInvalid("write_array", 0, 2, 3, 1); __PYX_ERR(0, 87, __pyx_L3_error)
         }
         case  2:
         if (kw_args > 0) {
@@ -1986,7 +2173,7 @@ static PyObject *__pyx_pw_7feather_3ext_13FeatherWriter_5write_array(PyObject *_
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_array") < 0)) __PYX_ERR(0, 77, __pyx_L3_error)
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_array") < 0)) __PYX_ERR(0, 87, __pyx_L3_error)
       }
     } else {
       switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -2003,7 +2190,7 @@ static PyObject *__pyx_pw_7feather_3ext_13FeatherWriter_5write_array(PyObject *_
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("write_array", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 77, __pyx_L3_error)
+  __Pyx_RaiseArgtupleInvalid("write_array", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 87, __pyx_L3_error)
   __pyx_L3_error:;
   __Pyx_AddTraceback("feather.ext.FeatherWriter.write_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
@@ -2028,7 +2215,7 @@ static PyObject *__pyx_pf_7feather_3ext_13FeatherWriter_4write_array(struct __py
   PyObject *__pyx_t_7 = NULL;
   __Pyx_RefNannySetupContext("write_array", 0);
 
-  /* "feather/ext.pyx":78
+  /* "feather/ext.pyx":88
  * 
  *     def write_array(self, object name, object col, object mask=None):
  *         if self.num_rows >= 0:             # <<<<<<<<<<<<<<
@@ -2038,31 +2225,31 @@ static PyObject *__pyx_pf_7feather_3ext_13FeatherWriter_4write_array(struct __py
   __pyx_t_1 = ((__pyx_v_self->num_rows >= 0) != 0);
   if (__pyx_t_1) {
 
-    /* "feather/ext.pyx":79
+    /* "feather/ext.pyx":89
  *     def write_array(self, object name, object col, object mask=None):
  *         if self.num_rows >= 0:
  *             if len(col) != self.num_rows:             # <<<<<<<<<<<<<<
  *                 raise ValueError('prior column had a different number of rows')
  *         else:
  */
-    __pyx_t_2 = PyObject_Length(__pyx_v_col); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 79, __pyx_L1_error)
+    __pyx_t_2 = PyObject_Length(__pyx_v_col); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 89, __pyx_L1_error)
     __pyx_t_1 = ((__pyx_t_2 != __pyx_v_self->num_rows) != 0);
     if (__pyx_t_1) {
 
-      /* "feather/ext.pyx":80
+      /* "feather/ext.pyx":90
  *         if self.num_rows >= 0:
  *             if len(col) != self.num_rows:
  *                 raise ValueError('prior column had a different number of rows')             # <<<<<<<<<<<<<<
  *         else:
  *             self.num_rows = len(col)
  */
-      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 80, __pyx_L1_error)
+      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 90, __pyx_L1_error)
       __Pyx_GOTREF(__pyx_t_3);
       __Pyx_Raise(__pyx_t_3, 0, 0, 0);
       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __PYX_ERR(0, 80, __pyx_L1_error)
+      __PYX_ERR(0, 90, __pyx_L1_error)
 
-      /* "feather/ext.pyx":79
+      /* "feather/ext.pyx":89
  *     def write_array(self, object name, object col, object mask=None):
  *         if self.num_rows >= 0:
  *             if len(col) != self.num_rows:             # <<<<<<<<<<<<<<
@@ -2071,7 +2258,7 @@ static PyObject *__pyx_pf_7feather_3ext_13FeatherWriter_4write_array(struct __py
  */
     }
 
-    /* "feather/ext.pyx":78
+    /* "feather/ext.pyx":88
  * 
  *     def write_array(self, object name, object col, object mask=None):
  *         if self.num_rows >= 0:             # <<<<<<<<<<<<<<
@@ -2081,32 +2268,32 @@ static PyObject *__pyx_pf_7feather_3ext_13FeatherWriter_4write_array(struct __py
     goto __pyx_L3;
   }
 
-  /* "feather/ext.pyx":82
+  /* "feather/ext.pyx":92
  *                 raise ValueError('prior column had a different number of rows')
  *         else:
  *             self.num_rows = len(col)             # <<<<<<<<<<<<<<
  * 
- *         if pdcom.is_categorical_dtype(col.dtype):
+ *         if pdapi.is_categorical_dtype(col.dtype):
  */
   /*else*/ {
-    __pyx_t_2 = PyObject_Length(__pyx_v_col); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 82, __pyx_L1_error)
+    __pyx_t_2 = PyObject_Length(__pyx_v_col); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 92, __pyx_L1_error)
     __pyx_v_self->num_rows = __pyx_t_2;
   }
   __pyx_L3:;
 
-  /* "feather/ext.pyx":84
+  /* "feather/ext.pyx":94
  *             self.num_rows = len(col)
  * 
- *         if pdcom.is_categorical_dtype(col.dtype):             # <<<<<<<<<<<<<<
+ *         if pdapi.is_categorical_dtype(col.dtype):             # <<<<<<<<<<<<<<
  *             self.write_category(name, col, mask)
- *         elif pdcom.is_datetime64_any_dtype(col.dtype):
+ *         elif pdapi.is_datetime64_any_dtype(col.dtype):
  */
-  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdcom); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 84, __pyx_L1_error)
+  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdapi); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 94, __pyx_L1_error)
   __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_is_categorical_dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 84, __pyx_L1_error)
+  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_is_categorical_dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 94, __pyx_L1_error)
   __Pyx_GOTREF(__pyx_t_5);
   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_col, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 84, __pyx_L1_error)
+  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_col, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 94, __pyx_L1_error)
   __Pyx_GOTREF(__pyx_t_4);
   __pyx_t_6 = NULL;
   if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
@@ -2119,59 +2306,59 @@ static PyObject *__pyx_pf_7feather_3ext_13FeatherWriter_4write_array(struct __py
     }
   }
   if (!__pyx_t_6) {
-    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 84, __pyx_L1_error)
+    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 94, __pyx_L1_error)
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
     __Pyx_GOTREF(__pyx_t_3);
   } else {
-    __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 84, __pyx_L1_error)
+    __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 94, __pyx_L1_error)
     __Pyx_GOTREF(__pyx_t_7);
     __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
     __Pyx_GIVEREF(__pyx_t_4);
     PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_4);
     __pyx_t_4 = 0;
-    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 84, __pyx_L1_error)
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 94, __pyx_L1_error)
     __Pyx_GOTREF(__pyx_t_3);
     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   }
   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 84, __pyx_L1_error)
+  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 94, __pyx_L1_error)
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   if (__pyx_t_1) {
 
-    /* "feather/ext.pyx":85
+    /* "feather/ext.pyx":95
  * 
- *         if pdcom.is_categorical_dtype(col.dtype):
+ *         if pdapi.is_categorical_dtype(col.dtype):
  *             self.write_category(name, col, mask)             # <<<<<<<<<<<<<<
- *         elif pdcom.is_datetime64_any_dtype(col.dtype):
+ *         elif pdapi.is_datetime64_any_dtype(col.dtype):
  *             self.write_timestamp(name, col, mask)
  */
-    __pyx_t_3 = ((struct __pyx_vtabstruct_7feather_3ext_FeatherWriter *)__pyx_v_self->__pyx_vtab)->write_category(__pyx_v_self, __pyx_v_name, __pyx_v_col, __pyx_v_mask); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 85, __pyx_L1_error)
+    __pyx_t_3 = ((struct __pyx_vtabstruct_7feather_3ext_FeatherWriter *)__pyx_v_self->__pyx_vtab)->write_category(__pyx_v_self, __pyx_v_name, __pyx_v_col, __pyx_v_mask); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 95, __pyx_L1_error)
     __Pyx_GOTREF(__pyx_t_3);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-    /* "feather/ext.pyx":84
+    /* "feather/ext.pyx":94
  *             self.num_rows = len(col)
  * 
- *         if pdcom.is_categorical_dtype(col.dtype):             # <<<<<<<<<<<<<<
+ *         if pdapi.is_categorical_dtype(col.dtype):             # <<<<<<<<<<<<<<
  *             self.write_category(name, col, mask)
- *         elif pdcom.is_datetime64_any_dtype(col.dtype):
+ *         elif pdapi.is_datetime64_any_dtype(col.dtype):
  */
     goto __pyx_L5;
   }
 
-  /* "feather/ext.pyx":86
- *         if pdcom.is_categorical_dtype(col.dtype):
+  /* "feather/ext.pyx":96
+ *         if pdapi.is_categorical_dtype(col.dtype):
  *             self.write_category(name, col, mask)
- *         elif pdcom.is_datetime64_any_dtype(col.dtype):             # <<<<<<<<<<<<<<
+ *         elif pdapi.is_datetime64_any_dtype(col.dtype):             # <<<<<<<<<<<<<<
  *             self.write_timestamp(name, col, mask)
  *         else:
  */
-  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdcom); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 86, __pyx_L1_error)
+  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdapi); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 96, __pyx_L1_error)
   __Pyx_GOTREF(__pyx_t_5);
-  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_is_datetime64_any_dtype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 86, __pyx_L1_error)
+  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_is_datetime64_any_dtype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 96, __pyx_L1_error)
   __Pyx_GOTREF(__pyx_t_7);
   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_col, __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 86, __pyx_L1_error)
+  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_col, __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 96, __pyx_L1_error)
   __Pyx_GOTREF(__pyx_t_5);
   __pyx_t_4 = NULL;
   if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) {
@@ -2184,47 +2371,47 @@ static PyObject *__pyx_pf_7feather_3ext_13FeatherWriter_4write_array(struct __py
     }
   }
   if (!__pyx_t_4) {
-    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 86, __pyx_L1_error)
+    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 96, __pyx_L1_error)
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
     __Pyx_GOTREF(__pyx_t_3);
   } else {
-    __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 86, __pyx_L1_error)
+    __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 96, __pyx_L1_error)
     __Pyx_GOTREF(__pyx_t_6);
     __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
     __Pyx_GIVEREF(__pyx_t_5);
     PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_5);
     __pyx_t_5 = 0;
-    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 86, __pyx_L1_error)
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 96, __pyx_L1_error)
     __Pyx_GOTREF(__pyx_t_3);
     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   }
   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 86, __pyx_L1_error)
+  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 96, __pyx_L1_error)
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   if (__pyx_t_1) {
 
-    /* "feather/ext.pyx":87
+    /* "feather/ext.pyx":97
  *             self.write_category(name, col, mask)
- *         elif pdcom.is_datetime64_any_dtype(col.dtype):
+ *         elif pdapi.is_datetime64_any_dtype(col.dtype):
  *             self.write_timestamp(name, col, mask)             # <<<<<<<<<<<<<<
  *         else:
  *             self.write_primitive(name, col, mask)
  */
-    __pyx_t_3 = ((struct __pyx_vtabstruct_7feather_3ext_FeatherWriter *)__pyx_v_self->__pyx_vtab)->write_timestamp(__pyx_v_self, __pyx_v_name, __pyx_v_col, __pyx_v_mask); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 87, __pyx_L1_error)
+    __pyx_t_3 = ((struct __pyx_vtabstruct_7feather_3ext_FeatherWriter *)__pyx_v_self->__pyx_vtab)->write_timestamp(__pyx_v_self, __pyx_v_name, __pyx_v_col, __pyx_v_mask); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 97, __pyx_L1_error)
     __Pyx_GOTREF(__pyx_t_3);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-    /* "feather/ext.pyx":86
- *         if pdcom.is_categorical_dtype(col.dtype):
+    /* "feather/ext.pyx":96
+ *         if pdapi.is_categorical_dtype(col.dtype):
  *             self.write_category(name, col, mask)
- *         elif pdcom.is_datetime64_any_dtype(col.dtype):             # <<<<<<<<<<<<<<
+ *         elif pdapi.is_datetime64_any_dtype(col.dtype):             # <<<<<<<<<<<<<<
  *             self.write_timestamp(name, col, mask)
  *         else:
  */
     goto __pyx_L5;
   }
 
-  /* "feather/ext.pyx":89
+  /* "feather/ext.pyx":99
  *             self.write_timestamp(name, col, mask)
  *         else:
  *             self.write_primitive(name, col, mask)             # <<<<<<<<<<<<<<
@@ -2232,13 +2419,13 @@ static PyObject *__pyx_pf_7feather_3ext_13FeatherWriter_4write_array(struct __py
  *     cdef write_category(self, name, col, mask):
  */
   /*else*/ {
... 2991 lines suppressed ...

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-feather-format.git



More information about the Python-modules-commits mailing list