From f9903e5649df8b7fd156e6e077ce55b2b187dea0 Mon Sep 17 00:00:00 2001 From: Jeff Whitaker Date: Fri, 12 May 2017 10:36:48 -0600 Subject: [PATCH] fix for issue #659 (datetime used when it shouldn't be for negative times) --- Changelog | 1 + netCDF4/_netCDF4.c | 7071 ++++++++++++++++++++-------------------- netCDF4/_netCDF4.pyx | 5 +- test/tst_netcdftime.py | 7 + 4 files changed, 3593 insertions(+), 3491 deletions(-) diff --git a/Changelog b/Changelog index ffc8b944f..1b7afa619 100644 --- a/Changelog +++ b/Changelog @@ -3,6 +3,7 @@ * recognize _Unsigned attribute used by netcdf-java to designate unsigned integer data stored with a signed integer type in netcdf-3. * add Dataset init memory parameter to allow loading a file from memory + * fix for negative times in num2date (issue #659). version 1.2.7 (tag v1.2.7rel) ============================== diff --git a/netCDF4/_netCDF4.c b/netCDF4/_netCDF4.c index 521c89f50..96440291c 100644 --- a/netCDF4/_netCDF4.c +++ b/netCDF4/_netCDF4.c @@ -677,7 +677,7 @@ struct __pyx_opt_args_7netCDF4_8_netCDF4__ensure_nc_success { PyObject *err_cls; }; -/* "netCDF4/_netCDF4.pyx":4763 +/* "netCDF4/_netCDF4.pyx":4762 * return xtype * * cdef _read_compound(group, nc_type xtype, endian=None): # <<<<<<<<<<<<<< @@ -689,7 +689,7 @@ struct __pyx_opt_args_7netCDF4_8_netCDF4__read_compound { PyObject *endian; }; -/* "netCDF4/_netCDF4.pyx":4936 +/* "netCDF4/_netCDF4.pyx":4935 * return xtype, dt * * cdef _read_vlen(group, nc_type xtype, endian=None): # <<<<<<<<<<<<<< @@ -701,7 +701,7 @@ struct __pyx_opt_args_7netCDF4_8_netCDF4__read_vlen { PyObject *endian; }; -/* "netCDF4/_netCDF4.pyx":5059 +/* "netCDF4/_netCDF4.pyx":5058 * return xtype, dt * * cdef _read_enum(group, nc_type xtype, endian=None): # <<<<<<<<<<<<<< @@ -713,7 +713,7 @@ struct __pyx_opt_args_7netCDF4_8_netCDF4__read_enum { PyObject *endian; }; -/* "netCDF4/_netCDF4.pyx":5095 +/* "netCDF4/_netCDF4.pyx":5094 * return EnumType(group, dt, name, enum_dict, typeid=xtype) * * cdef _strencode(pystr,encoding=None): # <<<<<<<<<<<<<< @@ -816,7 +816,7 @@ struct __pyx_obj_7netCDF4_8_netCDF4_Variable { }; -/* "netCDF4/_netCDF4.pyx":4598 +/* "netCDF4/_netCDF4.pyx":4597 * # Compound datatype support. * * cdef class CompoundType: # <<<<<<<<<<<<<< @@ -831,7 +831,7 @@ struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType { }; -/* "netCDF4/_netCDF4.pyx":4847 +/* "netCDF4/_netCDF4.pyx":4846 * # VLEN datatype support. * * cdef class VLType: # <<<<<<<<<<<<<< @@ -846,7 +846,7 @@ struct __pyx_obj_7netCDF4_8_netCDF4_VLType { }; -/* "netCDF4/_netCDF4.pyx":4965 +/* "netCDF4/_netCDF4.pyx":4964 * # Enum datatype support. * * cdef class EnumType: # <<<<<<<<<<<<<< @@ -2008,6 +2008,7 @@ static const char __pyx_k_itemsize[] = "itemsize"; static const char __pyx_k_newSlice[] = "newSlice"; static const char __pyx_k_normpath[] = "normpath"; static const char __pyx_k_num2date[] = "num2date"; +static const char __pyx_k_postimes[] = "postimes"; static const char __pyx_k_qualname[] = "__qualname__"; static const char __pyx_k_quantize[] = "_quantize"; static const char __pyx_k_ref_date[] = "ref_date"; @@ -2891,6 +2892,7 @@ static PyObject *__pyx_n_s_persist; static PyObject *__pyx_kp_s_please_install_ordereddict_https; static PyObject *__pyx_n_s_pop; static PyObject *__pyx_n_s_posixpath; +static PyObject *__pyx_n_s_postimes; static PyObject *__pyx_n_s_preemption; static PyObject *__pyx_n_s_prepare; static PyObject *__pyx_n_s_private_atts; @@ -40636,7 +40638,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py * # else if variable has only add_offset attributes, rescale. * elif hasattr(self, 'add_offset') and self.add_offset != 0.0: # <<<<<<<<<<<<<< * data = data + self.add_offset - * + * return data */ __pyx_t_9 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 3830, __pyx_L1_error) __pyx_t_12 = (__pyx_t_9 != 0); @@ -40659,8 +40661,8 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py * # else if variable has only add_offset attributes, rescale. * elif hasattr(self, 'add_offset') and self.add_offset != 0.0: * data = data + self.add_offset # <<<<<<<<<<<<<< - * * return data + * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3831, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -40675,7 +40677,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py * # else if variable has only add_offset attributes, rescale. * elif hasattr(self, 'add_offset') and self.add_offset != 0.0: # <<<<<<<<<<<<<< * data = data + self.add_offset - * + * return data */ } __pyx_L59:; @@ -40689,9 +40691,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py */ } - /* "netCDF4/_netCDF4.pyx":3833 + /* "netCDF4/_netCDF4.pyx":3832 + * elif hasattr(self, 'add_offset') and self.add_offset != 0.0: * data = data + self.add_offset - * * return data # <<<<<<<<<<<<<< * * def _toma(self,data): @@ -40742,7 +40744,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":3835 +/* "netCDF4/_netCDF4.pyx":3834 * return data * * def _toma(self,data): # <<<<<<<<<<<<<< @@ -40801,23 +40803,23 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __Pyx_RefNannySetupContext("_toma", 0); __Pyx_INCREF(__pyx_v_data); - /* "netCDF4/_netCDF4.pyx":3839 + /* "netCDF4/_netCDF4.pyx":3838 * # private function for creating a masked array, masking missing_values * # and/or _FillValues. * totalmask = numpy.zeros(data.shape, numpy.bool) # <<<<<<<<<<<<<< * fill_value = None * if hasattr(self, 'missing_value'): */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3839, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3838, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3839, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3838, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3839, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3838, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3839, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3838, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_bool); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3839, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_bool); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3838, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -40835,7 +40837,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_2, __pyx_t_5}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3839, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3838, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -40845,7 +40847,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_2, __pyx_t_5}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3839, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3838, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -40853,7 +40855,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ } else #endif { - __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3839, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3838, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -40864,7 +40866,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_5); __pyx_t_2 = 0; __pyx_t_5 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3839, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3838, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -40872,7 +40874,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __pyx_v_totalmask = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":3840 + /* "netCDF4/_netCDF4.pyx":3839 * # and/or _FillValues. * totalmask = numpy.zeros(data.shape, numpy.bool) * fill_value = None # <<<<<<<<<<<<<< @@ -40882,30 +40884,30 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __Pyx_INCREF(Py_None); __pyx_v_fill_value = Py_None; - /* "netCDF4/_netCDF4.pyx":3841 + /* "netCDF4/_netCDF4.pyx":3840 * totalmask = numpy.zeros(data.shape, numpy.bool) * fill_value = None * if hasattr(self, 'missing_value'): # <<<<<<<<<<<<<< * mval = numpy.array(self.missing_value, self.dtype) * # create mask from missing values. */ - __pyx_t_8 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_missing_value); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 3841, __pyx_L1_error) + __pyx_t_8 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_missing_value); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 3840, __pyx_L1_error) __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { - /* "netCDF4/_netCDF4.pyx":3842 + /* "netCDF4/_netCDF4.pyx":3841 * fill_value = None * if hasattr(self, 'missing_value'): * mval = numpy.array(self.missing_value, self.dtype) # <<<<<<<<<<<<<< * # create mask from missing values. * mvalmask = numpy.zeros(data.shape, numpy.bool) */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3842, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3842, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_missing_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3842, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_missing_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -40922,7 +40924,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_v_self->dtype}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3842, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3841, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -40931,14 +40933,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_v_self->dtype}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3842, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3841, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { - __pyx_t_2 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3842, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -40949,7 +40951,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __Pyx_GIVEREF(__pyx_v_self->dtype); PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_6, __pyx_v_self->dtype); __pyx_t_3 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3842, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -40957,23 +40959,23 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __pyx_v_mval = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":3844 + /* "netCDF4/_netCDF4.pyx":3843 * mval = numpy.array(self.missing_value, self.dtype) * # create mask from missing values. * mvalmask = numpy.zeros(data.shape, numpy.bool) # <<<<<<<<<<<<<< * # set mask=True for data outside valid_min,valid_max. * # (issue #576) */ - __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3844, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3844, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3844, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3844, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_bool); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3844, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_bool); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -40991,7 +40993,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_7, __pyx_t_5}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3844, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3843, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -41001,7 +41003,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_7, __pyx_t_5}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3844, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3843, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -41009,7 +41011,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ } else #endif { - __pyx_t_4 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3844, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; @@ -41020,7 +41022,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_6, __pyx_t_5); __pyx_t_7 = 0; __pyx_t_5 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3844, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -41028,7 +41030,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __pyx_v_mvalmask = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":3847 + /* "netCDF4/_netCDF4.pyx":3846 * # set mask=True for data outside valid_min,valid_max. * # (issue #576) * validmin = None; validmax = None # <<<<<<<<<<<<<< @@ -41040,44 +41042,44 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __Pyx_INCREF(Py_None); __pyx_v_validmax = Py_None; - /* "netCDF4/_netCDF4.pyx":3852 + /* "netCDF4/_netCDF4.pyx":3851 * # treatment of byte data as described at * # http://www.unidata.ucar.edu/software/netcdf/docs/attribute_conventions.html). * if hasattr(self, 'valid_range') and len(self.valid_range) == 2: # <<<<<<<<<<<<<< * validmin = numpy.array(self.valid_range[0], self.dtype) * validmax = numpy.array(self.valid_range[1], self.dtype) */ - __pyx_t_8 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_valid_range); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 3852, __pyx_L1_error) + __pyx_t_8 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_valid_range); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 3851, __pyx_L1_error) __pyx_t_10 = (__pyx_t_8 != 0); if (__pyx_t_10) { } else { __pyx_t_9 = __pyx_t_10; goto __pyx_L5_bool_binop_done; } - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_valid_range); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3852, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_valid_range); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3851, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_11 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 3852, __pyx_L1_error) + __pyx_t_11 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 3851, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_10 = ((__pyx_t_11 == 2) != 0); __pyx_t_9 = __pyx_t_10; __pyx_L5_bool_binop_done:; if (__pyx_t_9) { - /* "netCDF4/_netCDF4.pyx":3853 + /* "netCDF4/_netCDF4.pyx":3852 * # http://www.unidata.ucar.edu/software/netcdf/docs/attribute_conventions.html). * if hasattr(self, 'valid_range') and len(self.valid_range) == 2: * validmin = numpy.array(self.valid_range[0], self.dtype) # <<<<<<<<<<<<<< * validmax = numpy.array(self.valid_range[1], self.dtype) * else: */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3853, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3852, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3853, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3852, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_valid_range); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3853, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_valid_range); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3852, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3853, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3852, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -41095,7 +41097,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_5, __pyx_v_self->dtype}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3853, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3852, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -41104,14 +41106,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_5, __pyx_v_self->dtype}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3853, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3852, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { - __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3853, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3852, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_2) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __pyx_t_2 = NULL; @@ -41122,7 +41124,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __Pyx_GIVEREF(__pyx_v_self->dtype); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_self->dtype); __pyx_t_5 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3853, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3852, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -41130,21 +41132,21 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __Pyx_DECREF_SET(__pyx_v_validmin, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":3854 + /* "netCDF4/_netCDF4.pyx":3853 * if hasattr(self, 'valid_range') and len(self.valid_range) == 2: * validmin = numpy.array(self.valid_range[0], self.dtype) * validmax = numpy.array(self.valid_range[1], self.dtype) # <<<<<<<<<<<<<< * else: * if hasattr(self, 'valid_min'): */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3854, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3853, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3854, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3853, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_valid_range); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3854, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_valid_range); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3853, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3854, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3853, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -41162,7 +41164,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_5, __pyx_v_self->dtype}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3854, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3853, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -41171,14 +41173,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_5, __pyx_v_self->dtype}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3854, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3853, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { - __pyx_t_2 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3854, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3853, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -41189,7 +41191,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __Pyx_GIVEREF(__pyx_v_self->dtype); PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_6, __pyx_v_self->dtype); __pyx_t_5 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3854, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3853, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -41197,7 +41199,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __Pyx_DECREF_SET(__pyx_v_validmax, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":3852 + /* "netCDF4/_netCDF4.pyx":3851 * # treatment of byte data as described at * # http://www.unidata.ucar.edu/software/netcdf/docs/attribute_conventions.html). * if hasattr(self, 'valid_range') and len(self.valid_range) == 2: # <<<<<<<<<<<<<< @@ -41207,7 +41209,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ goto __pyx_L4; } - /* "netCDF4/_netCDF4.pyx":3856 + /* "netCDF4/_netCDF4.pyx":3855 * validmax = numpy.array(self.valid_range[1], self.dtype) * else: * if hasattr(self, 'valid_min'): # <<<<<<<<<<<<<< @@ -41215,23 +41217,23 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ * if hasattr(self, 'valid_max'): */ /*else*/ { - __pyx_t_9 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_valid_min); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 3856, __pyx_L1_error) + __pyx_t_9 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_valid_min); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 3855, __pyx_L1_error) __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { - /* "netCDF4/_netCDF4.pyx":3857 + /* "netCDF4/_netCDF4.pyx":3856 * else: * if hasattr(self, 'valid_min'): * validmin = numpy.array(self.valid_min, self.dtype) # <<<<<<<<<<<<<< * if hasattr(self, 'valid_max'): * validmax = numpy.array(self.valid_max, self.dtype) */ - __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3857, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3857, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_valid_min); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3857, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_valid_min); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -41248,7 +41250,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_7, __pyx_v_self->dtype}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3857, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3856, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -41257,14 +41259,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_7, __pyx_v_self->dtype}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3857, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3856, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { - __pyx_t_4 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3857, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -41275,7 +41277,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __Pyx_GIVEREF(__pyx_v_self->dtype); PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_6, __pyx_v_self->dtype); __pyx_t_7 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3857, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -41283,7 +41285,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __Pyx_DECREF_SET(__pyx_v_validmin, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":3856 + /* "netCDF4/_netCDF4.pyx":3855 * validmax = numpy.array(self.valid_range[1], self.dtype) * else: * if hasattr(self, 'valid_min'): # <<<<<<<<<<<<<< @@ -41292,30 +41294,30 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":3858 + /* "netCDF4/_netCDF4.pyx":3857 * if hasattr(self, 'valid_min'): * validmin = numpy.array(self.valid_min, self.dtype) * if hasattr(self, 'valid_max'): # <<<<<<<<<<<<<< * validmax = numpy.array(self.valid_max, self.dtype) * # http://www.unidata.ucar.edu/software/netcdf/docs/attribute_conventions.html). */ - __pyx_t_10 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_valid_max); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 3858, __pyx_L1_error) + __pyx_t_10 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_valid_max); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 3857, __pyx_L1_error) __pyx_t_9 = (__pyx_t_10 != 0); if (__pyx_t_9) { - /* "netCDF4/_netCDF4.pyx":3859 + /* "netCDF4/_netCDF4.pyx":3858 * validmin = numpy.array(self.valid_min, self.dtype) * if hasattr(self, 'valid_max'): * validmax = numpy.array(self.valid_max, self.dtype) # <<<<<<<<<<<<<< * # http://www.unidata.ucar.edu/software/netcdf/docs/attribute_conventions.html). * # "If the data type is byte and _FillValue */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3859, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3858, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3859, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3858, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_valid_max); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3859, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_valid_max); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3858, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = NULL; __pyx_t_6 = 0; @@ -41332,7 +41334,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_2, __pyx_v_self->dtype}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3859, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3858, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -41341,14 +41343,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_2, __pyx_v_self->dtype}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3859, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3858, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { - __pyx_t_5 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3859, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3858, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -41359,7 +41361,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __Pyx_GIVEREF(__pyx_v_self->dtype); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_6, __pyx_v_self->dtype); __pyx_t_2 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3859, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3858, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -41367,7 +41369,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __Pyx_DECREF_SET(__pyx_v_validmax, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":3858 + /* "netCDF4/_netCDF4.pyx":3857 * if hasattr(self, 'valid_min'): * validmin = numpy.array(self.valid_min, self.dtype) * if hasattr(self, 'valid_max'): # <<<<<<<<<<<<<< @@ -41378,54 +41380,54 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ } __pyx_L4:; - /* "netCDF4/_netCDF4.pyx":3868 + /* "netCDF4/_netCDF4.pyx":3867 * # If the _FillValue is positive then it defines a valid maximum, * # otherwise it defines a valid minimum." * byte_type = self.dtype.str[1:] in ['u1','i1'] # <<<<<<<<<<<<<< * if hasattr(self, '_FillValue'): * fval = numpy.array(self._FillValue, self.dtype) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_str); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3868, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_str); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3867, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_t_1, 1, 0, NULL, NULL, &__pyx_slice__61, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3868, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_t_1, 1, 0, NULL, NULL, &__pyx_slice__61, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3867, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_u1, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 3868, __pyx_L1_error) + __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_u1, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 3867, __pyx_L1_error) if (!__pyx_t_10) { } else { __pyx_t_9 = __pyx_t_10; goto __pyx_L9_bool_binop_done; } - __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_i1, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 3868, __pyx_L1_error) + __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_i1, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 3867, __pyx_L1_error) __pyx_t_9 = __pyx_t_10; __pyx_L9_bool_binop_done:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_byte_type = __pyx_t_9; - /* "netCDF4/_netCDF4.pyx":3869 + /* "netCDF4/_netCDF4.pyx":3868 * # otherwise it defines a valid minimum." * byte_type = self.dtype.str[1:] in ['u1','i1'] * if hasattr(self, '_FillValue'): # <<<<<<<<<<<<<< * fval = numpy.array(self._FillValue, self.dtype) * else: */ - __pyx_t_9 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_FillValue); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 3869, __pyx_L1_error) + __pyx_t_9 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_FillValue); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 3868, __pyx_L1_error) __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { - /* "netCDF4/_netCDF4.pyx":3870 + /* "netCDF4/_netCDF4.pyx":3869 * byte_type = self.dtype.str[1:] in ['u1','i1'] * if hasattr(self, '_FillValue'): * fval = numpy.array(self._FillValue, self.dtype) # <<<<<<<<<<<<<< * else: * fval = numpy.array(default_fillvals[self.dtype.str[1:]],self.dtype) */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3870, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3869, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3870, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3869, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_FillValue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3870, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_FillValue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3869, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = NULL; __pyx_t_6 = 0; @@ -41442,7 +41444,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_1, __pyx_v_self->dtype}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3870, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3869, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -41451,14 +41453,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_1, __pyx_v_self->dtype}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3870, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3869, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else #endif { - __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3870, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3869, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_2) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __pyx_t_2 = NULL; @@ -41469,7 +41471,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __Pyx_GIVEREF(__pyx_v_self->dtype); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_self->dtype); __pyx_t_1 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3870, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3869, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -41477,7 +41479,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __pyx_v_fval = __pyx_t_4; __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":3869 + /* "netCDF4/_netCDF4.pyx":3868 * # otherwise it defines a valid minimum." * byte_type = self.dtype.str[1:] in ['u1','i1'] * if hasattr(self, '_FillValue'): # <<<<<<<<<<<<<< @@ -41487,7 +41489,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ goto __pyx_L11; } - /* "netCDF4/_netCDF4.pyx":3872 + /* "netCDF4/_netCDF4.pyx":3871 * fval = numpy.array(self._FillValue, self.dtype) * else: * fval = numpy.array(default_fillvals[self.dtype.str[1:]],self.dtype) # <<<<<<<<<<<<<< @@ -41495,19 +41497,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ * if validmin is None and (fval is not None and fval <= 0): */ /*else*/ { - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3872, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3871, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3872, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3871, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_fillvals); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3872, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_fillvals); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3871, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_str); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3872, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_str); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3871, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_t_1, 1, 0, NULL, NULL, &__pyx_slice__62, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3872, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_t_1, 1, 0, NULL, NULL, &__pyx_slice__62, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3871, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_GetItem(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3872, __pyx_L1_error) + __pyx_t_1 = PyObject_GetItem(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3871, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -41526,7 +41528,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_1, __pyx_v_self->dtype}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3872, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3871, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -41535,14 +41537,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_1, __pyx_v_self->dtype}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3872, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3871, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else #endif { - __pyx_t_5 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3872, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3871, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_2) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL; @@ -41553,7 +41555,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __Pyx_GIVEREF(__pyx_v_self->dtype); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_6, __pyx_v_self->dtype); __pyx_t_1 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3872, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3871, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -41561,7 +41563,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __pyx_v_fval = __pyx_t_4; __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":3873 + /* "netCDF4/_netCDF4.pyx":3872 * else: * fval = numpy.array(default_fillvals[self.dtype.str[1:]],self.dtype) * if byte_type: fval = None # <<<<<<<<<<<<<< @@ -41576,7 +41578,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ } __pyx_L11:; - /* "netCDF4/_netCDF4.pyx":3874 + /* "netCDF4/_netCDF4.pyx":3873 * fval = numpy.array(default_fillvals[self.dtype.str[1:]],self.dtype) * if byte_type: fval = None * if validmin is None and (fval is not None and fval <= 0): # <<<<<<<<<<<<<< @@ -41597,14 +41599,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __pyx_t_10 = __pyx_t_9; goto __pyx_L14_bool_binop_done; } - __pyx_t_4 = PyObject_RichCompare(__pyx_v_fval, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3874, __pyx_L1_error) - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3874, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_fval, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3873, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3873, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_10 = __pyx_t_9; __pyx_L14_bool_binop_done:; if (__pyx_t_10) { - /* "netCDF4/_netCDF4.pyx":3875 + /* "netCDF4/_netCDF4.pyx":3874 * if byte_type: fval = None * if validmin is None and (fval is not None and fval <= 0): * validmin = fval # <<<<<<<<<<<<<< @@ -41614,7 +41616,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __Pyx_INCREF(__pyx_v_fval); __Pyx_DECREF_SET(__pyx_v_validmin, __pyx_v_fval); - /* "netCDF4/_netCDF4.pyx":3874 + /* "netCDF4/_netCDF4.pyx":3873 * fval = numpy.array(default_fillvals[self.dtype.str[1:]],self.dtype) * if byte_type: fval = None * if validmin is None and (fval is not None and fval <= 0): # <<<<<<<<<<<<<< @@ -41624,7 +41626,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ goto __pyx_L13; } - /* "netCDF4/_netCDF4.pyx":3876 + /* "netCDF4/_netCDF4.pyx":3875 * if validmin is None and (fval is not None and fval <= 0): * validmin = fval * elif validmax is None and (fval is not None and fval > 0): # <<<<<<<<<<<<<< @@ -41645,14 +41647,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __pyx_t_10 = __pyx_t_9; goto __pyx_L17_bool_binop_done; } - __pyx_t_4 = PyObject_RichCompare(__pyx_v_fval, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3876, __pyx_L1_error) - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3876, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_fval, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3875, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3875, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_10 = __pyx_t_9; __pyx_L17_bool_binop_done:; if (__pyx_t_10) { - /* "netCDF4/_netCDF4.pyx":3877 + /* "netCDF4/_netCDF4.pyx":3876 * validmin = fval * elif validmax is None and (fval is not None and fval > 0): * validmax = fval # <<<<<<<<<<<<<< @@ -41662,7 +41664,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __Pyx_INCREF(__pyx_v_fval); __Pyx_DECREF_SET(__pyx_v_validmax, __pyx_v_fval); - /* "netCDF4/_netCDF4.pyx":3876 + /* "netCDF4/_netCDF4.pyx":3875 * if validmin is None and (fval is not None and fval <= 0): * validmin = fval * elif validmax is None and (fval is not None and fval > 0): # <<<<<<<<<<<<<< @@ -41672,7 +41674,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ } __pyx_L13:; - /* "netCDF4/_netCDF4.pyx":3878 + /* "netCDF4/_netCDF4.pyx":3877 * elif validmax is None and (fval is not None and fval > 0): * validmax = fval * if validmin is not None: # <<<<<<<<<<<<<< @@ -41683,21 +41685,21 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __pyx_t_9 = (__pyx_t_10 != 0); if (__pyx_t_9) { - /* "netCDF4/_netCDF4.pyx":3879 + /* "netCDF4/_netCDF4.pyx":3878 * validmax = fval * if validmin is not None: * mvalmask += data < validmin # <<<<<<<<<<<<<< * if validmax is not None: * mvalmask += data > validmax */ - __pyx_t_4 = PyObject_RichCompare(__pyx_v_data, __pyx_v_validmin, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3879, __pyx_L1_error) - __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_mvalmask, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3879, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_data, __pyx_v_validmin, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3878, __pyx_L1_error) + __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_mvalmask, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3878, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_mvalmask, __pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":3878 + /* "netCDF4/_netCDF4.pyx":3877 * elif validmax is None and (fval is not None and fval > 0): * validmax = fval * if validmin is not None: # <<<<<<<<<<<<<< @@ -41706,7 +41708,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":3880 + /* "netCDF4/_netCDF4.pyx":3879 * if validmin is not None: * mvalmask += data < validmin * if validmax is not None: # <<<<<<<<<<<<<< @@ -41717,21 +41719,21 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { - /* "netCDF4/_netCDF4.pyx":3881 + /* "netCDF4/_netCDF4.pyx":3880 * mvalmask += data < validmin * if validmax is not None: * mvalmask += data > validmax # <<<<<<<<<<<<<< * if mval.shape == (): # mval a scalar. * mval = [mval] # make into iterable. */ - __pyx_t_7 = PyObject_RichCompare(__pyx_v_data, __pyx_v_validmax, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3881, __pyx_L1_error) - __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_mvalmask, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3881, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(__pyx_v_data, __pyx_v_validmax, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3880, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_mvalmask, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3880, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF_SET(__pyx_v_mvalmask, __pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":3880 + /* "netCDF4/_netCDF4.pyx":3879 * if validmin is not None: * mvalmask += data < validmin * if validmax is not None: # <<<<<<<<<<<<<< @@ -41740,29 +41742,29 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":3882 + /* "netCDF4/_netCDF4.pyx":3881 * if validmax is not None: * mvalmask += data > validmax * if mval.shape == (): # mval a scalar. # <<<<<<<<<<<<<< * mval = [mval] # make into iterable. * for m in mval: */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_mval, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3882, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_mval, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3881, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = PyObject_RichCompare(__pyx_t_4, __pyx_empty_tuple, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3882, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(__pyx_t_4, __pyx_empty_tuple, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3881, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 3882, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 3881, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_10) { - /* "netCDF4/_netCDF4.pyx":3883 + /* "netCDF4/_netCDF4.pyx":3882 * mvalmask += data > validmax * if mval.shape == (): # mval a scalar. * mval = [mval] # make into iterable. # <<<<<<<<<<<<<< * for m in mval: * # is scalar missing value a NaN? */ - __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3883, __pyx_L1_error) + __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3882, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_mval); __Pyx_GIVEREF(__pyx_v_mval); @@ -41770,7 +41772,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __Pyx_DECREF_SET(__pyx_v_mval, __pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":3882 + /* "netCDF4/_netCDF4.pyx":3881 * if validmax is not None: * mvalmask += data > validmax * if mval.shape == (): # mval a scalar. # <<<<<<<<<<<<<< @@ -41779,7 +41781,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":3884 + /* "netCDF4/_netCDF4.pyx":3883 * if mval.shape == (): # mval a scalar. * mval = [mval] # make into iterable. * for m in mval: # <<<<<<<<<<<<<< @@ -41790,26 +41792,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __pyx_t_7 = __pyx_v_mval; __Pyx_INCREF(__pyx_t_7); __pyx_t_11 = 0; __pyx_t_12 = NULL; } else { - __pyx_t_11 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_mval); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3884, __pyx_L1_error) + __pyx_t_11 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_mval); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3883, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_12 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3884, __pyx_L1_error) + __pyx_t_12 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3883, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_12)) { if (likely(PyList_CheckExact(__pyx_t_7))) { if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 3884, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 3883, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3884, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3883, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 3884, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 3883, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3884, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3883, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -41819,7 +41821,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 3884, __pyx_L1_error) + else __PYX_ERR(0, 3883, __pyx_L1_error) } break; } @@ -41828,7 +41830,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __Pyx_XDECREF_SET(__pyx_v_m, __pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":3886 + /* "netCDF4/_netCDF4.pyx":3885 * for m in mval: * # is scalar missing value a NaN? * try: # <<<<<<<<<<<<<< @@ -41844,16 +41846,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __Pyx_XGOTREF(__pyx_t_15); /*try:*/ { - /* "netCDF4/_netCDF4.pyx":3887 + /* "netCDF4/_netCDF4.pyx":3886 * # is scalar missing value a NaN? * try: * mvalisnan = numpy.isnan(m) # <<<<<<<<<<<<<< * except TypeError: # isnan fails on some dtypes (issue 206) * mvalisnan = False */ - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3887, __pyx_L25_error) + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3886, __pyx_L25_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_isnan); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3887, __pyx_L25_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_isnan); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3886, __pyx_L25_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -41867,13 +41869,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ } } if (!__pyx_t_5) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_m); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3887, __pyx_L25_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_m); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3886, __pyx_L25_error) __Pyx_GOTREF(__pyx_t_4); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_m}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3887, __pyx_L25_error) + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3886, __pyx_L25_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_4); } else @@ -41881,19 +41883,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_m}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3887, __pyx_L25_error) + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3886, __pyx_L25_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { - __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3887, __pyx_L25_error) + __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3886, __pyx_L25_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_INCREF(__pyx_v_m); __Pyx_GIVEREF(__pyx_v_m); PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_m); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3887, __pyx_L25_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3886, __pyx_L25_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -41902,7 +41904,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __Pyx_XDECREF_SET(__pyx_v_mvalisnan, __pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":3886 + /* "netCDF4/_netCDF4.pyx":3885 * for m in mval: * # is scalar missing value a NaN? * try: # <<<<<<<<<<<<<< @@ -41922,7 +41924,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":3888 + /* "netCDF4/_netCDF4.pyx":3887 * try: * mvalisnan = numpy.isnan(m) * except TypeError: # isnan fails on some dtypes (issue 206) # <<<<<<<<<<<<<< @@ -41932,12 +41934,12 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError); if (__pyx_t_6) { __Pyx_AddTraceback("netCDF4._netCDF4.Variable._toma", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_1, &__pyx_t_2) < 0) __PYX_ERR(0, 3888, __pyx_L27_except_error) + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_1, &__pyx_t_2) < 0) __PYX_ERR(0, 3887, __pyx_L27_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_2); - /* "netCDF4/_netCDF4.pyx":3889 + /* "netCDF4/_netCDF4.pyx":3888 * mvalisnan = numpy.isnan(m) * except TypeError: # isnan fails on some dtypes (issue 206) * mvalisnan = False # <<<<<<<<<<<<<< @@ -41954,7 +41956,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ goto __pyx_L27_except_error; __pyx_L27_except_error:; - /* "netCDF4/_netCDF4.pyx":3886 + /* "netCDF4/_netCDF4.pyx":3885 * for m in mval: * # is scalar missing value a NaN? * try: # <<<<<<<<<<<<<< @@ -41976,26 +41978,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __pyx_L32_try_end:; } - /* "netCDF4/_netCDF4.pyx":3890 + /* "netCDF4/_netCDF4.pyx":3889 * except TypeError: # isnan fails on some dtypes (issue 206) * mvalisnan = False * if mvalisnan: # <<<<<<<<<<<<<< * mvalmask += numpy.isnan(data) * else: */ - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_mvalisnan); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 3890, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_mvalisnan); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 3889, __pyx_L1_error) if (__pyx_t_10) { - /* "netCDF4/_netCDF4.pyx":3891 + /* "netCDF4/_netCDF4.pyx":3890 * mvalisnan = False * if mvalisnan: * mvalmask += numpy.isnan(data) # <<<<<<<<<<<<<< * else: * mvalmask += data==m */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3891, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3890, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_isnan); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3891, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_isnan); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3890, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -42009,13 +42011,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ } } if (!__pyx_t_1) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3891, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3890, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_data}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3891, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3890, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -42023,31 +42025,31 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_data}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3891, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3890, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3891, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3890, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __pyx_t_1 = NULL; __Pyx_INCREF(__pyx_v_data); __Pyx_GIVEREF(__pyx_v_data); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_data); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3891, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3890, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_mvalmask, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3891, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_mvalmask, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3890, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_mvalmask, __pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":3890 + /* "netCDF4/_netCDF4.pyx":3889 * except TypeError: # isnan fails on some dtypes (issue 206) * mvalisnan = False * if mvalisnan: # <<<<<<<<<<<<<< @@ -42057,7 +42059,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ goto __pyx_L35; } - /* "netCDF4/_netCDF4.pyx":3893 + /* "netCDF4/_netCDF4.pyx":3892 * mvalmask += numpy.isnan(data) * else: * mvalmask += data==m # <<<<<<<<<<<<<< @@ -42065,8 +42067,8 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ * # set fill_value for masked array */ /*else*/ { - __pyx_t_4 = PyObject_RichCompare(__pyx_v_data, __pyx_v_m, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3893, __pyx_L1_error) - __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_mvalmask, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3893, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_data, __pyx_v_m, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3892, __pyx_L1_error) + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_mvalmask, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3892, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_mvalmask, __pyx_t_2); @@ -42074,7 +42076,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ } __pyx_L35:; - /* "netCDF4/_netCDF4.pyx":3884 + /* "netCDF4/_netCDF4.pyx":3883 * if mval.shape == (): # mval a scalar. * mval = [mval] # make into iterable. * for m in mval: # <<<<<<<<<<<<<< @@ -42084,14 +42086,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":3894 + /* "netCDF4/_netCDF4.pyx":3893 * else: * mvalmask += data==m * if mvalmask.any(): # <<<<<<<<<<<<<< * # set fill_value for masked array * # to missing_value (or 1st element */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_mvalmask, __pyx_n_s_any); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3894, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_mvalmask, __pyx_n_s_any); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3893, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -42104,42 +42106,42 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ } } if (__pyx_t_4) { - __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3894, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3893, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { - __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3894, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3893, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 3894, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 3893, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_10) { - /* "netCDF4/_netCDF4.pyx":3898 + /* "netCDF4/_netCDF4.pyx":3897 * # to missing_value (or 1st element * # if missing_value is a vector). * fill_value = mval[0] # <<<<<<<<<<<<<< * totalmask += mvalmask * # set mask=True for missing data */ - __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_mval, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3898, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_mval, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3897, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF_SET(__pyx_v_fill_value, __pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":3899 + /* "netCDF4/_netCDF4.pyx":3898 * # if missing_value is a vector). * fill_value = mval[0] * totalmask += mvalmask # <<<<<<<<<<<<<< * # set mask=True for missing data * if hasattr(self, '_FillValue'): */ - __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_totalmask, __pyx_v_mvalmask); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3899, __pyx_L1_error) + __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_totalmask, __pyx_v_mvalmask); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF_SET(__pyx_v_totalmask, __pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":3894 + /* "netCDF4/_netCDF4.pyx":3893 * else: * mvalmask += data==m * if mvalmask.any(): # <<<<<<<<<<<<<< @@ -42148,7 +42150,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":3841 + /* "netCDF4/_netCDF4.pyx":3840 * totalmask = numpy.zeros(data.shape, numpy.bool) * fill_value = None * if hasattr(self, 'missing_value'): # <<<<<<<<<<<<<< @@ -42157,30 +42159,30 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":3901 + /* "netCDF4/_netCDF4.pyx":3900 * totalmask += mvalmask * # set mask=True for missing data * if hasattr(self, '_FillValue'): # <<<<<<<<<<<<<< * fval = numpy.array(self._FillValue, self.dtype) * # is _FillValue a NaN? */ - __pyx_t_10 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_FillValue); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 3901, __pyx_L1_error) + __pyx_t_10 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_FillValue); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 3900, __pyx_L1_error) __pyx_t_9 = (__pyx_t_10 != 0); if (__pyx_t_9) { - /* "netCDF4/_netCDF4.pyx":3902 + /* "netCDF4/_netCDF4.pyx":3901 * # set mask=True for missing data * if hasattr(self, '_FillValue'): * fval = numpy.array(self._FillValue, self.dtype) # <<<<<<<<<<<<<< * # is _FillValue a NaN? * try: */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3902, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3901, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3902, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3901, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_FillValue); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3902, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_FillValue); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3901, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -42197,7 +42199,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_2, __pyx_v_self->dtype}; - __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3902, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3901, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -42206,14 +42208,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_2, __pyx_v_self->dtype}; - __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3902, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3901, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { - __pyx_t_1 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3902, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3901, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -42224,7 +42226,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __Pyx_GIVEREF(__pyx_v_self->dtype); PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_6, __pyx_v_self->dtype); __pyx_t_2 = 0; - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3902, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3901, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } @@ -42232,7 +42234,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __Pyx_XDECREF_SET(__pyx_v_fval, __pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":3904 + /* "netCDF4/_netCDF4.pyx":3903 * fval = numpy.array(self._FillValue, self.dtype) * # is _FillValue a NaN? * try: # <<<<<<<<<<<<<< @@ -42248,16 +42250,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __Pyx_XGOTREF(__pyx_t_13); /*try:*/ { - /* "netCDF4/_netCDF4.pyx":3905 + /* "netCDF4/_netCDF4.pyx":3904 * # is _FillValue a NaN? * try: * fvalisnan = numpy.isnan(fval) # <<<<<<<<<<<<<< * except: # isnan fails on some dtypes (issue 202) * fvalisnan = False */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3905, __pyx_L38_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3904, __pyx_L38_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_isnan); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3905, __pyx_L38_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_isnan); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3904, __pyx_L38_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -42271,13 +42273,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ } } if (!__pyx_t_4) { - __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_fval); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3905, __pyx_L38_error) + __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_fval); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3904, __pyx_L38_error) __Pyx_GOTREF(__pyx_t_7); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_fval}; - __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3905, __pyx_L38_error) + __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3904, __pyx_L38_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_7); } else @@ -42285,19 +42287,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_fval}; - __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3905, __pyx_L38_error) + __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3904, __pyx_L38_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_7); } else #endif { - __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3905, __pyx_L38_error) + __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3904, __pyx_L38_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_INCREF(__pyx_v_fval); __Pyx_GIVEREF(__pyx_v_fval); PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_fval); - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3905, __pyx_L38_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3904, __pyx_L38_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -42306,7 +42308,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __pyx_v_fvalisnan = __pyx_t_7; __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":3904 + /* "netCDF4/_netCDF4.pyx":3903 * fval = numpy.array(self._FillValue, self.dtype) * # is _FillValue a NaN? * try: # <<<<<<<<<<<<<< @@ -42327,7 +42329,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":3906 + /* "netCDF4/_netCDF4.pyx":3905 * try: * fvalisnan = numpy.isnan(fval) * except: # isnan fails on some dtypes (issue 202) # <<<<<<<<<<<<<< @@ -42336,12 +42338,12 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ */ /*except:*/ { __Pyx_AddTraceback("netCDF4._netCDF4.Variable._toma", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_1, &__pyx_t_2) < 0) __PYX_ERR(0, 3906, __pyx_L40_except_error) + if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_1, &__pyx_t_2) < 0) __PYX_ERR(0, 3905, __pyx_L40_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_2); - /* "netCDF4/_netCDF4.pyx":3907 + /* "netCDF4/_netCDF4.pyx":3906 * fvalisnan = numpy.isnan(fval) * except: # isnan fails on some dtypes (issue 202) * fvalisnan = False # <<<<<<<<<<<<<< @@ -42357,7 +42359,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ } __pyx_L40_except_error:; - /* "netCDF4/_netCDF4.pyx":3904 + /* "netCDF4/_netCDF4.pyx":3903 * fval = numpy.array(self._FillValue, self.dtype) * # is _FillValue a NaN? * try: # <<<<<<<<<<<<<< @@ -42379,26 +42381,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __pyx_L45_try_end:; } - /* "netCDF4/_netCDF4.pyx":3908 + /* "netCDF4/_netCDF4.pyx":3907 * except: # isnan fails on some dtypes (issue 202) * fvalisnan = False * if fvalisnan: # <<<<<<<<<<<<<< * mask = numpy.isnan(data) * elif (data == fval).any(): */ - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_fvalisnan); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3908, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_fvalisnan); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3907, __pyx_L1_error) if (__pyx_t_9) { - /* "netCDF4/_netCDF4.pyx":3909 + /* "netCDF4/_netCDF4.pyx":3908 * fvalisnan = False * if fvalisnan: * mask = numpy.isnan(data) # <<<<<<<<<<<<<< * elif (data == fval).any(): * mask = data==fval */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3909, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3908, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_isnan); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3909, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_isnan); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3908, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -42412,13 +42414,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ } } if (!__pyx_t_1) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3909, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3908, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_data}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3909, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3908, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -42426,19 +42428,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_data}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3909, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3908, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3909, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3908, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __pyx_t_1 = NULL; __Pyx_INCREF(__pyx_v_data); __Pyx_GIVEREF(__pyx_v_data); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_data); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3909, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3908, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -42447,7 +42449,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __pyx_v_mask = __pyx_t_2; __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":3908 + /* "netCDF4/_netCDF4.pyx":3907 * except: # isnan fails on some dtypes (issue 202) * fvalisnan = False * if fvalisnan: # <<<<<<<<<<<<<< @@ -42457,15 +42459,15 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ goto __pyx_L48; } - /* "netCDF4/_netCDF4.pyx":3910 + /* "netCDF4/_netCDF4.pyx":3909 * if fvalisnan: * mask = numpy.isnan(data) * elif (data == fval).any(): # <<<<<<<<<<<<<< * mask = data==fval * else: */ - __pyx_t_7 = PyObject_RichCompare(__pyx_v_data, __pyx_v_fval, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3910, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_any); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3910, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(__pyx_v_data, __pyx_v_fval, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3909, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_any); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3909, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; @@ -42479,29 +42481,29 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ } } if (__pyx_t_7) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3910, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3909, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3910, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3909, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3910, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3909, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_9) { - /* "netCDF4/_netCDF4.pyx":3911 + /* "netCDF4/_netCDF4.pyx":3910 * mask = numpy.isnan(data) * elif (data == fval).any(): * mask = data==fval # <<<<<<<<<<<<<< * else: * mask = None */ - __pyx_t_2 = PyObject_RichCompare(__pyx_v_data, __pyx_v_fval, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3911, __pyx_L1_error) + __pyx_t_2 = PyObject_RichCompare(__pyx_v_data, __pyx_v_fval, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3910, __pyx_L1_error) __pyx_v_mask = __pyx_t_2; __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":3910 + /* "netCDF4/_netCDF4.pyx":3909 * if fvalisnan: * mask = numpy.isnan(data) * elif (data == fval).any(): # <<<<<<<<<<<<<< @@ -42511,7 +42513,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ goto __pyx_L48; } - /* "netCDF4/_netCDF4.pyx":3913 + /* "netCDF4/_netCDF4.pyx":3912 * mask = data==fval * else: * mask = None # <<<<<<<<<<<<<< @@ -42524,7 +42526,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ } __pyx_L48:; - /* "netCDF4/_netCDF4.pyx":3914 + /* "netCDF4/_netCDF4.pyx":3913 * else: * mask = None * if mask is not None: # <<<<<<<<<<<<<< @@ -42535,7 +42537,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { - /* "netCDF4/_netCDF4.pyx":3915 + /* "netCDF4/_netCDF4.pyx":3914 * mask = None * if mask is not None: * if fill_value is None: # <<<<<<<<<<<<<< @@ -42546,7 +42548,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __pyx_t_9 = (__pyx_t_10 != 0); if (__pyx_t_9) { - /* "netCDF4/_netCDF4.pyx":3916 + /* "netCDF4/_netCDF4.pyx":3915 * if mask is not None: * if fill_value is None: * fill_value = fval # <<<<<<<<<<<<<< @@ -42556,7 +42558,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __Pyx_INCREF(__pyx_v_fval); __Pyx_DECREF_SET(__pyx_v_fill_value, __pyx_v_fval); - /* "netCDF4/_netCDF4.pyx":3915 + /* "netCDF4/_netCDF4.pyx":3914 * mask = None * if mask is not None: * if fill_value is None: # <<<<<<<<<<<<<< @@ -42565,19 +42567,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":3917 + /* "netCDF4/_netCDF4.pyx":3916 * if fill_value is None: * fill_value = fval * totalmask += mask # <<<<<<<<<<<<<< * # issue 209: don't return masked array if variable filling * # is disabled. */ - __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_totalmask, __pyx_v_mask); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3917, __pyx_L1_error) + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_totalmask, __pyx_v_mask); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3916, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_totalmask, __pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":3914 + /* "netCDF4/_netCDF4.pyx":3913 * else: * mask = None * if mask is not None: # <<<<<<<<<<<<<< @@ -42586,7 +42588,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":3901 + /* "netCDF4/_netCDF4.pyx":3900 * totalmask += mvalmask * # set mask=True for missing data * if hasattr(self, '_FillValue'): # <<<<<<<<<<<<<< @@ -42596,7 +42598,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ goto __pyx_L37; } - /* "netCDF4/_netCDF4.pyx":3921 + /* "netCDF4/_netCDF4.pyx":3920 * # is disabled. * else: * with nogil: # <<<<<<<<<<<<<< @@ -42611,7 +42613,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":3922 + /* "netCDF4/_netCDF4.pyx":3921 * else: * with nogil: * ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL) # <<<<<<<<<<<<<< @@ -42621,7 +42623,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __pyx_v_ierr = nc_inq_var_fill(__pyx_v_self->_grpid, __pyx_v_self->_varid, (&__pyx_v_no_fill), NULL); } - /* "netCDF4/_netCDF4.pyx":3921 + /* "netCDF4/_netCDF4.pyx":3920 * # is disabled. * else: * with nogil: # <<<<<<<<<<<<<< @@ -42639,7 +42641,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ } } - /* "netCDF4/_netCDF4.pyx":3923 + /* "netCDF4/_netCDF4.pyx":3922 * with nogil: * ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -42649,7 +42651,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __pyx_t_9 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_9) { - /* "netCDF4/_netCDF4.pyx":3924 + /* "netCDF4/_netCDF4.pyx":3923 * ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -42657,22 +42659,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ * # from http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-c/Fill-Values.html#Fill-Values */ __pyx_t_16 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_16, 0, strlen(__pyx_t_16), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3924, __pyx_L1_error) + __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_16, 0, strlen(__pyx_t_16), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3923, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3924, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3923, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3924, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3923, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 3924, __pyx_L1_error) + __PYX_ERR(0, 3923, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3923 + /* "netCDF4/_netCDF4.pyx":3922 * with nogil: * ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -42681,7 +42683,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":3937 + /* "netCDF4/_netCDF4.pyx":3936 * # small to assume one of the values should appear as a missing * # value unless a _FillValue attribute is set explicitly." * if no_fill != 1 and self.dtype.str[1:] not in ['u1','i1']: # <<<<<<<<<<<<<< @@ -42694,18 +42696,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __pyx_t_9 = __pyx_t_10; goto __pyx_L56_bool_binop_done; } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3937, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3936, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_t_2, 1, 0, NULL, NULL, &__pyx_slice__63, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3937, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_t_2, 1, 0, NULL, NULL, &__pyx_slice__63, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3936, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_u1, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3937, __pyx_L1_error) + __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_u1, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3936, __pyx_L1_error) if (__pyx_t_8) { } else { __pyx_t_10 = __pyx_t_8; goto __pyx_L58_bool_binop_done; } - __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_i1, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3937, __pyx_L1_error) + __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_i1, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3936, __pyx_L1_error) __pyx_t_10 = __pyx_t_8; __pyx_L58_bool_binop_done:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -42714,26 +42716,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __pyx_L56_bool_binop_done:; if (__pyx_t_9) { - /* "netCDF4/_netCDF4.pyx":3938 + /* "netCDF4/_netCDF4.pyx":3937 * # value unless a _FillValue attribute is set explicitly." * if no_fill != 1 and self.dtype.str[1:] not in ['u1','i1']: * fillval = numpy.array(default_fillvals[self.dtype.str[1:]],self.dtype) # <<<<<<<<<<<<<< * has_fillval = data == fillval * # if data is an array scalar, has_fillval will be a boolean. */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3938, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3937, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3938, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3937, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_fillvals); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3938, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_fillvals); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3937, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_str); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3938, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_str); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3937, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_1, 1, 0, NULL, NULL, &__pyx_slice__64, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3938, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_1, 1, 0, NULL, NULL, &__pyx_slice__64, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3937, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_GetItem(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3938, __pyx_L1_error) + __pyx_t_1 = PyObject_GetItem(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3937, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -42752,7 +42754,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_v_self->dtype}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3938, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3937, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -42761,14 +42763,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_v_self->dtype}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3938, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3937, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else #endif { - __pyx_t_2 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3938, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3937, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -42779,7 +42781,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __Pyx_GIVEREF(__pyx_v_self->dtype); PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_6, __pyx_v_self->dtype); __pyx_t_1 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3938, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3937, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -42787,31 +42789,31 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __pyx_v_fillval = __pyx_t_4; __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":3939 + /* "netCDF4/_netCDF4.pyx":3938 * if no_fill != 1 and self.dtype.str[1:] not in ['u1','i1']: * fillval = numpy.array(default_fillvals[self.dtype.str[1:]],self.dtype) * has_fillval = data == fillval # <<<<<<<<<<<<<< * # if data is an array scalar, has_fillval will be a boolean. * # in that case convert to an array. */ - __pyx_t_4 = PyObject_RichCompare(__pyx_v_data, __pyx_v_fillval, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3939, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_data, __pyx_v_fillval, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3938, __pyx_L1_error) __pyx_v_has_fillval = __pyx_t_4; __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":3942 + /* "netCDF4/_netCDF4.pyx":3941 * # if data is an array scalar, has_fillval will be a boolean. * # in that case convert to an array. * if type(has_fillval) == bool: has_fillval=numpy.asarray(has_fillval) # <<<<<<<<<<<<<< * if has_fillval.any(): * mask=data==fillval */ - __pyx_t_4 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_has_fillval)), ((PyObject*)&PyBool_Type), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3942, __pyx_L1_error) - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3942, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_has_fillval)), ((PyObject*)&PyBool_Type), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3941, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3941, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_9) { - __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3942, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3941, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3942, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3941, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; @@ -42825,13 +42827,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ } } if (!__pyx_t_7) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_has_fillval); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3942, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_has_fillval); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3941, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_has_fillval}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3942, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3941, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_4); } else @@ -42839,19 +42841,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_has_fillval}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3942, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3941, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { - __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3942, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3941, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7); __pyx_t_7 = NULL; __Pyx_INCREF(__pyx_v_has_fillval); __Pyx_GIVEREF(__pyx_v_has_fillval); PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_has_fillval); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3942, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3941, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } @@ -42861,14 +42863,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __pyx_t_4 = 0; } - /* "netCDF4/_netCDF4.pyx":3943 + /* "netCDF4/_netCDF4.pyx":3942 * # in that case convert to an array. * if type(has_fillval) == bool: has_fillval=numpy.asarray(has_fillval) * if has_fillval.any(): # <<<<<<<<<<<<<< * mask=data==fillval * if fill_value is None: */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_has_fillval, __pyx_n_s_any); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3943, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_has_fillval, __pyx_n_s_any); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3942, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -42881,29 +42883,29 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ } } if (__pyx_t_1) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3943, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3942, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3943, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3942, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3943, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3942, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_9) { - /* "netCDF4/_netCDF4.pyx":3944 + /* "netCDF4/_netCDF4.pyx":3943 * if type(has_fillval) == bool: has_fillval=numpy.asarray(has_fillval) * if has_fillval.any(): * mask=data==fillval # <<<<<<<<<<<<<< * if fill_value is None: * fill_value = fillval */ - __pyx_t_4 = PyObject_RichCompare(__pyx_v_data, __pyx_v_fillval, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3944, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_data, __pyx_v_fillval, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3943, __pyx_L1_error) __pyx_v_mask = __pyx_t_4; __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":3945 + /* "netCDF4/_netCDF4.pyx":3944 * if has_fillval.any(): * mask=data==fillval * if fill_value is None: # <<<<<<<<<<<<<< @@ -42914,7 +42916,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __pyx_t_8 = (__pyx_t_9 != 0); if (__pyx_t_8) { - /* "netCDF4/_netCDF4.pyx":3946 + /* "netCDF4/_netCDF4.pyx":3945 * mask=data==fillval * if fill_value is None: * fill_value = fillval # <<<<<<<<<<<<<< @@ -42924,7 +42926,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __Pyx_INCREF(__pyx_v_fillval); __Pyx_DECREF_SET(__pyx_v_fill_value, __pyx_v_fillval); - /* "netCDF4/_netCDF4.pyx":3945 + /* "netCDF4/_netCDF4.pyx":3944 * if has_fillval.any(): * mask=data==fillval * if fill_value is None: # <<<<<<<<<<<<<< @@ -42933,19 +42935,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":3947 + /* "netCDF4/_netCDF4.pyx":3946 * if fill_value is None: * fill_value = fillval * totalmask += mask # <<<<<<<<<<<<<< * # all values where data == missing_value or _FillValue are * # masked. fill_value set to missing_value if it exists, */ - __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_totalmask, __pyx_v_mask); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3947, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_totalmask, __pyx_v_mask); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3946, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_totalmask, __pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":3943 + /* "netCDF4/_netCDF4.pyx":3942 * # in that case convert to an array. * if type(has_fillval) == bool: has_fillval=numpy.asarray(has_fillval) * if has_fillval.any(): # <<<<<<<<<<<<<< @@ -42954,7 +42956,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":3937 + /* "netCDF4/_netCDF4.pyx":3936 * # small to assume one of the values should appear as a missing * # value unless a _FillValue attribute is set explicitly." * if no_fill != 1 and self.dtype.str[1:] not in ['u1','i1']: # <<<<<<<<<<<<<< @@ -42965,7 +42967,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ } __pyx_L37:; - /* "netCDF4/_netCDF4.pyx":3951 + /* "netCDF4/_netCDF4.pyx":3950 * # masked. fill_value set to missing_value if it exists, * # otherwise _FillValue. * if fill_value is not None: # <<<<<<<<<<<<<< @@ -42976,28 +42978,28 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { - /* "netCDF4/_netCDF4.pyx":3952 + /* "netCDF4/_netCDF4.pyx":3951 * # otherwise _FillValue. * if fill_value is not None: * data = ma.masked_array(data,mask=totalmask,fill_value=fill_value) # <<<<<<<<<<<<<< * # issue 515 scalar array with mask=True should be converted * # to numpy.ma.MaskedConstant to be consistent with slicing */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3952, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3951, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_masked_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3952, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_masked_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3951, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3952, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3951, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_data); __Pyx_GIVEREF(__pyx_v_data); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_data); - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3952, __pyx_L1_error) + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3951, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_mask, __pyx_v_totalmask) < 0) __PYX_ERR(0, 3952, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_fill_value, __pyx_v_fill_value) < 0) __PYX_ERR(0, 3952, __pyx_L1_error) - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3952, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_mask, __pyx_v_totalmask) < 0) __PYX_ERR(0, 3951, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_fill_value, __pyx_v_fill_value) < 0) __PYX_ERR(0, 3951, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3951, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -43005,27 +43007,27 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":3956 + /* "netCDF4/_netCDF4.pyx":3955 * # to numpy.ma.MaskedConstant to be consistent with slicing * # behavior of masked arrays. * if data.shape == () and data.mask.all(): # <<<<<<<<<<<<<< * data = data[...] * return data */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3956, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3955, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_1 = PyObject_RichCompare(__pyx_t_7, __pyx_empty_tuple, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3956, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_t_7, __pyx_empty_tuple, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3955, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3956, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3955, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_8) { } else { __pyx_t_9 = __pyx_t_8; goto __pyx_L65_bool_binop_done; } - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_mask); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3956, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_mask); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3955, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_all); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3956, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_all); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3955, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; @@ -43039,32 +43041,32 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ } } if (__pyx_t_7) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3956, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3955, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3956, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3955, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3956, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3955, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = __pyx_t_8; __pyx_L65_bool_binop_done:; if (__pyx_t_9) { - /* "netCDF4/_netCDF4.pyx":3957 + /* "netCDF4/_netCDF4.pyx":3956 * # behavior of masked arrays. * if data.shape == () and data.mask.all(): * data = data[...] # <<<<<<<<<<<<<< * return data * */ - __pyx_t_1 = PyObject_GetItem(__pyx_v_data, Py_Ellipsis); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3957, __pyx_L1_error) + __pyx_t_1 = PyObject_GetItem(__pyx_v_data, Py_Ellipsis); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3956, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":3956 + /* "netCDF4/_netCDF4.pyx":3955 * # to numpy.ma.MaskedConstant to be consistent with slicing * # behavior of masked arrays. * if data.shape == () and data.mask.all(): # <<<<<<<<<<<<<< @@ -43073,7 +43075,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":3951 + /* "netCDF4/_netCDF4.pyx":3950 * # masked. fill_value set to missing_value if it exists, * # otherwise _FillValue. * if fill_value is not None: # <<<<<<<<<<<<<< @@ -43082,7 +43084,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":3958 + /* "netCDF4/_netCDF4.pyx":3957 * if data.shape == () and data.mask.all(): * data = data[...] * return data # <<<<<<<<<<<<<< @@ -43094,7 +43096,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __pyx_r = __pyx_v_data; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":3835 + /* "netCDF4/_netCDF4.pyx":3834 * return data * * def _toma(self,data): # <<<<<<<<<<<<<< @@ -43132,7 +43134,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":3960 +/* "netCDF4/_netCDF4.pyx":3959 * return data * * def _assign_vlen(self, elem, data): # <<<<<<<<<<<<<< @@ -43169,11 +43171,11 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_49_assign_vlen(PyObject * case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_assign_vlen", 1, 2, 2, 1); __PYX_ERR(0, 3960, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_assign_vlen", 1, 2, 2, 1); __PYX_ERR(0, 3959, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_assign_vlen") < 0)) __PYX_ERR(0, 3960, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_assign_vlen") < 0)) __PYX_ERR(0, 3959, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -43186,7 +43188,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_49_assign_vlen(PyObject * } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_assign_vlen", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3960, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_assign_vlen", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3959, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("netCDF4._netCDF4.Variable._assign_vlen", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -43231,31 +43233,31 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p __Pyx_RefNannySetupContext("_assign_vlen", 0); __Pyx_INCREF(__pyx_v_elem); - /* "netCDF4/_netCDF4.pyx":3968 + /* "netCDF4/_netCDF4.pyx":3967 * cdef char **strdata * cdef ndarray data2 * if not self._isvlen: # <<<<<<<<<<<<<< * raise TypeError('_assign_vlen method only for use with VLEN variables') * ndims = self.ndim */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3968, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3967, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":3969 + /* "netCDF4/_netCDF4.pyx":3968 * cdef ndarray data2 * if not self._isvlen: * raise TypeError('_assign_vlen method only for use with VLEN variables') # <<<<<<<<<<<<<< * ndims = self.ndim * msg="data can only be assigned to VLEN variables using integer indices" */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3969, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3968, __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, 3969, __pyx_L1_error) + __PYX_ERR(0, 3968, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3968 + /* "netCDF4/_netCDF4.pyx":3967 * cdef char **strdata * cdef ndarray data2 * if not self._isvlen: # <<<<<<<<<<<<<< @@ -43264,17 +43266,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p */ } - /* "netCDF4/_netCDF4.pyx":3970 + /* "netCDF4/_netCDF4.pyx":3969 * if not self._isvlen: * raise TypeError('_assign_vlen method only for use with VLEN variables') * ndims = self.ndim # <<<<<<<<<<<<<< * msg="data can only be assigned to VLEN variables using integer indices" * # check to see that elem is a tuple of integers. */ - __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_self->ndim); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3970, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_self->ndim); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3969, __pyx_L1_error) __pyx_v_ndims = __pyx_t_4; - /* "netCDF4/_netCDF4.pyx":3971 + /* "netCDF4/_netCDF4.pyx":3970 * raise TypeError('_assign_vlen method only for use with VLEN variables') * ndims = self.ndim * msg="data can only be assigned to VLEN variables using integer indices" # <<<<<<<<<<<<<< @@ -43284,7 +43286,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p __Pyx_INCREF(__pyx_kp_s_data_can_only_be_assigned_to_VLE); __pyx_v_msg = __pyx_kp_s_data_can_only_be_assigned_to_VLE; - /* "netCDF4/_netCDF4.pyx":3974 + /* "netCDF4/_netCDF4.pyx":3973 * # check to see that elem is a tuple of integers. * # handle negative integers. * if isinstance(elem, int): # <<<<<<<<<<<<<< @@ -43295,7 +43297,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":3975 + /* "netCDF4/_netCDF4.pyx":3974 * # handle negative integers. * if isinstance(elem, int): * if ndims > 1: # <<<<<<<<<<<<<< @@ -43305,26 +43307,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p __pyx_t_1 = ((__pyx_v_ndims > 1) != 0); if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":3976 + /* "netCDF4/_netCDF4.pyx":3975 * if isinstance(elem, int): * if ndims > 1: * raise IndexError(msg) # <<<<<<<<<<<<<< * if elem < 0: * if self.shape[0]+elem >= 0: */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3976, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3975, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_msg); __Pyx_GIVEREF(__pyx_v_msg); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_msg); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3976, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3975, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __PYX_ERR(0, 3976, __pyx_L1_error) + __PYX_ERR(0, 3975, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3975 + /* "netCDF4/_netCDF4.pyx":3974 * # handle negative integers. * if isinstance(elem, int): * if ndims > 1: # <<<<<<<<<<<<<< @@ -43333,58 +43335,58 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p */ } - /* "netCDF4/_netCDF4.pyx":3977 + /* "netCDF4/_netCDF4.pyx":3976 * if ndims > 1: * raise IndexError(msg) * if elem < 0: # <<<<<<<<<<<<<< * if self.shape[0]+elem >= 0: * elem = self.shape[0]+elem */ - __pyx_t_5 = PyObject_RichCompare(__pyx_v_elem, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3977, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3977, __pyx_L1_error) + __pyx_t_5 = PyObject_RichCompare(__pyx_v_elem, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3976, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3976, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":3978 + /* "netCDF4/_netCDF4.pyx":3977 * raise IndexError(msg) * if elem < 0: * if self.shape[0]+elem >= 0: # <<<<<<<<<<<<<< * elem = self.shape[0]+elem * else: */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3978, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3977, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3978, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3977, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyNumber_Add(__pyx_t_3, __pyx_v_elem); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3978, __pyx_L1_error) + __pyx_t_5 = PyNumber_Add(__pyx_t_3, __pyx_v_elem); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3977, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3978, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3977, __pyx_L1_error) __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, 3978, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3977, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":3979 + /* "netCDF4/_netCDF4.pyx":3978 * if elem < 0: * if self.shape[0]+elem >= 0: * elem = self.shape[0]+elem # <<<<<<<<<<<<<< * else: * raise IndexError("Illegal index") */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3979, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3978, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3979, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3978, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyNumber_Add(__pyx_t_5, __pyx_v_elem); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3979, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_t_5, __pyx_v_elem); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3978, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_elem, __pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":3978 + /* "netCDF4/_netCDF4.pyx":3977 * raise IndexError(msg) * if elem < 0: * if self.shape[0]+elem >= 0: # <<<<<<<<<<<<<< @@ -43394,7 +43396,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p goto __pyx_L7; } - /* "netCDF4/_netCDF4.pyx":3981 + /* "netCDF4/_netCDF4.pyx":3980 * elem = self.shape[0]+elem * else: * raise IndexError("Illegal index") # <<<<<<<<<<<<<< @@ -43402,15 +43404,15 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p * if len(elem) != ndims: */ /*else*/ { - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3981, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3980, __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, 3981, __pyx_L1_error) + __PYX_ERR(0, 3980, __pyx_L1_error) } __pyx_L7:; - /* "netCDF4/_netCDF4.pyx":3977 + /* "netCDF4/_netCDF4.pyx":3976 * if ndims > 1: * raise IndexError(msg) * if elem < 0: # <<<<<<<<<<<<<< @@ -43419,7 +43421,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p */ } - /* "netCDF4/_netCDF4.pyx":3974 + /* "netCDF4/_netCDF4.pyx":3973 * # check to see that elem is a tuple of integers. * # handle negative integers. * if isinstance(elem, int): # <<<<<<<<<<<<<< @@ -43429,7 +43431,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p goto __pyx_L4; } - /* "netCDF4/_netCDF4.pyx":3982 + /* "netCDF4/_netCDF4.pyx":3981 * else: * raise IndexError("Illegal index") * elif isinstance(elem, tuple): # <<<<<<<<<<<<<< @@ -43440,31 +43442,31 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":3983 + /* "netCDF4/_netCDF4.pyx":3982 * raise IndexError("Illegal index") * elif isinstance(elem, tuple): * if len(elem) != ndims: # <<<<<<<<<<<<<< * raise IndexError("Illegal index") * elemnew = [] */ - __pyx_t_6 = PyObject_Length(__pyx_v_elem); if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(0, 3983, __pyx_L1_error) + __pyx_t_6 = PyObject_Length(__pyx_v_elem); if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(0, 3982, __pyx_L1_error) __pyx_t_2 = ((__pyx_t_6 != __pyx_v_ndims) != 0); if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":3984 + /* "netCDF4/_netCDF4.pyx":3983 * elif isinstance(elem, tuple): * if len(elem) != ndims: * raise IndexError("Illegal index") # <<<<<<<<<<<<<< * elemnew = [] * for n,e in enumerate(elem): */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__67, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3984, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__67, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3983, __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, 3984, __pyx_L1_error) + __PYX_ERR(0, 3983, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3983 + /* "netCDF4/_netCDF4.pyx":3982 * raise IndexError("Illegal index") * elif isinstance(elem, tuple): * if len(elem) != ndims: # <<<<<<<<<<<<<< @@ -43473,19 +43475,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p */ } - /* "netCDF4/_netCDF4.pyx":3985 + /* "netCDF4/_netCDF4.pyx":3984 * if len(elem) != ndims: * raise IndexError("Illegal index") * elemnew = [] # <<<<<<<<<<<<<< * for n,e in enumerate(elem): * if not isinstance(e, int): */ - __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3985, __pyx_L1_error) + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3984, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_elemnew = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":3986 + /* "netCDF4/_netCDF4.pyx":3985 * raise IndexError("Illegal index") * elemnew = [] * for n,e in enumerate(elem): # <<<<<<<<<<<<<< @@ -43497,26 +43499,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p __pyx_t_3 = __pyx_v_elem; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_elem); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3986, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_elem); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3985, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3986, __pyx_L1_error) + __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3985, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 3986, __pyx_L1_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 3985, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3986, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3985, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 3986, __pyx_L1_error) + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 3985, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3986, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3985, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } @@ -43526,7 +43528,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 3986, __pyx_L1_error) + else __PYX_ERR(0, 3985, __pyx_L1_error) } break; } @@ -43537,7 +43539,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p __pyx_v_n = __pyx_t_4; __pyx_t_4 = (__pyx_t_4 + 1); - /* "netCDF4/_netCDF4.pyx":3987 + /* "netCDF4/_netCDF4.pyx":3986 * elemnew = [] * for n,e in enumerate(elem): * if not isinstance(e, int): # <<<<<<<<<<<<<< @@ -43548,26 +43550,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0); if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":3988 + /* "netCDF4/_netCDF4.pyx":3987 * for n,e in enumerate(elem): * if not isinstance(e, int): * raise IndexError(msg) # <<<<<<<<<<<<<< * elif e < 0: * enew = self.shape[n]+e */ - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3988, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3987, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_msg); __Pyx_GIVEREF(__pyx_v_msg); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_msg); - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3988, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3987, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __PYX_ERR(0, 3988, __pyx_L1_error) + __PYX_ERR(0, 3987, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3987 + /* "netCDF4/_netCDF4.pyx":3986 * elemnew = [] * for n,e in enumerate(elem): * if not isinstance(e, int): # <<<<<<<<<<<<<< @@ -43576,62 +43578,62 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p */ } - /* "netCDF4/_netCDF4.pyx":3989 + /* "netCDF4/_netCDF4.pyx":3988 * if not isinstance(e, int): * raise IndexError(msg) * elif e < 0: # <<<<<<<<<<<<<< * enew = self.shape[n]+e * if enew < 0: */ - __pyx_t_8 = PyObject_RichCompare(__pyx_v_e, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3989, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3989, __pyx_L1_error) + __pyx_t_8 = PyObject_RichCompare(__pyx_v_e, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3988, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3988, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":3990 + /* "netCDF4/_netCDF4.pyx":3989 * raise IndexError(msg) * elif e < 0: * enew = self.shape[n]+e # <<<<<<<<<<<<<< * if enew < 0: * raise IndexError("Illegal index") */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shape); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3990, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shape); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3989, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_8, __pyx_v_n, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3990, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_8, __pyx_v_n, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3989, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = PyNumber_Add(__pyx_t_5, __pyx_v_e); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3990, __pyx_L1_error) + __pyx_t_8 = PyNumber_Add(__pyx_t_5, __pyx_v_e); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3989, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_enew, __pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":3991 + /* "netCDF4/_netCDF4.pyx":3990 * elif e < 0: * enew = self.shape[n]+e * if enew < 0: # <<<<<<<<<<<<<< * raise IndexError("Illegal index") * else: */ - __pyx_t_8 = PyObject_RichCompare(__pyx_v_enew, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3991, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3991, __pyx_L1_error) + __pyx_t_8 = PyObject_RichCompare(__pyx_v_enew, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3990, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3990, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":3992 + /* "netCDF4/_netCDF4.pyx":3991 * enew = self.shape[n]+e * if enew < 0: * raise IndexError("Illegal index") # <<<<<<<<<<<<<< * else: * elemnew.append(self.shape[n]+e) */ - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__68, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3992, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__68, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3991, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __PYX_ERR(0, 3992, __pyx_L1_error) + __PYX_ERR(0, 3991, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3991 + /* "netCDF4/_netCDF4.pyx":3990 * elif e < 0: * enew = self.shape[n]+e * if enew < 0: # <<<<<<<<<<<<<< @@ -43640,7 +43642,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p */ } - /* "netCDF4/_netCDF4.pyx":3994 + /* "netCDF4/_netCDF4.pyx":3993 * raise IndexError("Illegal index") * else: * elemnew.append(self.shape[n]+e) # <<<<<<<<<<<<<< @@ -43648,19 +43650,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p * elemnew.append(e) */ /*else*/ { - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shape); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3994, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shape); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3993, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_8, __pyx_v_n, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3994, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_8, __pyx_v_n, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3993, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = PyNumber_Add(__pyx_t_5, __pyx_v_e); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3994, __pyx_L1_error) + __pyx_t_8 = PyNumber_Add(__pyx_t_5, __pyx_v_e); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3993, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_elemnew, __pyx_t_8); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 3994, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_elemnew, __pyx_t_8); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 3993, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } - /* "netCDF4/_netCDF4.pyx":3989 + /* "netCDF4/_netCDF4.pyx":3988 * if not isinstance(e, int): * raise IndexError(msg) * elif e < 0: # <<<<<<<<<<<<<< @@ -43670,7 +43672,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p goto __pyx_L11; } - /* "netCDF4/_netCDF4.pyx":3996 + /* "netCDF4/_netCDF4.pyx":3995 * elemnew.append(self.shape[n]+e) * else: * elemnew.append(e) # <<<<<<<<<<<<<< @@ -43678,11 +43680,11 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p * else: */ /*else*/ { - __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_elemnew, __pyx_v_e); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 3996, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_elemnew, __pyx_v_e); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 3995, __pyx_L1_error) } __pyx_L11:; - /* "netCDF4/_netCDF4.pyx":3986 + /* "netCDF4/_netCDF4.pyx":3985 * raise IndexError("Illegal index") * elemnew = [] * for n,e in enumerate(elem): # <<<<<<<<<<<<<< @@ -43692,19 +43694,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":3997 + /* "netCDF4/_netCDF4.pyx":3996 * else: * elemnew.append(e) * elem = tuple(elemnew) # <<<<<<<<<<<<<< * else: * raise IndexError(msg) */ - __pyx_t_3 = PyList_AsTuple(__pyx_v_elemnew); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3997, __pyx_L1_error) + __pyx_t_3 = PyList_AsTuple(__pyx_v_elemnew); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3996, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_elem, __pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":3982 + /* "netCDF4/_netCDF4.pyx":3981 * else: * raise IndexError("Illegal index") * elif isinstance(elem, tuple): # <<<<<<<<<<<<<< @@ -43714,7 +43716,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p goto __pyx_L4; } - /* "netCDF4/_netCDF4.pyx":3999 + /* "netCDF4/_netCDF4.pyx":3998 * elem = tuple(elemnew) * else: * raise IndexError(msg) # <<<<<<<<<<<<<< @@ -43722,21 +43724,21 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p * if isinstance(elem, tuple): */ /*else*/ { - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3999, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_msg); __Pyx_GIVEREF(__pyx_v_msg); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_msg); - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3999, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __PYX_ERR(0, 3999, __pyx_L1_error) + __PYX_ERR(0, 3998, __pyx_L1_error) } __pyx_L4:; - /* "netCDF4/_netCDF4.pyx":4001 + /* "netCDF4/_netCDF4.pyx":4000 * raise IndexError(msg) * # set start, count * if isinstance(elem, tuple): # <<<<<<<<<<<<<< @@ -43747,19 +43749,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":4002 + /* "netCDF4/_netCDF4.pyx":4001 * # set start, count * if isinstance(elem, tuple): * start = list(elem) # <<<<<<<<<<<<<< * else: * start = [elem] */ - __pyx_t_8 = PySequence_List(__pyx_v_elem); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4002, __pyx_L1_error) + __pyx_t_8 = PySequence_List(__pyx_v_elem); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4001, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_v_start = ((PyObject*)__pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":4001 + /* "netCDF4/_netCDF4.pyx":4000 * raise IndexError(msg) * # set start, count * if isinstance(elem, tuple): # <<<<<<<<<<<<<< @@ -43769,7 +43771,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p goto __pyx_L13; } - /* "netCDF4/_netCDF4.pyx":4004 + /* "netCDF4/_netCDF4.pyx":4003 * start = list(elem) * else: * start = [elem] # <<<<<<<<<<<<<< @@ -43777,7 +43779,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p * startp = malloc(sizeof(size_t) * ndims) */ /*else*/ { - __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4004, __pyx_L1_error) + __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4003, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_elem); __Pyx_GIVEREF(__pyx_v_elem); @@ -43787,14 +43789,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p } __pyx_L13:; - /* "netCDF4/_netCDF4.pyx":4005 + /* "netCDF4/_netCDF4.pyx":4004 * else: * start = [elem] * count = [1]*ndims # <<<<<<<<<<<<<< * startp = malloc(sizeof(size_t) * ndims) * countp = malloc(sizeof(size_t) * ndims) */ - __pyx_t_8 = PyList_New(1 * ((__pyx_v_ndims<0) ? 0:__pyx_v_ndims)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4005, __pyx_L1_error) + __pyx_t_8 = PyList_New(1 * ((__pyx_v_ndims<0) ? 0:__pyx_v_ndims)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4004, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < __pyx_v_ndims; __pyx_temp++) { @@ -43806,7 +43808,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p __pyx_v_count = ((PyObject*)__pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":4006 + /* "netCDF4/_netCDF4.pyx":4005 * start = [elem] * count = [1]*ndims * startp = malloc(sizeof(size_t) * ndims) # <<<<<<<<<<<<<< @@ -43815,7 +43817,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p */ __pyx_v_startp = ((size_t *)malloc(((sizeof(size_t)) * __pyx_v_ndims))); - /* "netCDF4/_netCDF4.pyx":4007 + /* "netCDF4/_netCDF4.pyx":4006 * count = [1]*ndims * startp = malloc(sizeof(size_t) * ndims) * countp = malloc(sizeof(size_t) * ndims) # <<<<<<<<<<<<<< @@ -43824,7 +43826,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p */ __pyx_v_countp = ((size_t *)malloc(((sizeof(size_t)) * __pyx_v_ndims))); - /* "netCDF4/_netCDF4.pyx":4008 + /* "netCDF4/_netCDF4.pyx":4007 * startp = malloc(sizeof(size_t) * ndims) * countp = malloc(sizeof(size_t) * ndims) * for n from 0 <= n < ndims: # <<<<<<<<<<<<<< @@ -43834,46 +43836,46 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p __pyx_t_4 = __pyx_v_ndims; for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_4; __pyx_v_n++) { - /* "netCDF4/_netCDF4.pyx":4009 + /* "netCDF4/_netCDF4.pyx":4008 * countp = malloc(sizeof(size_t) * ndims) * for n from 0 <= n < ndims: * startp[n] = start[n] # <<<<<<<<<<<<<< * countp[n] = count[n] * if self.dtype == str: # VLEN string */ - __pyx_t_8 = __Pyx_GetItemInt_List(__pyx_v_start, __pyx_v_n, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4009, __pyx_L1_error) + __pyx_t_8 = __Pyx_GetItemInt_List(__pyx_v_start, __pyx_v_n, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4008, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_10 = __Pyx_PyInt_As_size_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4009, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_As_size_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4008, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; (__pyx_v_startp[__pyx_v_n]) = __pyx_t_10; - /* "netCDF4/_netCDF4.pyx":4010 + /* "netCDF4/_netCDF4.pyx":4009 * for n from 0 <= n < ndims: * startp[n] = start[n] * countp[n] = count[n] # <<<<<<<<<<<<<< * if self.dtype == str: # VLEN string * strdata = malloc(sizeof(char *)) */ - __pyx_t_8 = __Pyx_GetItemInt_List(__pyx_v_count, __pyx_v_n, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4010, __pyx_L1_error) + __pyx_t_8 = __Pyx_GetItemInt_List(__pyx_v_count, __pyx_v_n, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4009, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_10 = __Pyx_PyInt_As_size_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4010, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_As_size_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4009, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; (__pyx_v_countp[__pyx_v_n]) = __pyx_t_10; } - /* "netCDF4/_netCDF4.pyx":4011 + /* "netCDF4/_netCDF4.pyx":4010 * startp[n] = start[n] * countp[n] = count[n] * if self.dtype == str: # VLEN string # <<<<<<<<<<<<<< * strdata = malloc(sizeof(char *)) * bytestr = _strencode(data) */ - __pyx_t_8 = PyObject_RichCompare(__pyx_v_self->dtype, ((PyObject *)(&PyString_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4011, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4011, __pyx_L1_error) + __pyx_t_8 = PyObject_RichCompare(__pyx_v_self->dtype, ((PyObject *)(&PyString_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4010, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4010, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":4012 + /* "netCDF4/_netCDF4.pyx":4011 * countp[n] = count[n] * if self.dtype == str: # VLEN string * strdata = malloc(sizeof(char *)) # <<<<<<<<<<<<<< @@ -43882,29 +43884,29 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p */ __pyx_v_strdata = ((char **)malloc((sizeof(char *)))); - /* "netCDF4/_netCDF4.pyx":4013 + /* "netCDF4/_netCDF4.pyx":4012 * if self.dtype == str: # VLEN string * strdata = malloc(sizeof(char *)) * bytestr = _strencode(data) # <<<<<<<<<<<<<< * strdata[0] = bytestr * ierr = nc_put_vara(self._grpid, self._varid, */ - __pyx_t_8 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_data, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4013, __pyx_L1_error) + __pyx_t_8 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_data, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4012, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_v_bytestr = __pyx_t_8; __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":4014 + /* "netCDF4/_netCDF4.pyx":4013 * strdata = malloc(sizeof(char *)) * bytestr = _strencode(data) * strdata[0] = bytestr # <<<<<<<<<<<<<< * ierr = nc_put_vara(self._grpid, self._varid, * startp, countp, strdata) */ - __pyx_t_11 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(0, 4014, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(0, 4013, __pyx_L1_error) (__pyx_v_strdata[0]) = __pyx_t_11; - /* "netCDF4/_netCDF4.pyx":4015 + /* "netCDF4/_netCDF4.pyx":4014 * bytestr = _strencode(data) * strdata[0] = bytestr * ierr = nc_put_vara(self._grpid, self._varid, # <<<<<<<<<<<<<< @@ -43913,7 +43915,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p */ __pyx_v_ierr = nc_put_vara(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_startp, __pyx_v_countp, __pyx_v_strdata); - /* "netCDF4/_netCDF4.pyx":4017 + /* "netCDF4/_netCDF4.pyx":4016 * ierr = nc_put_vara(self._grpid, self._varid, * startp, countp, strdata) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -43923,7 +43925,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p __pyx_t_2 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":4018 + /* "netCDF4/_netCDF4.pyx":4017 * startp, countp, strdata) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -43931,22 +43933,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p * else: # regular VLEN */ __pyx_t_11 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_8 = __Pyx_decode_c_string(__pyx_t_11, 0, strlen(__pyx_t_11), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4018, __pyx_L1_error) + __pyx_t_8 = __Pyx_decode_c_string(__pyx_t_11, 0, strlen(__pyx_t_11), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4018, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4018, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __PYX_ERR(0, 4018, __pyx_L1_error) + __PYX_ERR(0, 4017, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4017 + /* "netCDF4/_netCDF4.pyx":4016 * ierr = nc_put_vara(self._grpid, self._varid, * startp, countp, strdata) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -43955,7 +43957,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p */ } - /* "netCDF4/_netCDF4.pyx":4019 + /* "netCDF4/_netCDF4.pyx":4018 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * free(strdata) # <<<<<<<<<<<<<< @@ -43964,7 +43966,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p */ free(__pyx_v_strdata); - /* "netCDF4/_netCDF4.pyx":4011 + /* "netCDF4/_netCDF4.pyx":4010 * startp[n] = start[n] * countp[n] = count[n] * if self.dtype == str: # VLEN string # <<<<<<<<<<<<<< @@ -43974,7 +43976,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p goto __pyx_L16; } - /* "netCDF4/_netCDF4.pyx":4021 + /* "netCDF4/_netCDF4.pyx":4020 * free(strdata) * else: # regular VLEN * if data.dtype != self.dtype: # <<<<<<<<<<<<<< @@ -43982,24 +43984,24 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p * data2 = data */ /*else*/ { - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4021, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4020, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_3 = PyObject_RichCompare(__pyx_t_8, __pyx_v_self->dtype, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4021, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_8, __pyx_v_self->dtype, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4020, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4021, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4020, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":4022 + /* "netCDF4/_netCDF4.pyx":4021 * else: # regular VLEN * if data.dtype != self.dtype: * raise TypeError("wrong data type: should be %s, got %s" % (self.dtype,data.dtype)) # <<<<<<<<<<<<<< * data2 = data * vldata = malloc(sizeof(nc_vlen_t)) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4022, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4021, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4022, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4021, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_self->dtype); __Pyx_GIVEREF(__pyx_v_self->dtype); @@ -44007,22 +44009,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_wrong_data_type_should_be_s_got, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4022, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_wrong_data_type_should_be_s_got, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4021, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4022, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4021, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4022, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4021, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 4022, __pyx_L1_error) + __PYX_ERR(0, 4021, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4021 + /* "netCDF4/_netCDF4.pyx":4020 * free(strdata) * else: # regular VLEN * if data.dtype != self.dtype: # <<<<<<<<<<<<<< @@ -44031,20 +44033,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p */ } - /* "netCDF4/_netCDF4.pyx":4023 + /* "netCDF4/_netCDF4.pyx":4022 * if data.dtype != self.dtype: * raise TypeError("wrong data type: should be %s, got %s" % (self.dtype,data.dtype)) * data2 = data # <<<<<<<<<<<<<< * vldata = malloc(sizeof(nc_vlen_t)) * vldata[0].len = PyArray_SIZE(data2) */ - if (!(likely(((__pyx_v_data) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_data, __pyx_ptype_7netCDF4_8_netCDF4_ndarray))))) __PYX_ERR(0, 4023, __pyx_L1_error) + if (!(likely(((__pyx_v_data) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_data, __pyx_ptype_7netCDF4_8_netCDF4_ndarray))))) __PYX_ERR(0, 4022, __pyx_L1_error) __pyx_t_3 = __pyx_v_data; __Pyx_INCREF(__pyx_t_3); __pyx_v_data2 = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":4024 + /* "netCDF4/_netCDF4.pyx":4023 * raise TypeError("wrong data type: should be %s, got %s" % (self.dtype,data.dtype)) * data2 = data * vldata = malloc(sizeof(nc_vlen_t)) # <<<<<<<<<<<<<< @@ -44053,7 +44055,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p */ __pyx_v_vldata = ((nc_vlen_t *)malloc((sizeof(nc_vlen_t)))); - /* "netCDF4/_netCDF4.pyx":4025 + /* "netCDF4/_netCDF4.pyx":4024 * data2 = data * vldata = malloc(sizeof(nc_vlen_t)) * vldata[0].len = PyArray_SIZE(data2) # <<<<<<<<<<<<<< @@ -44062,7 +44064,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p */ (__pyx_v_vldata[0]).len = PyArray_SIZE(__pyx_v_data2); - /* "netCDF4/_netCDF4.pyx":4026 + /* "netCDF4/_netCDF4.pyx":4025 * vldata = malloc(sizeof(nc_vlen_t)) * vldata[0].len = PyArray_SIZE(data2) * vldata[0].p = data2.data # <<<<<<<<<<<<<< @@ -44072,7 +44074,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p __pyx_t_11 = __pyx_v_data2->data; (__pyx_v_vldata[0]).p = __pyx_t_11; - /* "netCDF4/_netCDF4.pyx":4027 + /* "netCDF4/_netCDF4.pyx":4026 * vldata[0].len = PyArray_SIZE(data2) * vldata[0].p = data2.data * ierr = nc_put_vara(self._grpid, self._varid, # <<<<<<<<<<<<<< @@ -44081,7 +44083,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p */ __pyx_v_ierr = nc_put_vara(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_startp, __pyx_v_countp, __pyx_v_vldata); - /* "netCDF4/_netCDF4.pyx":4029 + /* "netCDF4/_netCDF4.pyx":4028 * ierr = nc_put_vara(self._grpid, self._varid, * startp, countp, vldata) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -44091,7 +44093,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p __pyx_t_2 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":4030 + /* "netCDF4/_netCDF4.pyx":4029 * startp, countp, vldata) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -44099,22 +44101,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p * free(startp) */ __pyx_t_11 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_11, 0, strlen(__pyx_t_11), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4030, __pyx_L1_error) + __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_11, 0, strlen(__pyx_t_11), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4029, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4030, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4029, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4030, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4029, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 4030, __pyx_L1_error) + __PYX_ERR(0, 4029, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4029 + /* "netCDF4/_netCDF4.pyx":4028 * ierr = nc_put_vara(self._grpid, self._varid, * startp, countp, vldata) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -44123,7 +44125,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p */ } - /* "netCDF4/_netCDF4.pyx":4031 + /* "netCDF4/_netCDF4.pyx":4030 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * free(vldata) # <<<<<<<<<<<<<< @@ -44134,7 +44136,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p } __pyx_L16:; - /* "netCDF4/_netCDF4.pyx":4032 + /* "netCDF4/_netCDF4.pyx":4031 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * free(vldata) * free(startp) # <<<<<<<<<<<<<< @@ -44143,7 +44145,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p */ free(__pyx_v_startp); - /* "netCDF4/_netCDF4.pyx":4033 + /* "netCDF4/_netCDF4.pyx":4032 * free(vldata) * free(startp) * free(countp) # <<<<<<<<<<<<<< @@ -44152,7 +44154,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p */ free(__pyx_v_countp); - /* "netCDF4/_netCDF4.pyx":3960 + /* "netCDF4/_netCDF4.pyx":3959 * return data * * def _assign_vlen(self, elem, data): # <<<<<<<<<<<<<< @@ -44184,7 +44186,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4035 +/* "netCDF4/_netCDF4.pyx":4034 * free(countp) * * def __setitem__(self, elem, data): # <<<<<<<<<<<<<< @@ -44243,54 +44245,54 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __Pyx_INCREF(__pyx_v_elem); __Pyx_INCREF(__pyx_v_data); - /* "netCDF4/_netCDF4.pyx":4042 + /* "netCDF4/_netCDF4.pyx":4041 * # to use. * * if self._isvlen: # if vlen, should be object array (don't try casting) # <<<<<<<<<<<<<< * if self.dtype == str: * # for string vars, if data is not an array */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4042, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4041, __pyx_L1_error) if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":4043 + /* "netCDF4/_netCDF4.pyx":4042 * * if self._isvlen: # if vlen, should be object array (don't try casting) * if self.dtype == str: # <<<<<<<<<<<<<< * # for string vars, if data is not an array * # assume it is a python string and raise an error */ - __pyx_t_2 = PyObject_RichCompare(__pyx_v_self->dtype, ((PyObject *)(&PyString_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4043, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4043, __pyx_L1_error) + __pyx_t_2 = PyObject_RichCompare(__pyx_v_self->dtype, ((PyObject *)(&PyString_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4042, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4042, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":4047 + /* "netCDF4/_netCDF4.pyx":4046 * # assume it is a python string and raise an error * # if it is an array, but not an object array. * if not isinstance(data, numpy.ndarray): # <<<<<<<<<<<<<< * # issue 458, allow Ellipsis to be used for scalar var * if type(elem) == type(Ellipsis) and not\ */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4047, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4046, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ndarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4047, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ndarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4046, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_1 = PyObject_IsInstance(__pyx_v_data, __pyx_t_3); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 4047, __pyx_L1_error) + __pyx_t_1 = PyObject_IsInstance(__pyx_v_data, __pyx_t_3); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 4046, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":4049 + /* "netCDF4/_netCDF4.pyx":4048 * if not isinstance(data, numpy.ndarray): * # issue 458, allow Ellipsis to be used for scalar var * if type(elem) == type(Ellipsis) and not\ # <<<<<<<<<<<<<< * len(self.dimensions): elem = 0 * self._assign_vlen(elem, data) */ - __pyx_t_3 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_elem)), ((PyObject *)Py_TYPE(__pyx_builtin_Ellipsis)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4049, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4049, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_elem)), ((PyObject *)Py_TYPE(__pyx_builtin_Ellipsis)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4048, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4048, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { } else { @@ -44298,19 +44300,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ goto __pyx_L7_bool_binop_done; } - /* "netCDF4/_netCDF4.pyx":4050 + /* "netCDF4/_netCDF4.pyx":4049 * # issue 458, allow Ellipsis to be used for scalar var * if type(elem) == type(Ellipsis) and not\ * len(self.dimensions): elem = 0 # <<<<<<<<<<<<<< * self._assign_vlen(elem, data) * return */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4050, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(0, 4050, __pyx_L1_error) + __pyx_t_5 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(0, 4049, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":4049 + /* "netCDF4/_netCDF4.pyx":4048 * if not isinstance(data, numpy.ndarray): * # issue 458, allow Ellipsis to be used for scalar var * if type(elem) == type(Ellipsis) and not\ # <<<<<<<<<<<<<< @@ -44322,7 +44324,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __pyx_L7_bool_binop_done:; if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":4050 + /* "netCDF4/_netCDF4.pyx":4049 * # issue 458, allow Ellipsis to be used for scalar var * if type(elem) == type(Ellipsis) and not\ * len(self.dimensions): elem = 0 # <<<<<<<<<<<<<< @@ -44332,7 +44334,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __Pyx_INCREF(__pyx_int_0); __Pyx_DECREF_SET(__pyx_v_elem, __pyx_int_0); - /* "netCDF4/_netCDF4.pyx":4049 + /* "netCDF4/_netCDF4.pyx":4048 * if not isinstance(data, numpy.ndarray): * # issue 458, allow Ellipsis to be used for scalar var * if type(elem) == type(Ellipsis) and not\ # <<<<<<<<<<<<<< @@ -44341,14 +44343,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":4051 + /* "netCDF4/_netCDF4.pyx":4050 * if type(elem) == type(Ellipsis) and not\ * len(self.dimensions): elem = 0 * self._assign_vlen(elem, data) # <<<<<<<<<<<<<< * return * elif data.dtype.kind in ['S', 'U']: */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_assign_vlen); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4051, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_assign_vlen); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4050, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = NULL; __pyx_t_7 = 0; @@ -44365,7 +44367,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_elem, __pyx_v_data}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4051, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4050, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -44373,13 +44375,13 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_elem, __pyx_v_data}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4051, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4050, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4051, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4050, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -44390,14 +44392,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __Pyx_INCREF(__pyx_v_data); __Pyx_GIVEREF(__pyx_v_data); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_data); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4051, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4050, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":4052 + /* "netCDF4/_netCDF4.pyx":4051 * len(self.dimensions): elem = 0 * self._assign_vlen(elem, data) * return # <<<<<<<<<<<<<< @@ -44407,7 +44409,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __pyx_r = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":4047 + /* "netCDF4/_netCDF4.pyx":4046 * # assume it is a python string and raise an error * # if it is an array, but not an object array. * if not isinstance(data, numpy.ndarray): # <<<<<<<<<<<<<< @@ -44416,41 +44418,41 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":4053 + /* "netCDF4/_netCDF4.pyx":4052 * self._assign_vlen(elem, data) * return * elif data.dtype.kind in ['S', 'U']: # <<<<<<<<<<<<<< * if ma.isMA(data): * msg='masked arrays cannot be assigned by VLEN str slices' */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4053, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4052, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_kind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4053, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_kind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4052, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_S, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4053, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_S, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4052, __pyx_L1_error) if (!__pyx_t_1) { } else { __pyx_t_4 = __pyx_t_1; goto __pyx_L9_bool_binop_done; } - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_U, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4053, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_U, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4052, __pyx_L1_error) __pyx_t_4 = __pyx_t_1; __pyx_L9_bool_binop_done:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = (__pyx_t_4 != 0); if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":4054 + /* "netCDF4/_netCDF4.pyx":4053 * return * elif data.dtype.kind in ['S', 'U']: * if ma.isMA(data): # <<<<<<<<<<<<<< * msg='masked arrays cannot be assigned by VLEN str slices' * raise TypeError(msg) */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4054, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4053, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_isMA); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4054, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_isMA); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4053, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -44464,13 +44466,13 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ } } if (!__pyx_t_3) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4054, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4053, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_data}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4054, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4053, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -44478,29 +44480,29 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_data}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4054, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4053, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4054, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4053, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_INCREF(__pyx_v_data); __Pyx_GIVEREF(__pyx_v_data); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_data); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4054, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4053, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4054, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4053, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":4055 + /* "netCDF4/_netCDF4.pyx":4054 * elif data.dtype.kind in ['S', 'U']: * if ma.isMA(data): * msg='masked arrays cannot be assigned by VLEN str slices' # <<<<<<<<<<<<<< @@ -44510,26 +44512,26 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __Pyx_INCREF(__pyx_kp_s_masked_arrays_cannot_be_assigned); __pyx_v_msg = __pyx_kp_s_masked_arrays_cannot_be_assigned; - /* "netCDF4/_netCDF4.pyx":4056 + /* "netCDF4/_netCDF4.pyx":4055 * if ma.isMA(data): * msg='masked arrays cannot be assigned by VLEN str slices' * raise TypeError(msg) # <<<<<<<<<<<<<< * data = data.astype(object) * elif data.dtype.kind != 'O': */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4056, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_msg); __Pyx_GIVEREF(__pyx_v_msg); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_msg); - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4056, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __PYX_ERR(0, 4056, __pyx_L1_error) + __PYX_ERR(0, 4055, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4054 + /* "netCDF4/_netCDF4.pyx":4053 * return * elif data.dtype.kind in ['S', 'U']: * if ma.isMA(data): # <<<<<<<<<<<<<< @@ -44538,14 +44540,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":4057 + /* "netCDF4/_netCDF4.pyx":4056 * msg='masked arrays cannot be assigned by VLEN str slices' * raise TypeError(msg) * data = data.astype(object) # <<<<<<<<<<<<<< * elif data.dtype.kind != 'O': * msg = ('only numpy string, unicode or object arrays can ' */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_astype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4057, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_astype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4056, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -44558,13 +44560,13 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ } } if (!__pyx_t_6) { - __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_builtin_object); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4057, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_builtin_object); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4056, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_builtin_object}; - __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4057, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4056, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_8); } else @@ -44572,19 +44574,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_builtin_object}; - __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4057, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4056, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_8); } else #endif { - __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4057, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4056, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_builtin_object); - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4057, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4056, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -44593,7 +44595,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":4053 + /* "netCDF4/_netCDF4.pyx":4052 * self._assign_vlen(elem, data) * return * elif data.dtype.kind in ['S', 'U']: # <<<<<<<<<<<<<< @@ -44603,23 +44605,23 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ goto __pyx_L5; } - /* "netCDF4/_netCDF4.pyx":4058 + /* "netCDF4/_netCDF4.pyx":4057 * raise TypeError(msg) * data = data.astype(object) * elif data.dtype.kind != 'O': # <<<<<<<<<<<<<< * msg = ('only numpy string, unicode or object arrays can ' * 'be assigned to VLEN str var slices') */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4058, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4057, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_kind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4058, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_kind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4057, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_O, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4058, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_O, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4057, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":4059 + /* "netCDF4/_netCDF4.pyx":4058 * data = data.astype(object) * elif data.dtype.kind != 'O': * msg = ('only numpy string, unicode or object arrays can ' # <<<<<<<<<<<<<< @@ -44629,26 +44631,26 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __Pyx_INCREF(__pyx_kp_s_only_numpy_string_unicode_or_obj); __pyx_v_msg = __pyx_kp_s_only_numpy_string_unicode_or_obj; - /* "netCDF4/_netCDF4.pyx":4061 + /* "netCDF4/_netCDF4.pyx":4060 * msg = ('only numpy string, unicode or object arrays can ' * 'be assigned to VLEN str var slices') * raise TypeError(msg) # <<<<<<<<<<<<<< * else: * # for non-string vlen arrays, if data is not multi-dim, or */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4061, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4060, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_msg); __Pyx_GIVEREF(__pyx_v_msg); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_msg); - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4061, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4060, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __PYX_ERR(0, 4061, __pyx_L1_error) + __PYX_ERR(0, 4060, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4058 + /* "netCDF4/_netCDF4.pyx":4057 * raise TypeError(msg) * data = data.astype(object) * elif data.dtype.kind != 'O': # <<<<<<<<<<<<<< @@ -44658,7 +44660,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ } __pyx_L5:; - /* "netCDF4/_netCDF4.pyx":4043 + /* "netCDF4/_netCDF4.pyx":4042 * * if self._isvlen: # if vlen, should be object array (don't try casting) * if self.dtype == str: # <<<<<<<<<<<<<< @@ -44668,7 +44670,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ goto __pyx_L4; } - /* "netCDF4/_netCDF4.pyx":4066 + /* "netCDF4/_netCDF4.pyx":4065 * # not an object array, assume it represents a single element * # of the vlen var. * if not isinstance(data, numpy.ndarray) or data.dtype.kind != 'O': # <<<<<<<<<<<<<< @@ -44676,12 +44678,12 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ * if type(elem) == type(Ellipsis) and not\ */ /*else*/ { - __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4066, __pyx_L1_error) + __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4065, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_ndarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4066, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_ndarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4065, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_4 = PyObject_IsInstance(__pyx_v_data, __pyx_t_2); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 4066, __pyx_L1_error) + __pyx_t_4 = PyObject_IsInstance(__pyx_v_data, __pyx_t_2); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 4065, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9 = ((!(__pyx_t_4 != 0)) != 0); if (!__pyx_t_9) { @@ -44689,26 +44691,26 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __pyx_t_1 = __pyx_t_9; goto __pyx_L13_bool_binop_done; } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4066, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4065, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_kind); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4066, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_kind); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4065, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_8, __pyx_n_s_O, Py_NE)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 4066, __pyx_L1_error) + __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_8, __pyx_n_s_O, Py_NE)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 4065, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_1 = __pyx_t_9; __pyx_L13_bool_binop_done:; if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":4068 + /* "netCDF4/_netCDF4.pyx":4067 * if not isinstance(data, numpy.ndarray) or data.dtype.kind != 'O': * # issue 458, allow Ellipsis to be used for scalar var * if type(elem) == type(Ellipsis) and not\ # <<<<<<<<<<<<<< * len(self.dimensions): elem = 0 * self._assign_vlen(elem, data) */ - __pyx_t_8 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_elem)), ((PyObject *)Py_TYPE(__pyx_builtin_Ellipsis)), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4068, __pyx_L1_error) - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 4068, __pyx_L1_error) + __pyx_t_8 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_elem)), ((PyObject *)Py_TYPE(__pyx_builtin_Ellipsis)), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4067, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 4067, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_9) { } else { @@ -44716,19 +44718,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ goto __pyx_L16_bool_binop_done; } - /* "netCDF4/_netCDF4.pyx":4069 + /* "netCDF4/_netCDF4.pyx":4068 * # issue 458, allow Ellipsis to be used for scalar var * if type(elem) == type(Ellipsis) and not\ * len(self.dimensions): elem = 0 # <<<<<<<<<<<<<< * self._assign_vlen(elem, data) * return */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4069, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4068, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_5 = PyObject_Length(__pyx_t_8); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(0, 4069, __pyx_L1_error) + __pyx_t_5 = PyObject_Length(__pyx_t_8); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(0, 4068, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":4068 + /* "netCDF4/_netCDF4.pyx":4067 * if not isinstance(data, numpy.ndarray) or data.dtype.kind != 'O': * # issue 458, allow Ellipsis to be used for scalar var * if type(elem) == type(Ellipsis) and not\ # <<<<<<<<<<<<<< @@ -44740,7 +44742,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __pyx_L16_bool_binop_done:; if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":4069 + /* "netCDF4/_netCDF4.pyx":4068 * # issue 458, allow Ellipsis to be used for scalar var * if type(elem) == type(Ellipsis) and not\ * len(self.dimensions): elem = 0 # <<<<<<<<<<<<<< @@ -44750,7 +44752,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __Pyx_INCREF(__pyx_int_0); __Pyx_DECREF_SET(__pyx_v_elem, __pyx_int_0); - /* "netCDF4/_netCDF4.pyx":4068 + /* "netCDF4/_netCDF4.pyx":4067 * if not isinstance(data, numpy.ndarray) or data.dtype.kind != 'O': * # issue 458, allow Ellipsis to be used for scalar var * if type(elem) == type(Ellipsis) and not\ # <<<<<<<<<<<<<< @@ -44759,14 +44761,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":4070 + /* "netCDF4/_netCDF4.pyx":4069 * if type(elem) == type(Ellipsis) and not\ * len(self.dimensions): elem = 0 * self._assign_vlen(elem, data) # <<<<<<<<<<<<<< * return * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_assign_vlen); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4070, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_assign_vlen); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4069, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_7 = 0; @@ -44783,7 +44785,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_elem, __pyx_v_data}; - __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4070, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4069, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_8); } else @@ -44791,13 +44793,13 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_elem, __pyx_v_data}; - __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4070, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4069, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_8); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4070, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4069, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL; @@ -44808,14 +44810,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __Pyx_INCREF(__pyx_v_data); __Pyx_GIVEREF(__pyx_v_data); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_v_data); - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4070, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4069, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":4071 + /* "netCDF4/_netCDF4.pyx":4070 * len(self.dimensions): elem = 0 * self._assign_vlen(elem, data) * return # <<<<<<<<<<<<<< @@ -44825,7 +44827,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __pyx_r = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":4066 + /* "netCDF4/_netCDF4.pyx":4065 * # not an object array, assume it represents a single element * # of the vlen var. * if not isinstance(data, numpy.ndarray) or data.dtype.kind != 'O': # <<<<<<<<<<<<<< @@ -44836,7 +44838,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ } __pyx_L4:; - /* "netCDF4/_netCDF4.pyx":4042 + /* "netCDF4/_netCDF4.pyx":4041 * # to use. * * if self._isvlen: # if vlen, should be object array (don't try casting) # <<<<<<<<<<<<<< @@ -44845,16 +44847,16 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":4075 + /* "netCDF4/_netCDF4.pyx":4074 * # A numpy or masked array (or an object supporting the buffer interface) is needed. * # Convert if necessary. * if not ma.isMA(data) and not (hasattr(data,'data') and isinstance(data.data,buffer)): # <<<<<<<<<<<<<< * # if auto scaling is to be done, don't cast to an integer yet. * if self.scale and self.dtype.kind in 'iu' and \ */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4075, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_isMA); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4075, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_isMA); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -44868,13 +44870,13 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ } } if (!__pyx_t_2) { - __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_data); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4075, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_data); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_data}; - __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4075, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4074, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_8); } else @@ -44882,25 +44884,25 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_data}; - __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4075, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4074, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_8); } else #endif { - __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4075, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = NULL; __Pyx_INCREF(__pyx_v_data); __Pyx_GIVEREF(__pyx_v_data); PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_data); - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4075, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 4075, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 4074, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_4 = ((!__pyx_t_9) != 0); if (__pyx_t_4) { @@ -44908,18 +44910,18 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __pyx_t_1 = __pyx_t_4; goto __pyx_L19_bool_binop_done; } - __pyx_t_9 = PyObject_HasAttr(__pyx_v_data, __pyx_n_s_data); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 4075, __pyx_L1_error) + __pyx_t_9 = PyObject_HasAttr(__pyx_v_data, __pyx_n_s_data); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 4074, __pyx_L1_error) __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { } else { __pyx_t_4 = __pyx_t_10; goto __pyx_L21_bool_binop_done; } - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_data); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4075, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_data); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_buffer); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4075, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_buffer); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_10 = PyObject_IsInstance(__pyx_t_8, __pyx_t_6); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 4075, __pyx_L1_error) + __pyx_t_10 = PyObject_IsInstance(__pyx_t_8, __pyx_t_6); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 4074, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_9 = (__pyx_t_10 != 0); @@ -44930,21 +44932,21 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __pyx_L19_bool_binop_done:; if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":4077 + /* "netCDF4/_netCDF4.pyx":4076 * if not ma.isMA(data) and not (hasattr(data,'data') and isinstance(data.data,buffer)): * # if auto scaling is to be done, don't cast to an integer yet. * if self.scale and self.dtype.kind in 'iu' and \ # <<<<<<<<<<<<<< * hasattr(self, 'scale_factor') or hasattr(self, 'add_offset'): * data = numpy.array(data,numpy.float) */ - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_self->scale); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 4077, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_self->scale); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 4076, __pyx_L1_error) if (!__pyx_t_9) { goto __pyx_L25_next_or; } else { } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4077, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4076, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_t_6, __pyx_n_s_iu, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 4077, __pyx_L1_error) + __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_t_6, __pyx_n_s_iu, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 4076, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (__pyx_t_9 != 0); if (!__pyx_t_4) { @@ -44952,14 +44954,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ } else { } - /* "netCDF4/_netCDF4.pyx":4078 + /* "netCDF4/_netCDF4.pyx":4077 * # if auto scaling is to be done, don't cast to an integer yet. * if self.scale and self.dtype.kind in 'iu' and \ * hasattr(self, 'scale_factor') or hasattr(self, 'add_offset'): # <<<<<<<<<<<<<< * data = numpy.array(data,numpy.float) * else: */ - __pyx_t_4 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 4078, __pyx_L1_error) + __pyx_t_4 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 4077, __pyx_L1_error) __pyx_t_9 = (__pyx_t_4 != 0); if (!__pyx_t_9) { } else { @@ -44967,12 +44969,12 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ goto __pyx_L24_bool_binop_done; } __pyx_L25_next_or:; - __pyx_t_9 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 4078, __pyx_L1_error) + __pyx_t_9 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 4077, __pyx_L1_error) __pyx_t_4 = (__pyx_t_9 != 0); __pyx_t_1 = __pyx_t_4; __pyx_L24_bool_binop_done:; - /* "netCDF4/_netCDF4.pyx":4077 + /* "netCDF4/_netCDF4.pyx":4076 * if not ma.isMA(data) and not (hasattr(data,'data') and isinstance(data.data,buffer)): * # if auto scaling is to be done, don't cast to an integer yet. * if self.scale and self.dtype.kind in 'iu' and \ # <<<<<<<<<<<<<< @@ -44981,21 +44983,21 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ */ if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":4079 + /* "netCDF4/_netCDF4.pyx":4078 * if self.scale and self.dtype.kind in 'iu' and \ * hasattr(self, 'scale_factor') or hasattr(self, 'add_offset'): * data = numpy.array(data,numpy.float) # <<<<<<<<<<<<<< * else: * data = numpy.array(data,self.dtype) */ - __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4079, __pyx_L1_error) + __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4078, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4079, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4078, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4079, __pyx_L1_error) + __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4078, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_float); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4079, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_float); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4078, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = NULL; @@ -45013,7 +45015,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_data, __pyx_t_2}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4079, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4078, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -45022,14 +45024,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_data, __pyx_t_2}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4079, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4078, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { - __pyx_t_11 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4079, __pyx_L1_error) + __pyx_t_11 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4078, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_8); __pyx_t_8 = NULL; @@ -45040,7 +45042,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_7, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4079, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4078, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } @@ -45048,7 +45050,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":4077 + /* "netCDF4/_netCDF4.pyx":4076 * if not ma.isMA(data) and not (hasattr(data,'data') and isinstance(data.data,buffer)): * # if auto scaling is to be done, don't cast to an integer yet. * if self.scale and self.dtype.kind in 'iu' and \ # <<<<<<<<<<<<<< @@ -45058,7 +45060,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ goto __pyx_L23; } - /* "netCDF4/_netCDF4.pyx":4081 + /* "netCDF4/_netCDF4.pyx":4080 * data = numpy.array(data,numpy.float) * else: * data = numpy.array(data,self.dtype) # <<<<<<<<<<<<<< @@ -45066,9 +45068,9 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ * # for Enum variable, make sure data is valid. */ /*else*/ { - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4081, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4080, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4081, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4080, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -45086,7 +45088,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_11)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_data, __pyx_v_self->dtype}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4081, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4080, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_6); } else @@ -45094,13 +45096,13 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_data, __pyx_v_self->dtype}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4081, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4080, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_6); } else #endif { - __pyx_t_2 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4081, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4080, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __pyx_t_3 = NULL; @@ -45111,7 +45113,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __Pyx_INCREF(__pyx_v_self->dtype); __Pyx_GIVEREF(__pyx_v_self->dtype); PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_7, __pyx_v_self->dtype); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4081, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4080, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -45121,7 +45123,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ } __pyx_L23:; - /* "netCDF4/_netCDF4.pyx":4075 + /* "netCDF4/_netCDF4.pyx":4074 * # A numpy or masked array (or an object supporting the buffer interface) is needed. * # Convert if necessary. * if not ma.isMA(data) and not (hasattr(data,'data') and isinstance(data.data,buffer)): # <<<<<<<<<<<<<< @@ -45130,33 +45132,33 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":4084 + /* "netCDF4/_netCDF4.pyx":4083 * * # for Enum variable, make sure data is valid. * if self._isenum: # <<<<<<<<<<<<<< * test = numpy.zeros(data.shape,numpy.bool) * for val in self.datatype.enum_dict.values(): */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isenum); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4084, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isenum); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4083, __pyx_L1_error) if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":4085 + /* "netCDF4/_netCDF4.pyx":4084 * # for Enum variable, make sure data is valid. * if self._isenum: * test = numpy.zeros(data.shape,numpy.bool) # <<<<<<<<<<<<<< * for val in self.datatype.enum_dict.values(): * test += data == val */ - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4085, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4084, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4085, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4084, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4085, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4084, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4085, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4084, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_bool); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4085, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_bool); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4084, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -45174,7 +45176,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_11, __pyx_t_8}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4085, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4084, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; @@ -45184,7 +45186,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_11, __pyx_t_8}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4085, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4084, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; @@ -45192,7 +45194,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ } else #endif { - __pyx_t_12 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4085, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4084, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_3); __pyx_t_3 = NULL; @@ -45203,7 +45205,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_7, __pyx_t_8); __pyx_t_11 = 0; __pyx_t_8 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4085, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4084, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } @@ -45211,19 +45213,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __pyx_v_test = __pyx_t_6; __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":4086 + /* "netCDF4/_netCDF4.pyx":4085 * if self._isenum: * test = numpy.zeros(data.shape,numpy.bool) * for val in self.datatype.enum_dict.values(): # <<<<<<<<<<<<<< * test += data == val * if not numpy.all(test): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_datatype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4086, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_datatype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4085, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_enum_dict); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4086, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_enum_dict); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4085, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4086, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4085, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = NULL; @@ -45237,10 +45239,10 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ } } if (__pyx_t_12) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4086, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4085, __pyx_L1_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } else { - __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4086, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4085, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -45248,9 +45250,9 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __pyx_t_2 = __pyx_t_6; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0; __pyx_t_13 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4086, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4085, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_13 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4086, __pyx_L1_error) + __pyx_t_13 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4085, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; for (;;) { @@ -45258,17 +45260,17 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_6); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 4086, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_6); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 4085, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4086, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4085, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_6); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 4086, __pyx_L1_error) + __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_6); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 4085, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4086, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4085, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } @@ -45278,7 +45280,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 4086, __pyx_L1_error) + else __PYX_ERR(0, 4085, __pyx_L1_error) } break; } @@ -45287,21 +45289,21 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":4087 + /* "netCDF4/_netCDF4.pyx":4086 * test = numpy.zeros(data.shape,numpy.bool) * for val in self.datatype.enum_dict.values(): * test += data == val # <<<<<<<<<<<<<< * if not numpy.all(test): * msg="trying to assign illegal value to Enum variable" */ - __pyx_t_6 = PyObject_RichCompare(__pyx_v_data, __pyx_v_val, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4087, __pyx_L1_error) - __pyx_t_12 = PyNumber_InPlaceAdd(__pyx_v_test, __pyx_t_6); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4087, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_v_data, __pyx_v_val, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4086, __pyx_L1_error) + __pyx_t_12 = PyNumber_InPlaceAdd(__pyx_v_test, __pyx_t_6); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4086, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_test, __pyx_t_12); __pyx_t_12 = 0; - /* "netCDF4/_netCDF4.pyx":4086 + /* "netCDF4/_netCDF4.pyx":4085 * if self._isenum: * test = numpy.zeros(data.shape,numpy.bool) * for val in self.datatype.enum_dict.values(): # <<<<<<<<<<<<<< @@ -45311,16 +45313,16 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":4088 + /* "netCDF4/_netCDF4.pyx":4087 * for val in self.datatype.enum_dict.values(): * test += data == val * if not numpy.all(test): # <<<<<<<<<<<<<< * msg="trying to assign illegal value to Enum variable" * raise ValueError(msg) */ - __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4088, __pyx_L1_error) + __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4087, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_all); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4088, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_all); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4087, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = NULL; @@ -45334,13 +45336,13 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ } } if (!__pyx_t_12) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_test); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4088, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_test); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4087, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v_test}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4088, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4087, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -45348,30 +45350,30 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v_test}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4088, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4087, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4088, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4087, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_12); __pyx_t_12 = NULL; __Pyx_INCREF(__pyx_v_test); __Pyx_GIVEREF(__pyx_v_test); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_test); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4088, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4087, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4088, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4087, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = ((!__pyx_t_1) != 0); if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":4089 + /* "netCDF4/_netCDF4.pyx":4088 * test += data == val * if not numpy.all(test): * msg="trying to assign illegal value to Enum variable" # <<<<<<<<<<<<<< @@ -45381,26 +45383,26 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __Pyx_INCREF(__pyx_kp_s_trying_to_assign_illegal_value_t); __pyx_v_msg = __pyx_kp_s_trying_to_assign_illegal_value_t; - /* "netCDF4/_netCDF4.pyx":4090 + /* "netCDF4/_netCDF4.pyx":4089 * if not numpy.all(test): * msg="trying to assign illegal value to Enum variable" * raise ValueError(msg) # <<<<<<<<<<<<<< * * start, count, stride, put_ind =\ */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4090, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4089, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_msg); __Pyx_GIVEREF(__pyx_v_msg); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_msg); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4090, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4089, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 4090, __pyx_L1_error) + __PYX_ERR(0, 4089, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4088 + /* "netCDF4/_netCDF4.pyx":4087 * for val in self.datatype.enum_dict.values(): * test += data == val * if not numpy.all(test): # <<<<<<<<<<<<<< @@ -45409,7 +45411,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":4084 + /* "netCDF4/_netCDF4.pyx":4083 * * # for Enum variable, make sure data is valid. * if self._isenum: # <<<<<<<<<<<<<< @@ -45418,20 +45420,20 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":4093 + /* "netCDF4/_netCDF4.pyx":4092 * * start, count, stride, put_ind =\ * _StartCountStride(elem,self.shape,self.dimensions,self._grp,datashape=data.shape,put=True) # <<<<<<<<<<<<<< * datashape = _out_array_shape(count) * */ - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_StartCountStride); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4093, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_StartCountStride); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4093, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4093, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_12 = PyTuple_New(4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4093, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_INCREF(__pyx_v_elem); __Pyx_GIVEREF(__pyx_v_elem); @@ -45445,14 +45447,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ PyTuple_SET_ITEM(__pyx_t_12, 3, __pyx_v_self->_grp); __pyx_t_2 = 0; __pyx_t_8 = 0; - __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4093, __pyx_L1_error) + __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4093, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_datashape, __pyx_t_2) < 0) __PYX_ERR(0, 4093, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_datashape, __pyx_t_2) < 0) __PYX_ERR(0, 4092, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_put, Py_True) < 0) __PYX_ERR(0, 4093, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_12, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4093, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_put, Py_True) < 0) __PYX_ERR(0, 4092, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_12, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; @@ -45467,7 +45469,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ if (unlikely(size != 4)) { if (size > 4) __Pyx_RaiseTooManyValuesError(4); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 4092, __pyx_L1_error) + __PYX_ERR(0, 4091, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -45490,7 +45492,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ Py_ssize_t i; PyObject** temps[4] = {&__pyx_t_8,&__pyx_t_12,&__pyx_t_6,&__pyx_t_11}; for (i=0; i < 4; i++) { - PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 4092, __pyx_L1_error) + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 4091, __pyx_L1_error) __Pyx_GOTREF(item); *(temps[i]) = item; } @@ -45500,7 +45502,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ } else { Py_ssize_t index = -1; PyObject** temps[4] = {&__pyx_t_8,&__pyx_t_12,&__pyx_t_6,&__pyx_t_11}; - __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4092, __pyx_L1_error) + __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4091, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_14 = Py_TYPE(__pyx_t_3)->tp_iternext; @@ -45509,7 +45511,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __Pyx_GOTREF(item); *(temps[index]) = item; } - if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_3), 4) < 0) __PYX_ERR(0, 4092, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_3), 4) < 0) __PYX_ERR(0, 4091, __pyx_L1_error) __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L33_unpacking_done; @@ -45517,11 +45519,11 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 4092, __pyx_L1_error) + __PYX_ERR(0, 4091, __pyx_L1_error) __pyx_L33_unpacking_done:; } - /* "netCDF4/_netCDF4.pyx":4092 + /* "netCDF4/_netCDF4.pyx":4091 * raise ValueError(msg) * * start, count, stride, put_ind =\ # <<<<<<<<<<<<<< @@ -45537,14 +45539,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __pyx_v_put_ind = __pyx_t_11; __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":4094 + /* "netCDF4/_netCDF4.pyx":4093 * start, count, stride, put_ind =\ * _StartCountStride(elem,self.shape,self.dimensions,self._grp,datashape=data.shape,put=True) * datashape = _out_array_shape(count) # <<<<<<<<<<<<<< * * # if a numpy scalar, create an array of the right size */ - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_out_array_shape); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4094, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_out_array_shape); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) { @@ -45557,13 +45559,13 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ } } if (!__pyx_t_6) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_count); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4094, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_count); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_11)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_count}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4094, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4093, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -45571,19 +45573,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_count}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4094, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4093, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4094, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_INCREF(__pyx_v_count); __Pyx_GIVEREF(__pyx_v_count); PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_v_count); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4094, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } @@ -45592,31 +45594,31 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __pyx_v_datashape = __pyx_t_2; __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":4098 + /* "netCDF4/_netCDF4.pyx":4097 * # if a numpy scalar, create an array of the right size * # and fill with scalar values. * if data.shape == (): # <<<<<<<<<<<<<< * data = numpy.tile(data,datashape) * # reshape data array by adding extra singleton dimensions */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4098, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4097, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_11 = PyObject_RichCompare(__pyx_t_2, __pyx_empty_tuple, Py_EQ); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4098, __pyx_L1_error) + __pyx_t_11 = PyObject_RichCompare(__pyx_t_2, __pyx_empty_tuple, Py_EQ); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4097, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4098, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4097, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":4099 + /* "netCDF4/_netCDF4.pyx":4098 * # and fill with scalar values. * if data.shape == (): * data = numpy.tile(data,datashape) # <<<<<<<<<<<<<< * # reshape data array by adding extra singleton dimensions * # if needed to conform with start,count,stride. */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4099, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4098, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_tile); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4099, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_tile); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4098, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -45634,7 +45636,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_12)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_data, __pyx_v_datashape}; - __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4099, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4098, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_11); } else @@ -45642,13 +45644,13 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_data, __pyx_v_datashape}; - __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4099, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4098, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_11); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4099, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4098, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_2) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL; @@ -45659,7 +45661,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __Pyx_INCREF(__pyx_v_datashape); __Pyx_GIVEREF(__pyx_v_datashape); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_v_datashape); - __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_6, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4099, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_6, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4098, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -45667,7 +45669,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":4098 + /* "netCDF4/_netCDF4.pyx":4097 * # if a numpy scalar, create an array of the right size * # and fill with scalar values. * if data.shape == (): # <<<<<<<<<<<<<< @@ -45676,29 +45678,29 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":4102 + /* "netCDF4/_netCDF4.pyx":4101 * # reshape data array by adding extra singleton dimensions * # if needed to conform with start,count,stride. * if len(data.shape) != len(datashape): # <<<<<<<<<<<<<< * # create a view so shape in caller is not modified (issue 90) * data = data.view() */ - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4102, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_5 = PyObject_Length(__pyx_t_11); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(0, 4102, __pyx_L1_error) + __pyx_t_5 = PyObject_Length(__pyx_t_11); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(0, 4101, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_15 = PyObject_Length(__pyx_v_datashape); if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 4102, __pyx_L1_error) + __pyx_t_15 = PyObject_Length(__pyx_v_datashape); if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 4101, __pyx_L1_error) __pyx_t_4 = ((__pyx_t_5 != __pyx_t_15) != 0); if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":4104 + /* "netCDF4/_netCDF4.pyx":4103 * if len(data.shape) != len(datashape): * # create a view so shape in caller is not modified (issue 90) * data = data.view() # <<<<<<<<<<<<<< * data.shape = tuple(datashape) * */ - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_view); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4104, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_view); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) { @@ -45711,29 +45713,29 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ } } if (__pyx_t_6) { - __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4104, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4103, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { - __pyx_t_11 = __Pyx_PyObject_CallNoArg(__pyx_t_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4104, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_CallNoArg(__pyx_t_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4103, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":4105 + /* "netCDF4/_netCDF4.pyx":4104 * # create a view so shape in caller is not modified (issue 90) * data = data.view() * data.shape = tuple(datashape) # <<<<<<<<<<<<<< * * # Reshape these arrays so we can iterate over them. */ - __pyx_t_11 = PySequence_Tuple(__pyx_v_datashape); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4105, __pyx_L1_error) + __pyx_t_11 = PySequence_Tuple(__pyx_v_datashape); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_data, __pyx_n_s_shape, __pyx_t_11) < 0) __PYX_ERR(0, 4105, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_data, __pyx_n_s_shape, __pyx_t_11) < 0) __PYX_ERR(0, 4104, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":4102 + /* "netCDF4/_netCDF4.pyx":4101 * # reshape data array by adding extra singleton dimensions * # if needed to conform with start,count,stride. * if len(data.shape) != len(datashape): # <<<<<<<<<<<<<< @@ -45742,28 +45744,28 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":4108 + /* "netCDF4/_netCDF4.pyx":4107 * * # Reshape these arrays so we can iterate over them. * start = start.reshape((-1, self.ndim or 1)) # <<<<<<<<<<<<<< * count = count.reshape((-1, self.ndim or 1)) * stride = stride.reshape((-1, self.ndim or 1)) */ - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_start, __pyx_n_s_reshape); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4108, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_start, __pyx_n_s_reshape); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4108, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4107, __pyx_L1_error) if (!__pyx_t_4) { } else { __Pyx_INCREF(__pyx_v_self->ndim); __pyx_t_6 = __pyx_v_self->ndim; goto __pyx_L36_bool_binop_done; } - __pyx_t_2 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4108, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __pyx_t_2; __pyx_t_2 = 0; __pyx_L36_bool_binop_done:; - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4108, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); @@ -45782,14 +45784,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ } } if (!__pyx_t_6) { - __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4108, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4107, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_11); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_12)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_2}; - __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4108, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4107, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -45798,20 +45800,20 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_2}; - __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4108, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4107, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { - __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4108, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_8, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4108, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_8, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -45820,28 +45822,28 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __Pyx_DECREF_SET(__pyx_v_start, __pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":4109 + /* "netCDF4/_netCDF4.pyx":4108 * # Reshape these arrays so we can iterate over them. * start = start.reshape((-1, self.ndim or 1)) * count = count.reshape((-1, self.ndim or 1)) # <<<<<<<<<<<<<< * stride = stride.reshape((-1, self.ndim or 1)) * put_ind = put_ind.reshape((-1, self.ndim or 1)) */ - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_count, __pyx_n_s_reshape); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4109, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_count, __pyx_n_s_reshape); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4109, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4108, __pyx_L1_error) if (!__pyx_t_4) { } else { __Pyx_INCREF(__pyx_v_self->ndim); __pyx_t_8 = __pyx_v_self->ndim; goto __pyx_L38_bool_binop_done; } - __pyx_t_2 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4109, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = __pyx_t_2; __pyx_t_2 = 0; __pyx_L38_bool_binop_done:; - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4109, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); @@ -45860,14 +45862,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ } } if (!__pyx_t_8) { - __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4109, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4108, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_11); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_12)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_2}; - __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4109, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4108, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -45876,20 +45878,20 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_2}; - __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4109, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4108, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4109, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __pyx_t_8 = NULL; __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_6, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4109, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_6, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -45898,28 +45900,28 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __Pyx_DECREF_SET(__pyx_v_count, __pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":4110 + /* "netCDF4/_netCDF4.pyx":4109 * start = start.reshape((-1, self.ndim or 1)) * count = count.reshape((-1, self.ndim or 1)) * stride = stride.reshape((-1, self.ndim or 1)) # <<<<<<<<<<<<<< * put_ind = put_ind.reshape((-1, self.ndim or 1)) * */ - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_stride, __pyx_n_s_reshape); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4110, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_stride, __pyx_n_s_reshape); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4110, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4109, __pyx_L1_error) if (!__pyx_t_4) { } else { __Pyx_INCREF(__pyx_v_self->ndim); __pyx_t_6 = __pyx_v_self->ndim; goto __pyx_L40_bool_binop_done; } - __pyx_t_2 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4110, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __pyx_t_2; __pyx_t_2 = 0; __pyx_L40_bool_binop_done:; - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4110, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); @@ -45938,14 +45940,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ } } if (!__pyx_t_6) { - __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4110, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4109, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_11); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_12)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_2}; - __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4110, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4109, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -45954,20 +45956,20 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_2}; - __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4110, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4109, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { - __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4110, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_8, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4110, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_8, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -45976,28 +45978,28 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __Pyx_DECREF_SET(__pyx_v_stride, __pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":4111 + /* "netCDF4/_netCDF4.pyx":4110 * count = count.reshape((-1, self.ndim or 1)) * stride = stride.reshape((-1, self.ndim or 1)) * put_ind = put_ind.reshape((-1, self.ndim or 1)) # <<<<<<<<<<<<<< * * # quantize data if least_significant_digit attribute */ - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_put_ind, __pyx_n_s_reshape); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4111, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_put_ind, __pyx_n_s_reshape); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4111, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4110, __pyx_L1_error) if (!__pyx_t_4) { } else { __Pyx_INCREF(__pyx_v_self->ndim); __pyx_t_8 = __pyx_v_self->ndim; goto __pyx_L42_bool_binop_done; } - __pyx_t_2 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4111, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = __pyx_t_2; __pyx_t_2 = 0; __pyx_L42_bool_binop_done:; - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4111, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); @@ -46016,14 +46018,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ } } if (!__pyx_t_8) { - __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4111, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4110, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_11); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_12)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_2}; - __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4111, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4110, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -46032,20 +46034,20 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_2}; - __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4111, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4110, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4111, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __pyx_t_8 = NULL; __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_6, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4111, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_6, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -46054,26 +46056,26 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __Pyx_DECREF_SET(__pyx_v_put_ind, __pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":4115 + /* "netCDF4/_netCDF4.pyx":4114 * # quantize data if least_significant_digit attribute * # exists (improves compression). * if self._has_lsd: # <<<<<<<<<<<<<< * data = _quantize(data,self.least_significant_digit) * # if auto_scale mode set to True, (through */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_has_lsd); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4115, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_has_lsd); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4114, __pyx_L1_error) if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":4116 + /* "netCDF4/_netCDF4.pyx":4115 * # exists (improves compression). * if self._has_lsd: * data = _quantize(data,self.least_significant_digit) # <<<<<<<<<<<<<< * # if auto_scale mode set to True, (through * # a call to set_auto_scale or set_auto_maskandscale), */ - __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_quantize); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4116, __pyx_L1_error) + __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_quantize); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_least_significant_digit); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4116, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_least_significant_digit); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = NULL; __pyx_t_7 = 0; @@ -46090,7 +46092,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_12)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_data, __pyx_t_6}; - __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4116, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4115, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -46099,14 +46101,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_data, __pyx_t_6}; - __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4116, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4115, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { - __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4116, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_2) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2); __pyx_t_2 = NULL; @@ -46117,7 +46119,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_6); __pyx_t_6 = 0; - __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_8, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4116, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_8, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -46125,7 +46127,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":4115 + /* "netCDF4/_netCDF4.pyx":4114 * # quantize data if least_significant_digit attribute * # exists (improves compression). * if self._has_lsd: # <<<<<<<<<<<<<< @@ -46134,60 +46136,60 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":4125 + /* "netCDF4/_netCDF4.pyx":4124 * # valid_min,validmax,missing_value,_Fill_Value. * # ignore if not a primitive or enum data type (not compound or vlen). * if self.mask and (self._isprimitive or self._isenum): # <<<<<<<<<<<<<< * # use missing_value as fill value. * # if no missing value set, use _FillValue. */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->mask); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4125, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->mask); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4124, __pyx_L1_error) if (__pyx_t_1) { } else { __pyx_t_4 = __pyx_t_1; goto __pyx_L46_bool_binop_done; } - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4125, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4124, __pyx_L1_error) if (!__pyx_t_1) { } else { __pyx_t_4 = __pyx_t_1; goto __pyx_L46_bool_binop_done; } - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isenum); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4125, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isenum); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4124, __pyx_L1_error) __pyx_t_4 = __pyx_t_1; __pyx_L46_bool_binop_done:; if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":4128 + /* "netCDF4/_netCDF4.pyx":4127 * # use missing_value as fill value. * # if no missing value set, use _FillValue. * if hasattr(self, 'scale_factor') or hasattr(self, 'add_offset'): # <<<<<<<<<<<<<< * # if not masked, create a masked array. * if not ma.isMA(data): data = self._toma(data) */ - __pyx_t_1 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 4128, __pyx_L1_error) + __pyx_t_1 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 4127, __pyx_L1_error) __pyx_t_9 = (__pyx_t_1 != 0); if (!__pyx_t_9) { } else { __pyx_t_4 = __pyx_t_9; goto __pyx_L50_bool_binop_done; } - __pyx_t_9 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 4128, __pyx_L1_error) + __pyx_t_9 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 4127, __pyx_L1_error) __pyx_t_1 = (__pyx_t_9 != 0); __pyx_t_4 = __pyx_t_1; __pyx_L50_bool_binop_done:; if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":4130 + /* "netCDF4/_netCDF4.pyx":4129 * if hasattr(self, 'scale_factor') or hasattr(self, 'add_offset'): * # if not masked, create a masked array. * if not ma.isMA(data): data = self._toma(data) # <<<<<<<<<<<<<< * if self.scale and self._isprimitive: * # pack non-masked values using scale_factor and add_offset */ - __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4130, __pyx_L1_error) + __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_isMA); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4130, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_isMA); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = NULL; @@ -46201,13 +46203,13 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ } } if (!__pyx_t_12) { - __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_data); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4130, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_data); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v_data}; - __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4130, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4129, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_11); } else @@ -46215,29 +46217,29 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v_data}; - __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4130, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4129, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_11); } else #endif { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4130, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_12); __pyx_t_12 = NULL; __Pyx_INCREF(__pyx_v_data); __Pyx_GIVEREF(__pyx_v_data); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_data); - __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4130, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4130, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4129, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_1 = ((!__pyx_t_4) != 0); if (__pyx_t_1) { - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_toma); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4130, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_toma); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { @@ -46250,13 +46252,13 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ } } if (!__pyx_t_6) { - __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_data); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4130, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_data); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_data}; - __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4130, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4129, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_11); } else @@ -46264,19 +46266,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_data}; - __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4130, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4129, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_11); } else #endif { - __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4130, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_INCREF(__pyx_v_data); __Pyx_GIVEREF(__pyx_v_data); PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_v_data); - __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_12, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4130, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_12, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } @@ -46286,7 +46288,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __pyx_t_11 = 0; } - /* "netCDF4/_netCDF4.pyx":4128 + /* "netCDF4/_netCDF4.pyx":4127 * # use missing_value as fill value. * # if no missing value set, use _FillValue. * if hasattr(self, 'scale_factor') or hasattr(self, 'add_offset'): # <<<<<<<<<<<<<< @@ -46295,7 +46297,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":4125 + /* "netCDF4/_netCDF4.pyx":4124 * # valid_min,validmax,missing_value,_Fill_Value. * # ignore if not a primitive or enum data type (not compound or vlen). * if self.mask and (self._isprimitive or self._isenum): # <<<<<<<<<<<<<< @@ -46304,81 +46306,81 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":4131 + /* "netCDF4/_netCDF4.pyx":4130 * # if not masked, create a masked array. * if not ma.isMA(data): data = self._toma(data) * if self.scale and self._isprimitive: # <<<<<<<<<<<<<< * # pack non-masked values using scale_factor and add_offset * if hasattr(self, 'scale_factor') and hasattr(self, 'add_offset'): */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->scale); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4131, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->scale); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4130, __pyx_L1_error) if (__pyx_t_4) { } else { __pyx_t_1 = __pyx_t_4; goto __pyx_L54_bool_binop_done; } - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4131, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4130, __pyx_L1_error) __pyx_t_1 = __pyx_t_4; __pyx_L54_bool_binop_done:; if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":4133 + /* "netCDF4/_netCDF4.pyx":4132 * if self.scale and self._isprimitive: * # pack non-masked values using scale_factor and add_offset * if hasattr(self, 'scale_factor') and hasattr(self, 'add_offset'): # <<<<<<<<<<<<<< * data = (data - self.add_offset)/self.scale_factor * if self.dtype.kind in 'iu': data = numpy.around(data) */ - __pyx_t_4 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 4133, __pyx_L1_error) + __pyx_t_4 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 4132, __pyx_L1_error) __pyx_t_9 = (__pyx_t_4 != 0); if (__pyx_t_9) { } else { __pyx_t_1 = __pyx_t_9; goto __pyx_L57_bool_binop_done; } - __pyx_t_9 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 4133, __pyx_L1_error) + __pyx_t_9 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 4132, __pyx_L1_error) __pyx_t_4 = (__pyx_t_9 != 0); __pyx_t_1 = __pyx_t_4; __pyx_L57_bool_binop_done:; if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":4134 + /* "netCDF4/_netCDF4.pyx":4133 * # pack non-masked values using scale_factor and add_offset * if hasattr(self, 'scale_factor') and hasattr(self, 'add_offset'): * data = (data - self.add_offset)/self.scale_factor # <<<<<<<<<<<<<< * if self.dtype.kind in 'iu': data = numpy.around(data) * elif hasattr(self, 'scale_factor'): */ - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4134, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_8 = PyNumber_Subtract(__pyx_v_data, __pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4134, __pyx_L1_error) + __pyx_t_8 = PyNumber_Subtract(__pyx_v_data, __pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4134, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_12 = __Pyx_PyNumber_Divide(__pyx_t_8, __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4134, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyNumber_Divide(__pyx_t_8, __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_12); __pyx_t_12 = 0; - /* "netCDF4/_netCDF4.pyx":4135 + /* "netCDF4/_netCDF4.pyx":4134 * if hasattr(self, 'scale_factor') and hasattr(self, 'add_offset'): * data = (data - self.add_offset)/self.scale_factor * if self.dtype.kind in 'iu': data = numpy.around(data) # <<<<<<<<<<<<<< * elif hasattr(self, 'scale_factor'): * data = data/self.scale_factor */ - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4135, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_12, __pyx_n_s_iu, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4135, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_12, __pyx_n_s_iu, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4134, __pyx_L1_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_4 = (__pyx_t_1 != 0); if (__pyx_t_4) { - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4135, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_around); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4135, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_around); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = NULL; @@ -46392,13 +46394,13 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ } } if (!__pyx_t_11) { - __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_data); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4135, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_data); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_v_data}; - __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4135, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4134, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_12); } else @@ -46406,19 +46408,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_v_data}; - __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4135, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4134, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_12); } else #endif { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4135, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_11); __pyx_t_11 = NULL; __Pyx_INCREF(__pyx_v_data); __Pyx_GIVEREF(__pyx_v_data); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_data); - __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4135, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -46428,7 +46430,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __pyx_t_12 = 0; } - /* "netCDF4/_netCDF4.pyx":4133 + /* "netCDF4/_netCDF4.pyx":4132 * if self.scale and self._isprimitive: * # pack non-masked values using scale_factor and add_offset * if hasattr(self, 'scale_factor') and hasattr(self, 'add_offset'): # <<<<<<<<<<<<<< @@ -46438,48 +46440,48 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ goto __pyx_L56; } - /* "netCDF4/_netCDF4.pyx":4136 + /* "netCDF4/_netCDF4.pyx":4135 * data = (data - self.add_offset)/self.scale_factor * if self.dtype.kind in 'iu': data = numpy.around(data) * elif hasattr(self, 'scale_factor'): # <<<<<<<<<<<<<< * data = data/self.scale_factor * if self.dtype.kind in 'iu': data = numpy.around(data) */ - __pyx_t_4 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 4136, __pyx_L1_error) + __pyx_t_4 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 4135, __pyx_L1_error) __pyx_t_1 = (__pyx_t_4 != 0); if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":4137 + /* "netCDF4/_netCDF4.pyx":4136 * if self.dtype.kind in 'iu': data = numpy.around(data) * elif hasattr(self, 'scale_factor'): * data = data/self.scale_factor # <<<<<<<<<<<<<< * if self.dtype.kind in 'iu': data = numpy.around(data) * elif hasattr(self, 'add_offset'): */ - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4137, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_8 = __Pyx_PyNumber_Divide(__pyx_v_data, __pyx_t_12); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4137, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyNumber_Divide(__pyx_v_data, __pyx_t_12); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":4138 + /* "netCDF4/_netCDF4.pyx":4137 * elif hasattr(self, 'scale_factor'): * data = data/self.scale_factor * if self.dtype.kind in 'iu': data = numpy.around(data) # <<<<<<<<<<<<<< * elif hasattr(self, 'add_offset'): * data = data - self.add_offset */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4138, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_8, __pyx_n_s_iu, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4138, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_8, __pyx_n_s_iu, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4137, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_4 = (__pyx_t_1 != 0); if (__pyx_t_4) { - __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4138, __pyx_L1_error) + __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_around); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4138, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_around); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = NULL; @@ -46493,13 +46495,13 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ } } if (!__pyx_t_12) { - __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_data); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4138, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_data); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v_data}; - __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4138, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4137, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_8); } else @@ -46507,19 +46509,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v_data}; - __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4138, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4137, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_8); } else #endif { - __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4138, __pyx_L1_error) + __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12); __pyx_t_12 = NULL; __Pyx_INCREF(__pyx_v_data); __Pyx_GIVEREF(__pyx_v_data); PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_v_data); - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4138, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } @@ -46529,7 +46531,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __pyx_t_8 = 0; } - /* "netCDF4/_netCDF4.pyx":4136 + /* "netCDF4/_netCDF4.pyx":4135 * data = (data - self.add_offset)/self.scale_factor * if self.dtype.kind in 'iu': data = numpy.around(data) * elif hasattr(self, 'scale_factor'): # <<<<<<<<<<<<<< @@ -46539,48 +46541,48 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ goto __pyx_L56; } - /* "netCDF4/_netCDF4.pyx":4139 + /* "netCDF4/_netCDF4.pyx":4138 * data = data/self.scale_factor * if self.dtype.kind in 'iu': data = numpy.around(data) * elif hasattr(self, 'add_offset'): # <<<<<<<<<<<<<< * data = data - self.add_offset * if self.dtype.kind in 'iu': data = numpy.around(data) */ - __pyx_t_4 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 4139, __pyx_L1_error) + __pyx_t_4 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 4138, __pyx_L1_error) __pyx_t_1 = (__pyx_t_4 != 0); if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":4140 + /* "netCDF4/_netCDF4.pyx":4139 * if self.dtype.kind in 'iu': data = numpy.around(data) * elif hasattr(self, 'add_offset'): * data = data - self.add_offset # <<<<<<<<<<<<<< * if self.dtype.kind in 'iu': data = numpy.around(data) * if ma.isMA(data): */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4140, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_6 = PyNumber_Subtract(__pyx_v_data, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4140, __pyx_L1_error) + __pyx_t_6 = PyNumber_Subtract(__pyx_v_data, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":4141 + /* "netCDF4/_netCDF4.pyx":4140 * elif hasattr(self, 'add_offset'): * data = data - self.add_offset * if self.dtype.kind in 'iu': data = numpy.around(data) # <<<<<<<<<<<<<< * if ma.isMA(data): * # if underlying data in masked regions of masked array */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4141, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_6, __pyx_n_s_iu, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4141, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_6, __pyx_n_s_iu, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4140, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (__pyx_t_1 != 0); if (__pyx_t_4) { - __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4141, __pyx_L1_error) + __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_around); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4141, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_around); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = NULL; @@ -46594,13 +46596,13 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ } } if (!__pyx_t_8) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_data); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4141, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_data); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_11)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_data}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4141, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4140, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_6); } else @@ -46608,19 +46610,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_data}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4141, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4140, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_6); } else #endif { - __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4141, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_8); __pyx_t_8 = NULL; __Pyx_INCREF(__pyx_v_data); __Pyx_GIVEREF(__pyx_v_data); PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_v_data); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4141, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } @@ -46630,7 +46632,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __pyx_t_6 = 0; } - /* "netCDF4/_netCDF4.pyx":4139 + /* "netCDF4/_netCDF4.pyx":4138 * data = data/self.scale_factor * if self.dtype.kind in 'iu': data = numpy.around(data) * elif hasattr(self, 'add_offset'): # <<<<<<<<<<<<<< @@ -46640,16 +46642,16 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ } __pyx_L56:; - /* "netCDF4/_netCDF4.pyx":4142 + /* "netCDF4/_netCDF4.pyx":4141 * data = data - self.add_offset * if self.dtype.kind in 'iu': data = numpy.around(data) * if ma.isMA(data): # <<<<<<<<<<<<<< * # if underlying data in masked regions of masked array * # corresponds to missing values, don't fill masked array - */ - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4142, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_isMA); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4142, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_isMA); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = NULL; @@ -46663,13 +46665,13 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ } } if (!__pyx_t_11) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_v_data); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4142, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_v_data); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_12)) { PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_v_data}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4142, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4141, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_6); } else @@ -46677,36 +46679,36 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) { PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_v_data}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4142, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4141, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_6); } else #endif { - __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4142, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_11); __pyx_t_11 = NULL; __Pyx_INCREF(__pyx_v_data); __Pyx_GIVEREF(__pyx_v_data); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_data); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4142, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4142, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4141, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":4146 + /* "netCDF4/_netCDF4.pyx":4145 * # corresponds to missing values, don't fill masked array - * # just use underlying data instead * if hasattr(self, 'missing_value') and \ # <<<<<<<<<<<<<< * numpy.all(numpy.in1d(data.data[data.mask],self.missing_value)): * data = data.data */ - __pyx_t_1 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_missing_value); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 4146, __pyx_L1_error) + __pyx_t_1 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_missing_value); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 4145, __pyx_L1_error) __pyx_t_9 = (__pyx_t_1 != 0); if (__pyx_t_9) { } else { @@ -46714,32 +46716,32 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ goto __pyx_L64_bool_binop_done; } - /* "netCDF4/_netCDF4.pyx":4147 + /* "netCDF4/_netCDF4.pyx":4146 * # just use underlying data instead * if hasattr(self, 'missing_value') and \ * numpy.all(numpy.in1d(data.data[data.mask],self.missing_value)): # <<<<<<<<<<<<<< * data = data.data * else: */ - __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4147, __pyx_L1_error) + __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_all); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4147, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_all); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4147, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_in1d); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4147, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_in1d); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_data); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4147, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_data); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_mask); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4147, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_mask); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_16 = PyObject_GetItem(__pyx_t_11, __pyx_t_3); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4147, __pyx_L1_error) + __pyx_t_16 = PyObject_GetItem(__pyx_t_11, __pyx_t_3); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_missing_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4147, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_missing_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_11 = NULL; __pyx_t_7 = 0; @@ -46756,7 +46758,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_16, __pyx_t_3}; - __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4147, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4146, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; @@ -46766,7 +46768,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_16, __pyx_t_3}; - __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4147, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4146, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; @@ -46774,7 +46776,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ } else #endif { - __pyx_t_17 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4147, __pyx_L1_error) + __pyx_t_17 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); if (__pyx_t_11) { __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_11); __pyx_t_11 = NULL; @@ -46785,7 +46787,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ PyTuple_SET_ITEM(__pyx_t_17, 1+__pyx_t_7, __pyx_t_3); __pyx_t_16 = 0; __pyx_t_3 = 0; - __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_17, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4147, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_17, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; } @@ -46801,14 +46803,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ } } if (!__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4147, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4146, __pyx_L1_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_6); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_12}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4147, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4146, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; @@ -46817,31 +46819,31 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_12}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4147, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4146, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } else #endif { - __pyx_t_17 = PyTuple_New(1+1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4147, __pyx_L1_error) + __pyx_t_17 = PyTuple_New(1+1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_2); __pyx_t_2 = NULL; __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_17, 0+1, __pyx_t_12); __pyx_t_12 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_17, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4147, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_17, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; } } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 4147, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 4146, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = __pyx_t_9; __pyx_L64_bool_binop_done:; - /* "netCDF4/_netCDF4.pyx":4146 + /* "netCDF4/_netCDF4.pyx":4145 * # corresponds to missing values, don't fill masked array - * # just use underlying data instead * if hasattr(self, 'missing_value') and \ # <<<<<<<<<<<<<< @@ -46850,19 +46852,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ */ if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":4148 + /* "netCDF4/_netCDF4.pyx":4147 * if hasattr(self, 'missing_value') and \ * numpy.all(numpy.in1d(data.data[data.mask],self.missing_value)): * data = data.data # <<<<<<<<<<<<<< * else: * if hasattr(self, 'missing_value'): */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_data); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4148, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_data); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":4146 + /* "netCDF4/_netCDF4.pyx":4145 * # corresponds to missing values, don't fill masked array - * # just use underlying data instead * if hasattr(self, 'missing_value') and \ # <<<<<<<<<<<<<< @@ -46872,7 +46874,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ goto __pyx_L63; } - /* "netCDF4/_netCDF4.pyx":4150 + /* "netCDF4/_netCDF4.pyx":4149 * data = data.data * else: * if hasattr(self, 'missing_value'): # <<<<<<<<<<<<<< @@ -46880,23 +46882,23 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ * # if missing value is a vector, raise an exception */ /*else*/ { - __pyx_t_4 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_missing_value); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 4150, __pyx_L1_error) + __pyx_t_4 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_missing_value); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 4149, __pyx_L1_error) __pyx_t_9 = (__pyx_t_4 != 0); if (__pyx_t_9) { - /* "netCDF4/_netCDF4.pyx":4154 + /* "netCDF4/_netCDF4.pyx":4153 * # if missing value is a vector, raise an exception * # since we then don't know how to fill in masked values. * if numpy.array(self.missing_value).shape == (): # <<<<<<<<<<<<<< * fillval = self.missing_value * else: */ - __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4154, __pyx_L1_error) + __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_array); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4154, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_array); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_missing_value); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4154, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_missing_value); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_17))) { @@ -46909,14 +46911,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ } } if (!__pyx_t_12) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_17, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4154, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_17, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4153, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_6); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_17)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_8}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_17, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4154, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_17, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4153, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -46925,47 +46927,47 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_17)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_8}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_17, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4154, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_17, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4153, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else #endif { - __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4154, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_12); __pyx_t_12 = NULL; __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_8); __pyx_t_8 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_17, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4154, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_17, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } } __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_shape); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4154, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_shape); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyObject_RichCompare(__pyx_t_17, __pyx_empty_tuple, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4154, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_t_17, __pyx_empty_tuple, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4153, __pyx_L1_error) __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 4154, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 4153, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_9) { - /* "netCDF4/_netCDF4.pyx":4155 + /* "netCDF4/_netCDF4.pyx":4154 * # since we then don't know how to fill in masked values. * if numpy.array(self.missing_value).shape == (): * fillval = self.missing_value # <<<<<<<<<<<<<< * else: * msg="cannot assign fill_value for masked array when missing_value attribute is not a scalar" */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_missing_value); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4155, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_missing_value); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_fillval = __pyx_t_6; __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":4154 + /* "netCDF4/_netCDF4.pyx":4153 * # if missing value is a vector, raise an exception * # since we then don't know how to fill in masked values. * if numpy.array(self.missing_value).shape == (): # <<<<<<<<<<<<<< @@ -46975,7 +46977,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ goto __pyx_L67; } - /* "netCDF4/_netCDF4.pyx":4157 + /* "netCDF4/_netCDF4.pyx":4156 * fillval = self.missing_value * else: * msg="cannot assign fill_value for masked array when missing_value attribute is not a scalar" # <<<<<<<<<<<<<< @@ -46986,37 +46988,37 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __Pyx_INCREF(__pyx_kp_s_cannot_assign_fill_value_for_mas); __pyx_v_msg = __pyx_kp_s_cannot_assign_fill_value_for_mas; - /* "netCDF4/_netCDF4.pyx":4158 + /* "netCDF4/_netCDF4.pyx":4157 * else: * msg="cannot assign fill_value for masked array when missing_value attribute is not a scalar" * raise RuntimeError(msg) # <<<<<<<<<<<<<< * if numpy.array(fillval).shape != (): * fillval = fillval[0] */ - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4158, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_msg); __Pyx_GIVEREF(__pyx_v_msg); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_msg); - __pyx_t_17 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4158, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_17, 0, 0, 0); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - __PYX_ERR(0, 4158, __pyx_L1_error) + __PYX_ERR(0, 4157, __pyx_L1_error) } __pyx_L67:; - /* "netCDF4/_netCDF4.pyx":4159 + /* "netCDF4/_netCDF4.pyx":4158 * msg="cannot assign fill_value for masked array when missing_value attribute is not a scalar" * raise RuntimeError(msg) * if numpy.array(fillval).shape != (): # <<<<<<<<<<<<<< * fillval = fillval[0] * elif hasattr(self, '_FillValue'): */ - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4159, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4159, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -47030,13 +47032,13 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ } } if (!__pyx_t_6) { - __pyx_t_17 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_fillval); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4159, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_fillval); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_fillval}; - __pyx_t_17 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4159, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4158, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_17); } else @@ -47044,46 +47046,46 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_fillval}; - __pyx_t_17 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4159, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4158, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_17); } else #endif { - __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4159, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_INCREF(__pyx_v_fillval); __Pyx_GIVEREF(__pyx_v_fillval); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_fillval); - __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4159, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4159, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - __pyx_t_17 = PyObject_RichCompare(__pyx_t_2, __pyx_empty_tuple, Py_NE); __Pyx_XGOTREF(__pyx_t_17); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4159, __pyx_L1_error) + __pyx_t_17 = PyObject_RichCompare(__pyx_t_2, __pyx_empty_tuple, Py_NE); __Pyx_XGOTREF(__pyx_t_17); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4158, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_17); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 4159, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_17); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 4158, __pyx_L1_error) __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; if (__pyx_t_9) { - /* "netCDF4/_netCDF4.pyx":4160 + /* "netCDF4/_netCDF4.pyx":4159 * raise RuntimeError(msg) * if numpy.array(fillval).shape != (): * fillval = fillval[0] # <<<<<<<<<<<<<< * elif hasattr(self, '_FillValue'): * fillval = self._FillValue */ - __pyx_t_17 = __Pyx_GetItemInt(__pyx_v_fillval, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4160, __pyx_L1_error) + __pyx_t_17 = __Pyx_GetItemInt(__pyx_v_fillval, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF_SET(__pyx_v_fillval, __pyx_t_17); __pyx_t_17 = 0; - /* "netCDF4/_netCDF4.pyx":4159 + /* "netCDF4/_netCDF4.pyx":4158 * msg="cannot assign fill_value for masked array when missing_value attribute is not a scalar" * raise RuntimeError(msg) * if numpy.array(fillval).shape != (): # <<<<<<<<<<<<<< @@ -47092,7 +47094,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":4150 + /* "netCDF4/_netCDF4.pyx":4149 * data = data.data * else: * if hasattr(self, 'missing_value'): # <<<<<<<<<<<<<< @@ -47102,30 +47104,30 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ goto __pyx_L66; } - /* "netCDF4/_netCDF4.pyx":4161 + /* "netCDF4/_netCDF4.pyx":4160 * if numpy.array(fillval).shape != (): * fillval = fillval[0] * elif hasattr(self, '_FillValue'): # <<<<<<<<<<<<<< * fillval = self._FillValue * else: */ - __pyx_t_9 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_FillValue); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 4161, __pyx_L1_error) + __pyx_t_9 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_FillValue); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 4160, __pyx_L1_error) __pyx_t_4 = (__pyx_t_9 != 0); if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":4162 + /* "netCDF4/_netCDF4.pyx":4161 * fillval = fillval[0] * elif hasattr(self, '_FillValue'): * fillval = self._FillValue # <<<<<<<<<<<<<< * else: * fillval = default_fillvals[self.dtype.str[1:]] */ - __pyx_t_17 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_FillValue); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4162, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_FillValue); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); __pyx_v_fillval = __pyx_t_17; __pyx_t_17 = 0; - /* "netCDF4/_netCDF4.pyx":4161 + /* "netCDF4/_netCDF4.pyx":4160 * if numpy.array(fillval).shape != (): * fillval = fillval[0] * elif hasattr(self, '_FillValue'): # <<<<<<<<<<<<<< @@ -47135,7 +47137,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ goto __pyx_L66; } - /* "netCDF4/_netCDF4.pyx":4164 + /* "netCDF4/_netCDF4.pyx":4163 * fillval = self._FillValue * else: * fillval = default_fillvals[self.dtype.str[1:]] # <<<<<<<<<<<<<< @@ -47143,14 +47145,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ * */ /*else*/ { - __pyx_t_17 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_fillvals); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4164, __pyx_L1_error) + __pyx_t_17 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_fillvals); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4164, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_t_2, 1, 0, NULL, NULL, &__pyx_slice__69, 1, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4164, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_t_2, 1, 0, NULL, NULL, &__pyx_slice__69, 1, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_GetItem(__pyx_t_17, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4164, __pyx_L1_error) + __pyx_t_2 = PyObject_GetItem(__pyx_t_17, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -47159,19 +47161,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ } __pyx_L66:; - /* "netCDF4/_netCDF4.pyx":4165 + /* "netCDF4/_netCDF4.pyx":4164 * else: * fillval = default_fillvals[self.dtype.str[1:]] * data = data.filled(fill_value=fillval) # <<<<<<<<<<<<<< * * # Fill output array with data chunks. */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_filled); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4165, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_filled); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4165, __pyx_L1_error) + __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_fill_value, __pyx_v_fillval) < 0) __PYX_ERR(0, 4165, __pyx_L1_error) - __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4165, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_fill_value, __pyx_v_fillval) < 0) __PYX_ERR(0, 4164, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -47180,7 +47182,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ } __pyx_L63:; - /* "netCDF4/_netCDF4.pyx":4142 + /* "netCDF4/_netCDF4.pyx":4141 * data = data - self.add_offset * if self.dtype.kind in 'iu': data = numpy.around(data) * if ma.isMA(data): # <<<<<<<<<<<<<< @@ -47189,7 +47191,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":4131 + /* "netCDF4/_netCDF4.pyx":4130 * # if not masked, create a masked array. * if not ma.isMA(data): data = self._toma(data) * if self.scale and self._isprimitive: # <<<<<<<<<<<<<< @@ -47198,14 +47200,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":4168 + /* "netCDF4/_netCDF4.pyx":4167 * * # Fill output array with data chunks. * for (a,b,c,i) in zip(start, count, stride, put_ind): # <<<<<<<<<<<<<< * dataput = data[tuple(i)] * if dataput.size == 0: continue # nothing to write */ - __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4168, __pyx_L1_error) + __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_2 = NULL; __pyx_t_7 = 0; @@ -47222,7 +47224,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[5] = {__pyx_t_2, __pyx_v_start, __pyx_v_count, __pyx_v_stride, __pyx_v_put_ind}; - __pyx_t_17 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4168, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4167, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_17); } else @@ -47230,13 +47232,13 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[5] = {__pyx_t_2, __pyx_v_start, __pyx_v_count, __pyx_v_stride, __pyx_v_put_ind}; - __pyx_t_17 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4168, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4167, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_17); } else #endif { - __pyx_t_6 = PyTuple_New(4+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4168, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(4+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_2) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL; @@ -47253,7 +47255,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __Pyx_INCREF(__pyx_v_put_ind); __Pyx_GIVEREF(__pyx_v_put_ind); PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_7, __pyx_v_put_ind); - __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4168, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -47262,9 +47264,9 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __pyx_t_8 = __pyx_t_17; __Pyx_INCREF(__pyx_t_8); __pyx_t_15 = 0; __pyx_t_13 = NULL; } else { - __pyx_t_15 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_17); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4168, __pyx_L1_error) + __pyx_t_15 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_17); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_13 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4168, __pyx_L1_error) + __pyx_t_13 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4167, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; for (;;) { @@ -47272,17 +47274,17 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ if (likely(PyList_CheckExact(__pyx_t_8))) { if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_8)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_17 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_15); __Pyx_INCREF(__pyx_t_17); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 4168, __pyx_L1_error) + __pyx_t_17 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_15); __Pyx_INCREF(__pyx_t_17); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 4167, __pyx_L1_error) #else - __pyx_t_17 = PySequence_ITEM(__pyx_t_8, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4168, __pyx_L1_error) + __pyx_t_17 = PySequence_ITEM(__pyx_t_8, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); #endif } else { if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_8)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_17 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_15); __Pyx_INCREF(__pyx_t_17); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 4168, __pyx_L1_error) + __pyx_t_17 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_15); __Pyx_INCREF(__pyx_t_17); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 4167, __pyx_L1_error) #else - __pyx_t_17 = PySequence_ITEM(__pyx_t_8, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4168, __pyx_L1_error) + __pyx_t_17 = PySequence_ITEM(__pyx_t_8, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); #endif } @@ -47292,7 +47294,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 4168, __pyx_L1_error) + else __PYX_ERR(0, 4167, __pyx_L1_error) } break; } @@ -47308,7 +47310,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ if (unlikely(size != 4)) { if (size > 4) __Pyx_RaiseTooManyValuesError(4); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 4168, __pyx_L1_error) + __PYX_ERR(0, 4167, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -47331,7 +47333,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ Py_ssize_t i; PyObject** temps[4] = {&__pyx_t_6,&__pyx_t_2,&__pyx_t_12,&__pyx_t_3}; for (i=0; i < 4; i++) { - PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 4168, __pyx_L1_error) + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 4167, __pyx_L1_error) __Pyx_GOTREF(item); *(temps[i]) = item; } @@ -47341,7 +47343,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ } else { Py_ssize_t index = -1; PyObject** temps[4] = {&__pyx_t_6,&__pyx_t_2,&__pyx_t_12,&__pyx_t_3}; - __pyx_t_16 = PyObject_GetIter(__pyx_t_17); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4168, __pyx_L1_error) + __pyx_t_16 = PyObject_GetIter(__pyx_t_17); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_14 = Py_TYPE(__pyx_t_16)->tp_iternext; @@ -47350,7 +47352,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __Pyx_GOTREF(item); *(temps[index]) = item; } - if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_16), 4) < 0) __PYX_ERR(0, 4168, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_16), 4) < 0) __PYX_ERR(0, 4167, __pyx_L1_error) __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; goto __pyx_L72_unpacking_done; @@ -47358,7 +47360,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 4168, __pyx_L1_error) + __PYX_ERR(0, 4167, __pyx_L1_error) __pyx_L72_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_a, __pyx_t_6); @@ -47370,74 +47372,74 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":4169 + /* "netCDF4/_netCDF4.pyx":4168 * # Fill output array with data chunks. * for (a,b,c,i) in zip(start, count, stride, put_ind): * dataput = data[tuple(i)] # <<<<<<<<<<<<<< * if dataput.size == 0: continue # nothing to write * # convert array scalar to regular array with one element. */ - __pyx_t_17 = PySequence_Tuple(__pyx_v_i); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4169, __pyx_L1_error) + __pyx_t_17 = PySequence_Tuple(__pyx_v_i); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); - __pyx_t_3 = PyObject_GetItem(__pyx_v_data, __pyx_t_17); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4169, __pyx_L1_error) + __pyx_t_3 = PyObject_GetItem(__pyx_v_data, __pyx_t_17); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_XDECREF_SET(__pyx_v_dataput, __pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":4170 + /* "netCDF4/_netCDF4.pyx":4169 * for (a,b,c,i) in zip(start, count, stride, put_ind): * dataput = data[tuple(i)] * if dataput.size == 0: continue # nothing to write # <<<<<<<<<<<<<< * # convert array scalar to regular array with one element. * if dataput.shape == (): */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dataput, __pyx_n_s_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4170, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dataput, __pyx_n_s_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_17 = __Pyx_PyInt_EqObjC(__pyx_t_3, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4170, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyInt_EqObjC(__pyx_t_3, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_17); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4170, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_17); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4169, __pyx_L1_error) __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; if (__pyx_t_4) { goto __pyx_L69_continue; } - /* "netCDF4/_netCDF4.pyx":4172 + /* "netCDF4/_netCDF4.pyx":4171 * if dataput.size == 0: continue # nothing to write * # convert array scalar to regular array with one element. * if dataput.shape == (): # <<<<<<<<<<<<<< * if self._isvlen: * dataput=numpy.array(dataput,'O') */ - __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_dataput, __pyx_n_s_shape); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4172, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_dataput, __pyx_n_s_shape); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); - __pyx_t_3 = PyObject_RichCompare(__pyx_t_17, __pyx_empty_tuple, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4172, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_17, __pyx_empty_tuple, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4171, __pyx_L1_error) __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4172, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4171, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":4173 + /* "netCDF4/_netCDF4.pyx":4172 * # convert array scalar to regular array with one element. * if dataput.shape == (): * if self._isvlen: # <<<<<<<<<<<<<< * dataput=numpy.array(dataput,'O') * else: */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4173, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4172, __pyx_L1_error) if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":4174 + /* "netCDF4/_netCDF4.pyx":4173 * if dataput.shape == (): * if self._isvlen: * dataput=numpy.array(dataput,'O') # <<<<<<<<<<<<<< * else: * dataput=numpy.array(dataput,dataput.dtype) */ - __pyx_t_17 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4174, __pyx_L1_error) + __pyx_t_17 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_array); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4174, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_array); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_17 = NULL; @@ -47455,7 +47457,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_12)) { PyObject *__pyx_temp[3] = {__pyx_t_17, __pyx_v_dataput, __pyx_n_s_O}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4174, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4173, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -47463,13 +47465,13 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) { PyObject *__pyx_temp[3] = {__pyx_t_17, __pyx_v_dataput, __pyx_n_s_O}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4174, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4173, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_2 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4174, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__pyx_t_17) { __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_17); __pyx_t_17 = NULL; @@ -47480,7 +47482,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __Pyx_INCREF(__pyx_n_s_O); __Pyx_GIVEREF(__pyx_n_s_O); PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_7, __pyx_n_s_O); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4174, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -47488,7 +47490,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __Pyx_DECREF_SET(__pyx_v_dataput, __pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":4173 + /* "netCDF4/_netCDF4.pyx":4172 * # convert array scalar to regular array with one element. * if dataput.shape == (): * if self._isvlen: # <<<<<<<<<<<<<< @@ -47498,7 +47500,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ goto __pyx_L75; } - /* "netCDF4/_netCDF4.pyx":4176 + /* "netCDF4/_netCDF4.pyx":4175 * dataput=numpy.array(dataput,'O') * else: * dataput=numpy.array(dataput,dataput.dtype) # <<<<<<<<<<<<<< @@ -47506,12 +47508,12 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ * */ /*else*/ { - __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4176, __pyx_L1_error) + __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4176, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_dataput, __pyx_n_s_dtype); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4176, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_dataput, __pyx_n_s_dtype); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_17 = NULL; __pyx_t_7 = 0; @@ -47528,7 +47530,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_17, __pyx_v_dataput, __pyx_t_12}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4176, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4175, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; @@ -47537,14 +47539,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_17, __pyx_v_dataput, __pyx_t_12}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4176, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4175, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4176, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_17) { __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_17); __pyx_t_17 = NULL; @@ -47555,7 +47557,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_t_12); __pyx_t_12 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4176, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -47565,7 +47567,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ } __pyx_L75:; - /* "netCDF4/_netCDF4.pyx":4172 + /* "netCDF4/_netCDF4.pyx":4171 * if dataput.size == 0: continue # nothing to write * # convert array scalar to regular array with one element. * if dataput.shape == (): # <<<<<<<<<<<<<< @@ -47574,14 +47576,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":4177 + /* "netCDF4/_netCDF4.pyx":4176 * else: * dataput=numpy.array(dataput,dataput.dtype) * self._put(dataput,a,b,c) # <<<<<<<<<<<<<< * * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_put_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4177, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_put_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = NULL; __pyx_t_7 = 0; @@ -47598,7 +47600,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[5] = {__pyx_t_6, __pyx_v_dataput, __pyx_v_a, __pyx_v_b, __pyx_v_c}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4177, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4176, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -47606,13 +47608,13 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[5] = {__pyx_t_6, __pyx_v_dataput, __pyx_v_a, __pyx_v_b, __pyx_v_c}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4177, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4176, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_12 = PyTuple_New(4+__pyx_t_7); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4177, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(4+__pyx_t_7); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -47629,14 +47631,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __Pyx_INCREF(__pyx_v_c); __Pyx_GIVEREF(__pyx_v_c); PyTuple_SET_ITEM(__pyx_t_12, 3+__pyx_t_7, __pyx_v_c); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_12, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4177, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_12, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":4168 + /* "netCDF4/_netCDF4.pyx":4167 * * # Fill output array with data chunks. * for (a,b,c,i) in zip(start, count, stride, put_ind): # <<<<<<<<<<<<<< @@ -47647,7 +47649,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":4035 + /* "netCDF4/_netCDF4.pyx":4034 * free(countp) * * def __setitem__(self, elem, data): # <<<<<<<<<<<<<< @@ -47690,7 +47692,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4180 +/* "netCDF4/_netCDF4.pyx":4179 * * * def __len__(self): # <<<<<<<<<<<<<< @@ -47721,34 +47723,34 @@ static Py_ssize_t __pyx_pf_7netCDF4_8_netCDF4_8Variable_52__len__(struct __pyx_o Py_ssize_t __pyx_t_5; __Pyx_RefNannySetupContext("__len__", 0); - /* "netCDF4/_netCDF4.pyx":4181 + /* "netCDF4/_netCDF4.pyx":4180 * * def __len__(self): * if not self.shape: # <<<<<<<<<<<<<< * raise TypeError('len() of unsized object') * else: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4181, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4181, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4180, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = ((!__pyx_t_2) != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":4182 + /* "netCDF4/_netCDF4.pyx":4181 * def __len__(self): * if not self.shape: * raise TypeError('len() of unsized object') # <<<<<<<<<<<<<< * else: * return self.shape[0] */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__70, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4182, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__70, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 4182, __pyx_L1_error) + __PYX_ERR(0, 4181, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4181 + /* "netCDF4/_netCDF4.pyx":4180 * * def __len__(self): * if not self.shape: # <<<<<<<<<<<<<< @@ -47757,7 +47759,7 @@ static Py_ssize_t __pyx_pf_7netCDF4_8_netCDF4_8Variable_52__len__(struct __pyx_o */ } - /* "netCDF4/_netCDF4.pyx":4184 + /* "netCDF4/_netCDF4.pyx":4183 * raise TypeError('len() of unsized object') * else: * return self.shape[0] # <<<<<<<<<<<<<< @@ -47765,18 +47767,18 @@ static Py_ssize_t __pyx_pf_7netCDF4_8_netCDF4_8Variable_52__len__(struct __pyx_o * */ /*else*/ { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4184, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4184, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4184, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4183, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":4180 + /* "netCDF4/_netCDF4.pyx":4179 * * * def __len__(self): # <<<<<<<<<<<<<< @@ -47795,7 +47797,7 @@ static Py_ssize_t __pyx_pf_7netCDF4_8_netCDF4_8Variable_52__len__(struct __pyx_o return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4187 +/* "netCDF4/_netCDF4.pyx":4186 * * * def assignValue(self,val): # <<<<<<<<<<<<<< @@ -47825,34 +47827,34 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_54assignValue(struct __py int __pyx_t_3; __Pyx_RefNannySetupContext("assignValue", 0); - /* "netCDF4/_netCDF4.pyx":4193 + /* "netCDF4/_netCDF4.pyx":4192 * assign a value to a scalar variable. Provided for compatibility with * Scientific.IO.NetCDF, can also be done by assigning to an Ellipsis slice ([...]).""" * if len(self.dimensions): # <<<<<<<<<<<<<< * raise IndexError('to assign values to a non-scalar variable, use a slice') * self[:]=val */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4193, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 4193, __pyx_L1_error) + __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 4192, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":4194 + /* "netCDF4/_netCDF4.pyx":4193 * Scientific.IO.NetCDF, can also be done by assigning to an Ellipsis slice ([...]).""" * if len(self.dimensions): * raise IndexError('to assign values to a non-scalar variable, use a slice') # <<<<<<<<<<<<<< * self[:]=val * */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4194, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 4194, __pyx_L1_error) + __PYX_ERR(0, 4193, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4193 + /* "netCDF4/_netCDF4.pyx":4192 * assign a value to a scalar variable. Provided for compatibility with * Scientific.IO.NetCDF, can also be done by assigning to an Ellipsis slice ([...]).""" * if len(self.dimensions): # <<<<<<<<<<<<<< @@ -47861,16 +47863,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_54assignValue(struct __py */ } - /* "netCDF4/_netCDF4.pyx":4195 + /* "netCDF4/_netCDF4.pyx":4194 * if len(self.dimensions): * raise IndexError('to assign values to a non-scalar variable, use a slice') * self[:]=val # <<<<<<<<<<<<<< * * def getValue(self): */ - if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self), __pyx_v_val, 0, 0, NULL, NULL, &__pyx_slice__72, 0, 0, 1) < 0) __PYX_ERR(0, 4195, __pyx_L1_error) + if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self), __pyx_v_val, 0, 0, NULL, NULL, &__pyx_slice__72, 0, 0, 1) < 0) __PYX_ERR(0, 4194, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4187 + /* "netCDF4/_netCDF4.pyx":4186 * * * def assignValue(self,val): # <<<<<<<<<<<<<< @@ -47891,7 +47893,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_54assignValue(struct __py return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4197 +/* "netCDF4/_netCDF4.pyx":4196 * self[:]=val * * def getValue(self): # <<<<<<<<<<<<<< @@ -47921,34 +47923,34 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_56getValue(struct __pyx_o int __pyx_t_3; __Pyx_RefNannySetupContext("getValue", 0); - /* "netCDF4/_netCDF4.pyx":4203 + /* "netCDF4/_netCDF4.pyx":4202 * get the value of a scalar variable. Provided for compatibility with * Scientific.IO.NetCDF, can also be done by slicing with an Ellipsis ([...]).""" * if len(self.dimensions): # <<<<<<<<<<<<<< * raise IndexError('to retrieve values from a non-scalar variable, use slicing') * return self[slice(None)] */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4203, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 4203, __pyx_L1_error) + __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 4202, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":4204 + /* "netCDF4/_netCDF4.pyx":4203 * Scientific.IO.NetCDF, can also be done by slicing with an Ellipsis ([...]).""" * if len(self.dimensions): * raise IndexError('to retrieve values from a non-scalar variable, use slicing') # <<<<<<<<<<<<<< * return self[slice(None)] * */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4204, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 4204, __pyx_L1_error) + __PYX_ERR(0, 4203, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4203 + /* "netCDF4/_netCDF4.pyx":4202 * get the value of a scalar variable. Provided for compatibility with * Scientific.IO.NetCDF, can also be done by slicing with an Ellipsis ([...]).""" * if len(self.dimensions): # <<<<<<<<<<<<<< @@ -47957,7 +47959,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_56getValue(struct __pyx_o */ } - /* "netCDF4/_netCDF4.pyx":4205 + /* "netCDF4/_netCDF4.pyx":4204 * if len(self.dimensions): * raise IndexError('to retrieve values from a non-scalar variable, use slicing') * return self[slice(None)] # <<<<<<<<<<<<<< @@ -47965,13 +47967,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_56getValue(struct __pyx_o * def set_auto_maskandscale(self,maskandscale): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_slice__74); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4205, __pyx_L1_error) + __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_slice__74); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":4197 + /* "netCDF4/_netCDF4.pyx":4196 * self[:]=val * * def getValue(self): # <<<<<<<<<<<<<< @@ -47990,7 +47992,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_56getValue(struct __pyx_o return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4207 +/* "netCDF4/_netCDF4.pyx":4206 * return self[slice(None)] * * def set_auto_maskandscale(self,maskandscale): # <<<<<<<<<<<<<< @@ -48018,17 +48020,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_58set_auto_maskandscale(s int __pyx_t_1; __Pyx_RefNannySetupContext("set_auto_maskandscale", 0); - /* "netCDF4/_netCDF4.pyx":4249 + /* "netCDF4/_netCDF4.pyx":4248 * (automatic conversions are performed). * """ * if maskandscale: # <<<<<<<<<<<<<< * self.scale = True * self.mask = True */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_maskandscale); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4249, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_maskandscale); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4248, __pyx_L1_error) if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":4250 + /* "netCDF4/_netCDF4.pyx":4249 * """ * if maskandscale: * self.scale = True # <<<<<<<<<<<<<< @@ -48041,7 +48043,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_58set_auto_maskandscale(s __Pyx_DECREF(__pyx_v_self->scale); __pyx_v_self->scale = Py_True; - /* "netCDF4/_netCDF4.pyx":4251 + /* "netCDF4/_netCDF4.pyx":4250 * if maskandscale: * self.scale = True * self.mask = True # <<<<<<<<<<<<<< @@ -48054,7 +48056,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_58set_auto_maskandscale(s __Pyx_DECREF(__pyx_v_self->mask); __pyx_v_self->mask = Py_True; - /* "netCDF4/_netCDF4.pyx":4249 + /* "netCDF4/_netCDF4.pyx":4248 * (automatic conversions are performed). * """ * if maskandscale: # <<<<<<<<<<<<<< @@ -48064,7 +48066,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_58set_auto_maskandscale(s goto __pyx_L3; } - /* "netCDF4/_netCDF4.pyx":4253 + /* "netCDF4/_netCDF4.pyx":4252 * self.mask = True * else: * self.scale = False # <<<<<<<<<<<<<< @@ -48078,7 +48080,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_58set_auto_maskandscale(s __Pyx_DECREF(__pyx_v_self->scale); __pyx_v_self->scale = Py_False; - /* "netCDF4/_netCDF4.pyx":4254 + /* "netCDF4/_netCDF4.pyx":4253 * else: * self.scale = False * self.mask = False # <<<<<<<<<<<<<< @@ -48093,7 +48095,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_58set_auto_maskandscale(s } __pyx_L3:; - /* "netCDF4/_netCDF4.pyx":4207 + /* "netCDF4/_netCDF4.pyx":4206 * return self[slice(None)] * * def set_auto_maskandscale(self,maskandscale): # <<<<<<<<<<<<<< @@ -48113,7 +48115,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_58set_auto_maskandscale(s return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4256 +/* "netCDF4/_netCDF4.pyx":4255 * self.mask = False * * def set_auto_scale(self,scale): # <<<<<<<<<<<<<< @@ -48141,17 +48143,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_60set_auto_scale(struct _ int __pyx_t_1; __Pyx_RefNannySetupContext("set_auto_scale", 0); - /* "netCDF4/_netCDF4.pyx":4283 + /* "netCDF4/_netCDF4.pyx":4282 * (automatic conversions are performed). * """ * if scale: # <<<<<<<<<<<<<< * self.scale = True * else: */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_scale); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4283, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_scale); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4282, __pyx_L1_error) if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":4284 + /* "netCDF4/_netCDF4.pyx":4283 * """ * if scale: * self.scale = True # <<<<<<<<<<<<<< @@ -48164,7 +48166,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_60set_auto_scale(struct _ __Pyx_DECREF(__pyx_v_self->scale); __pyx_v_self->scale = Py_True; - /* "netCDF4/_netCDF4.pyx":4283 + /* "netCDF4/_netCDF4.pyx":4282 * (automatic conversions are performed). * """ * if scale: # <<<<<<<<<<<<<< @@ -48174,7 +48176,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_60set_auto_scale(struct _ goto __pyx_L3; } - /* "netCDF4/_netCDF4.pyx":4286 + /* "netCDF4/_netCDF4.pyx":4285 * self.scale = True * else: * self.scale = False # <<<<<<<<<<<<<< @@ -48190,7 +48192,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_60set_auto_scale(struct _ } __pyx_L3:; - /* "netCDF4/_netCDF4.pyx":4256 + /* "netCDF4/_netCDF4.pyx":4255 * self.mask = False * * def set_auto_scale(self,scale): # <<<<<<<<<<<<<< @@ -48210,7 +48212,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_60set_auto_scale(struct _ return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4288 +/* "netCDF4/_netCDF4.pyx":4287 * self.scale = False * * def set_auto_mask(self,mask): # <<<<<<<<<<<<<< @@ -48238,17 +48240,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_62set_auto_mask(struct __ int __pyx_t_1; __Pyx_RefNannySetupContext("set_auto_mask", 0); - /* "netCDF4/_netCDF4.pyx":4312 + /* "netCDF4/_netCDF4.pyx":4311 * (automatic conversions are performed). * """ * if mask: # <<<<<<<<<<<<<< * self.mask = True * else: */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_mask); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4312, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_mask); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4311, __pyx_L1_error) if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":4313 + /* "netCDF4/_netCDF4.pyx":4312 * """ * if mask: * self.mask = True # <<<<<<<<<<<<<< @@ -48261,7 +48263,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_62set_auto_mask(struct __ __Pyx_DECREF(__pyx_v_self->mask); __pyx_v_self->mask = Py_True; - /* "netCDF4/_netCDF4.pyx":4312 + /* "netCDF4/_netCDF4.pyx":4311 * (automatic conversions are performed). * """ * if mask: # <<<<<<<<<<<<<< @@ -48271,7 +48273,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_62set_auto_mask(struct __ goto __pyx_L3; } - /* "netCDF4/_netCDF4.pyx":4315 + /* "netCDF4/_netCDF4.pyx":4314 * self.mask = True * else: * self.mask = False # <<<<<<<<<<<<<< @@ -48287,7 +48289,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_62set_auto_mask(struct __ } __pyx_L3:; - /* "netCDF4/_netCDF4.pyx":4288 + /* "netCDF4/_netCDF4.pyx":4287 * self.scale = False * * def set_auto_mask(self,mask): # <<<<<<<<<<<<<< @@ -48307,7 +48309,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_62set_auto_mask(struct __ return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4318 +/* "netCDF4/_netCDF4.pyx":4317 * * * def _put(self,ndarray data,start,count,stride): # <<<<<<<<<<<<<< @@ -48348,21 +48350,21 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_65_put(PyObject *__pyx_v_ case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_start)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_put", 1, 4, 4, 1); __PYX_ERR(0, 4318, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_put", 1, 4, 4, 1); __PYX_ERR(0, 4317, __pyx_L3_error) } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_count)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_put", 1, 4, 4, 2); __PYX_ERR(0, 4318, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_put", 1, 4, 4, 2); __PYX_ERR(0, 4317, __pyx_L3_error) } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stride)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_put", 1, 4, 4, 3); __PYX_ERR(0, 4318, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_put", 1, 4, 4, 3); __PYX_ERR(0, 4317, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_put") < 0)) __PYX_ERR(0, 4318, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_put") < 0)) __PYX_ERR(0, 4317, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; @@ -48379,13 +48381,13 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_65_put(PyObject *__pyx_v_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_put", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4318, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_put", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4317, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("netCDF4._netCDF4.Variable._put", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), __pyx_ptype_7netCDF4_8_netCDF4_ndarray, 1, "data", 0))) __PYX_ERR(0, 4318, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), __pyx_ptype_7netCDF4_8_netCDF4_ndarray, 1, "data", 0))) __PYX_ERR(0, 4317, __pyx_L1_error) __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self), __pyx_v_data, __pyx_v_start, __pyx_v_count, __pyx_v_stride); /* function exit code */ @@ -48434,20 +48436,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 __Pyx_RefNannySetupContext("_put", 0); __Pyx_INCREF((PyObject *)__pyx_v_data); - /* "netCDF4/_netCDF4.pyx":4331 + /* "netCDF4/_netCDF4.pyx":4330 * cdef nc_vlen_t *vldata * # rank of variable. * ndims = len(self.dimensions) # <<<<<<<<<<<<<< * # make sure data is contiguous. * # if not, make a local copy. */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4331, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 4331, __pyx_L1_error) + __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 4330, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_ndims = __pyx_t_2; - /* "netCDF4/_netCDF4.pyx":4334 + /* "netCDF4/_netCDF4.pyx":4333 * # make sure data is contiguous. * # if not, make a local copy. * if not PyArray_ISCONTIGUOUS(data): # <<<<<<<<<<<<<< @@ -48457,14 +48459,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 __pyx_t_3 = ((!(PyArray_ISCONTIGUOUS(__pyx_v_data) != 0)) != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":4335 + /* "netCDF4/_netCDF4.pyx":4334 * # if not, make a local copy. * if not PyArray_ISCONTIGUOUS(data): * data = data.copy() # <<<<<<<<<<<<<< * # fill up startp,countp,stridep. * totelem = 1 */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_copy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4335, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_copy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4334, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -48477,18 +48479,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 } } if (__pyx_t_5) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4335, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4334, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4335, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4334, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7netCDF4_8_netCDF4_ndarray))))) __PYX_ERR(0, 4335, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7netCDF4_8_netCDF4_ndarray))))) __PYX_ERR(0, 4334, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":4334 + /* "netCDF4/_netCDF4.pyx":4333 * # make sure data is contiguous. * # if not, make a local copy. * if not PyArray_ISCONTIGUOUS(data): # <<<<<<<<<<<<<< @@ -48497,7 +48499,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ } - /* "netCDF4/_netCDF4.pyx":4337 + /* "netCDF4/_netCDF4.pyx":4336 * data = data.copy() * # fill up startp,countp,stridep. * totelem = 1 # <<<<<<<<<<<<<< @@ -48506,7 +48508,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ __pyx_v_totelem = 1; - /* "netCDF4/_netCDF4.pyx":4338 + /* "netCDF4/_netCDF4.pyx":4337 * # fill up startp,countp,stridep. * totelem = 1 * negstride = 0 # <<<<<<<<<<<<<< @@ -48515,19 +48517,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ __pyx_v_negstride = 0; - /* "netCDF4/_netCDF4.pyx":4339 + /* "netCDF4/_netCDF4.pyx":4338 * totelem = 1 * negstride = 0 * sl = [] # <<<<<<<<<<<<<< * startp = malloc(sizeof(size_t) * ndims) * countp = malloc(sizeof(size_t) * ndims) */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4339, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_sl = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":4340 + /* "netCDF4/_netCDF4.pyx":4339 * negstride = 0 * sl = [] * startp = malloc(sizeof(size_t) * ndims) # <<<<<<<<<<<<<< @@ -48536,7 +48538,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ __pyx_v_startp = ((size_t *)malloc(((sizeof(size_t)) * __pyx_v_ndims))); - /* "netCDF4/_netCDF4.pyx":4341 + /* "netCDF4/_netCDF4.pyx":4340 * sl = [] * startp = malloc(sizeof(size_t) * ndims) * countp = malloc(sizeof(size_t) * ndims) # <<<<<<<<<<<<<< @@ -48545,7 +48547,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ __pyx_v_countp = ((size_t *)malloc(((sizeof(size_t)) * __pyx_v_ndims))); - /* "netCDF4/_netCDF4.pyx":4342 + /* "netCDF4/_netCDF4.pyx":4341 * startp = malloc(sizeof(size_t) * ndims) * countp = malloc(sizeof(size_t) * ndims) * stridep = malloc(sizeof(ptrdiff_t) * ndims) # <<<<<<<<<<<<<< @@ -48554,7 +48556,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ __pyx_v_stridep = ((ptrdiff_t *)malloc(((sizeof(ptrdiff_t)) * __pyx_v_ndims))); - /* "netCDF4/_netCDF4.pyx":4343 + /* "netCDF4/_netCDF4.pyx":4342 * countp = malloc(sizeof(size_t) * ndims) * stridep = malloc(sizeof(ptrdiff_t) * ndims) * for n from 0 <= n < ndims: # <<<<<<<<<<<<<< @@ -48563,56 +48565,56 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ __pyx_t_6 = __pyx_v_ndims; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7++) { - __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4343, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":4344 + /* "netCDF4/_netCDF4.pyx":4343 * stridep = malloc(sizeof(ptrdiff_t) * ndims) * for n from 0 <= n < ndims: * count[n] = abs(count[n]) # make -1 into +1 # <<<<<<<<<<<<<< * countp[n] = count[n] * # for neg strides, reverse order (then flip that axis after data read in) */ - __pyx_t_1 = PyObject_GetItem(__pyx_v_count, __pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4344, __pyx_L1_error) + __pyx_t_1 = PyObject_GetItem(__pyx_v_count, __pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyNumber_Absolute(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4344, __pyx_L1_error) + __pyx_t_4 = PyNumber_Absolute(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(PyObject_SetItem(__pyx_v_count, __pyx_v_n, __pyx_t_4) < 0)) __PYX_ERR(0, 4344, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v_count, __pyx_v_n, __pyx_t_4) < 0)) __PYX_ERR(0, 4343, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":4345 + /* "netCDF4/_netCDF4.pyx":4344 * for n from 0 <= n < ndims: * count[n] = abs(count[n]) # make -1 into +1 * countp[n] = count[n] # <<<<<<<<<<<<<< * # for neg strides, reverse order (then flip that axis after data read in) * if stride[n] < 0: */ - __pyx_t_4 = PyObject_GetItem(__pyx_v_count, __pyx_v_n); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4345, __pyx_L1_error) + __pyx_t_4 = PyObject_GetItem(__pyx_v_count, __pyx_v_n); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = __Pyx_PyInt_As_size_t(__pyx_t_4); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4345, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_As_size_t(__pyx_t_4); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4344, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4345, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4344, __pyx_L1_error) (__pyx_v_countp[__pyx_t_2]) = __pyx_t_8; - /* "netCDF4/_netCDF4.pyx":4347 + /* "netCDF4/_netCDF4.pyx":4346 * countp[n] = count[n] * # for neg strides, reverse order (then flip that axis after data read in) * if stride[n] < 0: # <<<<<<<<<<<<<< * negstride = 1 * stridep[n] = -stride[n] */ - __pyx_t_4 = PyObject_GetItem(__pyx_v_stride, __pyx_v_n); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4347, __pyx_L1_error) + __pyx_t_4 = PyObject_GetItem(__pyx_v_stride, __pyx_v_n); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4347, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4346, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4347, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4346, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":4348 + /* "netCDF4/_netCDF4.pyx":4347 * # for neg strides, reverse order (then flip that axis after data read in) * if stride[n] < 0: * negstride = 1 # <<<<<<<<<<<<<< @@ -48621,77 +48623,77 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ __pyx_v_negstride = 1; - /* "netCDF4/_netCDF4.pyx":4349 + /* "netCDF4/_netCDF4.pyx":4348 * if stride[n] < 0: * negstride = 1 * stridep[n] = -stride[n] # <<<<<<<<<<<<<< * startp[n] = start[n]+stride[n]*(count[n]-1) * stride[n] = -stride[n] */ - __pyx_t_1 = PyObject_GetItem(__pyx_v_stride, __pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4349, __pyx_L1_error) + __pyx_t_1 = PyObject_GetItem(__pyx_v_stride, __pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4348, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyNumber_Negative(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4349, __pyx_L1_error) + __pyx_t_4 = PyNumber_Negative(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4348, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_9 = __Pyx_PyInt_As_ptrdiff_t(__pyx_t_4); if (unlikely((__pyx_t_9 == (ptrdiff_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4349, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_As_ptrdiff_t(__pyx_t_4); if (unlikely((__pyx_t_9 == (ptrdiff_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4348, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4349, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4348, __pyx_L1_error) (__pyx_v_stridep[__pyx_t_2]) = __pyx_t_9; - /* "netCDF4/_netCDF4.pyx":4350 + /* "netCDF4/_netCDF4.pyx":4349 * negstride = 1 * stridep[n] = -stride[n] * startp[n] = start[n]+stride[n]*(count[n]-1) # <<<<<<<<<<<<<< * stride[n] = -stride[n] * sl.append(slice(None, None, -1)) # this slice will reverse the data */ - __pyx_t_4 = PyObject_GetItem(__pyx_v_start, __pyx_v_n); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4350, __pyx_L1_error) + __pyx_t_4 = PyObject_GetItem(__pyx_v_start, __pyx_v_n); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyObject_GetItem(__pyx_v_stride, __pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4350, __pyx_L1_error) + __pyx_t_1 = PyObject_GetItem(__pyx_v_stride, __pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyObject_GetItem(__pyx_v_count, __pyx_v_n); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4350, __pyx_L1_error) + __pyx_t_5 = PyObject_GetItem(__pyx_v_count, __pyx_v_n); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_10 = __Pyx_PyInt_SubtractObjC(__pyx_t_5, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4350, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_SubtractObjC(__pyx_t_5, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyNumber_Multiply(__pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4350, __pyx_L1_error) + __pyx_t_5 = PyNumber_Multiply(__pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = PyNumber_Add(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4350, __pyx_L1_error) + __pyx_t_10 = PyNumber_Add(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyInt_As_size_t(__pyx_t_10); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4350, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_As_size_t(__pyx_t_10); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4349, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4350, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4349, __pyx_L1_error) (__pyx_v_startp[__pyx_t_2]) = __pyx_t_8; - /* "netCDF4/_netCDF4.pyx":4351 + /* "netCDF4/_netCDF4.pyx":4350 * stridep[n] = -stride[n] * startp[n] = start[n]+stride[n]*(count[n]-1) * stride[n] = -stride[n] # <<<<<<<<<<<<<< * sl.append(slice(None, None, -1)) # this slice will reverse the data * else: */ - __pyx_t_10 = PyObject_GetItem(__pyx_v_stride, __pyx_v_n); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4351, __pyx_L1_error) + __pyx_t_10 = PyObject_GetItem(__pyx_v_stride, __pyx_v_n); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_5 = PyNumber_Negative(__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4351, __pyx_L1_error) + __pyx_t_5 = PyNumber_Negative(__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(PyObject_SetItem(__pyx_v_stride, __pyx_v_n, __pyx_t_5) < 0)) __PYX_ERR(0, 4351, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v_stride, __pyx_v_n, __pyx_t_5) < 0)) __PYX_ERR(0, 4350, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":4352 + /* "netCDF4/_netCDF4.pyx":4351 * startp[n] = start[n]+stride[n]*(count[n]-1) * stride[n] = -stride[n] * sl.append(slice(None, None, -1)) # this slice will reverse the data # <<<<<<<<<<<<<< * else: * startp[n] = start[n] */ - __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_sl, __pyx_slice__75); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4352, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_sl, __pyx_slice__75); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4351, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4347 + /* "netCDF4/_netCDF4.pyx":4346 * countp[n] = count[n] * # for neg strides, reverse order (then flip that axis after data read in) * if stride[n] < 0: # <<<<<<<<<<<<<< @@ -48701,7 +48703,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 goto __pyx_L6; } - /* "netCDF4/_netCDF4.pyx":4354 + /* "netCDF4/_netCDF4.pyx":4353 * sl.append(slice(None, None, -1)) # this slice will reverse the data * else: * startp[n] = start[n] # <<<<<<<<<<<<<< @@ -48709,63 +48711,63 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 * sl.append(slice(None,None, 1)) */ /*else*/ { - __pyx_t_5 = PyObject_GetItem(__pyx_v_start, __pyx_v_n); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4354, __pyx_L1_error) + __pyx_t_5 = PyObject_GetItem(__pyx_v_start, __pyx_v_n); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_8 = __Pyx_PyInt_As_size_t(__pyx_t_5); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4354, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_As_size_t(__pyx_t_5); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4353, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4354, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4353, __pyx_L1_error) (__pyx_v_startp[__pyx_t_2]) = __pyx_t_8; - /* "netCDF4/_netCDF4.pyx":4355 + /* "netCDF4/_netCDF4.pyx":4354 * else: * startp[n] = start[n] * stridep[n] = stride[n] # <<<<<<<<<<<<<< * sl.append(slice(None,None, 1)) * totelem = totelem*countp[n] */ - __pyx_t_5 = PyObject_GetItem(__pyx_v_stride, __pyx_v_n); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4355, __pyx_L1_error) + __pyx_t_5 = PyObject_GetItem(__pyx_v_stride, __pyx_v_n); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4354, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_9 = __Pyx_PyInt_As_ptrdiff_t(__pyx_t_5); if (unlikely((__pyx_t_9 == (ptrdiff_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4355, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_As_ptrdiff_t(__pyx_t_5); if (unlikely((__pyx_t_9 == (ptrdiff_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4354, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4355, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4354, __pyx_L1_error) (__pyx_v_stridep[__pyx_t_2]) = __pyx_t_9; - /* "netCDF4/_netCDF4.pyx":4356 + /* "netCDF4/_netCDF4.pyx":4355 * startp[n] = start[n] * stridep[n] = stride[n] * sl.append(slice(None,None, 1)) # <<<<<<<<<<<<<< * totelem = totelem*countp[n] * # check to see that size of data array is what is expected */ - __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_sl, __pyx_slice__76); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4356, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_sl, __pyx_slice__76); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4355, __pyx_L1_error) } __pyx_L6:; - /* "netCDF4/_netCDF4.pyx":4357 + /* "netCDF4/_netCDF4.pyx":4356 * stridep[n] = stride[n] * sl.append(slice(None,None, 1)) * totelem = totelem*countp[n] # <<<<<<<<<<<<<< * # check to see that size of data array is what is expected * # for slice given. */ - __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4357, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4356, __pyx_L1_error) __pyx_v_totelem = (__pyx_v_totelem * (__pyx_v_countp[__pyx_t_2])); - __pyx_t_7 = __Pyx_PyInt_As_long(__pyx_v_n); if (unlikely((__pyx_t_7 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4343, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_As_long(__pyx_v_n); if (unlikely((__pyx_t_7 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4342, __pyx_L1_error) } - /* "netCDF4/_netCDF4.pyx":4343 + /* "netCDF4/_netCDF4.pyx":4342 * countp = malloc(sizeof(size_t) * ndims) * stridep = malloc(sizeof(ptrdiff_t) * ndims) * for n from 0 <= n < ndims: # <<<<<<<<<<<<<< * count[n] = abs(count[n]) # make -1 into +1 * countp[n] = count[n] */ - __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4343, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_5); __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":4360 + /* "netCDF4/_netCDF4.pyx":4359 * # check to see that size of data array is what is expected * # for slice given. * dataelem = PyArray_SIZE(data) # <<<<<<<<<<<<<< @@ -48774,7 +48776,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ __pyx_v_dataelem = PyArray_SIZE(__pyx_v_data); - /* "netCDF4/_netCDF4.pyx":4361 + /* "netCDF4/_netCDF4.pyx":4360 * # for slice given. * dataelem = PyArray_SIZE(data) * if totelem != dataelem: # <<<<<<<<<<<<<< @@ -48784,20 +48786,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 __pyx_t_3 = ((__pyx_v_totelem != __pyx_v_dataelem) != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":4362 + /* "netCDF4/_netCDF4.pyx":4361 * dataelem = PyArray_SIZE(data) * if totelem != dataelem: * raise IndexError('size of data array does not conform to slice') # <<<<<<<<<<<<<< * if negstride: * # reverse data along axes with negative strides. */ - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__77, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4362, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__77, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __PYX_ERR(0, 4362, __pyx_L1_error) + __PYX_ERR(0, 4361, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4361 + /* "netCDF4/_netCDF4.pyx":4360 * # for slice given. * dataelem = PyArray_SIZE(data) * if totelem != dataelem: # <<<<<<<<<<<<<< @@ -48806,7 +48808,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ } - /* "netCDF4/_netCDF4.pyx":4363 + /* "netCDF4/_netCDF4.pyx":4362 * if totelem != dataelem: * raise IndexError('size of data array does not conform to slice') * if negstride: # <<<<<<<<<<<<<< @@ -48816,16 +48818,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 __pyx_t_3 = (__pyx_v_negstride != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":4365 + /* "netCDF4/_netCDF4.pyx":4364 * if negstride: * # reverse data along axes with negative strides. * data = data[sl].copy() # make sure a copy is made. # <<<<<<<<<<<<<< * if self._isprimitive or self._iscompound or self._isenum: * # primitive, enum or compound data type. */ - __pyx_t_10 = PyObject_GetItem(((PyObject *)__pyx_v_data), __pyx_v_sl); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4365, __pyx_L1_error) + __pyx_t_10 = PyObject_GetItem(((PyObject *)__pyx_v_data), __pyx_v_sl); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_copy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4365, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_copy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = NULL; @@ -48839,18 +48841,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 } } if (__pyx_t_10) { - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4365, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4364, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } else { - __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4365, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4364, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_7netCDF4_8_netCDF4_ndarray))))) __PYX_ERR(0, 4365, __pyx_L1_error) + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_7netCDF4_8_netCDF4_ndarray))))) __PYX_ERR(0, 4364, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_5)); __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":4363 + /* "netCDF4/_netCDF4.pyx":4362 * if totelem != dataelem: * raise IndexError('size of data array does not conform to slice') * if negstride: # <<<<<<<<<<<<<< @@ -48859,53 +48861,53 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ } - /* "netCDF4/_netCDF4.pyx":4366 + /* "netCDF4/_netCDF4.pyx":4365 * # reverse data along axes with negative strides. * data = data[sl].copy() # make sure a copy is made. * if self._isprimitive or self._iscompound or self._isenum: # <<<<<<<<<<<<<< * # primitive, enum or compound data type. * # if data type of array doesn't match variable, */ - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4366, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4365, __pyx_L1_error) if (!__pyx_t_12) { } else { __pyx_t_3 = __pyx_t_12; goto __pyx_L10_bool_binop_done; } - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_iscompound); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4366, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_iscompound); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4365, __pyx_L1_error) if (!__pyx_t_12) { } else { __pyx_t_3 = __pyx_t_12; goto __pyx_L10_bool_binop_done; } - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isenum); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4366, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isenum); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4365, __pyx_L1_error) __pyx_t_3 = __pyx_t_12; __pyx_L10_bool_binop_done:; if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":4370 + /* "netCDF4/_netCDF4.pyx":4369 * # if data type of array doesn't match variable, * # try to cast the data. * if self.dtype != data.dtype: # <<<<<<<<<<<<<< * data = data.astype(self.dtype) # cast data, if necessary. * # byte-swap data in numpy array so that is has native */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4370, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_self->dtype, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4370, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_self->dtype, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4369, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4370, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4369, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":4371 + /* "netCDF4/_netCDF4.pyx":4370 * # try to cast the data. * if self.dtype != data.dtype: * data = data.astype(self.dtype) # cast data, if necessary. # <<<<<<<<<<<<<< * # byte-swap data in numpy array so that is has native * # endian byte order (this is what netcdf-c expects - */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_astype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4371, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_astype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -48918,13 +48920,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 } } if (!__pyx_t_10) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_self->dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4371, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_self->dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_self->dtype}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4371, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4370, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_4); } else @@ -48932,29 +48934,29 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_self->dtype}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4371, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4370, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { - __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4371, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_10); __pyx_t_10 = NULL; __Pyx_INCREF(__pyx_v_self->dtype); __Pyx_GIVEREF(__pyx_v_self->dtype); PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_self->dtype); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4371, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_7netCDF4_8_netCDF4_ndarray))))) __PYX_ERR(0, 4371, __pyx_L1_error) + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_7netCDF4_8_netCDF4_ndarray))))) __PYX_ERR(0, 4370, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_4)); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":4370 + /* "netCDF4/_netCDF4.pyx":4369 * # if data type of array doesn't match variable, * # try to cast the data. * if self.dtype != data.dtype: # <<<<<<<<<<<<<< @@ -48963,31 +48965,31 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ } - /* "netCDF4/_netCDF4.pyx":4375 + /* "netCDF4/_netCDF4.pyx":4374 * # endian byte order (this is what netcdf-c expects - * # issue #554, pull request #555) * if not data.dtype.isnative: # <<<<<<<<<<<<<< * data = data.byteswap() * # strides all 1 or scalar variable, use put_vara (faster) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4375, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_isnative); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4375, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_isnative); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4375, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4374, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_12 = ((!__pyx_t_3) != 0); if (__pyx_t_12) { - /* "netCDF4/_netCDF4.pyx":4376 + /* "netCDF4/_netCDF4.pyx":4375 * # issue #554, pull request #555) * if not data.dtype.isnative: * data = data.byteswap() # <<<<<<<<<<<<<< * # strides all 1 or scalar variable, use put_vara (faster) * if sum(stride) == ndims or ndims == 0: */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_byteswap); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4376, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_byteswap); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4375, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -49000,18 +49002,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 } } if (__pyx_t_1) { - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4376, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4375, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { - __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4376, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4375, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_7netCDF4_8_netCDF4_ndarray))))) __PYX_ERR(0, 4376, __pyx_L1_error) + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_7netCDF4_8_netCDF4_ndarray))))) __PYX_ERR(0, 4375, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_5)); __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":4375 + /* "netCDF4/_netCDF4.pyx":4374 * # endian byte order (this is what netcdf-c expects - * # issue #554, pull request #555) * if not data.dtype.isnative: # <<<<<<<<<<<<<< @@ -49020,27 +49022,27 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ } - /* "netCDF4/_netCDF4.pyx":4378 + /* "netCDF4/_netCDF4.pyx":4377 * data = data.byteswap() * # strides all 1 or scalar variable, use put_vara (faster) * if sum(stride) == ndims or ndims == 0: # <<<<<<<<<<<<<< * ierr = nc_put_vara(self._grpid, self._varid, * startp, countp, data.data) */ - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4378, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_stride); __Pyx_GIVEREF(__pyx_v_stride); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_stride); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4378, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ndims); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4378, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ndims); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4378, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4377, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4378, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4377, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_3) { } else { @@ -49052,7 +49054,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 __pyx_L16_bool_binop_done:; if (__pyx_t_12) { - /* "netCDF4/_netCDF4.pyx":4379 + /* "netCDF4/_netCDF4.pyx":4378 * # strides all 1 or scalar variable, use put_vara (faster) * if sum(stride) == ndims or ndims == 0: * ierr = nc_put_vara(self._grpid, self._varid, # <<<<<<<<<<<<<< @@ -49061,7 +49063,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ __pyx_v_ierr = nc_put_vara(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_startp, __pyx_v_countp, __pyx_v_data->data); - /* "netCDF4/_netCDF4.pyx":4378 + /* "netCDF4/_netCDF4.pyx":4377 * data = data.byteswap() * # strides all 1 or scalar variable, use put_vara (faster) * if sum(stride) == ndims or ndims == 0: # <<<<<<<<<<<<<< @@ -49071,7 +49073,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 goto __pyx_L15; } - /* "netCDF4/_netCDF4.pyx":4382 + /* "netCDF4/_netCDF4.pyx":4381 * startp, countp, data.data) * else: * ierr = nc_put_vars(self._grpid, self._varid, # <<<<<<<<<<<<<< @@ -49080,7 +49082,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ /*else*/ { - /* "netCDF4/_netCDF4.pyx":4383 + /* "netCDF4/_netCDF4.pyx":4382 * else: * ierr = nc_put_vars(self._grpid, self._varid, * startp, countp, stridep, data.data) # <<<<<<<<<<<<<< @@ -49091,7 +49093,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 } __pyx_L15:; - /* "netCDF4/_netCDF4.pyx":4384 + /* "netCDF4/_netCDF4.pyx":4383 * ierr = nc_put_vars(self._grpid, self._varid, * startp, countp, stridep, data.data) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -49101,7 +49103,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 __pyx_t_12 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_12) { - /* "netCDF4/_netCDF4.pyx":4385 + /* "netCDF4/_netCDF4.pyx":4384 * startp, countp, stridep, data.data) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -49109,22 +49111,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 * if data.dtype.char !='O': */ __pyx_t_13 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_13, 0, strlen(__pyx_t_13), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4385, __pyx_L1_error) + __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_13, 0, strlen(__pyx_t_13), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4384, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4385, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4384, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4385, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4384, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 4385, __pyx_L1_error) + __PYX_ERR(0, 4384, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4384 + /* "netCDF4/_netCDF4.pyx":4383 * ierr = nc_put_vars(self._grpid, self._varid, * startp, countp, stridep, data.data) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -49133,7 +49135,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ } - /* "netCDF4/_netCDF4.pyx":4366 + /* "netCDF4/_netCDF4.pyx":4365 * # reverse data along axes with negative strides. * data = data[sl].copy() # make sure a copy is made. * if self._isprimitive or self._iscompound or self._isenum: # <<<<<<<<<<<<<< @@ -49143,46 +49145,46 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 goto __pyx_L9; } - /* "netCDF4/_netCDF4.pyx":4386 + /* "netCDF4/_netCDF4.pyx":4385 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * elif self._isvlen: # <<<<<<<<<<<<<< * if data.dtype.char !='O': * raise TypeError('data to put in string variable must be an object array containing Python strings') */ - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4386, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4385, __pyx_L1_error) if (__pyx_t_12) { - /* "netCDF4/_netCDF4.pyx":4387 + /* "netCDF4/_netCDF4.pyx":4386 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * elif self._isvlen: * if data.dtype.char !='O': # <<<<<<<<<<<<<< * raise TypeError('data to put in string variable must be an object array containing Python strings') * # flatten data array. */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4387, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4386, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_char); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4387, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_char); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4386, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_n_s_O, Py_NE)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4387, __pyx_L1_error) + __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_n_s_O, Py_NE)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4386, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_12) { - /* "netCDF4/_netCDF4.pyx":4388 + /* "netCDF4/_netCDF4.pyx":4387 * elif self._isvlen: * if data.dtype.char !='O': * raise TypeError('data to put in string variable must be an object array containing Python strings') # <<<<<<<<<<<<<< * # flatten data array. * data = data.flatten() */ - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__78, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4388, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__78, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4387, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __PYX_ERR(0, 4388, __pyx_L1_error) + __PYX_ERR(0, 4387, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4387 + /* "netCDF4/_netCDF4.pyx":4386 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * elif self._isvlen: * if data.dtype.char !='O': # <<<<<<<<<<<<<< @@ -49191,14 +49193,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ } - /* "netCDF4/_netCDF4.pyx":4390 + /* "netCDF4/_netCDF4.pyx":4389 * raise TypeError('data to put in string variable must be an object array containing Python strings') * # flatten data array. * data = data.flatten() # <<<<<<<<<<<<<< * if self.dtype == str: * # convert all elements from strings to bytes */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_flatten); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4390, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_flatten); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -49211,56 +49213,56 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 } } if (__pyx_t_4) { - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4390, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4389, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { - __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4390, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4389, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_7netCDF4_8_netCDF4_ndarray))))) __PYX_ERR(0, 4390, __pyx_L1_error) + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_7netCDF4_8_netCDF4_ndarray))))) __PYX_ERR(0, 4389, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_5)); __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":4391 + /* "netCDF4/_netCDF4.pyx":4390 * # flatten data array. * data = data.flatten() * if self.dtype == str: # <<<<<<<<<<<<<< * # convert all elements from strings to bytes * for n in range(data.shape[0]): */ - __pyx_t_5 = PyObject_RichCompare(__pyx_v_self->dtype, ((PyObject *)(&PyString_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4391, __pyx_L1_error) - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4391, __pyx_L1_error) + __pyx_t_5 = PyObject_RichCompare(__pyx_v_self->dtype, ((PyObject *)(&PyString_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4390, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4390, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_12) { - /* "netCDF4/_netCDF4.pyx":4393 + /* "netCDF4/_netCDF4.pyx":4392 * if self.dtype == str: * # convert all elements from strings to bytes * for n in range(data.shape[0]): # <<<<<<<<<<<<<< * data[n] = _strencode(data[n]) * # vlen string (NC_STRING) */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4393, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4393, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4393, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4393, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_5 = __pyx_t_1; __Pyx_INCREF(__pyx_t_5); __pyx_t_2 = 0; __pyx_t_14 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4393, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_14 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4393, __pyx_L1_error) + __pyx_t_14 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4392, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -49268,17 +49270,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 if (likely(PyList_CheckExact(__pyx_t_5))) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 4393, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 4392, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4393, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 4393, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 4392, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4393, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -49288,7 +49290,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 4393, __pyx_L1_error) + else __PYX_ERR(0, 4392, __pyx_L1_error) } break; } @@ -49297,22 +49299,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":4394 + /* "netCDF4/_netCDF4.pyx":4393 * # convert all elements from strings to bytes * for n in range(data.shape[0]): * data[n] = _strencode(data[n]) # <<<<<<<<<<<<<< * # vlen string (NC_STRING) * # loop over elements of object array, put data buffer for */ - __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_data), __pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4394, __pyx_L1_error) + __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_data), __pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4393, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4394, __pyx_L1_error) + __pyx_t_4 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4393, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_data), __pyx_v_n, __pyx_t_4) < 0)) __PYX_ERR(0, 4394, __pyx_L1_error) + if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_data), __pyx_v_n, __pyx_t_4) < 0)) __PYX_ERR(0, 4393, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":4393 + /* "netCDF4/_netCDF4.pyx":4392 * if self.dtype == str: * # convert all elements from strings to bytes * for n in range(data.shape[0]): # <<<<<<<<<<<<<< @@ -49322,7 +49324,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":4399 + /* "netCDF4/_netCDF4.pyx":4398 * # each element in struct. * # allocate struct array to hold vlen data. * strdata = malloc(sizeof(char *)*totelem) # <<<<<<<<<<<<<< @@ -49331,7 +49333,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ __pyx_v_strdata = ((char **)malloc(((sizeof(char *)) * __pyx_v_totelem))); - /* "netCDF4/_netCDF4.pyx":4400 + /* "netCDF4/_netCDF4.pyx":4399 * # allocate struct array to hold vlen data. * strdata = malloc(sizeof(char *)*totelem) * for i from 0<=imalloc(sizeof(char *)*totelem) * for i from 0<=i_grpid, __pyx_v_self->_varid, __pyx_v_startp, __pyx_v_countp, __pyx_v_strdata); - /* "netCDF4/_netCDF4.pyx":4403 + /* "netCDF4/_netCDF4.pyx":4402 * strdata[i] = data[i] * # strides all 1 or scalar variable, use put_vara (faster) * if sum(stride) == ndims or ndims == 0: # <<<<<<<<<<<<<< @@ -49406,7 +49408,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 goto __pyx_L25; } - /* "netCDF4/_netCDF4.pyx":4407 + /* "netCDF4/_netCDF4.pyx":4406 * startp, countp, strdata) * else: * raise IndexError('strides must all be 1 for string variables') # <<<<<<<<<<<<<< @@ -49414,15 +49416,15 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 * # startp, countp, stridep, strdata) */ /*else*/ { - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__79, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4407, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__79, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 4407, __pyx_L1_error) + __PYX_ERR(0, 4406, __pyx_L1_error) } __pyx_L25:; - /* "netCDF4/_netCDF4.pyx":4410 + /* "netCDF4/_netCDF4.pyx":4409 * #ierr = nc_put_vars(self._grpid, self._varid, * # startp, countp, stridep, strdata) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -49432,7 +49434,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 __pyx_t_12 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_12) { - /* "netCDF4/_netCDF4.pyx":4411 + /* "netCDF4/_netCDF4.pyx":4410 * # startp, countp, stridep, strdata) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -49440,22 +49442,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 * else: */ __pyx_t_13 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_13, 0, strlen(__pyx_t_13), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4411, __pyx_L1_error) + __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_13, 0, strlen(__pyx_t_13), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4411, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4411, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 4411, __pyx_L1_error) + __PYX_ERR(0, 4410, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4410 + /* "netCDF4/_netCDF4.pyx":4409 * #ierr = nc_put_vars(self._grpid, self._varid, * # startp, countp, stridep, strdata) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -49464,7 +49466,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ } - /* "netCDF4/_netCDF4.pyx":4412 + /* "netCDF4/_netCDF4.pyx":4411 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * free(strdata) # <<<<<<<<<<<<<< @@ -49473,7 +49475,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ free(__pyx_v_strdata); - /* "netCDF4/_netCDF4.pyx":4391 + /* "netCDF4/_netCDF4.pyx":4390 * # flatten data array. * data = data.flatten() * if self.dtype == str: # <<<<<<<<<<<<<< @@ -49483,7 +49485,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 goto __pyx_L20; } - /* "netCDF4/_netCDF4.pyx":4417 + /* "netCDF4/_netCDF4.pyx":4416 * # loop over elements of object array, put data buffer for * # each element in struct. * databuff = data.data # <<<<<<<<<<<<<< @@ -49494,7 +49496,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 __pyx_t_13 = __pyx_v_data->data; __pyx_v_databuff = __pyx_t_13; - /* "netCDF4/_netCDF4.pyx":4419 + /* "netCDF4/_netCDF4.pyx":4418 * databuff = data.data * # allocate struct array to hold vlen data. * vldata = malloc(totelem*sizeof(nc_vlen_t)) # <<<<<<<<<<<<<< @@ -49503,7 +49505,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ __pyx_v_vldata = ((nc_vlen_t *)malloc((((size_t)__pyx_v_totelem) * (sizeof(nc_vlen_t))))); - /* "netCDF4/_netCDF4.pyx":4420 + /* "netCDF4/_netCDF4.pyx":4419 * # allocate struct array to hold vlen data. * vldata = malloc(totelem*sizeof(nc_vlen_t)) * for i from 0<=imalloc(totelem*sizeof(nc_vlen_t)) * for i from 0<=idatabuff)[0] # <<<<<<<<<<<<<< @@ -49522,7 +49524,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ __pyx_v_elptr = (((void **)__pyx_v_databuff)[0]); - /* "netCDF4/_netCDF4.pyx":4422 + /* "netCDF4/_netCDF4.pyx":4421 * for i from 0<=idatabuff)[0] * dataarr = elptr # <<<<<<<<<<<<<< @@ -49534,37 +49536,37 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 __Pyx_XDECREF_SET(__pyx_v_dataarr, ((PyArrayObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":4423 + /* "netCDF4/_netCDF4.pyx":4422 * elptr = (databuff)[0] * dataarr = elptr * if self.dtype != dataarr.dtype.str[1:]: # <<<<<<<<<<<<<< * #dataarr = dataarr.astype(self.dtype) # cast data, if necessary. * # casting doesn't work ?? just raise TypeError */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dataarr), __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4423, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dataarr), __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_str); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4423, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_str); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_5, 1, 0, NULL, NULL, &__pyx_slice__80, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4423, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_5, 1, 0, NULL, NULL, &__pyx_slice__80, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyObject_RichCompare(__pyx_v_self->dtype, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4423, __pyx_L1_error) + __pyx_t_5 = PyObject_RichCompare(__pyx_v_self->dtype, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4422, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4423, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4422, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_12) { - /* "netCDF4/_netCDF4.pyx":4426 + /* "netCDF4/_netCDF4.pyx":4425 * #dataarr = dataarr.astype(self.dtype) # cast data, if necessary. * # casting doesn't work ?? just raise TypeError * raise TypeError("wrong data type in object array: should be %s, got %s" % (self.dtype,dataarr.dtype)) # <<<<<<<<<<<<<< * vldata[i].len = PyArray_SIZE(dataarr) * vldata[i].p = dataarr.data */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dataarr), __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4426, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dataarr), __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4426, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self->dtype); __Pyx_GIVEREF(__pyx_v_self->dtype); @@ -49572,22 +49574,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_wrong_data_type_in_object_array, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4426, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_wrong_data_type_in_object_array, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4426, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4426, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __PYX_ERR(0, 4426, __pyx_L1_error) + __PYX_ERR(0, 4425, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4423 + /* "netCDF4/_netCDF4.pyx":4422 * elptr = (databuff)[0] * dataarr = elptr * if self.dtype != dataarr.dtype.str[1:]: # <<<<<<<<<<<<<< @@ -49596,7 +49598,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ } - /* "netCDF4/_netCDF4.pyx":4427 + /* "netCDF4/_netCDF4.pyx":4426 * # casting doesn't work ?? just raise TypeError * raise TypeError("wrong data type in object array: should be %s, got %s" % (self.dtype,dataarr.dtype)) * vldata[i].len = PyArray_SIZE(dataarr) # <<<<<<<<<<<<<< @@ -49605,7 +49607,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ (__pyx_v_vldata[__pyx_v_i]).len = PyArray_SIZE(__pyx_v_dataarr); - /* "netCDF4/_netCDF4.pyx":4428 + /* "netCDF4/_netCDF4.pyx":4427 * raise TypeError("wrong data type in object array: should be %s, got %s" % (self.dtype,dataarr.dtype)) * vldata[i].len = PyArray_SIZE(dataarr) * vldata[i].p = dataarr.data # <<<<<<<<<<<<<< @@ -49615,7 +49617,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 __pyx_t_13 = __pyx_v_dataarr->data; (__pyx_v_vldata[__pyx_v_i]).p = __pyx_t_13; - /* "netCDF4/_netCDF4.pyx":4429 + /* "netCDF4/_netCDF4.pyx":4428 * vldata[i].len = PyArray_SIZE(dataarr) * vldata[i].p = dataarr.data * databuff = databuff + data.strides[0] # <<<<<<<<<<<<<< @@ -49625,27 +49627,27 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 __pyx_v_databuff = (__pyx_v_databuff + (__pyx_v_data->strides[0])); } - /* "netCDF4/_netCDF4.pyx":4431 + /* "netCDF4/_netCDF4.pyx":4430 * databuff = databuff + data.strides[0] * # strides all 1 or scalar variable, use put_vara (faster) * if sum(stride) == ndims or ndims == 0: # <<<<<<<<<<<<<< * ierr = nc_put_vara(self._grpid, self._varid, * startp, countp, vldata) */ - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4431, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_stride); __Pyx_GIVEREF(__pyx_v_stride); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_stride); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4431, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ndims); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4431, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ndims); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4431, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4430, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4431, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4430, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!__pyx_t_3) { } else { @@ -49657,7 +49659,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 __pyx_L33_bool_binop_done:; if (__pyx_t_12) { - /* "netCDF4/_netCDF4.pyx":4432 + /* "netCDF4/_netCDF4.pyx":4431 * # strides all 1 or scalar variable, use put_vara (faster) * if sum(stride) == ndims or ndims == 0: * ierr = nc_put_vara(self._grpid, self._varid, # <<<<<<<<<<<<<< @@ -49666,7 +49668,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ __pyx_v_ierr = nc_put_vara(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_startp, __pyx_v_countp, __pyx_v_vldata); - /* "netCDF4/_netCDF4.pyx":4431 + /* "netCDF4/_netCDF4.pyx":4430 * databuff = databuff + data.strides[0] * # strides all 1 or scalar variable, use put_vara (faster) * if sum(stride) == ndims or ndims == 0: # <<<<<<<<<<<<<< @@ -49676,7 +49678,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 goto __pyx_L32; } - /* "netCDF4/_netCDF4.pyx":4435 + /* "netCDF4/_netCDF4.pyx":4434 * startp, countp, vldata) * else: * raise IndexError('strides must all be 1 for vlen variables') # <<<<<<<<<<<<<< @@ -49684,15 +49686,15 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 * # startp, countp, stridep, vldata) */ /*else*/ { - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__81, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4435, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__81, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4434, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(0, 4435, __pyx_L1_error) + __PYX_ERR(0, 4434, __pyx_L1_error) } __pyx_L32:; - /* "netCDF4/_netCDF4.pyx":4438 + /* "netCDF4/_netCDF4.pyx":4437 * #ierr = nc_put_vars(self._grpid, self._varid, * # startp, countp, stridep, vldata) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -49702,7 +49704,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 __pyx_t_12 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_12) { - /* "netCDF4/_netCDF4.pyx":4439 + /* "netCDF4/_netCDF4.pyx":4438 * # startp, countp, stridep, vldata) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -49710,22 +49712,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 * free(vldata) */ __pyx_t_13 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_13, 0, strlen(__pyx_t_13), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4439, __pyx_L1_error) + __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_13, 0, strlen(__pyx_t_13), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4439, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4439, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(0, 4439, __pyx_L1_error) + __PYX_ERR(0, 4438, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4438 + /* "netCDF4/_netCDF4.pyx":4437 * #ierr = nc_put_vars(self._grpid, self._varid, * # startp, countp, stridep, vldata) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -49734,7 +49736,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ } - /* "netCDF4/_netCDF4.pyx":4441 + /* "netCDF4/_netCDF4.pyx":4440 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * # free the pointer array. * free(vldata) # <<<<<<<<<<<<<< @@ -49745,7 +49747,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 } __pyx_L20:; - /* "netCDF4/_netCDF4.pyx":4386 + /* "netCDF4/_netCDF4.pyx":4385 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * elif self._isvlen: # <<<<<<<<<<<<<< @@ -49755,7 +49757,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 } __pyx_L9:; - /* "netCDF4/_netCDF4.pyx":4442 + /* "netCDF4/_netCDF4.pyx":4441 * # free the pointer array. * free(vldata) * free(startp) # <<<<<<<<<<<<<< @@ -49764,7 +49766,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ free(__pyx_v_startp); - /* "netCDF4/_netCDF4.pyx":4443 + /* "netCDF4/_netCDF4.pyx":4442 * free(vldata) * free(startp) * free(countp) # <<<<<<<<<<<<<< @@ -49773,7 +49775,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ free(__pyx_v_countp); - /* "netCDF4/_netCDF4.pyx":4444 + /* "netCDF4/_netCDF4.pyx":4443 * free(startp) * free(countp) * free(stridep) # <<<<<<<<<<<<<< @@ -49782,7 +49784,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ free(__pyx_v_stridep); - /* "netCDF4/_netCDF4.pyx":4318 + /* "netCDF4/_netCDF4.pyx":4317 * * * def _put(self,ndarray data,start,count,stride): # <<<<<<<<<<<<<< @@ -49810,7 +49812,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4446 +/* "netCDF4/_netCDF4.pyx":4445 * free(stridep) * * def _get(self,start,count,stride): # <<<<<<<<<<<<<< @@ -49849,16 +49851,16 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_67_get(PyObject *__pyx_v_ case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_count)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_get", 1, 3, 3, 1); __PYX_ERR(0, 4446, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_get", 1, 3, 3, 1); __PYX_ERR(0, 4445, __pyx_L3_error) } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stride)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_get", 1, 3, 3, 2); __PYX_ERR(0, 4446, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_get", 1, 3, 3, 2); __PYX_ERR(0, 4445, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_get") < 0)) __PYX_ERR(0, 4446, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_get") < 0)) __PYX_ERR(0, 4445, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -49873,7 +49875,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_67_get(PyObject *__pyx_v_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_get", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4446, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_get", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4445, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("netCDF4._netCDF4.Variable._get", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -49926,7 +49928,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 Py_ssize_t __pyx_t_17; __Pyx_RefNannySetupContext("_get", 0); - /* "netCDF4/_netCDF4.pyx":4459 + /* "netCDF4/_netCDF4.pyx":4458 * # and not a slice so the resulting array * # should be 'squeezed' to remove the singleton dimension. * shapeout = () # <<<<<<<<<<<<<< @@ -49936,7 +49938,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 __Pyx_INCREF(__pyx_empty_tuple); __pyx_v_shapeout = __pyx_empty_tuple; - /* "netCDF4/_netCDF4.pyx":4460 + /* "netCDF4/_netCDF4.pyx":4459 * # should be 'squeezed' to remove the singleton dimension. * shapeout = () * squeeze_out = False # <<<<<<<<<<<<<< @@ -49945,7 +49947,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 */ __pyx_v_squeeze_out = 0; - /* "netCDF4/_netCDF4.pyx":4461 + /* "netCDF4/_netCDF4.pyx":4460 * shapeout = () * squeeze_out = False * for lendim in count: # <<<<<<<<<<<<<< @@ -49956,26 +49958,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 __pyx_t_1 = __pyx_v_count; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_count); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4461, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_count); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4460, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4461, __pyx_L1_error) + __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4460, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 4461, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 4460, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4461, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4460, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 4461, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 4460, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4461, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4460, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -49985,7 +49987,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 4461, __pyx_L1_error) + else __PYX_ERR(0, 4460, __pyx_L1_error) } break; } @@ -49994,32 +49996,32 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 __Pyx_XDECREF_SET(__pyx_v_lendim, __pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":4462 + /* "netCDF4/_netCDF4.pyx":4461 * squeeze_out = False * for lendim in count: * if lendim == -1: # <<<<<<<<<<<<<< * shapeout = shapeout + (1,) * squeeze_out = True */ - __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_v_lendim, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4462, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_v_lendim, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4462, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4461, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { - /* "netCDF4/_netCDF4.pyx":4463 + /* "netCDF4/_netCDF4.pyx":4462 * for lendim in count: * if lendim == -1: * shapeout = shapeout + (1,) # <<<<<<<<<<<<<< * squeeze_out = True * else: */ - __pyx_t_4 = PyNumber_Add(__pyx_v_shapeout, __pyx_tuple__82); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4463, __pyx_L1_error) + __pyx_t_4 = PyNumber_Add(__pyx_v_shapeout, __pyx_tuple__82); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4462, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_shapeout, __pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":4464 + /* "netCDF4/_netCDF4.pyx":4463 * if lendim == -1: * shapeout = shapeout + (1,) * squeeze_out = True # <<<<<<<<<<<<<< @@ -50028,7 +50030,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 */ __pyx_v_squeeze_out = 1; - /* "netCDF4/_netCDF4.pyx":4462 + /* "netCDF4/_netCDF4.pyx":4461 * squeeze_out = False * for lendim in count: * if lendim == -1: # <<<<<<<<<<<<<< @@ -50038,7 +50040,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 goto __pyx_L5; } - /* "netCDF4/_netCDF4.pyx":4466 + /* "netCDF4/_netCDF4.pyx":4465 * squeeze_out = True * else: * shapeout = shapeout + (lendim,) # <<<<<<<<<<<<<< @@ -50046,12 +50048,12 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 * ndims = len(self.dimensions) */ /*else*/ { - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4466, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_lendim); __Pyx_GIVEREF(__pyx_v_lendim); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_lendim); - __pyx_t_6 = PyNumber_Add(__pyx_v_shapeout, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4466, __pyx_L1_error) + __pyx_t_6 = PyNumber_Add(__pyx_v_shapeout, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_shapeout, __pyx_t_6); @@ -50059,7 +50061,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 } __pyx_L5:; - /* "netCDF4/_netCDF4.pyx":4461 + /* "netCDF4/_netCDF4.pyx":4460 * shapeout = () * squeeze_out = False * for lendim in count: # <<<<<<<<<<<<<< @@ -50069,20 +50071,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":4468 + /* "netCDF4/_netCDF4.pyx":4467 * shapeout = shapeout + (lendim,) * # rank of variable. * ndims = len(self.dimensions) # <<<<<<<<<<<<<< * # fill up startp,countp,stridep. * negstride = 0 */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4468, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4467, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 4468, __pyx_L1_error) + __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 4467, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_ndims = __pyx_t_2; - /* "netCDF4/_netCDF4.pyx":4470 + /* "netCDF4/_netCDF4.pyx":4469 * ndims = len(self.dimensions) * # fill up startp,countp,stridep. * negstride = 0 # <<<<<<<<<<<<<< @@ -50091,19 +50093,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 */ __pyx_v_negstride = 0; - /* "netCDF4/_netCDF4.pyx":4471 + /* "netCDF4/_netCDF4.pyx":4470 * # fill up startp,countp,stridep. * negstride = 0 * sl = [] # <<<<<<<<<<<<<< * startp = malloc(sizeof(size_t) * ndims) * countp = malloc(sizeof(size_t) * ndims) */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4471, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_sl = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":4472 + /* "netCDF4/_netCDF4.pyx":4471 * negstride = 0 * sl = [] * startp = malloc(sizeof(size_t) * ndims) # <<<<<<<<<<<<<< @@ -50112,7 +50114,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 */ __pyx_v_startp = ((size_t *)malloc(((sizeof(size_t)) * __pyx_v_ndims))); - /* "netCDF4/_netCDF4.pyx":4473 + /* "netCDF4/_netCDF4.pyx":4472 * sl = [] * startp = malloc(sizeof(size_t) * ndims) * countp = malloc(sizeof(size_t) * ndims) # <<<<<<<<<<<<<< @@ -50121,7 +50123,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 */ __pyx_v_countp = ((size_t *)malloc(((sizeof(size_t)) * __pyx_v_ndims))); - /* "netCDF4/_netCDF4.pyx":4474 + /* "netCDF4/_netCDF4.pyx":4473 * startp = malloc(sizeof(size_t) * ndims) * countp = malloc(sizeof(size_t) * ndims) * stridep = malloc(sizeof(ptrdiff_t) * ndims) # <<<<<<<<<<<<<< @@ -50130,7 +50132,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 */ __pyx_v_stridep = ((ptrdiff_t *)malloc(((sizeof(ptrdiff_t)) * __pyx_v_ndims))); - /* "netCDF4/_netCDF4.pyx":4475 + /* "netCDF4/_netCDF4.pyx":4474 * countp = malloc(sizeof(size_t) * ndims) * stridep = malloc(sizeof(ptrdiff_t) * ndims) * for n from 0 <= n < ndims: # <<<<<<<<<<<<<< @@ -50140,50 +50142,50 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 __pyx_t_7 = __pyx_v_ndims; for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_7; __pyx_v_n++) { - /* "netCDF4/_netCDF4.pyx":4476 + /* "netCDF4/_netCDF4.pyx":4475 * stridep = malloc(sizeof(ptrdiff_t) * ndims) * for n from 0 <= n < ndims: * count[n] = abs(count[n]) # make -1 into +1 # <<<<<<<<<<<<<< * countp[n] = count[n] * # for neg strides, reverse order (then flip that axis after data read in) */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_count, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4476, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_count, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyNumber_Absolute(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4476, __pyx_L1_error) + __pyx_t_6 = PyNumber_Absolute(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(__Pyx_SetItemInt(__pyx_v_count, __pyx_v_n, __pyx_t_6, long, 1, __Pyx_PyInt_From_long, 0, 1, 1) < 0)) __PYX_ERR(0, 4476, __pyx_L1_error) + if (unlikely(__Pyx_SetItemInt(__pyx_v_count, __pyx_v_n, __pyx_t_6, long, 1, __Pyx_PyInt_From_long, 0, 1, 1) < 0)) __PYX_ERR(0, 4475, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":4477 + /* "netCDF4/_netCDF4.pyx":4476 * for n from 0 <= n < ndims: * count[n] = abs(count[n]) # make -1 into +1 * countp[n] = count[n] # <<<<<<<<<<<<<< * # for neg strides, reverse order (then flip that axis after data read in) * if stride[n] < 0: */ - __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_count, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4477, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_count, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = __Pyx_PyInt_As_size_t(__pyx_t_6); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4477, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_As_size_t(__pyx_t_6); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4476, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; (__pyx_v_countp[__pyx_v_n]) = __pyx_t_8; - /* "netCDF4/_netCDF4.pyx":4479 + /* "netCDF4/_netCDF4.pyx":4478 * countp[n] = count[n] * # for neg strides, reverse order (then flip that axis after data read in) * if stride[n] < 0: # <<<<<<<<<<<<<< * negstride = 1 * stridep[n] = -stride[n] */ - __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_stride, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4479, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_stride, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4478, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4479, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4478, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4479, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4478, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { - /* "netCDF4/_netCDF4.pyx":4480 + /* "netCDF4/_netCDF4.pyx":4479 * # for neg strides, reverse order (then flip that axis after data read in) * if stride[n] < 0: * negstride = 1 # <<<<<<<<<<<<<< @@ -50192,75 +50194,75 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 */ __pyx_v_negstride = 1; - /* "netCDF4/_netCDF4.pyx":4481 + /* "netCDF4/_netCDF4.pyx":4480 * if stride[n] < 0: * negstride = 1 * stridep[n] = -stride[n] # <<<<<<<<<<<<<< * startp[n] = start[n]+stride[n]*(count[n]-1) * stride[n] = -stride[n] */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_stride, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4481, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_stride, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4480, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyNumber_Negative(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4481, __pyx_L1_error) + __pyx_t_6 = PyNumber_Negative(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4480, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_9 = __Pyx_PyInt_As_ptrdiff_t(__pyx_t_6); if (unlikely((__pyx_t_9 == (ptrdiff_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4481, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_As_ptrdiff_t(__pyx_t_6); if (unlikely((__pyx_t_9 == (ptrdiff_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4480, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; (__pyx_v_stridep[__pyx_v_n]) = __pyx_t_9; - /* "netCDF4/_netCDF4.pyx":4482 + /* "netCDF4/_netCDF4.pyx":4481 * negstride = 1 * stridep[n] = -stride[n] * startp[n] = start[n]+stride[n]*(count[n]-1) # <<<<<<<<<<<<<< * stride[n] = -stride[n] * sl.append(slice(None, None, -1)) # this slice will reverse the data */ - __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_start, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4482, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_start, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4481, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_stride, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4482, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_stride, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4481, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_count, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4482, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_count, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4481, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_10 = __Pyx_PyInt_SubtractObjC(__pyx_t_4, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4482, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_SubtractObjC(__pyx_t_4, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4481, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyNumber_Multiply(__pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4482, __pyx_L1_error) + __pyx_t_4 = PyNumber_Multiply(__pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4481, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = PyNumber_Add(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4482, __pyx_L1_error) + __pyx_t_10 = PyNumber_Add(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4481, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyInt_As_size_t(__pyx_t_10); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4482, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_As_size_t(__pyx_t_10); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4481, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; (__pyx_v_startp[__pyx_v_n]) = __pyx_t_8; - /* "netCDF4/_netCDF4.pyx":4483 + /* "netCDF4/_netCDF4.pyx":4482 * stridep[n] = -stride[n] * startp[n] = start[n]+stride[n]*(count[n]-1) * stride[n] = -stride[n] # <<<<<<<<<<<<<< * sl.append(slice(None, None, -1)) # this slice will reverse the data * else: */ - __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_stride, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4483, __pyx_L1_error) + __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_stride, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4482, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_4 = PyNumber_Negative(__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4483, __pyx_L1_error) + __pyx_t_4 = PyNumber_Negative(__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4482, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(__Pyx_SetItemInt(__pyx_v_stride, __pyx_v_n, __pyx_t_4, long, 1, __Pyx_PyInt_From_long, 0, 1, 1) < 0)) __PYX_ERR(0, 4483, __pyx_L1_error) + if (unlikely(__Pyx_SetItemInt(__pyx_v_stride, __pyx_v_n, __pyx_t_4, long, 1, __Pyx_PyInt_From_long, 0, 1, 1) < 0)) __PYX_ERR(0, 4482, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":4484 + /* "netCDF4/_netCDF4.pyx":4483 * startp[n] = start[n]+stride[n]*(count[n]-1) * stride[n] = -stride[n] * sl.append(slice(None, None, -1)) # this slice will reverse the data # <<<<<<<<<<<<<< * else: * startp[n] = start[n] */ - __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_sl, __pyx_slice__83); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4484, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_sl, __pyx_slice__83); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4483, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4479 + /* "netCDF4/_netCDF4.pyx":4478 * countp[n] = count[n] * # for neg strides, reverse order (then flip that axis after data read in) * if stride[n] < 0: # <<<<<<<<<<<<<< @@ -50270,7 +50272,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 goto __pyx_L8; } - /* "netCDF4/_netCDF4.pyx":4486 + /* "netCDF4/_netCDF4.pyx":4485 * sl.append(slice(None, None, -1)) # this slice will reverse the data * else: * startp[n] = start[n] # <<<<<<<<<<<<<< @@ -50278,71 +50280,71 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 * sl.append(slice(None,None, 1)) */ /*else*/ { - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_start, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4486, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_start, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4485, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = __Pyx_PyInt_As_size_t(__pyx_t_4); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4486, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_As_size_t(__pyx_t_4); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4485, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; (__pyx_v_startp[__pyx_v_n]) = __pyx_t_8; - /* "netCDF4/_netCDF4.pyx":4487 + /* "netCDF4/_netCDF4.pyx":4486 * else: * startp[n] = start[n] * stridep[n] = stride[n] # <<<<<<<<<<<<<< * sl.append(slice(None,None, 1)) * if self._isprimitive or self._iscompound or self._isenum: */ - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_stride, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4487, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_stride, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4486, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_9 = __Pyx_PyInt_As_ptrdiff_t(__pyx_t_4); if (unlikely((__pyx_t_9 == (ptrdiff_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4487, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_As_ptrdiff_t(__pyx_t_4); if (unlikely((__pyx_t_9 == (ptrdiff_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4486, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; (__pyx_v_stridep[__pyx_v_n]) = __pyx_t_9; - /* "netCDF4/_netCDF4.pyx":4488 + /* "netCDF4/_netCDF4.pyx":4487 * startp[n] = start[n] * stridep[n] = stride[n] * sl.append(slice(None,None, 1)) # <<<<<<<<<<<<<< * if self._isprimitive or self._iscompound or self._isenum: * data = numpy.empty(shapeout, self.dtype) */ - __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_sl, __pyx_slice__84); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4488, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_sl, __pyx_slice__84); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4487, __pyx_L1_error) } __pyx_L8:; } - /* "netCDF4/_netCDF4.pyx":4489 + /* "netCDF4/_netCDF4.pyx":4488 * stridep[n] = stride[n] * sl.append(slice(None,None, 1)) * if self._isprimitive or self._iscompound or self._isenum: # <<<<<<<<<<<<<< * data = numpy.empty(shapeout, self.dtype) * # strides all 1 or scalar variable, use get_vara (faster) */ - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4489, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4488, __pyx_L1_error) if (!__pyx_t_12) { } else { __pyx_t_5 = __pyx_t_12; goto __pyx_L10_bool_binop_done; } - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_iscompound); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4489, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_iscompound); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4488, __pyx_L1_error) if (!__pyx_t_12) { } else { __pyx_t_5 = __pyx_t_12; goto __pyx_L10_bool_binop_done; } - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isenum); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4489, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isenum); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4488, __pyx_L1_error) __pyx_t_5 = __pyx_t_12; __pyx_L10_bool_binop_done:; if (__pyx_t_5) { - /* "netCDF4/_netCDF4.pyx":4490 + /* "netCDF4/_netCDF4.pyx":4489 * sl.append(slice(None,None, 1)) * if self._isprimitive or self._iscompound or self._isenum: * data = numpy.empty(shapeout, self.dtype) # <<<<<<<<<<<<<< * # strides all 1 or scalar variable, use get_vara (faster) * if sum(stride) == ndims or ndims == 0: */ - __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4490, __pyx_L1_error) + __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4489, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4490, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4489, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = NULL; @@ -50360,7 +50362,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_shapeout, __pyx_v_self->dtype}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4490, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4489, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_4); } else @@ -50368,13 +50370,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_shapeout, __pyx_v_self->dtype}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4490, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4489, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { - __pyx_t_1 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4490, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4489, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__pyx_t_10) { __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_10); __pyx_t_10 = NULL; @@ -50385,36 +50387,36 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 __Pyx_INCREF(__pyx_v_self->dtype); __Pyx_GIVEREF(__pyx_v_self->dtype); PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_7, __pyx_v_self->dtype); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4490, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4489, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_7netCDF4_8_netCDF4_ndarray))))) __PYX_ERR(0, 4490, __pyx_L1_error) + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_7netCDF4_8_netCDF4_ndarray))))) __PYX_ERR(0, 4489, __pyx_L1_error) __pyx_v_data = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":4492 + /* "netCDF4/_netCDF4.pyx":4491 * data = numpy.empty(shapeout, self.dtype) * # strides all 1 or scalar variable, use get_vara (faster) * if sum(stride) == ndims or ndims == 0: # <<<<<<<<<<<<<< * with nogil: * ierr = nc_get_vara(self._grpid, self._varid, */ - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4492, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4491, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_stride); __Pyx_GIVEREF(__pyx_v_stride); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_stride); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4492, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4491, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ndims); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4492, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ndims); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4491, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4492, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4491, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4492, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4491, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_12) { } else { @@ -50426,7 +50428,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 __pyx_L14_bool_binop_done:; if (__pyx_t_5) { - /* "netCDF4/_netCDF4.pyx":4493 + /* "netCDF4/_netCDF4.pyx":4492 * # strides all 1 or scalar variable, use get_vara (faster) * if sum(stride) == ndims or ndims == 0: * with nogil: # <<<<<<<<<<<<<< @@ -50440,7 +50442,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":4494 + /* "netCDF4/_netCDF4.pyx":4493 * if sum(stride) == ndims or ndims == 0: * with nogil: * ierr = nc_get_vara(self._grpid, self._varid, # <<<<<<<<<<<<<< @@ -50450,7 +50452,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 __pyx_v_ierr = nc_get_vara(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_startp, __pyx_v_countp, __pyx_v_data->data); } - /* "netCDF4/_netCDF4.pyx":4493 + /* "netCDF4/_netCDF4.pyx":4492 * # strides all 1 or scalar variable, use get_vara (faster) * if sum(stride) == ndims or ndims == 0: * with nogil: # <<<<<<<<<<<<<< @@ -50468,7 +50470,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 } } - /* "netCDF4/_netCDF4.pyx":4492 + /* "netCDF4/_netCDF4.pyx":4491 * data = numpy.empty(shapeout, self.dtype) * # strides all 1 or scalar variable, use get_vara (faster) * if sum(stride) == ndims or ndims == 0: # <<<<<<<<<<<<<< @@ -50478,7 +50480,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 goto __pyx_L13; } - /* "netCDF4/_netCDF4.pyx":4497 + /* "netCDF4/_netCDF4.pyx":4496 * startp, countp, data.data) * else: * with nogil: # <<<<<<<<<<<<<< @@ -50493,7 +50495,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":4498 + /* "netCDF4/_netCDF4.pyx":4497 * else: * with nogil: * ierr = nc_get_vars(self._grpid, self._varid, # <<<<<<<<<<<<<< @@ -50503,7 +50505,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 __pyx_v_ierr = nc_get_vars(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_startp, __pyx_v_countp, __pyx_v_stridep, __pyx_v_data->data); } - /* "netCDF4/_netCDF4.pyx":4497 + /* "netCDF4/_netCDF4.pyx":4496 * startp, countp, data.data) * else: * with nogil: # <<<<<<<<<<<<<< @@ -50523,7 +50525,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 } __pyx_L13:; - /* "netCDF4/_netCDF4.pyx":4500 + /* "netCDF4/_netCDF4.pyx":4499 * ierr = nc_get_vars(self._grpid, self._varid, * startp, countp, stridep, data.data) * if ierr == NC_EINVALCOORDS: # <<<<<<<<<<<<<< @@ -50533,7 +50535,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 __pyx_t_5 = ((__pyx_v_ierr == NC_EINVALCOORDS) != 0); if (__pyx_t_5) { - /* "netCDF4/_netCDF4.pyx":4501 + /* "netCDF4/_netCDF4.pyx":4500 * startp, countp, stridep, data.data) * if ierr == NC_EINVALCOORDS: * raise IndexError # <<<<<<<<<<<<<< @@ -50541,9 +50543,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) */ __Pyx_Raise(__pyx_builtin_IndexError, 0, 0, 0); - __PYX_ERR(0, 4501, __pyx_L1_error) + __PYX_ERR(0, 4500, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4500 + /* "netCDF4/_netCDF4.pyx":4499 * ierr = nc_get_vars(self._grpid, self._varid, * startp, countp, stridep, data.data) * if ierr == NC_EINVALCOORDS: # <<<<<<<<<<<<<< @@ -50552,7 +50554,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 */ } - /* "netCDF4/_netCDF4.pyx":4502 + /* "netCDF4/_netCDF4.pyx":4501 * if ierr == NC_EINVALCOORDS: * raise IndexError * elif ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -50562,7 +50564,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 __pyx_t_5 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_5) { - /* "netCDF4/_netCDF4.pyx":4503 + /* "netCDF4/_netCDF4.pyx":4502 * raise IndexError * elif ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -50570,22 +50572,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 * # allocate array of correct primitive type. */ __pyx_t_13 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_13, 0, strlen(__pyx_t_13), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4503, __pyx_L1_error) + __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_13, 0, strlen(__pyx_t_13), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4503, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4503, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 4503, __pyx_L1_error) + __PYX_ERR(0, 4502, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4502 + /* "netCDF4/_netCDF4.pyx":4501 * if ierr == NC_EINVALCOORDS: * raise IndexError * elif ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -50594,7 +50596,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 */ } - /* "netCDF4/_netCDF4.pyx":4489 + /* "netCDF4/_netCDF4.pyx":4488 * stridep[n] = stride[n] * sl.append(slice(None,None, 1)) * if self._isprimitive or self._iscompound or self._isenum: # <<<<<<<<<<<<<< @@ -50604,26 +50606,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 goto __pyx_L9; } - /* "netCDF4/_netCDF4.pyx":4504 + /* "netCDF4/_netCDF4.pyx":4503 * elif ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * elif self._isvlen: # <<<<<<<<<<<<<< * # allocate array of correct primitive type. * data = numpy.empty(shapeout, 'O') */ - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4504, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4503, __pyx_L1_error) if (__pyx_t_5) { - /* "netCDF4/_netCDF4.pyx":4506 + /* "netCDF4/_netCDF4.pyx":4505 * elif self._isvlen: * # allocate array of correct primitive type. * data = numpy.empty(shapeout, 'O') # <<<<<<<<<<<<<< * # flatten data array. * data = data.flatten() */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4506, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4506, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -50641,7 +50643,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_shapeout, __pyx_n_s_O}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4506, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4505, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -50649,13 +50651,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_shapeout, __pyx_n_s_O}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4506, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4505, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_10 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4506, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -50666,23 +50668,23 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 __Pyx_INCREF(__pyx_n_s_O); __Pyx_GIVEREF(__pyx_n_s_O); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_7, __pyx_n_s_O); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4506, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7netCDF4_8_netCDF4_ndarray))))) __PYX_ERR(0, 4506, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7netCDF4_8_netCDF4_ndarray))))) __PYX_ERR(0, 4505, __pyx_L1_error) __pyx_v_data = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":4508 + /* "netCDF4/_netCDF4.pyx":4507 * data = numpy.empty(shapeout, 'O') * # flatten data array. * data = data.flatten() # <<<<<<<<<<<<<< * totelem = PyArray_SIZE(data) * if self.dtype == str: */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_flatten); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4508, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_flatten); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -50695,78 +50697,78 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 } } if (__pyx_t_10) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4508, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4507, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4508, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4507, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7netCDF4_8_netCDF4_ndarray))))) __PYX_ERR(0, 4508, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7netCDF4_8_netCDF4_ndarray))))) __PYX_ERR(0, 4507, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":4509 + /* "netCDF4/_netCDF4.pyx":4508 * # flatten data array. * data = data.flatten() * totelem = PyArray_SIZE(data) # <<<<<<<<<<<<<< * if self.dtype == str: * # vlen string (NC_STRING) */ - __pyx_t_1 = __Pyx_PyInt_From_npy_intp(PyArray_SIZE(__pyx_v_data)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4509, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_npy_intp(PyArray_SIZE(__pyx_v_data)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_totelem = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":4510 + /* "netCDF4/_netCDF4.pyx":4509 * data = data.flatten() * totelem = PyArray_SIZE(data) * if self.dtype == str: # <<<<<<<<<<<<<< * # vlen string (NC_STRING) * # allocate pointer array to hold string data. */ - __pyx_t_1 = PyObject_RichCompare(__pyx_v_self->dtype, ((PyObject *)(&PyString_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4510, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4510, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_v_self->dtype, ((PyObject *)(&PyString_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4509, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4509, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { - /* "netCDF4/_netCDF4.pyx":4513 + /* "netCDF4/_netCDF4.pyx":4512 * # vlen string (NC_STRING) * # allocate pointer array to hold string data. * strdata = malloc(sizeof(char *) * totelem) # <<<<<<<<<<<<<< * # strides all 1 or scalar variable, use get_vara (faster) * if sum(stride) == ndims or ndims == 0: */ - __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(char *))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4513, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(char *))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyNumber_Multiply(__pyx_t_1, __pyx_v_totelem); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4513, __pyx_L1_error) + __pyx_t_6 = PyNumber_Multiply(__pyx_t_1, __pyx_v_totelem); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_8 = __Pyx_PyInt_As_size_t(__pyx_t_6); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4513, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_As_size_t(__pyx_t_6); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4512, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_strdata = ((char **)malloc(__pyx_t_8)); - /* "netCDF4/_netCDF4.pyx":4515 + /* "netCDF4/_netCDF4.pyx":4514 * strdata = malloc(sizeof(char *) * totelem) * # strides all 1 or scalar variable, use get_vara (faster) * if sum(stride) == ndims or ndims == 0: # <<<<<<<<<<<<<< * with nogil: * ierr = nc_get_vara(self._grpid, self._varid, */ - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4515, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_stride); __Pyx_GIVEREF(__pyx_v_stride); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_stride); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4515, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_ndims); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4515, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_ndims); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_10 = PyObject_RichCompare(__pyx_t_1, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4515, __pyx_L1_error) + __pyx_t_10 = PyObject_RichCompare(__pyx_t_1, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4514, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4515, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4514, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (!__pyx_t_12) { } else { @@ -50778,7 +50780,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 __pyx_L25_bool_binop_done:; if (__pyx_t_5) { - /* "netCDF4/_netCDF4.pyx":4516 + /* "netCDF4/_netCDF4.pyx":4515 * # strides all 1 or scalar variable, use get_vara (faster) * if sum(stride) == ndims or ndims == 0: * with nogil: # <<<<<<<<<<<<<< @@ -50792,7 +50794,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":4517 + /* "netCDF4/_netCDF4.pyx":4516 * if sum(stride) == ndims or ndims == 0: * with nogil: * ierr = nc_get_vara(self._grpid, self._varid, # <<<<<<<<<<<<<< @@ -50802,7 +50804,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 __pyx_v_ierr = nc_get_vara(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_startp, __pyx_v_countp, __pyx_v_strdata); } - /* "netCDF4/_netCDF4.pyx":4516 + /* "netCDF4/_netCDF4.pyx":4515 * # strides all 1 or scalar variable, use get_vara (faster) * if sum(stride) == ndims or ndims == 0: * with nogil: # <<<<<<<<<<<<<< @@ -50820,7 +50822,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 } } - /* "netCDF4/_netCDF4.pyx":4515 + /* "netCDF4/_netCDF4.pyx":4514 * strdata = malloc(sizeof(char *) * totelem) * # strides all 1 or scalar variable, use get_vara (faster) * if sum(stride) == ndims or ndims == 0: # <<<<<<<<<<<<<< @@ -50830,7 +50832,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 goto __pyx_L24; } - /* "netCDF4/_netCDF4.pyx":4521 + /* "netCDF4/_netCDF4.pyx":4520 * else: * # FIXME: is this a bug in netCDF4? * raise IndexError('strides must all be 1 for string variables') # <<<<<<<<<<<<<< @@ -50838,15 +50840,15 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 * # startp, countp, stridep, strdata) */ /*else*/ { - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__85, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4521, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__85, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_Raise(__pyx_t_10, 0, 0, 0); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __PYX_ERR(0, 4521, __pyx_L1_error) + __PYX_ERR(0, 4520, __pyx_L1_error) } __pyx_L24:; - /* "netCDF4/_netCDF4.pyx":4524 + /* "netCDF4/_netCDF4.pyx":4523 * #ierr = nc_get_vars(self._grpid, self._varid, * # startp, countp, stridep, strdata) * if ierr == NC_EINVALCOORDS: # <<<<<<<<<<<<<< @@ -50856,7 +50858,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 __pyx_t_5 = ((__pyx_v_ierr == NC_EINVALCOORDS) != 0); if (__pyx_t_5) { - /* "netCDF4/_netCDF4.pyx":4525 + /* "netCDF4/_netCDF4.pyx":4524 * # startp, countp, stridep, strdata) * if ierr == NC_EINVALCOORDS: * raise IndexError # <<<<<<<<<<<<<< @@ -50864,9 +50866,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) */ __Pyx_Raise(__pyx_builtin_IndexError, 0, 0, 0); - __PYX_ERR(0, 4525, __pyx_L1_error) + __PYX_ERR(0, 4524, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4524 + /* "netCDF4/_netCDF4.pyx":4523 * #ierr = nc_get_vars(self._grpid, self._varid, * # startp, countp, stridep, strdata) * if ierr == NC_EINVALCOORDS: # <<<<<<<<<<<<<< @@ -50875,7 +50877,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 */ } - /* "netCDF4/_netCDF4.pyx":4526 + /* "netCDF4/_netCDF4.pyx":4525 * if ierr == NC_EINVALCOORDS: * raise IndexError * elif ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -50885,7 +50887,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 __pyx_t_5 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_5) { - /* "netCDF4/_netCDF4.pyx":4527 + /* "netCDF4/_netCDF4.pyx":4526 * raise IndexError * elif ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -50893,22 +50895,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 * # contents of strdata. */ __pyx_t_13 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_10 = __Pyx_decode_c_string(__pyx_t_13, 0, strlen(__pyx_t_13), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4527, __pyx_L1_error) + __pyx_t_10 = __Pyx_decode_c_string(__pyx_t_13, 0, strlen(__pyx_t_13), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4527, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4527, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_10, 0, 0, 0); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __PYX_ERR(0, 4527, __pyx_L1_error) + __PYX_ERR(0, 4526, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4526 + /* "netCDF4/_netCDF4.pyx":4525 * if ierr == NC_EINVALCOORDS: * raise IndexError * elif ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -50917,34 +50919,34 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 */ } - /* "netCDF4/_netCDF4.pyx":4530 + /* "netCDF4/_netCDF4.pyx":4529 * # loop over elements of object array, fill array with * # contents of strdata. * for i from 0<=imalloc(totelem*sizeof(nc_vlen_t)) # <<<<<<<<<<<<<< @@ -51107,37 +51109,37 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 * vldata[i].len = 0 */ /*else*/ { - __pyx_t_10 = __Pyx_PyInt_FromSize_t((sizeof(nc_vlen_t))); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4541, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_FromSize_t((sizeof(nc_vlen_t))); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_16 = PyNumber_Multiply(__pyx_v_totelem, __pyx_t_10); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4541, __pyx_L1_error) + __pyx_t_16 = PyNumber_Multiply(__pyx_v_totelem, __pyx_t_10); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_8 = __Pyx_PyInt_As_size_t(__pyx_t_16); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4541, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_As_size_t(__pyx_t_16); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4540, __pyx_L1_error) __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_v_vldata = ((nc_vlen_t *)malloc(__pyx_t_8)); - /* "netCDF4/_netCDF4.pyx":4542 + /* "netCDF4/_netCDF4.pyx":4541 * # allocate struct array to hold vlen data. * vldata = malloc(totelem*sizeof(nc_vlen_t)) * for i in range(totelem): # <<<<<<<<<<<<<< * vldata[i].len = 0 * vldata[i].p = 0 */ - __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4542, __pyx_L1_error) + __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_INCREF(__pyx_v_totelem); __Pyx_GIVEREF(__pyx_v_totelem); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_v_totelem); - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_16, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4542, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_16, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; if (likely(PyList_CheckExact(__pyx_t_10)) || PyTuple_CheckExact(__pyx_t_10)) { __pyx_t_16 = __pyx_t_10; __Pyx_INCREF(__pyx_t_16); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_16 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4542, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_16 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); - __pyx_t_3 = Py_TYPE(__pyx_t_16)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4542, __pyx_L1_error) + __pyx_t_3 = Py_TYPE(__pyx_t_16)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4541, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; for (;;) { @@ -51145,17 +51147,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 if (likely(PyList_CheckExact(__pyx_t_16))) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_16)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_10 = PyList_GET_ITEM(__pyx_t_16, __pyx_t_2); __Pyx_INCREF(__pyx_t_10); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 4542, __pyx_L1_error) + __pyx_t_10 = PyList_GET_ITEM(__pyx_t_16, __pyx_t_2); __Pyx_INCREF(__pyx_t_10); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 4541, __pyx_L1_error) #else - __pyx_t_10 = PySequence_ITEM(__pyx_t_16, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4542, __pyx_L1_error) + __pyx_t_10 = PySequence_ITEM(__pyx_t_16, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); #endif } else { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_16)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_16, __pyx_t_2); __Pyx_INCREF(__pyx_t_10); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 4542, __pyx_L1_error) + __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_16, __pyx_t_2); __Pyx_INCREF(__pyx_t_10); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 4541, __pyx_L1_error) #else - __pyx_t_10 = PySequence_ITEM(__pyx_t_16, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4542, __pyx_L1_error) + __pyx_t_10 = PySequence_ITEM(__pyx_t_16, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); #endif } @@ -51165,7 +51167,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 4542, __pyx_L1_error) + else __PYX_ERR(0, 4541, __pyx_L1_error) } break; } @@ -51174,27 +51176,27 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_10); __pyx_t_10 = 0; - /* "netCDF4/_netCDF4.pyx":4543 + /* "netCDF4/_netCDF4.pyx":4542 * vldata = malloc(totelem*sizeof(nc_vlen_t)) * for i in range(totelem): * vldata[i].len = 0 # <<<<<<<<<<<<<< * vldata[i].p = 0 * # strides all 1 or scalar variable, use get_vara (faster) */ - __pyx_t_17 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_17 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4543, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_17 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4542, __pyx_L1_error) (__pyx_v_vldata[__pyx_t_17]).len = 0; - /* "netCDF4/_netCDF4.pyx":4544 + /* "netCDF4/_netCDF4.pyx":4543 * for i in range(totelem): * vldata[i].len = 0 * vldata[i].p = 0 # <<<<<<<<<<<<<< * # strides all 1 or scalar variable, use get_vara (faster) * if sum(stride) == ndims or ndims == 0: */ - __pyx_t_17 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_17 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4544, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_17 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4543, __pyx_L1_error) (__pyx_v_vldata[__pyx_t_17]).p = ((void *)0); - /* "netCDF4/_netCDF4.pyx":4542 + /* "netCDF4/_netCDF4.pyx":4541 * # allocate struct array to hold vlen data. * vldata = malloc(totelem*sizeof(nc_vlen_t)) * for i in range(totelem): # <<<<<<<<<<<<<< @@ -51204,27 +51206,27 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 } __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; - /* "netCDF4/_netCDF4.pyx":4546 + /* "netCDF4/_netCDF4.pyx":4545 * vldata[i].p = 0 * # strides all 1 or scalar variable, use get_vara (faster) * if sum(stride) == ndims or ndims == 0: # <<<<<<<<<<<<<< * with nogil: * ierr = nc_get_vara(self._grpid, self._varid, */ - __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4546, __pyx_L1_error) + __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4545, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_INCREF(__pyx_v_stride); __Pyx_GIVEREF(__pyx_v_stride); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_v_stride); - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_16, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4546, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_16, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4545, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; - __pyx_t_16 = __Pyx_PyInt_From_int(__pyx_v_ndims); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4546, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyInt_From_int(__pyx_v_ndims); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4545, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); - __pyx_t_6 = PyObject_RichCompare(__pyx_t_10, __pyx_t_16, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4546, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_t_10, __pyx_t_16, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4545, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4546, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4545, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!__pyx_t_12) { } else { @@ -51236,7 +51238,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 __pyx_L36_bool_binop_done:; if (__pyx_t_5) { - /* "netCDF4/_netCDF4.pyx":4547 + /* "netCDF4/_netCDF4.pyx":4546 * # strides all 1 or scalar variable, use get_vara (faster) * if sum(stride) == ndims or ndims == 0: * with nogil: # <<<<<<<<<<<<<< @@ -51250,7 +51252,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":4548 + /* "netCDF4/_netCDF4.pyx":4547 * if sum(stride) == ndims or ndims == 0: * with nogil: * ierr = nc_get_vara(self._grpid, self._varid, # <<<<<<<<<<<<<< @@ -51260,7 +51262,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 __pyx_v_ierr = nc_get_vara(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_startp, __pyx_v_countp, __pyx_v_vldata); } - /* "netCDF4/_netCDF4.pyx":4547 + /* "netCDF4/_netCDF4.pyx":4546 * # strides all 1 or scalar variable, use get_vara (faster) * if sum(stride) == ndims or ndims == 0: * with nogil: # <<<<<<<<<<<<<< @@ -51278,7 +51280,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 } } - /* "netCDF4/_netCDF4.pyx":4546 + /* "netCDF4/_netCDF4.pyx":4545 * vldata[i].p = 0 * # strides all 1 or scalar variable, use get_vara (faster) * if sum(stride) == ndims or ndims == 0: # <<<<<<<<<<<<<< @@ -51288,7 +51290,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 goto __pyx_L35; } - /* "netCDF4/_netCDF4.pyx":4551 + /* "netCDF4/_netCDF4.pyx":4550 * startp, countp, vldata) * else: * raise IndexError('strides must all be 1 for vlen variables') # <<<<<<<<<<<<<< @@ -51296,15 +51298,15 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 * # startp, countp, stridep, vldata) */ /*else*/ { - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__86, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4551, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__86, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 4551, __pyx_L1_error) + __PYX_ERR(0, 4550, __pyx_L1_error) } __pyx_L35:; - /* "netCDF4/_netCDF4.pyx":4554 + /* "netCDF4/_netCDF4.pyx":4553 * #ierr = nc_get_vars(self._grpid, self._varid, * # startp, countp, stridep, vldata) * if ierr == NC_EINVALCOORDS: # <<<<<<<<<<<<<< @@ -51314,7 +51316,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 __pyx_t_5 = ((__pyx_v_ierr == NC_EINVALCOORDS) != 0); if (__pyx_t_5) { - /* "netCDF4/_netCDF4.pyx":4555 + /* "netCDF4/_netCDF4.pyx":4554 * # startp, countp, stridep, vldata) * if ierr == NC_EINVALCOORDS: * raise IndexError # <<<<<<<<<<<<<< @@ -51322,9 +51324,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) */ __Pyx_Raise(__pyx_builtin_IndexError, 0, 0, 0); - __PYX_ERR(0, 4555, __pyx_L1_error) + __PYX_ERR(0, 4554, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4554 + /* "netCDF4/_netCDF4.pyx":4553 * #ierr = nc_get_vars(self._grpid, self._varid, * # startp, countp, stridep, vldata) * if ierr == NC_EINVALCOORDS: # <<<<<<<<<<<<<< @@ -51333,7 +51335,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 */ } - /* "netCDF4/_netCDF4.pyx":4556 + /* "netCDF4/_netCDF4.pyx":4555 * if ierr == NC_EINVALCOORDS: * raise IndexError * elif ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -51343,7 +51345,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 __pyx_t_5 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_5) { - /* "netCDF4/_netCDF4.pyx":4557 + /* "netCDF4/_netCDF4.pyx":4556 * raise IndexError * elif ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -51351,22 +51353,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 * # contents of vlarray struct, put array in object array. */ __pyx_t_13 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_6 = __Pyx_decode_c_string(__pyx_t_13, 0, strlen(__pyx_t_13), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4557, __pyx_L1_error) + __pyx_t_6 = __Pyx_decode_c_string(__pyx_t_13, 0, strlen(__pyx_t_13), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4557, __pyx_L1_error) + __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_INCREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_16, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4557, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_16, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 4557, __pyx_L1_error) + __PYX_ERR(0, 4556, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4556 + /* "netCDF4/_netCDF4.pyx":4555 * if ierr == NC_EINVALCOORDS: * raise IndexError * elif ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -51375,44 +51377,44 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 */ } - /* "netCDF4/_netCDF4.pyx":4560 + /* "netCDF4/_netCDF4.pyx":4559 * # loop over elements of object array, fill array with * # contents of vlarray struct, put array in object array. * for i from 0<=ivldata[i].p */ - __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4561, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4560, __pyx_L1_error) __pyx_t_8 = (__pyx_v_vldata[__pyx_t_2]).len; __pyx_v_arrlen = __pyx_t_8; - /* "netCDF4/_netCDF4.pyx":4562 + /* "netCDF4/_netCDF4.pyx":4561 * for i from 0<=ivldata[i].p * memcpy(dataarr.data, vldata[i].p, dataarr.nbytes) */ - __pyx_t_16 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4562, __pyx_L1_error) + __pyx_t_16 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_empty); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4562, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_empty); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; - __pyx_t_16 = __Pyx_PyInt_FromSize_t(__pyx_v_arrlen); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4562, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyInt_FromSize_t(__pyx_v_arrlen); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __pyx_t_1 = NULL; __pyx_t_7 = 0; @@ -51429,7 +51431,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_16, __pyx_v_self->dtype}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4562, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4561, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; @@ -51438,14 +51440,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_16, __pyx_v_self->dtype}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4562, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4561, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } else #endif { - __pyx_t_4 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4562, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_1) { __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __pyx_t_1 = NULL; @@ -51456,62 +51458,62 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 __Pyx_GIVEREF(__pyx_v_self->dtype); PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_7, __pyx_v_self->dtype); __pyx_t_16 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4562, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_7netCDF4_8_netCDF4_ndarray))))) __PYX_ERR(0, 4562, __pyx_L1_error) + if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_7netCDF4_8_netCDF4_ndarray))))) __PYX_ERR(0, 4561, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_dataarr, ((PyArrayObject *)__pyx_t_6)); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":4564 + /* "netCDF4/_netCDF4.pyx":4563 * dataarr = numpy.empty(arrlen, self.dtype) * #dataarr.data = vldata[i].p * memcpy(dataarr.data, vldata[i].p, dataarr.nbytes) # <<<<<<<<<<<<<< * data[i] = dataarr * # reshape the output array */ - __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4564, __pyx_L1_error) - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dataarr), __pyx_n_s_nbytes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4564, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4563, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dataarr), __pyx_n_s_nbytes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = __Pyx_PyInt_As_size_t(__pyx_t_6); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4564, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_As_size_t(__pyx_t_6); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4563, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; memcpy(((void *)__pyx_v_dataarr->data), (__pyx_v_vldata[__pyx_t_2]).p, __pyx_t_8); - /* "netCDF4/_netCDF4.pyx":4565 + /* "netCDF4/_netCDF4.pyx":4564 * #dataarr.data = vldata[i].p * memcpy(dataarr.data, vldata[i].p, dataarr.nbytes) * data[i] = dataarr # <<<<<<<<<<<<<< * # reshape the output array * data = numpy.reshape(data, shapeout) */ - if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_data), __pyx_v_i, ((PyObject *)__pyx_v_dataarr)) < 0)) __PYX_ERR(0, 4565, __pyx_L1_error) - __pyx_t_14 = __Pyx_PyInt_As_long(__pyx_v_i); if (unlikely((__pyx_t_14 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4560, __pyx_L1_error) + if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_data), __pyx_v_i, ((PyObject *)__pyx_v_dataarr)) < 0)) __PYX_ERR(0, 4564, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyInt_As_long(__pyx_v_i); if (unlikely((__pyx_t_14 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4559, __pyx_L1_error) } - /* "netCDF4/_netCDF4.pyx":4560 + /* "netCDF4/_netCDF4.pyx":4559 * # loop over elements of object array, fill array with * # contents of vlarray struct, put array in object array. * for i from 0<=inc_strerror(ierr)).decode('ascii')) * elif self._isvlen: # <<<<<<<<<<<<<< @@ -51594,7 +51596,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 } __pyx_L9:; - /* "netCDF4/_netCDF4.pyx":4572 + /* "netCDF4/_netCDF4.pyx":4571 * # free the pointer array * free(vldata) * free(startp) # <<<<<<<<<<<<<< @@ -51603,7 +51605,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 */ free(__pyx_v_startp); - /* "netCDF4/_netCDF4.pyx":4573 + /* "netCDF4/_netCDF4.pyx":4572 * free(vldata) * free(startp) * free(countp) # <<<<<<<<<<<<<< @@ -51612,7 +51614,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 */ free(__pyx_v_countp); - /* "netCDF4/_netCDF4.pyx":4574 + /* "netCDF4/_netCDF4.pyx":4573 * free(startp) * free(countp) * free(stridep) # <<<<<<<<<<<<<< @@ -51621,7 +51623,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 */ free(__pyx_v_stridep); - /* "netCDF4/_netCDF4.pyx":4575 + /* "netCDF4/_netCDF4.pyx":4574 * free(countp) * free(stridep) * if negstride: # <<<<<<<<<<<<<< @@ -51631,17 +51633,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 __pyx_t_5 = (__pyx_v_negstride != 0); if (__pyx_t_5) { - /* "netCDF4/_netCDF4.pyx":4577 + /* "netCDF4/_netCDF4.pyx":4576 * if negstride: * # reverse data along axes with negative strides. * data = data[sl].copy() # make a copy so data is contiguous. # <<<<<<<<<<<<<< * # netcdf-c always returns data in native byte order, * # regardless of variable endian-ness. Here we swap the */ - if (unlikely(!__pyx_v_data)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 4577, __pyx_L1_error) } - __pyx_t_4 = PyObject_GetItem(((PyObject *)__pyx_v_data), __pyx_v_sl); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4577, __pyx_L1_error) + if (unlikely(!__pyx_v_data)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 4576, __pyx_L1_error) } + __pyx_t_4 = PyObject_GetItem(((PyObject *)__pyx_v_data), __pyx_v_sl); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4577, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -51655,18 +51657,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 } } if (__pyx_t_4) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4577, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4576, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { - __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_16); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4577, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_16); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4576, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; - if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_7netCDF4_8_netCDF4_ndarray))))) __PYX_ERR(0, 4577, __pyx_L1_error) + if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_7netCDF4_8_netCDF4_ndarray))))) __PYX_ERR(0, 4576, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_6)); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":4575 + /* "netCDF4/_netCDF4.pyx":4574 * free(countp) * free(stridep) * if negstride: # <<<<<<<<<<<<<< @@ -51675,40 +51677,40 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 */ } - /* "netCDF4/_netCDF4.pyx":4583 + /* "netCDF4/_netCDF4.pyx":4582 * # dtype of the returned numpy array matches the variable dtype. * # (pull request #555, issue #554). * if not data.dtype.isnative: # <<<<<<<<<<<<<< * data.byteswap(True) # in-place byteswap * if not self.dimensions: */ - if (unlikely(!__pyx_v_data)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 4583, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4583, __pyx_L1_error) + if (unlikely(!__pyx_v_data)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 4582, __pyx_L1_error) } + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_isnative); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4583, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_isnative); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_16); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4583, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_16); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4582, __pyx_L1_error) __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_12 = ((!__pyx_t_5) != 0); if (__pyx_t_12) { - /* "netCDF4/_netCDF4.pyx":4584 + /* "netCDF4/_netCDF4.pyx":4583 * # (pull request #555, issue #554). * if not data.dtype.isnative: * data.byteswap(True) # in-place byteswap # <<<<<<<<<<<<<< * if not self.dimensions: * return data[0] # a scalar */ - if (unlikely(!__pyx_v_data)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 4584, __pyx_L1_error) } - __pyx_t_16 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_byteswap); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4584, __pyx_L1_error) + if (unlikely(!__pyx_v_data)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 4583, __pyx_L1_error) } + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_byteswap); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_tuple__87, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4584, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_tuple__87, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":4583 + /* "netCDF4/_netCDF4.pyx":4582 * # dtype of the returned numpy array matches the variable dtype. * # (pull request #555, issue #554). * if not data.dtype.isnative: # <<<<<<<<<<<<<< @@ -51717,21 +51719,21 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 */ } - /* "netCDF4/_netCDF4.pyx":4585 + /* "netCDF4/_netCDF4.pyx":4584 * if not data.dtype.isnative: * data.byteswap(True) # in-place byteswap * if not self.dimensions: # <<<<<<<<<<<<<< * return data[0] # a scalar * elif squeeze_out: */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4585, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4585, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4584, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_5 = ((!__pyx_t_12) != 0); if (__pyx_t_5) { - /* "netCDF4/_netCDF4.pyx":4586 + /* "netCDF4/_netCDF4.pyx":4585 * data.byteswap(True) # in-place byteswap * if not self.dimensions: * return data[0] # a scalar # <<<<<<<<<<<<<< @@ -51739,14 +51741,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 * return numpy.squeeze(data) */ __Pyx_XDECREF(__pyx_r); - if (unlikely(!__pyx_v_data)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 4586, __pyx_L1_error) } - __pyx_t_6 = __Pyx_GetItemInt(((PyObject *)__pyx_v_data), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4586, __pyx_L1_error) + if (unlikely(!__pyx_v_data)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 4585, __pyx_L1_error) } + __pyx_t_6 = __Pyx_GetItemInt(((PyObject *)__pyx_v_data), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":4585 + /* "netCDF4/_netCDF4.pyx":4584 * if not data.dtype.isnative: * data.byteswap(True) # in-place byteswap * if not self.dimensions: # <<<<<<<<<<<<<< @@ -51755,7 +51757,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 */ } - /* "netCDF4/_netCDF4.pyx":4587 + /* "netCDF4/_netCDF4.pyx":4586 * if not self.dimensions: * return data[0] # a scalar * elif squeeze_out: # <<<<<<<<<<<<<< @@ -51765,7 +51767,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 __pyx_t_5 = (__pyx_v_squeeze_out != 0); if (__pyx_t_5) { - /* "netCDF4/_netCDF4.pyx":4588 + /* "netCDF4/_netCDF4.pyx":4587 * return data[0] # a scalar * elif squeeze_out: * return numpy.squeeze(data) # <<<<<<<<<<<<<< @@ -51773,12 +51775,12 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 * return data */ __Pyx_XDECREF(__pyx_r); - __pyx_t_16 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4588, __pyx_L1_error) + __pyx_t_16 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_squeeze); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4588, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_squeeze); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; - if (unlikely(!__pyx_v_data)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 4588, __pyx_L1_error) } + if (unlikely(!__pyx_v_data)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 4587, __pyx_L1_error) } __pyx_t_16 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_4); @@ -51790,13 +51792,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 } } if (!__pyx_t_16) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_data)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4588, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_data)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_16, ((PyObject *)__pyx_v_data)}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4588, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4587, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_GOTREF(__pyx_t_6); } else @@ -51804,19 +51806,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_16, ((PyObject *)__pyx_v_data)}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4588, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4587, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_GOTREF(__pyx_t_6); } else #endif { - __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4588, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_16); __pyx_t_16 = NULL; __Pyx_INCREF(((PyObject *)__pyx_v_data)); __Pyx_GIVEREF(((PyObject *)__pyx_v_data)); PyTuple_SET_ITEM(__pyx_t_10, 0+1, ((PyObject *)__pyx_v_data)); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4588, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -51826,7 +51828,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 __pyx_t_6 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":4587 + /* "netCDF4/_netCDF4.pyx":4586 * if not self.dimensions: * return data[0] # a scalar * elif squeeze_out: # <<<<<<<<<<<<<< @@ -51835,7 +51837,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 */ } - /* "netCDF4/_netCDF4.pyx":4590 + /* "netCDF4/_netCDF4.pyx":4589 * return numpy.squeeze(data) * else: * return data # <<<<<<<<<<<<<< @@ -51844,13 +51846,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 */ /*else*/ { __Pyx_XDECREF(__pyx_r); - if (unlikely(!__pyx_v_data)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 4590, __pyx_L1_error) } + if (unlikely(!__pyx_v_data)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 4589, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_data)); __pyx_r = ((PyObject *)__pyx_v_data); goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":4446 + /* "netCDF4/_netCDF4.pyx":4445 * free(stridep) * * def _get(self,start,count,stride): # <<<<<<<<<<<<<< @@ -51880,7 +51882,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4592 +/* "netCDF4/_netCDF4.pyx":4591 * return data * * def __reduce__(self): # <<<<<<<<<<<<<< @@ -51907,20 +51909,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_68__reduce__(CYTHON_UNUSE PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__reduce__", 0); - /* "netCDF4/_netCDF4.pyx":4594 + /* "netCDF4/_netCDF4.pyx":4593 * def __reduce__(self): * # raise error is user tries to pickle a Variable object. * raise NotImplementedError('Variable is not picklable') # <<<<<<<<<<<<<< * * # Compound datatype support. */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__88, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4594, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__88, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 4594, __pyx_L1_error) + __PYX_ERR(0, 4593, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4592 + /* "netCDF4/_netCDF4.pyx":4591 * return data * * def __reduce__(self): # <<<<<<<<<<<<<< @@ -53479,7 +53481,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_8_has_lsd_4__del__(struct __pyx return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4615 +/* "netCDF4/_netCDF4.pyx":4614 * __pdoc__['CompoundType.dtype'] = \ * """A numpy dtype object describing the compound data type.""" * def __init__(self, grp, object dt, object dtype_name, **kwargs): # <<<<<<<<<<<<<< @@ -53524,16 +53526,16 @@ static int __pyx_pw_7netCDF4_8_netCDF4_12CompoundType_1__init__(PyObject *__pyx_ case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dt)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 4615, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 4614, __pyx_L3_error) } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dtype_name)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 4615, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 4614, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 4615, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 4614, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -53548,7 +53550,7 @@ static int __pyx_pw_7netCDF4_8_netCDF4_12CompoundType_1__init__(PyObject *__pyx_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4615, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4614, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_AddTraceback("netCDF4._netCDF4.CompoundType.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -53577,27 +53579,27 @@ static int __pyx_pf_7netCDF4_8_netCDF4_12CompoundType___init__(struct __pyx_obj_ __Pyx_RefNannySetupContext("__init__", 0); __Pyx_INCREF(__pyx_v_dt); - /* "netCDF4/_netCDF4.pyx":4640 + /* "netCDF4/_netCDF4.pyx":4639 * """ * cdef nc_type xtype * dt = numpy.dtype(dt,align=True) # <<<<<<<<<<<<<< * if 'typeid' in kwargs: * xtype = kwargs['typeid'] */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4640, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4639, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4640, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4639, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4640, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4639, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_dt); __Pyx_GIVEREF(__pyx_v_dt); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_dt); - __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4640, __pyx_L1_error) + __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4639, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_align, Py_True) < 0) __PYX_ERR(0, 4640, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4640, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_align, Py_True) < 0) __PYX_ERR(0, 4639, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4639, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -53605,31 +53607,31 @@ static int __pyx_pf_7netCDF4_8_netCDF4_12CompoundType___init__(struct __pyx_obj_ __Pyx_DECREF_SET(__pyx_v_dt, __pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":4641 + /* "netCDF4/_netCDF4.pyx":4640 * cdef nc_type xtype * dt = numpy.dtype(dt,align=True) * if 'typeid' in kwargs: # <<<<<<<<<<<<<< * xtype = kwargs['typeid'] * else: */ - __pyx_t_5 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_typeid, __pyx_v_kwargs, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4641, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_typeid, __pyx_v_kwargs, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4640, __pyx_L1_error) __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "netCDF4/_netCDF4.pyx":4642 + /* "netCDF4/_netCDF4.pyx":4641 * dt = numpy.dtype(dt,align=True) * if 'typeid' in kwargs: * xtype = kwargs['typeid'] # <<<<<<<<<<<<<< * else: * xtype = _def_compound(grp, dt, dtype_name) */ - __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_s_typeid); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4642, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_s_typeid); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4641, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = __Pyx_PyInt_As_nc_type(__pyx_t_4); if (unlikely((__pyx_t_7 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4642, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_As_nc_type(__pyx_t_4); if (unlikely((__pyx_t_7 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4641, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_xtype = __pyx_t_7; - /* "netCDF4/_netCDF4.pyx":4641 + /* "netCDF4/_netCDF4.pyx":4640 * cdef nc_type xtype * dt = numpy.dtype(dt,align=True) * if 'typeid' in kwargs: # <<<<<<<<<<<<<< @@ -53639,7 +53641,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_12CompoundType___init__(struct __pyx_obj_ goto __pyx_L3; } - /* "netCDF4/_netCDF4.pyx":4644 + /* "netCDF4/_netCDF4.pyx":4643 * xtype = kwargs['typeid'] * else: * xtype = _def_compound(grp, dt, dtype_name) # <<<<<<<<<<<<<< @@ -53647,15 +53649,15 @@ static int __pyx_pf_7netCDF4_8_netCDF4_12CompoundType___init__(struct __pyx_obj_ * self.dtype = dt */ /*else*/ { - __pyx_t_4 = __pyx_f_7netCDF4_8_netCDF4__def_compound(__pyx_v_grp, __pyx_v_dt, __pyx_v_dtype_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4644, __pyx_L1_error) + __pyx_t_4 = __pyx_f_7netCDF4_8_netCDF4__def_compound(__pyx_v_grp, __pyx_v_dt, __pyx_v_dtype_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = __Pyx_PyInt_As_nc_type(__pyx_t_4); if (unlikely((__pyx_t_7 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4644, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_As_nc_type(__pyx_t_4); if (unlikely((__pyx_t_7 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4643, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_xtype = __pyx_t_7; } __pyx_L3:; - /* "netCDF4/_netCDF4.pyx":4645 + /* "netCDF4/_netCDF4.pyx":4644 * else: * xtype = _def_compound(grp, dt, dtype_name) * self._nc_type = xtype # <<<<<<<<<<<<<< @@ -53664,7 +53666,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_12CompoundType___init__(struct __pyx_obj_ */ __pyx_v_self->_nc_type = __pyx_v_xtype; - /* "netCDF4/_netCDF4.pyx":4646 + /* "netCDF4/_netCDF4.pyx":4645 * xtype = _def_compound(grp, dt, dtype_name) * self._nc_type = xtype * self.dtype = dt # <<<<<<<<<<<<<< @@ -53677,7 +53679,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_12CompoundType___init__(struct __pyx_obj_ __Pyx_DECREF(__pyx_v_self->dtype); __pyx_v_self->dtype = __pyx_v_dt; - /* "netCDF4/_netCDF4.pyx":4647 + /* "netCDF4/_netCDF4.pyx":4646 * self._nc_type = xtype * self.dtype = dt * self.name = dtype_name # <<<<<<<<<<<<<< @@ -53690,7 +53692,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_12CompoundType___init__(struct __pyx_obj_ __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = __pyx_v_dtype_name; - /* "netCDF4/_netCDF4.pyx":4615 + /* "netCDF4/_netCDF4.pyx":4614 * __pdoc__['CompoundType.dtype'] = \ * """A numpy dtype object describing the compound data type.""" * def __init__(self, grp, object dt, object dtype_name, **kwargs): # <<<<<<<<<<<<<< @@ -53714,7 +53716,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_12CompoundType___init__(struct __pyx_obj_ return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4649 +/* "netCDF4/_netCDF4.pyx":4648 * self.name = dtype_name * * def __repr__(self): # <<<<<<<<<<<<<< @@ -53746,20 +53748,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_2__repr__(struct __p PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - /* "netCDF4/_netCDF4.pyx":4650 + /* "netCDF4/_netCDF4.pyx":4649 * * def __repr__(self): * if python3: # <<<<<<<<<<<<<< * return self.__unicode__() * else: */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4650, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4649, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4650, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4649, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":4651 + /* "netCDF4/_netCDF4.pyx":4650 * def __repr__(self): * if python3: * return self.__unicode__() # <<<<<<<<<<<<<< @@ -53767,7 +53769,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_2__repr__(struct __p * return unicode(self).encode(default_encoding) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4651, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4650, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -53780,10 +53782,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_2__repr__(struct __p } } if (__pyx_t_4) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4651, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4650, __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, 4651, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4650, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -53791,7 +53793,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_2__repr__(struct __p __pyx_t_1 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":4650 + /* "netCDF4/_netCDF4.pyx":4649 * * def __repr__(self): * if python3: # <<<<<<<<<<<<<< @@ -53800,7 +53802,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_2__repr__(struct __p */ } - /* "netCDF4/_netCDF4.pyx":4653 + /* "netCDF4/_netCDF4.pyx":4652 * return self.__unicode__() * else: * return unicode(self).encode(default_encoding) # <<<<<<<<<<<<<< @@ -53809,18 +53811,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_2__repr__(struct __p */ /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4653, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4652, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self)); - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4653, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4652, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4653, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4652, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4653, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4652, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -53833,14 +53835,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_2__repr__(struct __p } } if (!__pyx_t_5) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4653, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4652, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4653, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4652, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -53849,20 +53851,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_2__repr__(struct __p #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4653, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4652, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4653, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4652, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4653, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4652, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -53873,7 +53875,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_2__repr__(struct __p goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":4649 + /* "netCDF4/_netCDF4.pyx":4648 * self.name = dtype_name * * def __repr__(self): # <<<<<<<<<<<<<< @@ -53896,7 +53898,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_2__repr__(struct __p return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4655 +/* "netCDF4/_netCDF4.pyx":4654 * return unicode(self).encode(default_encoding) * * def __unicode__(self): # <<<<<<<<<<<<<< @@ -53925,7 +53927,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_4__unicode__(struct PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__unicode__", 0); - /* "netCDF4/_netCDF4.pyx":4656 + /* "netCDF4/_netCDF4.pyx":4655 * * def __unicode__(self): * return repr(type(self))+": name = '%s', numpy dtype = %s\n" %\ # <<<<<<<<<<<<<< @@ -53933,17 +53935,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_4__unicode__(struct * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_Repr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4656, __pyx_L1_error) + __pyx_t_1 = PyObject_Repr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "netCDF4/_netCDF4.pyx":4657 + /* "netCDF4/_netCDF4.pyx":4656 * def __unicode__(self): * return repr(type(self))+": name = '%s', numpy dtype = %s\n" %\ * (self.name,self.dtype) # <<<<<<<<<<<<<< * * def __reduce__(self): */ - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4657, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_self->name); __Pyx_GIVEREF(__pyx_v_self->name); @@ -53952,17 +53954,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_4__unicode__(struct __Pyx_GIVEREF(__pyx_v_self->dtype); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->dtype); - /* "netCDF4/_netCDF4.pyx":4656 + /* "netCDF4/_netCDF4.pyx":4655 * * def __unicode__(self): * return repr(type(self))+": name = '%s', numpy dtype = %s\n" %\ # <<<<<<<<<<<<<< * (self.name,self.dtype) * */ - __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_name_s_numpy_dtype_s, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4656, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_name_s_numpy_dtype_s, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4656, __pyx_L1_error) + __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -53970,7 +53972,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_4__unicode__(struct __pyx_t_2 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":4655 + /* "netCDF4/_netCDF4.pyx":4654 * return unicode(self).encode(default_encoding) * * def __unicode__(self): # <<<<<<<<<<<<<< @@ -53991,7 +53993,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_4__unicode__(struct return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4659 +/* "netCDF4/_netCDF4.pyx":4658 * (self.name,self.dtype) * * def __reduce__(self): # <<<<<<<<<<<<<< @@ -54018,20 +54020,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_6__reduce__(CYTHON_U PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__reduce__", 0); - /* "netCDF4/_netCDF4.pyx":4661 + /* "netCDF4/_netCDF4.pyx":4660 * def __reduce__(self): * # raise error is user tries to pickle a CompoundType object. * raise NotImplementedError('CompoundType is not picklable') # <<<<<<<<<<<<<< * * cdef _def_compound(grp, object dt, object dtype_name): */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__89, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4661, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__89, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4660, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 4661, __pyx_L1_error) + __PYX_ERR(0, 4660, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4659 + /* "netCDF4/_netCDF4.pyx":4658 * (self.name,self.dtype) * * def __reduce__(self): # <<<<<<<<<<<<<< @@ -54049,7 +54051,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_6__reduce__(CYTHON_U return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4609 +/* "netCDF4/_netCDF4.pyx":4608 * the user. * """ * cdef public nc_type _nc_type # <<<<<<<<<<<<<< @@ -54076,7 +54078,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_8_nc_type___get__(st PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_nc_type(__pyx_v_self->_nc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4609, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_nc_type(__pyx_v_self->_nc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4608, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -54111,7 +54113,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_12CompoundType_8_nc_type_2__set__(struct __Pyx_RefNannyDeclarations nc_type __pyx_t_1; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyInt_As_nc_type(__pyx_v_value); if (unlikely((__pyx_t_1 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4609, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_nc_type(__pyx_v_value); if (unlikely((__pyx_t_1 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4608, __pyx_L1_error) __pyx_v_self->_nc_type = __pyx_t_1; /* function exit code */ @@ -54125,7 +54127,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_12CompoundType_8_nc_type_2__set__(struct return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4610 +/* "netCDF4/_netCDF4.pyx":4609 * """ * cdef public nc_type _nc_type * cdef public dtype, name # <<<<<<<<<<<<<< @@ -54307,7 +54309,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_12CompoundType_4name_4__del__(struct __py return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4663 +/* "netCDF4/_netCDF4.pyx":4662 * raise NotImplementedError('CompoundType is not picklable') * * cdef _def_compound(grp, object dt, object dtype_name): # <<<<<<<<<<<<<< @@ -54357,55 +54359,55 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, int __pyx_t_20; __Pyx_RefNannySetupContext("_def_compound", 0); - /* "netCDF4/_netCDF4.pyx":4672 + /* "netCDF4/_netCDF4.pyx":4671 * cdef char *nested_namstring * cdef int *dim_sizes * bytestr = _strencode(dtype_name) # <<<<<<<<<<<<<< * namstring = bytestr * size = dt.itemsize */ - __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_dtype_name, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4672, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_dtype_name, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_bytestr = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":4673 + /* "netCDF4/_netCDF4.pyx":4672 * cdef int *dim_sizes * bytestr = _strencode(dtype_name) * namstring = bytestr # <<<<<<<<<<<<<< * size = dt.itemsize * ierr = nc_def_compound(grp._grpid, size, namstring, &xtype) */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 4673, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 4672, __pyx_L1_error) __pyx_v_namstring = __pyx_t_2; - /* "netCDF4/_netCDF4.pyx":4674 + /* "netCDF4/_netCDF4.pyx":4673 * bytestr = _strencode(dtype_name) * namstring = bytestr * size = dt.itemsize # <<<<<<<<<<<<<< * ierr = nc_def_compound(grp._grpid, size, namstring, &xtype) * if ierr != NC_NOERR: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4674, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4673, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4674, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4673, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_size = __pyx_t_3; - /* "netCDF4/_netCDF4.pyx":4675 + /* "netCDF4/_netCDF4.pyx":4674 * namstring = bytestr * size = dt.itemsize * ierr = nc_def_compound(grp._grpid, size, namstring, &xtype) # <<<<<<<<<<<<<< * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4675, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4674, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4675, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4674, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_ierr = nc_def_compound(__pyx_t_4, __pyx_v_size, __pyx_v_namstring, (&__pyx_v_xtype)); - /* "netCDF4/_netCDF4.pyx":4676 + /* "netCDF4/_netCDF4.pyx":4675 * size = dt.itemsize * ierr = nc_def_compound(grp._grpid, size, namstring, &xtype) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -54415,7 +54417,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, __pyx_t_5 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_5) { - /* "netCDF4/_netCDF4.pyx":4677 + /* "netCDF4/_netCDF4.pyx":4676 * ierr = nc_def_compound(grp._grpid, size, namstring, &xtype) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -54423,22 +54425,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, * formats = [v[0] for v in dt.fields.values()] */ __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4677, __pyx_L1_error) + __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4677, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4677, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 4677, __pyx_L1_error) + __PYX_ERR(0, 4676, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4676 + /* "netCDF4/_netCDF4.pyx":4675 * size = dt.itemsize * ierr = nc_def_compound(grp._grpid, size, namstring, &xtype) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -54447,16 +54449,16 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, */ } - /* "netCDF4/_netCDF4.pyx":4678 + /* "netCDF4/_netCDF4.pyx":4677 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * names = list(dt.fields.keys()) # <<<<<<<<<<<<<< * formats = [v[0] for v in dt.fields.values()] * offsets = [v[1] for v in dt.fields.values()] */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_fields); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4678, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_fields); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4677, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_keys); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4678, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_keys); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4677, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -54470,31 +54472,31 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, } } if (__pyx_t_6) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4678, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4677, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4678, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4677, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4678, __pyx_L1_error) + __pyx_t_7 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4677, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_names = __pyx_t_7; __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":4679 + /* "netCDF4/_netCDF4.pyx":4678 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * names = list(dt.fields.keys()) * formats = [v[0] for v in dt.fields.values()] # <<<<<<<<<<<<<< * offsets = [v[1] for v in dt.fields.values()] * # make sure entries in lists sorted by offset. */ - __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4679, __pyx_L1_error) + __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_fields); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4679, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_fields); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_values); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4679, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_values); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -54508,10 +54510,10 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, } } if (__pyx_t_6) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4679, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4678, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4679, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4678, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -54519,9 +54521,9 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, __pyx_t_8 = __pyx_t_1; __Pyx_INCREF(__pyx_t_8); __pyx_t_9 = 0; __pyx_t_10 = NULL; } else { - __pyx_t_9 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4679, __pyx_L1_error) + __pyx_t_9 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_10 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4679, __pyx_L1_error) + __pyx_t_10 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4678, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -54529,17 +54531,17 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, if (likely(PyList_CheckExact(__pyx_t_8))) { if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_8)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 4679, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 4678, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4679, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_8)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 4679, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 4678, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4679, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -54549,7 +54551,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 4679, __pyx_L1_error) + else __PYX_ERR(0, 4678, __pyx_L1_error) } break; } @@ -54557,27 +54559,27 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, } __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_v, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4679, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_v, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 4679, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 4678, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_formats = __pyx_t_7; __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":4680 + /* "netCDF4/_netCDF4.pyx":4679 * names = list(dt.fields.keys()) * formats = [v[0] for v in dt.fields.values()] * offsets = [v[1] for v in dt.fields.values()] # <<<<<<<<<<<<<< * # make sure entries in lists sorted by offset. * # (don't know why this is necessary, but it is for version 4.0.1) */ - __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4680, __pyx_L1_error) + __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_fields); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4680, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_fields); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_values); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4680, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_values); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -54591,10 +54593,10 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, } } if (__pyx_t_1) { - __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4680, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4679, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { - __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4680, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4679, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -54602,9 +54604,9 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, __pyx_t_6 = __pyx_t_8; __Pyx_INCREF(__pyx_t_6); __pyx_t_9 = 0; __pyx_t_10 = NULL; } else { - __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4680, __pyx_L1_error) + __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4680, __pyx_L1_error) + __pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4679, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; for (;;) { @@ -54612,17 +54614,17 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, if (likely(PyList_CheckExact(__pyx_t_6))) { if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_8 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 4680, __pyx_L1_error) + __pyx_t_8 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 4679, __pyx_L1_error) #else - __pyx_t_8 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4680, __pyx_L1_error) + __pyx_t_8 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif } else { if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 4680, __pyx_L1_error) + __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 4679, __pyx_L1_error) #else - __pyx_t_8 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4680, __pyx_L1_error) + __pyx_t_8 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif } @@ -54632,7 +54634,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 4680, __pyx_L1_error) + else __PYX_ERR(0, 4679, __pyx_L1_error) } break; } @@ -54640,23 +54642,23 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, } __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_v, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4680, __pyx_L1_error) + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_v, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 4680, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 4679, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_offsets = ((PyObject*)__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":4683 + /* "netCDF4/_netCDF4.pyx":4682 * # make sure entries in lists sorted by offset. * # (don't know why this is necessary, but it is for version 4.0.1) * names = _sortbylist(names, offsets) # <<<<<<<<<<<<<< * formats = _sortbylist(formats, offsets) * offsets.sort() */ - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_sortbylist); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4683, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_sortbylist); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4682, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; __pyx_t_4 = 0; @@ -54673,7 +54675,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_names, __pyx_v_offsets}; - __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4683, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4682, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_7); } else @@ -54681,13 +54683,13 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_names, __pyx_v_offsets}; - __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4683, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4682, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_7); } else #endif { - __pyx_t_1 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4683, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4682, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_8); __pyx_t_8 = NULL; @@ -54698,7 +54700,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, __Pyx_INCREF(__pyx_v_offsets); __Pyx_GIVEREF(__pyx_v_offsets); PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_4, __pyx_v_offsets); - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4683, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4682, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } @@ -54706,14 +54708,14 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, __Pyx_DECREF_SET(__pyx_v_names, __pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":4684 + /* "netCDF4/_netCDF4.pyx":4683 * # (don't know why this is necessary, but it is for version 4.0.1) * names = _sortbylist(names, offsets) * formats = _sortbylist(formats, offsets) # <<<<<<<<<<<<<< * offsets.sort() * for name, format, offset in zip(names, formats, offsets): */ - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_sortbylist); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4684, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_sortbylist); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4683, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = NULL; __pyx_t_4 = 0; @@ -54730,7 +54732,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_formats, __pyx_v_offsets}; - __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4684, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4683, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_7); } else @@ -54738,13 +54740,13 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_formats, __pyx_v_offsets}; - __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4684, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4683, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_7); } else #endif { - __pyx_t_8 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4684, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4683, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_1) { __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); __pyx_t_1 = NULL; @@ -54755,7 +54757,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, __Pyx_INCREF(__pyx_v_offsets); __Pyx_GIVEREF(__pyx_v_offsets); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_4, __pyx_v_offsets); - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4684, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4683, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -54763,23 +54765,23 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, __Pyx_DECREF_SET(__pyx_v_formats, __pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":4685 + /* "netCDF4/_netCDF4.pyx":4684 * names = _sortbylist(names, offsets) * formats = _sortbylist(formats, offsets) * offsets.sort() # <<<<<<<<<<<<<< * for name, format, offset in zip(names, formats, offsets): * bytestr = _strencode(name) */ - __pyx_t_11 = PyList_Sort(__pyx_v_offsets); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4685, __pyx_L1_error) + __pyx_t_11 = PyList_Sort(__pyx_v_offsets); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4684, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4686 + /* "netCDF4/_netCDF4.pyx":4685 * formats = _sortbylist(formats, offsets) * offsets.sort() * for name, format, offset in zip(names, formats, offsets): # <<<<<<<<<<<<<< * bytestr = _strencode(name) * namstring = bytestr */ - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4686, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; __pyx_t_4 = 0; @@ -54796,7 +54798,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_v_names, __pyx_v_formats, __pyx_v_offsets}; - __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4686, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4685, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_7); } else @@ -54804,13 +54806,13 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_v_names, __pyx_v_formats, __pyx_v_offsets}; - __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4686, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4685, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_7); } else #endif { - __pyx_t_1 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4686, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_8); __pyx_t_8 = NULL; @@ -54824,7 +54826,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, __Pyx_INCREF(__pyx_v_offsets); __Pyx_GIVEREF(__pyx_v_offsets); PyTuple_SET_ITEM(__pyx_t_1, 2+__pyx_t_4, __pyx_v_offsets); - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4686, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } @@ -54833,9 +54835,9 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, __pyx_t_6 = __pyx_t_7; __Pyx_INCREF(__pyx_t_6); __pyx_t_9 = 0; __pyx_t_10 = NULL; } else { - __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4686, __pyx_L1_error) + __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4686, __pyx_L1_error) + __pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4685, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; for (;;) { @@ -54843,17 +54845,17 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, if (likely(PyList_CheckExact(__pyx_t_6))) { if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 4686, __pyx_L1_error) + __pyx_t_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 4685, __pyx_L1_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4686, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } else { if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 4686, __pyx_L1_error) + __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 4685, __pyx_L1_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4686, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } @@ -54863,7 +54865,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 4686, __pyx_L1_error) + else __PYX_ERR(0, 4685, __pyx_L1_error) } break; } @@ -54879,7 +54881,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 4686, __pyx_L1_error) + __PYX_ERR(0, 4685, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -54895,17 +54897,17 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_12); #else - __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4686, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4686, __pyx_L1_error) + __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_12 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4686, __pyx_L1_error) + __pyx_t_12 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); #endif __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { Py_ssize_t index = -1; - __pyx_t_13 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4686, __pyx_L1_error) + __pyx_t_13 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext; @@ -54915,7 +54917,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, __Pyx_GOTREF(__pyx_t_8); index = 2; __pyx_t_12 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_12)) goto __pyx_L10_unpacking_failed; __Pyx_GOTREF(__pyx_t_12); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 3) < 0) __PYX_ERR(0, 4686, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 3) < 0) __PYX_ERR(0, 4685, __pyx_L1_error) __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L11_unpacking_done; @@ -54923,10 +54925,10 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 4686, __pyx_L1_error) + __PYX_ERR(0, 4685, __pyx_L1_error) __pyx_L11_unpacking_done:; } - __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_12); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4686, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_12); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4685, __pyx_L1_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1); __pyx_t_1 = 0; @@ -54934,42 +54936,42 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, __pyx_t_8 = 0; __pyx_v_offset = __pyx_t_3; - /* "netCDF4/_netCDF4.pyx":4687 + /* "netCDF4/_netCDF4.pyx":4686 * offsets.sort() * for name, format, offset in zip(names, formats, offsets): * bytestr = _strencode(name) # <<<<<<<<<<<<<< * namstring = bytestr * if format.kind != 'V': # scalar primitive type */ - __pyx_t_7 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4687, __pyx_L1_error) + __pyx_t_7 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4686, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF_SET(__pyx_v_bytestr, __pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":4688 + /* "netCDF4/_netCDF4.pyx":4687 * for name, format, offset in zip(names, formats, offsets): * bytestr = _strencode(name) * namstring = bytestr # <<<<<<<<<<<<<< * if format.kind != 'V': # scalar primitive type * try: */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 4688, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 4687, __pyx_L1_error) __pyx_v_namstring = __pyx_t_2; - /* "netCDF4/_netCDF4.pyx":4689 + /* "netCDF4/_netCDF4.pyx":4688 * bytestr = _strencode(name) * namstring = bytestr * if format.kind != 'V': # scalar primitive type # <<<<<<<<<<<<<< * try: * xtype_tmp = _nptonctype[format.str[1:]] */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_kind); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4689, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_kind); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_V, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4689, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_V, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4688, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_5) { - /* "netCDF4/_netCDF4.pyx":4690 + /* "netCDF4/_netCDF4.pyx":4689 * namstring = bytestr * if format.kind != 'V': # scalar primitive type * try: # <<<<<<<<<<<<<< @@ -54985,29 +54987,29 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, __Pyx_XGOTREF(__pyx_t_17); /*try:*/ { - /* "netCDF4/_netCDF4.pyx":4691 + /* "netCDF4/_netCDF4.pyx":4690 * if format.kind != 'V': # scalar primitive type * try: * xtype_tmp = _nptonctype[format.str[1:]] # <<<<<<<<<<<<<< * except KeyError: * raise ValueError('Unsupported compound type element') */ - __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4691, __pyx_L13_error) + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4690, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_str); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4691, __pyx_L13_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_str); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4690, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_t_12, 1, 0, NULL, NULL, &__pyx_slice__90, 1, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4691, __pyx_L13_error) + __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_t_12, 1, 0, NULL, NULL, &__pyx_slice__90, 1, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4690, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = PyObject_GetItem(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4691, __pyx_L13_error) + __pyx_t_12 = PyObject_GetItem(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4690, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_18 = __Pyx_PyInt_As_nc_type(__pyx_t_12); if (unlikely((__pyx_t_18 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4691, __pyx_L13_error) + __pyx_t_18 = __Pyx_PyInt_As_nc_type(__pyx_t_12); if (unlikely((__pyx_t_18 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4690, __pyx_L13_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_v_xtype_tmp = __pyx_t_18; - /* "netCDF4/_netCDF4.pyx":4690 + /* "netCDF4/_netCDF4.pyx":4689 * namstring = bytestr * if format.kind != 'V': # scalar primitive type * try: # <<<<<<<<<<<<<< @@ -55027,7 +55029,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - /* "netCDF4/_netCDF4.pyx":4692 + /* "netCDF4/_netCDF4.pyx":4691 * try: * xtype_tmp = _nptonctype[format.str[1:]] * except KeyError: # <<<<<<<<<<<<<< @@ -55037,28 +55039,28 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_4) { __Pyx_AddTraceback("netCDF4._netCDF4._def_compound", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_8, &__pyx_t_7) < 0) __PYX_ERR(0, 4692, __pyx_L15_except_error) + if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_8, &__pyx_t_7) < 0) __PYX_ERR(0, 4691, __pyx_L15_except_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_7); - /* "netCDF4/_netCDF4.pyx":4693 + /* "netCDF4/_netCDF4.pyx":4692 * xtype_tmp = _nptonctype[format.str[1:]] * except KeyError: * raise ValueError('Unsupported compound type element') # <<<<<<<<<<<<<< * ierr = nc_insert_compound(grp._grpid, xtype, namstring, * offset, xtype_tmp) */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__91, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4693, __pyx_L15_except_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__91, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4692, __pyx_L15_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 4693, __pyx_L15_except_error) + __PYX_ERR(0, 4692, __pyx_L15_except_error) } goto __pyx_L15_except_error; __pyx_L15_except_error:; - /* "netCDF4/_netCDF4.pyx":4690 + /* "netCDF4/_netCDF4.pyx":4689 * namstring = bytestr * if format.kind != 'V': # scalar primitive type * try: # <<<<<<<<<<<<<< @@ -55074,19 +55076,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, __pyx_L20_try_end:; } - /* "netCDF4/_netCDF4.pyx":4694 + /* "netCDF4/_netCDF4.pyx":4693 * except KeyError: * raise ValueError('Unsupported compound type element') * ierr = nc_insert_compound(grp._grpid, xtype, namstring, # <<<<<<<<<<<<<< * offset, xtype_tmp) * if ierr != NC_NOERR: */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4694, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4694, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4693, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":4695 + /* "netCDF4/_netCDF4.pyx":4694 * raise ValueError('Unsupported compound type element') * ierr = nc_insert_compound(grp._grpid, xtype, namstring, * offset, xtype_tmp) # <<<<<<<<<<<<<< @@ -55095,7 +55097,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, */ __pyx_v_ierr = nc_insert_compound(__pyx_t_4, __pyx_v_xtype, __pyx_v_namstring, __pyx_v_offset, __pyx_v_xtype_tmp); - /* "netCDF4/_netCDF4.pyx":4696 + /* "netCDF4/_netCDF4.pyx":4695 * ierr = nc_insert_compound(grp._grpid, xtype, namstring, * offset, xtype_tmp) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -55105,7 +55107,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, __pyx_t_5 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_5) { - /* "netCDF4/_netCDF4.pyx":4697 + /* "netCDF4/_netCDF4.pyx":4696 * offset, xtype_tmp) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -55113,22 +55115,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, * if format.shape == (): # nested scalar compound type */ __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_7 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4697, __pyx_L1_error) + __pyx_t_7 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4697, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4697, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __PYX_ERR(0, 4697, __pyx_L1_error) + __PYX_ERR(0, 4696, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4696 + /* "netCDF4/_netCDF4.pyx":4695 * ierr = nc_insert_compound(grp._grpid, xtype, namstring, * offset, xtype_tmp) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -55137,7 +55139,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, */ } - /* "netCDF4/_netCDF4.pyx":4689 + /* "netCDF4/_netCDF4.pyx":4688 * bytestr = _strencode(name) * namstring = bytestr * if format.kind != 'V': # scalar primitive type # <<<<<<<<<<<<<< @@ -55147,7 +55149,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, goto __pyx_L12; } - /* "netCDF4/_netCDF4.pyx":4699 + /* "netCDF4/_netCDF4.pyx":4698 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * else: * if format.shape == (): # nested scalar compound type # <<<<<<<<<<<<<< @@ -55155,62 +55157,62 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, * xtype_tmp = _find_cmptype(grp, format) */ /*else*/ { - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_shape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4699, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_shape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4698, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = PyObject_RichCompare(__pyx_t_7, __pyx_empty_tuple, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4699, __pyx_L1_error) + __pyx_t_8 = PyObject_RichCompare(__pyx_t_7, __pyx_empty_tuple, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4698, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4699, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4698, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_5) { - /* "netCDF4/_netCDF4.pyx":4701 + /* "netCDF4/_netCDF4.pyx":4700 * if format.shape == (): # nested scalar compound type * # find this compound type in this group or it's parents. * xtype_tmp = _find_cmptype(grp, format) # <<<<<<<<<<<<<< * bytestr = _strencode(name) * nested_namstring = bytestr */ - __pyx_t_8 = __pyx_f_7netCDF4_8_netCDF4__find_cmptype(__pyx_v_grp, __pyx_v_format); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4701, __pyx_L1_error) + __pyx_t_8 = __pyx_f_7netCDF4_8_netCDF4__find_cmptype(__pyx_v_grp, __pyx_v_format); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_18 = __Pyx_PyInt_As_nc_type(__pyx_t_8); if (unlikely((__pyx_t_18 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4701, __pyx_L1_error) + __pyx_t_18 = __Pyx_PyInt_As_nc_type(__pyx_t_8); if (unlikely((__pyx_t_18 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4700, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_xtype_tmp = __pyx_t_18; - /* "netCDF4/_netCDF4.pyx":4702 + /* "netCDF4/_netCDF4.pyx":4701 * # find this compound type in this group or it's parents. * xtype_tmp = _find_cmptype(grp, format) * bytestr = _strencode(name) # <<<<<<<<<<<<<< * nested_namstring = bytestr * ierr = nc_insert_compound(grp._grpid, xtype,\ */ - __pyx_t_8 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4702, __pyx_L1_error) + __pyx_t_8 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF_SET(__pyx_v_bytestr, __pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":4703 + /* "netCDF4/_netCDF4.pyx":4702 * xtype_tmp = _find_cmptype(grp, format) * bytestr = _strencode(name) * nested_namstring = bytestr # <<<<<<<<<<<<<< * ierr = nc_insert_compound(grp._grpid, xtype,\ * nested_namstring,\ */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 4703, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 4702, __pyx_L1_error) __pyx_v_nested_namstring = __pyx_t_2; - /* "netCDF4/_netCDF4.pyx":4704 + /* "netCDF4/_netCDF4.pyx":4703 * bytestr = _strencode(name) * nested_namstring = bytestr * ierr = nc_insert_compound(grp._grpid, xtype,\ # <<<<<<<<<<<<<< * nested_namstring,\ * offset, xtype_tmp) */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4704, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4703, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4704, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4703, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":4706 + /* "netCDF4/_netCDF4.pyx":4705 * ierr = nc_insert_compound(grp._grpid, xtype,\ * nested_namstring,\ * offset, xtype_tmp) # <<<<<<<<<<<<<< @@ -55219,7 +55221,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, */ __pyx_v_ierr = nc_insert_compound(__pyx_t_4, __pyx_v_xtype, __pyx_v_nested_namstring, __pyx_v_offset, __pyx_v_xtype_tmp); - /* "netCDF4/_netCDF4.pyx":4707 + /* "netCDF4/_netCDF4.pyx":4706 * nested_namstring,\ * offset, xtype_tmp) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -55229,7 +55231,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, __pyx_t_5 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_5) { - /* "netCDF4/_netCDF4.pyx":4708 + /* "netCDF4/_netCDF4.pyx":4707 * offset, xtype_tmp) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -55237,22 +55239,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, * ndims = len(format.shape) */ __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_8 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4708, __pyx_L1_error) + __pyx_t_8 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4707, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4708, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4707, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4708, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4707, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __PYX_ERR(0, 4708, __pyx_L1_error) + __PYX_ERR(0, 4707, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4707 + /* "netCDF4/_netCDF4.pyx":4706 * nested_namstring,\ * offset, xtype_tmp) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -55261,7 +55263,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, */ } - /* "netCDF4/_netCDF4.pyx":4699 + /* "netCDF4/_netCDF4.pyx":4698 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * else: * if format.shape == (): # nested scalar compound type # <<<<<<<<<<<<<< @@ -55271,7 +55273,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, goto __pyx_L24; } - /* "netCDF4/_netCDF4.pyx":4710 + /* "netCDF4/_netCDF4.pyx":4709 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * else: # array compound element * ndims = len(format.shape) # <<<<<<<<<<<<<< @@ -55279,13 +55281,13 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, * for n from 0 <= n < ndims: */ /*else*/ { - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_shape); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4710, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_shape); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4709, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_19 = PyObject_Length(__pyx_t_8); if (unlikely(__pyx_t_19 == -1)) __PYX_ERR(0, 4710, __pyx_L1_error) + __pyx_t_19 = PyObject_Length(__pyx_t_8); if (unlikely(__pyx_t_19 == -1)) __PYX_ERR(0, 4709, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_ndims = __pyx_t_19; - /* "netCDF4/_netCDF4.pyx":4711 + /* "netCDF4/_netCDF4.pyx":4710 * else: # array compound element * ndims = len(format.shape) * dim_sizes = malloc(sizeof(int) * ndims) # <<<<<<<<<<<<<< @@ -55294,7 +55296,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, */ __pyx_v_dim_sizes = ((int *)malloc(((sizeof(int)) * __pyx_v_ndims))); - /* "netCDF4/_netCDF4.pyx":4712 + /* "netCDF4/_netCDF4.pyx":4711 * ndims = len(format.shape) * dim_sizes = malloc(sizeof(int) * ndims) * for n from 0 <= n < ndims: # <<<<<<<<<<<<<< @@ -55304,46 +55306,46 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, __pyx_t_4 = __pyx_v_ndims; for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_4; __pyx_v_n++) { - /* "netCDF4/_netCDF4.pyx":4713 + /* "netCDF4/_netCDF4.pyx":4712 * dim_sizes = malloc(sizeof(int) * ndims) * for n from 0 <= n < ndims: * dim_sizes[n] = format.shape[n] # <<<<<<<<<<<<<< * if format.subdtype[0].str[1] != 'V': # primitive type. * try: */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_shape); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4713, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_shape); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_8, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4713, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_8, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_20 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_20 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4713, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_20 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4712, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; (__pyx_v_dim_sizes[__pyx_v_n]) = __pyx_t_20; } - /* "netCDF4/_netCDF4.pyx":4714 + /* "netCDF4/_netCDF4.pyx":4713 * for n from 0 <= n < ndims: * dim_sizes[n] = format.shape[n] * if format.subdtype[0].str[1] != 'V': # primitive type. # <<<<<<<<<<<<<< * try: * xtype_tmp = _nptonctype[format.subdtype[0].str[1:]] */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_subdtype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4714, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_subdtype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4713, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_7, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4714, __pyx_L1_error) + __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_7, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4713, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_str); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4714, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_str); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4713, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_7, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4714, __pyx_L1_error) + __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_7, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4713, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_8, __pyx_n_s_V, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4714, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_8, __pyx_n_s_V, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4713, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_5) { - /* "netCDF4/_netCDF4.pyx":4715 + /* "netCDF4/_netCDF4.pyx":4714 * dim_sizes[n] = format.shape[n] * if format.subdtype[0].str[1] != 'V': # primitive type. * try: # <<<<<<<<<<<<<< @@ -55359,35 +55361,35 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, __Pyx_XGOTREF(__pyx_t_15); /*try:*/ { - /* "netCDF4/_netCDF4.pyx":4716 + /* "netCDF4/_netCDF4.pyx":4715 * if format.subdtype[0].str[1] != 'V': # primitive type. * try: * xtype_tmp = _nptonctype[format.subdtype[0].str[1:]] # <<<<<<<<<<<<<< * except KeyError: * raise ValueError('Unsupported compound type element') */ - __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4716, __pyx_L29_error) + __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4715, __pyx_L29_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_subdtype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4716, __pyx_L29_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_subdtype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4715, __pyx_L29_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_7, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4716, __pyx_L29_error) + __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_7, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4715, __pyx_L29_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_str); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4716, __pyx_L29_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_str); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4715, __pyx_L29_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = __Pyx_PyObject_GetSlice(__pyx_t_7, 1, 0, NULL, NULL, &__pyx_slice__92, 1, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4716, __pyx_L29_error) + __pyx_t_12 = __Pyx_PyObject_GetSlice(__pyx_t_7, 1, 0, NULL, NULL, &__pyx_slice__92, 1, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4715, __pyx_L29_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyObject_GetItem(__pyx_t_8, __pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4716, __pyx_L29_error) + __pyx_t_7 = PyObject_GetItem(__pyx_t_8, __pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4715, __pyx_L29_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_18 = __Pyx_PyInt_As_nc_type(__pyx_t_7); if (unlikely((__pyx_t_18 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4716, __pyx_L29_error) + __pyx_t_18 = __Pyx_PyInt_As_nc_type(__pyx_t_7); if (unlikely((__pyx_t_18 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4715, __pyx_L29_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_xtype_tmp = __pyx_t_18; - /* "netCDF4/_netCDF4.pyx":4715 + /* "netCDF4/_netCDF4.pyx":4714 * dim_sizes[n] = format.shape[n] * if format.subdtype[0].str[1] != 'V': # primitive type. * try: # <<<<<<<<<<<<<< @@ -55407,7 +55409,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":4717 + /* "netCDF4/_netCDF4.pyx":4716 * try: * xtype_tmp = _nptonctype[format.subdtype[0].str[1:]] * except KeyError: # <<<<<<<<<<<<<< @@ -55417,28 +55419,28 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_4) { __Pyx_AddTraceback("netCDF4._netCDF4._def_compound", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_12, &__pyx_t_8) < 0) __PYX_ERR(0, 4717, __pyx_L31_except_error) + if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_12, &__pyx_t_8) < 0) __PYX_ERR(0, 4716, __pyx_L31_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_12); __Pyx_GOTREF(__pyx_t_8); - /* "netCDF4/_netCDF4.pyx":4718 + /* "netCDF4/_netCDF4.pyx":4717 * xtype_tmp = _nptonctype[format.subdtype[0].str[1:]] * except KeyError: * raise ValueError('Unsupported compound type element') # <<<<<<<<<<<<<< * ierr = nc_insert_array_compound(grp._grpid,xtype,namstring, * offset,xtype_tmp,ndims,dim_sizes) */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__93, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4718, __pyx_L31_except_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__93, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4717, __pyx_L31_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 4718, __pyx_L31_except_error) + __PYX_ERR(0, 4717, __pyx_L31_except_error) } goto __pyx_L31_except_error; __pyx_L31_except_error:; - /* "netCDF4/_netCDF4.pyx":4715 + /* "netCDF4/_netCDF4.pyx":4714 * dim_sizes[n] = format.shape[n] * if format.subdtype[0].str[1] != 'V': # primitive type. * try: # <<<<<<<<<<<<<< @@ -55454,19 +55456,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, __pyx_L36_try_end:; } - /* "netCDF4/_netCDF4.pyx":4719 + /* "netCDF4/_netCDF4.pyx":4718 * except KeyError: * raise ValueError('Unsupported compound type element') * ierr = nc_insert_array_compound(grp._grpid,xtype,namstring, # <<<<<<<<<<<<<< * offset,xtype_tmp,ndims,dim_sizes) * if ierr != NC_NOERR: */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4719, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4719, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4718, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":4720 + /* "netCDF4/_netCDF4.pyx":4719 * raise ValueError('Unsupported compound type element') * ierr = nc_insert_array_compound(grp._grpid,xtype,namstring, * offset,xtype_tmp,ndims,dim_sizes) # <<<<<<<<<<<<<< @@ -55475,7 +55477,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, */ __pyx_v_ierr = nc_insert_array_compound(__pyx_t_4, __pyx_v_xtype, __pyx_v_namstring, __pyx_v_offset, __pyx_v_xtype_tmp, __pyx_v_ndims, __pyx_v_dim_sizes); - /* "netCDF4/_netCDF4.pyx":4721 + /* "netCDF4/_netCDF4.pyx":4720 * ierr = nc_insert_array_compound(grp._grpid,xtype,namstring, * offset,xtype_tmp,ndims,dim_sizes) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -55485,7 +55487,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, __pyx_t_5 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_5) { - /* "netCDF4/_netCDF4.pyx":4722 + /* "netCDF4/_netCDF4.pyx":4721 * offset,xtype_tmp,ndims,dim_sizes) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -55493,22 +55495,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, * # find this compound type in this group or it's parents. */ __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_8 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4722, __pyx_L1_error) + __pyx_t_8 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4722, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_INCREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_12, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4722, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_12, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __PYX_ERR(0, 4722, __pyx_L1_error) + __PYX_ERR(0, 4721, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4721 + /* "netCDF4/_netCDF4.pyx":4720 * ierr = nc_insert_array_compound(grp._grpid,xtype,namstring, * offset,xtype_tmp,ndims,dim_sizes) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -55517,7 +55519,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, */ } - /* "netCDF4/_netCDF4.pyx":4714 + /* "netCDF4/_netCDF4.pyx":4713 * for n from 0 <= n < ndims: * dim_sizes[n] = format.shape[n] * if format.subdtype[0].str[1] != 'V': # primitive type. # <<<<<<<<<<<<<< @@ -55527,7 +55529,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, goto __pyx_L28; } - /* "netCDF4/_netCDF4.pyx":4725 + /* "netCDF4/_netCDF4.pyx":4724 * else: # nested array compound type. * # find this compound type in this group or it's parents. * xtype_tmp = _find_cmptype(grp, format.subdtype[0]) # <<<<<<<<<<<<<< @@ -55535,53 +55537,53 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, * nested_namstring = bytestr */ /*else*/ { - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_subdtype); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4725, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_subdtype); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4724, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4725, __pyx_L1_error) + __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4724, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __pyx_f_7netCDF4_8_netCDF4__find_cmptype(__pyx_v_grp, __pyx_t_12); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4725, __pyx_L1_error) + __pyx_t_8 = __pyx_f_7netCDF4_8_netCDF4__find_cmptype(__pyx_v_grp, __pyx_t_12); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4724, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_18 = __Pyx_PyInt_As_nc_type(__pyx_t_8); if (unlikely((__pyx_t_18 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4725, __pyx_L1_error) + __pyx_t_18 = __Pyx_PyInt_As_nc_type(__pyx_t_8); if (unlikely((__pyx_t_18 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4724, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_xtype_tmp = __pyx_t_18; - /* "netCDF4/_netCDF4.pyx":4726 + /* "netCDF4/_netCDF4.pyx":4725 * # find this compound type in this group or it's parents. * xtype_tmp = _find_cmptype(grp, format.subdtype[0]) * bytestr = _strencode(name) # <<<<<<<<<<<<<< * nested_namstring = bytestr * ierr = nc_insert_array_compound(grp._grpid,xtype,\ */ - __pyx_t_8 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4726, __pyx_L1_error) + __pyx_t_8 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4725, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF_SET(__pyx_v_bytestr, __pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":4727 + /* "netCDF4/_netCDF4.pyx":4726 * xtype_tmp = _find_cmptype(grp, format.subdtype[0]) * bytestr = _strencode(name) * nested_namstring = bytestr # <<<<<<<<<<<<<< * ierr = nc_insert_array_compound(grp._grpid,xtype,\ * nested_namstring,\ */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 4727, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 4726, __pyx_L1_error) __pyx_v_nested_namstring = __pyx_t_2; - /* "netCDF4/_netCDF4.pyx":4728 + /* "netCDF4/_netCDF4.pyx":4727 * bytestr = _strencode(name) * nested_namstring = bytestr * ierr = nc_insert_array_compound(grp._grpid,xtype,\ # <<<<<<<<<<<<<< * nested_namstring,\ * offset,xtype_tmp,\ */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4728, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4727, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4728, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4727, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":4731 + /* "netCDF4/_netCDF4.pyx":4730 * nested_namstring,\ * offset,xtype_tmp,\ * ndims,dim_sizes) # <<<<<<<<<<<<<< @@ -55590,7 +55592,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, */ __pyx_v_ierr = nc_insert_array_compound(__pyx_t_4, __pyx_v_xtype, __pyx_v_nested_namstring, __pyx_v_offset, __pyx_v_xtype_tmp, __pyx_v_ndims, __pyx_v_dim_sizes); - /* "netCDF4/_netCDF4.pyx":4732 + /* "netCDF4/_netCDF4.pyx":4731 * offset,xtype_tmp,\ * ndims,dim_sizes) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -55600,7 +55602,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, __pyx_t_5 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_5) { - /* "netCDF4/_netCDF4.pyx":4733 + /* "netCDF4/_netCDF4.pyx":4732 * ndims,dim_sizes) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -55608,22 +55610,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, * return xtype */ __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_8 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4733, __pyx_L1_error) + __pyx_t_8 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4732, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4733, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4732, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_INCREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_12, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4733, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_12, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4732, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __PYX_ERR(0, 4733, __pyx_L1_error) + __PYX_ERR(0, 4732, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4732 + /* "netCDF4/_netCDF4.pyx":4731 * offset,xtype_tmp,\ * ndims,dim_sizes) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -55634,7 +55636,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, } __pyx_L28:; - /* "netCDF4/_netCDF4.pyx":4734 + /* "netCDF4/_netCDF4.pyx":4733 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * free(dim_sizes) # <<<<<<<<<<<<<< @@ -55647,7 +55649,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, } __pyx_L12:; - /* "netCDF4/_netCDF4.pyx":4686 + /* "netCDF4/_netCDF4.pyx":4685 * formats = _sortbylist(formats, offsets) * offsets.sort() * for name, format, offset in zip(names, formats, offsets): # <<<<<<<<<<<<<< @@ -55657,7 +55659,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":4735 + /* "netCDF4/_netCDF4.pyx":4734 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * free(dim_sizes) * return xtype # <<<<<<<<<<<<<< @@ -55665,13 +55667,13 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, * cdef _find_cmptype(grp, dtype): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = __Pyx_PyInt_From_nc_type(__pyx_v_xtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4735, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_nc_type(__pyx_v_xtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4734, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":4663 + /* "netCDF4/_netCDF4.pyx":4662 * raise NotImplementedError('CompoundType is not picklable') * * cdef _def_compound(grp, object dt, object dtype_name): # <<<<<<<<<<<<<< @@ -55702,7 +55704,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4737 +/* "netCDF4/_netCDF4.pyx":4736 * return xtype * * cdef _find_cmptype(grp, dtype): # <<<<<<<<<<<<<< @@ -55742,7 +55744,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, int __pyx_t_17; __Pyx_RefNannySetupContext("_find_cmptype", 0); - /* "netCDF4/_netCDF4.pyx":4741 + /* "netCDF4/_netCDF4.pyx":4740 * # return datatype id when found, if not found, raise exception. * cdef nc_type xtype * match = False # <<<<<<<<<<<<<< @@ -55751,16 +55753,16 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, */ __pyx_v_match = 0; - /* "netCDF4/_netCDF4.pyx":4742 + /* "netCDF4/_netCDF4.pyx":4741 * cdef nc_type xtype * match = False * for cmpname, cmpdt in grp.cmptypes.items(): # <<<<<<<<<<<<<< * xtype = cmpdt._nc_type * names1 = dtype.names; names2 = cmpdt.dtype.names */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_cmptypes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4742, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_cmptypes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4741, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4742, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4741, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -55774,10 +55776,10 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, } } if (__pyx_t_2) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4742, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4741, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4742, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4741, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -55785,9 +55787,9 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4742, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4741, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4742, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4741, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -55795,17 +55797,17 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 4742, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 4741, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4742, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4741, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 4742, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 4741, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4742, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4741, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -55815,7 +55817,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 4742, __pyx_L1_error) + else __PYX_ERR(0, 4741, __pyx_L1_error) } break; } @@ -55831,7 +55833,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 4742, __pyx_L1_error) + __PYX_ERR(0, 4741, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -55844,15 +55846,15 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4742, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4741, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4742, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4741, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4742, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4741, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; @@ -55860,7 +55862,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 4742, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 4741, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_unpacking_done; @@ -55868,7 +55870,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 4742, __pyx_L1_error) + __PYX_ERR(0, 4741, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_cmpname, __pyx_t_2); @@ -55876,50 +55878,50 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, __Pyx_XDECREF_SET(__pyx_v_cmpdt, __pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":4743 + /* "netCDF4/_netCDF4.pyx":4742 * match = False * for cmpname, cmpdt in grp.cmptypes.items(): * xtype = cmpdt._nc_type # <<<<<<<<<<<<<< * names1 = dtype.names; names2 = cmpdt.dtype.names * formats1 = [v[0] for v in dtype.fields.values()] */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmpdt, __pyx_n_s_nc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4743, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmpdt, __pyx_n_s_nc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4742, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = __Pyx_PyInt_As_nc_type(__pyx_t_1); if (unlikely((__pyx_t_9 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4743, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_As_nc_type(__pyx_t_1); if (unlikely((__pyx_t_9 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4742, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_xtype = __pyx_t_9; - /* "netCDF4/_netCDF4.pyx":4744 + /* "netCDF4/_netCDF4.pyx":4743 * for cmpname, cmpdt in grp.cmptypes.items(): * xtype = cmpdt._nc_type * names1 = dtype.names; names2 = cmpdt.dtype.names # <<<<<<<<<<<<<< * formats1 = [v[0] for v in dtype.fields.values()] * formats2 = [v[0] for v in cmpdt.dtype.fields.values()] */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_names); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4744, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_names); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4743, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_names1, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmpdt, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4744, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmpdt, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4743, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_names); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4744, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_names); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4743, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_names2, __pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":4745 + /* "netCDF4/_netCDF4.pyx":4744 * xtype = cmpdt._nc_type * names1 = dtype.names; names2 = cmpdt.dtype.names * formats1 = [v[0] for v in dtype.fields.values()] # <<<<<<<<<<<<<< * formats2 = [v[0] for v in cmpdt.dtype.fields.values()] * # match names, formats, but not offsets (they may be changed */ - __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4745, __pyx_L1_error) + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4744, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_fields); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4745, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_fields); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4744, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4745, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4744, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -55933,10 +55935,10 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, } } if (__pyx_t_2) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4745, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4744, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4745, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4744, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -55944,9 +55946,9 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, __pyx_t_7 = __pyx_t_1; __Pyx_INCREF(__pyx_t_7); __pyx_t_10 = 0; __pyx_t_11 = NULL; } else { - __pyx_t_10 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4745, __pyx_L1_error) + __pyx_t_10 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4744, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_11 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4745, __pyx_L1_error) + __pyx_t_11 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4744, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -55954,17 +55956,17 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, if (likely(PyList_CheckExact(__pyx_t_7))) { if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 4745, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 4744, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_7, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4745, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_7, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4744, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 4745, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 4744, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_7, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4745, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_7, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4744, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -55974,7 +55976,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 4745, __pyx_L1_error) + else __PYX_ERR(0, 4744, __pyx_L1_error) } break; } @@ -55982,30 +55984,30 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, } __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_v, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4745, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_v, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4744, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 4745, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 4744, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF_SET(__pyx_v_formats1, ((PyObject*)__pyx_t_6)); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":4746 + /* "netCDF4/_netCDF4.pyx":4745 * names1 = dtype.names; names2 = cmpdt.dtype.names * formats1 = [v[0] for v in dtype.fields.values()] * formats2 = [v[0] for v in cmpdt.dtype.fields.values()] # <<<<<<<<<<<<<< * # match names, formats, but not offsets (they may be changed * # by netcdf lib). */ - __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4746, __pyx_L1_error) + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4745, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmpdt, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4746, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmpdt, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4745, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_fields); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4746, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_fields); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4745, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4746, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4745, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -56019,10 +56021,10 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, } } if (__pyx_t_2) { - __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4746, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4745, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { - __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4746, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4745, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -56030,9 +56032,9 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, __pyx_t_1 = __pyx_t_7; __Pyx_INCREF(__pyx_t_1); __pyx_t_10 = 0; __pyx_t_11 = NULL; } else { - __pyx_t_10 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4746, __pyx_L1_error) + __pyx_t_10 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4745, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_11 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4746, __pyx_L1_error) + __pyx_t_11 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4745, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; for (;;) { @@ -56040,17 +56042,17 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_7 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_7); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 4746, __pyx_L1_error) + __pyx_t_7 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_7); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 4745, __pyx_L1_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4746, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4745, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } else { if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_7); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 4746, __pyx_L1_error) + __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_7); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 4745, __pyx_L1_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4746, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4745, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } @@ -56060,7 +56062,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 4746, __pyx_L1_error) + else __PYX_ERR(0, 4745, __pyx_L1_error) } break; } @@ -56068,38 +56070,38 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, } __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_v, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4746, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_v, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4745, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 4746, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 4745, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_formats2, ((PyObject*)__pyx_t_6)); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":4749 + /* "netCDF4/_netCDF4.pyx":4748 * # match names, formats, but not offsets (they may be changed * # by netcdf lib). * if names1==names2 and formats1==formats2: # <<<<<<<<<<<<<< * match = True * break */ - __pyx_t_6 = PyObject_RichCompare(__pyx_v_names1, __pyx_v_names2, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4749, __pyx_L1_error) - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 4749, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_v_names1, __pyx_v_names2, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4748, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 4748, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_13) { } else { __pyx_t_12 = __pyx_t_13; goto __pyx_L12_bool_binop_done; } - __pyx_t_6 = PyObject_RichCompare(__pyx_v_formats1, __pyx_v_formats2, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4749, __pyx_L1_error) - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 4749, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_v_formats1, __pyx_v_formats2, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4748, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 4748, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_12 = __pyx_t_13; __pyx_L12_bool_binop_done:; if (__pyx_t_12) { - /* "netCDF4/_netCDF4.pyx":4750 + /* "netCDF4/_netCDF4.pyx":4749 * # by netcdf lib). * if names1==names2 and formats1==formats2: * match = True # <<<<<<<<<<<<<< @@ -56108,7 +56110,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, */ __pyx_v_match = 1; - /* "netCDF4/_netCDF4.pyx":4751 + /* "netCDF4/_netCDF4.pyx":4750 * if names1==names2 and formats1==formats2: * match = True * break # <<<<<<<<<<<<<< @@ -56117,7 +56119,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, */ goto __pyx_L4_break; - /* "netCDF4/_netCDF4.pyx":4749 + /* "netCDF4/_netCDF4.pyx":4748 * # match names, formats, but not offsets (they may be changed * # by netcdf lib). * if names1==names2 and formats1==formats2: # <<<<<<<<<<<<<< @@ -56126,7 +56128,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, */ } - /* "netCDF4/_netCDF4.pyx":4742 + /* "netCDF4/_netCDF4.pyx":4741 * cdef nc_type xtype * match = False * for cmpname, cmpdt in grp.cmptypes.items(): # <<<<<<<<<<<<<< @@ -56137,7 +56139,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, __pyx_L4_break:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":4752 + /* "netCDF4/_netCDF4.pyx":4751 * match = True * break * if not match: # <<<<<<<<<<<<<< @@ -56147,7 +56149,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, __pyx_t_12 = ((!(__pyx_v_match != 0)) != 0); if (__pyx_t_12) { - /* "netCDF4/_netCDF4.pyx":4753 + /* "netCDF4/_netCDF4.pyx":4752 * break * if not match: * try: # <<<<<<<<<<<<<< @@ -56163,19 +56165,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, __Pyx_XGOTREF(__pyx_t_16); /*try:*/ { - /* "netCDF4/_netCDF4.pyx":4754 + /* "netCDF4/_netCDF4.pyx":4753 * if not match: * try: * parent_grp = grp.parent # <<<<<<<<<<<<<< * except AttributeError: * raise ValueError("cannot find compound type in this group or parent groups") */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_parent); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4754, __pyx_L15_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_parent); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4753, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_parent_grp = __pyx_t_3; __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":4753 + /* "netCDF4/_netCDF4.pyx":4752 * break * if not match: * try: # <<<<<<<<<<<<<< @@ -56195,7 +56197,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":4755 + /* "netCDF4/_netCDF4.pyx":4754 * try: * parent_grp = grp.parent * except AttributeError: # <<<<<<<<<<<<<< @@ -56205,28 +56207,28 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, __pyx_t_17 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_17) { __Pyx_AddTraceback("netCDF4._netCDF4._find_cmptype", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_6, &__pyx_t_1) < 0) __PYX_ERR(0, 4755, __pyx_L17_except_error) + if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_6, &__pyx_t_1) < 0) __PYX_ERR(0, 4754, __pyx_L17_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_1); - /* "netCDF4/_netCDF4.pyx":4756 + /* "netCDF4/_netCDF4.pyx":4755 * parent_grp = grp.parent * except AttributeError: * raise ValueError("cannot find compound type in this group or parent groups") # <<<<<<<<<<<<<< * if parent_grp is None: * raise ValueError("cannot find compound type in this group or parent groups") */ - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__94, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4756, __pyx_L17_except_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__94, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4755, __pyx_L17_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __PYX_ERR(0, 4756, __pyx_L17_except_error) + __PYX_ERR(0, 4755, __pyx_L17_except_error) } goto __pyx_L17_except_error; __pyx_L17_except_error:; - /* "netCDF4/_netCDF4.pyx":4753 + /* "netCDF4/_netCDF4.pyx":4752 * break * if not match: * try: # <<<<<<<<<<<<<< @@ -56242,7 +56244,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, __pyx_L22_try_end:; } - /* "netCDF4/_netCDF4.pyx":4757 + /* "netCDF4/_netCDF4.pyx":4756 * except AttributeError: * raise ValueError("cannot find compound type in this group or parent groups") * if parent_grp is None: # <<<<<<<<<<<<<< @@ -56253,20 +56255,20 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, __pyx_t_13 = (__pyx_t_12 != 0); if (__pyx_t_13) { - /* "netCDF4/_netCDF4.pyx":4758 + /* "netCDF4/_netCDF4.pyx":4757 * raise ValueError("cannot find compound type in this group or parent groups") * if parent_grp is None: * raise ValueError("cannot find compound type in this group or parent groups") # <<<<<<<<<<<<<< * else: * xtype = _find_cmptype(parent_grp,dtype) */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__95, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4758, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__95, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4757, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 4758, __pyx_L1_error) + __PYX_ERR(0, 4757, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4757 + /* "netCDF4/_netCDF4.pyx":4756 * except AttributeError: * raise ValueError("cannot find compound type in this group or parent groups") * if parent_grp is None: # <<<<<<<<<<<<<< @@ -56275,7 +56277,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, */ } - /* "netCDF4/_netCDF4.pyx":4760 + /* "netCDF4/_netCDF4.pyx":4759 * raise ValueError("cannot find compound type in this group or parent groups") * else: * xtype = _find_cmptype(parent_grp,dtype) # <<<<<<<<<<<<<< @@ -56283,14 +56285,14 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, * */ /*else*/ { - __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__find_cmptype(__pyx_v_parent_grp, __pyx_v_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4760, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__find_cmptype(__pyx_v_parent_grp, __pyx_v_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4759, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = __Pyx_PyInt_As_nc_type(__pyx_t_1); if (unlikely((__pyx_t_9 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4760, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_As_nc_type(__pyx_t_1); if (unlikely((__pyx_t_9 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4759, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_xtype = __pyx_t_9; } - /* "netCDF4/_netCDF4.pyx":4752 + /* "netCDF4/_netCDF4.pyx":4751 * match = True * break * if not match: # <<<<<<<<<<<<<< @@ -56299,7 +56301,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, */ } - /* "netCDF4/_netCDF4.pyx":4761 + /* "netCDF4/_netCDF4.pyx":4760 * else: * xtype = _find_cmptype(parent_grp,dtype) * return xtype # <<<<<<<<<<<<<< @@ -56307,13 +56309,13 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, * cdef _read_compound(group, nc_type xtype, endian=None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_nc_type(__pyx_v_xtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4761, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_nc_type(__pyx_v_xtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4760, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":4737 + /* "netCDF4/_netCDF4.pyx":4736 * return xtype * * cdef _find_cmptype(grp, dtype): # <<<<<<<<<<<<<< @@ -56344,7 +56346,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4763 +/* "netCDF4/_netCDF4.pyx":4762 * return xtype * * cdef _read_compound(group, nc_type xtype, endian=None): # <<<<<<<<<<<<<< @@ -56400,20 +56402,20 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro } } - /* "netCDF4/_netCDF4.pyx":4776 + /* "netCDF4/_netCDF4.pyx":4775 * cdef char cmp_namstring[NC_MAX_NAME+1] * # get name and number of fields. * _grpid = group._grpid # <<<<<<<<<<<<<< * with nogil: * ierr = nc_inq_compound(_grpid, xtype, cmp_namstring, NULL, &nfields) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4776, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4776, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4775, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v__grpid = __pyx_t_2; - /* "netCDF4/_netCDF4.pyx":4777 + /* "netCDF4/_netCDF4.pyx":4776 * # get name and number of fields. * _grpid = group._grpid * with nogil: # <<<<<<<<<<<<<< @@ -56427,7 +56429,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":4778 + /* "netCDF4/_netCDF4.pyx":4777 * _grpid = group._grpid * with nogil: * ierr = nc_inq_compound(_grpid, xtype, cmp_namstring, NULL, &nfields) # <<<<<<<<<<<<<< @@ -56437,7 +56439,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro __pyx_v_ierr = nc_inq_compound(__pyx_v__grpid, __pyx_v_xtype, __pyx_v_cmp_namstring, NULL, (&__pyx_v_nfields)); } - /* "netCDF4/_netCDF4.pyx":4777 + /* "netCDF4/_netCDF4.pyx":4776 * # get name and number of fields. * _grpid = group._grpid * with nogil: # <<<<<<<<<<<<<< @@ -56455,7 +56457,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro } } - /* "netCDF4/_netCDF4.pyx":4779 + /* "netCDF4/_netCDF4.pyx":4778 * with nogil: * ierr = nc_inq_compound(_grpid, xtype, cmp_namstring, NULL, &nfields) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -56465,7 +56467,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":4780 + /* "netCDF4/_netCDF4.pyx":4779 * ierr = nc_inq_compound(_grpid, xtype, cmp_namstring, NULL, &nfields) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -56473,22 +56475,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro * # loop over fields. */ __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4780, __pyx_L1_error) + __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4780, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4780, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 4780, __pyx_L1_error) + __PYX_ERR(0, 4779, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4779 + /* "netCDF4/_netCDF4.pyx":4778 * with nogil: * ierr = nc_inq_compound(_grpid, xtype, cmp_namstring, NULL, &nfields) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -56497,21 +56499,21 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro */ } - /* "netCDF4/_netCDF4.pyx":4781 + /* "netCDF4/_netCDF4.pyx":4780 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * name = cmp_namstring.decode(default_encoding,unicode_error) # <<<<<<<<<<<<<< * # loop over fields. * names = [] */ - __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_cmp_namstring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4781, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_cmp_namstring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4780, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4781, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4780, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4781, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4780, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4781, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4780, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; __pyx_t_2 = 0; @@ -56528,7 +56530,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_5, __pyx_t_7}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4781, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4780, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -56538,7 +56540,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_5, __pyx_t_7}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4781, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4780, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -56546,7 +56548,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro } else #endif { - __pyx_t_9 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4781, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4780, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; @@ -56557,7 +56559,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_2, __pyx_t_7); __pyx_t_5 = 0; __pyx_t_7 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4781, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4780, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -56565,43 +56567,43 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro __pyx_v_name = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":4783 + /* "netCDF4/_netCDF4.pyx":4782 * name = cmp_namstring.decode(default_encoding,unicode_error) * # loop over fields. * names = [] # <<<<<<<<<<<<<< * formats = [] * offsets = [] */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4783, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4782, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_names = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":4784 + /* "netCDF4/_netCDF4.pyx":4783 * # loop over fields. * names = [] * formats = [] # <<<<<<<<<<<<<< * offsets = [] * for nf from 0 <= nf < nfields: */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4784, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4783, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_formats = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":4785 + /* "netCDF4/_netCDF4.pyx":4784 * names = [] * formats = [] * offsets = [] # <<<<<<<<<<<<<< * for nf from 0 <= nf < nfields: * with nogil: */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4785, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4784, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_offsets = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":4786 + /* "netCDF4/_netCDF4.pyx":4785 * formats = [] * offsets = [] * for nf from 0 <= nf < nfields: # <<<<<<<<<<<<<< @@ -56611,7 +56613,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro __pyx_t_10 = __pyx_v_nfields; for (__pyx_v_nf = 0; __pyx_v_nf < __pyx_t_10; __pyx_v_nf++) { - /* "netCDF4/_netCDF4.pyx":4787 + /* "netCDF4/_netCDF4.pyx":4786 * offsets = [] * for nf from 0 <= nf < nfields: * with nogil: # <<<<<<<<<<<<<< @@ -56625,7 +56627,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":4788 + /* "netCDF4/_netCDF4.pyx":4787 * for nf from 0 <= nf < nfields: * with nogil: * ierr = nc_inq_compound_field(_grpid, # <<<<<<<<<<<<<< @@ -56635,7 +56637,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro __pyx_v_ierr = nc_inq_compound_field(__pyx_v__grpid, __pyx_v_xtype, __pyx_v_nf, __pyx_v_field_namstring, (&__pyx_v_offset), (&__pyx_v_field_typeid), (&__pyx_v_numdims), NULL); } - /* "netCDF4/_netCDF4.pyx":4787 + /* "netCDF4/_netCDF4.pyx":4786 * offsets = [] * for nf from 0 <= nf < nfields: * with nogil: # <<<<<<<<<<<<<< @@ -56653,7 +56655,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro } } - /* "netCDF4/_netCDF4.pyx":4796 + /* "netCDF4/_netCDF4.pyx":4795 * &numdims, * NULL) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -56663,7 +56665,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":4797 + /* "netCDF4/_netCDF4.pyx":4796 * NULL) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -56671,22 +56673,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro * with nogil: */ __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4797, __pyx_L1_error) + __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4796, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4797, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4796, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4797, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4796, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 4797, __pyx_L1_error) + __PYX_ERR(0, 4796, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4796 + /* "netCDF4/_netCDF4.pyx":4795 * &numdims, * NULL) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -56695,7 +56697,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro */ } - /* "netCDF4/_netCDF4.pyx":4798 + /* "netCDF4/_netCDF4.pyx":4797 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * dim_sizes = malloc(sizeof(int) * numdims) # <<<<<<<<<<<<<< @@ -56704,7 +56706,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro */ __pyx_v_dim_sizes = ((int *)malloc(((sizeof(int)) * __pyx_v_numdims))); - /* "netCDF4/_netCDF4.pyx":4799 + /* "netCDF4/_netCDF4.pyx":4798 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * dim_sizes = malloc(sizeof(int) * numdims) * with nogil: # <<<<<<<<<<<<<< @@ -56718,7 +56720,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":4800 + /* "netCDF4/_netCDF4.pyx":4799 * dim_sizes = malloc(sizeof(int) * numdims) * with nogil: * ierr = nc_inq_compound_field(_grpid, # <<<<<<<<<<<<<< @@ -56728,7 +56730,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro __pyx_v_ierr = nc_inq_compound_field(__pyx_v__grpid, __pyx_v_xtype, __pyx_v_nf, __pyx_v_field_namstring, (&__pyx_v_offset), (&__pyx_v_field_typeid), (&__pyx_v_numdims), __pyx_v_dim_sizes); } - /* "netCDF4/_netCDF4.pyx":4799 + /* "netCDF4/_netCDF4.pyx":4798 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * dim_sizes = malloc(sizeof(int) * numdims) * with nogil: # <<<<<<<<<<<<<< @@ -56746,7 +56748,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro } } - /* "netCDF4/_netCDF4.pyx":4808 + /* "netCDF4/_netCDF4.pyx":4807 * &numdims, * dim_sizes) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -56756,7 +56758,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":4809 + /* "netCDF4/_netCDF4.pyx":4808 * dim_sizes) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -56764,22 +56766,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro * names.append(field_name) */ __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4809, __pyx_L1_error) + __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4808, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4809, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4808, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4809, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4808, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 4809, __pyx_L1_error) + __PYX_ERR(0, 4808, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4808 + /* "netCDF4/_netCDF4.pyx":4807 * &numdims, * dim_sizes) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -56788,21 +56790,21 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro */ } - /* "netCDF4/_netCDF4.pyx":4810 + /* "netCDF4/_netCDF4.pyx":4809 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * field_name = field_namstring.decode(default_encoding,unicode_error) # <<<<<<<<<<<<<< * names.append(field_name) * offsets.append(offset) */ - __pyx_t_6 = __Pyx_PyObject_FromString(__pyx_v_field_namstring); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4810, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_FromString(__pyx_v_field_namstring); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4809, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_decode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4810, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_decode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4809, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4810, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4809, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4810, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4809, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = NULL; __pyx_t_2 = 0; @@ -56819,7 +56821,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_9)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_6, __pyx_t_7}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4810, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4809, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -56829,7 +56831,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_6, __pyx_t_7}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4810, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4809, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -56837,7 +56839,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro } else #endif { - __pyx_t_8 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4810, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4809, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -56848,7 +56850,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_2, __pyx_t_7); __pyx_t_6 = 0; __pyx_t_7 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4810, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4809, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -56856,28 +56858,28 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro __Pyx_XDECREF_SET(__pyx_v_field_name, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":4811 + /* "netCDF4/_netCDF4.pyx":4810 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * field_name = field_namstring.decode(default_encoding,unicode_error) * names.append(field_name) # <<<<<<<<<<<<<< * offsets.append(offset) * # if numdims=0, not an array. */ - __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_names, __pyx_v_field_name); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4811, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_names, __pyx_v_field_name); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4810, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4812 + /* "netCDF4/_netCDF4.pyx":4811 * field_name = field_namstring.decode(default_encoding,unicode_error) * names.append(field_name) * offsets.append(offset) # <<<<<<<<<<<<<< * # if numdims=0, not an array. * field_shape = () */ - __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4812, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4811, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_offsets, __pyx_t_1); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4812, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_offsets, __pyx_t_1); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4811, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":4814 + /* "netCDF4/_netCDF4.pyx":4813 * offsets.append(offset) * # if numdims=0, not an array. * field_shape = () # <<<<<<<<<<<<<< @@ -56887,7 +56889,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro __Pyx_INCREF(__pyx_empty_tuple); __Pyx_XDECREF_SET(__pyx_v_field_shape, __pyx_empty_tuple); - /* "netCDF4/_netCDF4.pyx":4815 + /* "netCDF4/_netCDF4.pyx":4814 * # if numdims=0, not an array. * field_shape = () * if numdims != 0: # <<<<<<<<<<<<<< @@ -56897,7 +56899,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro __pyx_t_3 = ((__pyx_v_numdims != 0) != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":4816 + /* "netCDF4/_netCDF4.pyx":4815 * field_shape = () * if numdims != 0: * for ndim from 0 <= ndim < numdims: # <<<<<<<<<<<<<< @@ -56907,28 +56909,28 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro __pyx_t_2 = __pyx_v_numdims; for (__pyx_v_ndim = 0; __pyx_v_ndim < __pyx_t_2; __pyx_v_ndim++) { - /* "netCDF4/_netCDF4.pyx":4817 + /* "netCDF4/_netCDF4.pyx":4816 * if numdims != 0: * for ndim from 0 <= ndim < numdims: * field_shape = field_shape + (dim_sizes[ndim],) # <<<<<<<<<<<<<< * free(dim_sizes) * # check to see if this field is a nested compound type. */ - __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_dim_sizes[__pyx_v_ndim])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4817, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_dim_sizes[__pyx_v_ndim])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4816, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4817, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4816, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Add(__pyx_v_field_shape, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4817, __pyx_L1_error) + __pyx_t_1 = PyNumber_Add(__pyx_v_field_shape, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4816, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF_SET(__pyx_v_field_shape, __pyx_t_1); __pyx_t_1 = 0; } - /* "netCDF4/_netCDF4.pyx":4815 + /* "netCDF4/_netCDF4.pyx":4814 * # if numdims=0, not an array. * field_shape = () * if numdims != 0: # <<<<<<<<<<<<<< @@ -56937,7 +56939,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro */ } - /* "netCDF4/_netCDF4.pyx":4818 + /* "netCDF4/_netCDF4.pyx":4817 * for ndim from 0 <= ndim < numdims: * field_shape = field_shape + (dim_sizes[ndim],) * free(dim_sizes) # <<<<<<<<<<<<<< @@ -56946,7 +56948,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro */ free(__pyx_v_dim_sizes); - /* "netCDF4/_netCDF4.pyx":4820 + /* "netCDF4/_netCDF4.pyx":4819 * free(dim_sizes) * # check to see if this field is a nested compound type. * try: # <<<<<<<<<<<<<< @@ -56962,22 +56964,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro __Pyx_XGOTREF(__pyx_t_14); /*try:*/ { - /* "netCDF4/_netCDF4.pyx":4821 + /* "netCDF4/_netCDF4.pyx":4820 * # check to see if this field is a nested compound type. * try: * field_type = _nctonptype[field_typeid] # <<<<<<<<<<<<<< * if endian is not None: * format = endian + format */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4821, __pyx_L24_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4820, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_field_typeid, nc_type, 1, __Pyx_PyInt_From_nc_type, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4821, __pyx_L24_error) + __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_field_typeid, nc_type, 1, __Pyx_PyInt_From_nc_type, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4820, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_field_type, __pyx_t_9); __pyx_t_9 = 0; - /* "netCDF4/_netCDF4.pyx":4822 + /* "netCDF4/_netCDF4.pyx":4821 * try: * field_type = _nctonptype[field_typeid] * if endian is not None: # <<<<<<<<<<<<<< @@ -56988,20 +56990,20 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro __pyx_t_15 = (__pyx_t_3 != 0); if (__pyx_t_15) { - /* "netCDF4/_netCDF4.pyx":4823 + /* "netCDF4/_netCDF4.pyx":4822 * field_type = _nctonptype[field_typeid] * if endian is not None: * format = endian + format # <<<<<<<<<<<<<< * except KeyError: * with nogil: */ - if (unlikely(!__pyx_v_format)) { __Pyx_RaiseUnboundLocalError("format"); __PYX_ERR(0, 4823, __pyx_L24_error) } - __pyx_t_9 = PyNumber_Add(__pyx_v_endian, __pyx_v_format); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4823, __pyx_L24_error) + if (unlikely(!__pyx_v_format)) { __Pyx_RaiseUnboundLocalError("format"); __PYX_ERR(0, 4822, __pyx_L24_error) } + __pyx_t_9 = PyNumber_Add(__pyx_v_endian, __pyx_v_format); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4822, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_XDECREF_SET(__pyx_v_format, __pyx_t_9); __pyx_t_9 = 0; - /* "netCDF4/_netCDF4.pyx":4822 + /* "netCDF4/_netCDF4.pyx":4821 * try: * field_type = _nctonptype[field_typeid] * if endian is not None: # <<<<<<<<<<<<<< @@ -57010,7 +57012,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro */ } - /* "netCDF4/_netCDF4.pyx":4820 + /* "netCDF4/_netCDF4.pyx":4819 * free(dim_sizes) * # check to see if this field is a nested compound type. * try: # <<<<<<<<<<<<<< @@ -57031,7 +57033,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "netCDF4/_netCDF4.pyx":4824 + /* "netCDF4/_netCDF4.pyx":4823 * if endian is not None: * format = endian + format * except KeyError: # <<<<<<<<<<<<<< @@ -57041,12 +57043,12 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro __pyx_t_2 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_2) { __Pyx_AddTraceback("netCDF4._netCDF4._read_compound", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_1, &__pyx_t_8) < 0) __PYX_ERR(0, 4824, __pyx_L26_except_error) + if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_1, &__pyx_t_8) < 0) __PYX_ERR(0, 4823, __pyx_L26_except_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_8); - /* "netCDF4/_netCDF4.pyx":4825 + /* "netCDF4/_netCDF4.pyx":4824 * format = endian + format * except KeyError: * with nogil: # <<<<<<<<<<<<<< @@ -57060,7 +57062,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":4826 + /* "netCDF4/_netCDF4.pyx":4825 * except KeyError: * with nogil: * ierr = nc_inq_user_type(_grpid, # <<<<<<<<<<<<<< @@ -57070,7 +57072,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro __pyx_v_ierr = nc_inq_user_type(__pyx_v__grpid, __pyx_v_field_typeid, NULL, NULL, NULL, NULL, (&__pyx_v_classp)); } - /* "netCDF4/_netCDF4.pyx":4825 + /* "netCDF4/_netCDF4.pyx":4824 * format = endian + format * except KeyError: * with nogil: # <<<<<<<<<<<<<< @@ -57088,7 +57090,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro } } - /* "netCDF4/_netCDF4.pyx":4828 + /* "netCDF4/_netCDF4.pyx":4827 * ierr = nc_inq_user_type(_grpid, * field_typeid,NULL,NULL,NULL,NULL,&classp) * if classp == NC_COMPOUND: # a compound type # <<<<<<<<<<<<<< @@ -57098,7 +57100,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro __pyx_t_15 = ((__pyx_v_classp == NC_COMPOUND) != 0); if (__pyx_t_15) { - /* "netCDF4/_netCDF4.pyx":4830 + /* "netCDF4/_netCDF4.pyx":4829 * if classp == NC_COMPOUND: # a compound type * # recursively call this function? * field_type = _read_compound(group, field_typeid, endian=endian) # <<<<<<<<<<<<<< @@ -57107,12 +57109,12 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro */ __pyx_t_16.__pyx_n = 1; __pyx_t_16.endian = __pyx_v_endian; - __pyx_t_7 = __pyx_f_7netCDF4_8_netCDF4__read_compound(__pyx_v_group, __pyx_v_field_typeid, &__pyx_t_16); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4830, __pyx_L26_except_error) + __pyx_t_7 = __pyx_f_7netCDF4_8_netCDF4__read_compound(__pyx_v_group, __pyx_v_field_typeid, &__pyx_t_16); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4829, __pyx_L26_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_XDECREF_SET(__pyx_v_field_type, __pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":4828 + /* "netCDF4/_netCDF4.pyx":4827 * ierr = nc_inq_user_type(_grpid, * field_typeid,NULL,NULL,NULL,NULL,&classp) * if classp == NC_COMPOUND: # a compound type # <<<<<<<<<<<<<< @@ -57122,7 +57124,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro goto __pyx_L40; } - /* "netCDF4/_netCDF4.pyx":4832 + /* "netCDF4/_netCDF4.pyx":4831 * field_type = _read_compound(group, field_typeid, endian=endian) * else: * raise KeyError('compound field of an unsupported data type') # <<<<<<<<<<<<<< @@ -57130,11 +57132,11 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro * formats.append((field_type,field_shape)) */ /*else*/ { - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_tuple__96, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4832, __pyx_L26_except_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_tuple__96, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4831, __pyx_L26_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __PYX_ERR(0, 4832, __pyx_L26_except_error) + __PYX_ERR(0, 4831, __pyx_L26_except_error) } __pyx_L40:; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; @@ -57145,7 +57147,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro goto __pyx_L26_except_error; __pyx_L26_except_error:; - /* "netCDF4/_netCDF4.pyx":4820 + /* "netCDF4/_netCDF4.pyx":4819 * free(dim_sizes) * # check to see if this field is a nested compound type. * try: # <<<<<<<<<<<<<< @@ -57167,26 +57169,26 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro __pyx_L31_try_end:; } - /* "netCDF4/_netCDF4.pyx":4833 + /* "netCDF4/_netCDF4.pyx":4832 * else: * raise KeyError('compound field of an unsupported data type') * if field_shape != (): # <<<<<<<<<<<<<< * formats.append((field_type,field_shape)) * else: */ - __pyx_t_8 = PyObject_RichCompare(__pyx_v_field_shape, __pyx_empty_tuple, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4833, __pyx_L1_error) - __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 4833, __pyx_L1_error) + __pyx_t_8 = PyObject_RichCompare(__pyx_v_field_shape, __pyx_empty_tuple, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4832, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 4832, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_15) { - /* "netCDF4/_netCDF4.pyx":4834 + /* "netCDF4/_netCDF4.pyx":4833 * raise KeyError('compound field of an unsupported data type') * if field_shape != (): * formats.append((field_type,field_shape)) # <<<<<<<<<<<<<< * else: * formats.append(field_type) */ - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4834, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4833, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_field_type); __Pyx_GIVEREF(__pyx_v_field_type); @@ -57194,10 +57196,10 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro __Pyx_INCREF(__pyx_v_field_shape); __Pyx_GIVEREF(__pyx_v_field_shape); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_field_shape); - __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_formats, __pyx_t_8); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4834, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_formats, __pyx_t_8); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4833, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":4833 + /* "netCDF4/_netCDF4.pyx":4832 * else: * raise KeyError('compound field of an unsupported data type') * if field_shape != (): # <<<<<<<<<<<<<< @@ -57207,7 +57209,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro goto __pyx_L41; } - /* "netCDF4/_netCDF4.pyx":4836 + /* "netCDF4/_netCDF4.pyx":4835 * formats.append((field_type,field_shape)) * else: * formats.append(field_type) # <<<<<<<<<<<<<< @@ -57215,19 +57217,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro * names = _sortbylist(names, offsets) */ /*else*/ { - __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_formats, __pyx_v_field_type); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4836, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_formats, __pyx_v_field_type); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4835, __pyx_L1_error) } __pyx_L41:; } - /* "netCDF4/_netCDF4.pyx":4838 + /* "netCDF4/_netCDF4.pyx":4837 * formats.append(field_type) * # make sure entries in lists sorted by offset. * names = _sortbylist(names, offsets) # <<<<<<<<<<<<<< * formats = _sortbylist(formats, offsets) * offsets.sort() */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sortbylist); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4838, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sortbylist); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4837, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = NULL; __pyx_t_2 = 0; @@ -57244,7 +57246,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_names, __pyx_v_offsets}; - __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4838, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4837, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_8); } else @@ -57252,13 +57254,13 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_names, __pyx_v_offsets}; - __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4838, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4837, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_8); } else #endif { - __pyx_t_7 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4838, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4837, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_9) { __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_9); __pyx_t_9 = NULL; @@ -57269,7 +57271,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro __Pyx_INCREF(__pyx_v_offsets); __Pyx_GIVEREF(__pyx_v_offsets); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_2, __pyx_v_offsets); - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4838, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4837, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -57277,14 +57279,14 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro __Pyx_DECREF_SET(__pyx_v_names, __pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":4839 + /* "netCDF4/_netCDF4.pyx":4838 * # make sure entries in lists sorted by offset. * names = _sortbylist(names, offsets) * formats = _sortbylist(formats, offsets) # <<<<<<<<<<<<<< * offsets.sort() * # create a dict that can be converted into a numpy dtype. */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sortbylist); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4839, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sortbylist); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4838, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = NULL; __pyx_t_2 = 0; @@ -57301,7 +57303,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_formats, __pyx_v_offsets}; - __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4839, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4838, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_8); } else @@ -57309,13 +57311,13 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_formats, __pyx_v_offsets}; - __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4839, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4838, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_8); } else #endif { - __pyx_t_9 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4839, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4838, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -57326,7 +57328,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro __Pyx_INCREF(__pyx_v_offsets); __Pyx_GIVEREF(__pyx_v_offsets); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_2, __pyx_v_offsets); - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4839, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4838, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -57334,31 +57336,31 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro __Pyx_DECREF_SET(__pyx_v_formats, __pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":4840 + /* "netCDF4/_netCDF4.pyx":4839 * names = _sortbylist(names, offsets) * formats = _sortbylist(formats, offsets) * offsets.sort() # <<<<<<<<<<<<<< * # create a dict that can be converted into a numpy dtype. * dtype_dict = {'names':names,'formats':formats,'offsets':offsets} */ - __pyx_t_11 = PyList_Sort(__pyx_v_offsets); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4840, __pyx_L1_error) + __pyx_t_11 = PyList_Sort(__pyx_v_offsets); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4839, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4842 + /* "netCDF4/_netCDF4.pyx":4841 * offsets.sort() * # create a dict that can be converted into a numpy dtype. * dtype_dict = {'names':names,'formats':formats,'offsets':offsets} # <<<<<<<<<<<<<< * return CompoundType(group, dtype_dict, name, typeid=xtype) * */ - __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4842, __pyx_L1_error) + __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_names, __pyx_v_names) < 0) __PYX_ERR(0, 4842, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_formats, __pyx_v_formats) < 0) __PYX_ERR(0, 4842, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_offsets, __pyx_v_offsets) < 0) __PYX_ERR(0, 4842, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_names, __pyx_v_names) < 0) __PYX_ERR(0, 4841, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_formats, __pyx_v_formats) < 0) __PYX_ERR(0, 4841, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_offsets, __pyx_v_offsets) < 0) __PYX_ERR(0, 4841, __pyx_L1_error) __pyx_v_dtype_dict = ((PyObject*)__pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":4843 + /* "netCDF4/_netCDF4.pyx":4842 * # create a dict that can be converted into a numpy dtype. * dtype_dict = {'names':names,'formats':formats,'offsets':offsets} * return CompoundType(group, dtype_dict, name, typeid=xtype) # <<<<<<<<<<<<<< @@ -57366,7 +57368,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro * # VLEN datatype support. */ __Pyx_XDECREF(__pyx_r); - __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4843, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_group); __Pyx_GIVEREF(__pyx_v_group); @@ -57377,13 +57379,13 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_name); - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4843, __pyx_L1_error) + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = __Pyx_PyInt_From_nc_type(__pyx_v_xtype); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4843, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_From_nc_type(__pyx_v_xtype); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_typeid, __pyx_t_9) < 0) __PYX_ERR(0, 4843, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_typeid, __pyx_t_9) < 0) __PYX_ERR(0, 4842, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7netCDF4_8_netCDF4_CompoundType), __pyx_t_8, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4843, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7netCDF4_8_netCDF4_CompoundType), __pyx_t_8, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -57391,7 +57393,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro __pyx_t_9 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":4763 + /* "netCDF4/_netCDF4.pyx":4762 * return xtype * * cdef _read_compound(group, nc_type xtype, endian=None): # <<<<<<<<<<<<<< @@ -57424,7 +57426,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4863 +/* "netCDF4/_netCDF4.pyx":4862 * __pdoc__['VLType.dtype'] = \ * """A numpy dtype object describing the component type for the VLEN.""" * def __init__(self, grp, object dt, object dtype_name, **kwargs): # <<<<<<<<<<<<<< @@ -57469,16 +57471,16 @@ static int __pyx_pw_7netCDF4_8_netCDF4_6VLType_1__init__(PyObject *__pyx_v_self, case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dt)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 4863, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 4862, __pyx_L3_error) } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dtype_name)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 4863, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 4862, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 4863, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 4862, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -57493,7 +57495,7 @@ static int __pyx_pw_7netCDF4_8_netCDF4_6VLType_1__init__(PyObject *__pyx_v_self, } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4863, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4862, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_AddTraceback("netCDF4._netCDF4.VLType.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -57523,31 +57525,31 @@ static int __pyx_pf_7netCDF4_8_netCDF4_6VLType___init__(struct __pyx_obj_7netCDF __Pyx_RefNannySetupContext("__init__", 0); __Pyx_INCREF(__pyx_v_dt); - /* "netCDF4/_netCDF4.pyx":4882 + /* "netCDF4/_netCDF4.pyx":4881 * """ * cdef nc_type xtype * if 'typeid' in kwargs: # <<<<<<<<<<<<<< * xtype = kwargs['typeid'] * else: */ - __pyx_t_1 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_typeid, __pyx_v_kwargs, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4882, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_typeid, __pyx_v_kwargs, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4881, __pyx_L1_error) __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":4883 + /* "netCDF4/_netCDF4.pyx":4882 * cdef nc_type xtype * if 'typeid' in kwargs: * xtype = kwargs['typeid'] # <<<<<<<<<<<<<< * else: * xtype, dt = _def_vlen(grp, dt, dtype_name) */ - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_s_typeid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4883, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_s_typeid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4882, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyInt_As_nc_type(__pyx_t_3); if (unlikely((__pyx_t_4 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4883, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_As_nc_type(__pyx_t_3); if (unlikely((__pyx_t_4 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4882, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_xtype = __pyx_t_4; - /* "netCDF4/_netCDF4.pyx":4882 + /* "netCDF4/_netCDF4.pyx":4881 * """ * cdef nc_type xtype * if 'typeid' in kwargs: # <<<<<<<<<<<<<< @@ -57557,7 +57559,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_6VLType___init__(struct __pyx_obj_7netCDF goto __pyx_L3; } - /* "netCDF4/_netCDF4.pyx":4885 + /* "netCDF4/_netCDF4.pyx":4884 * xtype = kwargs['typeid'] * else: * xtype, dt = _def_vlen(grp, dt, dtype_name) # <<<<<<<<<<<<<< @@ -57565,7 +57567,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_6VLType___init__(struct __pyx_obj_7netCDF * self.dtype = dt */ /*else*/ { - __pyx_t_3 = __pyx_f_7netCDF4_8_netCDF4__def_vlen(__pyx_v_grp, __pyx_v_dt, __pyx_v_dtype_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4885, __pyx_L1_error) + __pyx_t_3 = __pyx_f_7netCDF4_8_netCDF4__def_vlen(__pyx_v_grp, __pyx_v_dt, __pyx_v_dtype_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4884, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { PyObject* sequence = __pyx_t_3; @@ -57577,7 +57579,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_6VLType___init__(struct __pyx_obj_7netCDF if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 4885, __pyx_L1_error) + __PYX_ERR(0, 4884, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -57590,15 +57592,15 @@ static int __pyx_pf_7netCDF4_8_netCDF4_6VLType___init__(struct __pyx_obj_7netCDF __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4885, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4884, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4885, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4884, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_7 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4885, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4884, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; @@ -57606,7 +57608,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_6VLType___init__(struct __pyx_obj_7netCDF __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 4885, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 4884, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L5_unpacking_done; @@ -57614,10 +57616,10 @@ static int __pyx_pf_7netCDF4_8_netCDF4_6VLType___init__(struct __pyx_obj_7netCDF __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 4885, __pyx_L1_error) + __PYX_ERR(0, 4884, __pyx_L1_error) __pyx_L5_unpacking_done:; } - __pyx_t_4 = __Pyx_PyInt_As_nc_type(__pyx_t_5); if (unlikely((__pyx_t_4 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4885, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_As_nc_type(__pyx_t_5); if (unlikely((__pyx_t_4 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4884, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_xtype = __pyx_t_4; __Pyx_DECREF_SET(__pyx_v_dt, __pyx_t_6); @@ -57625,7 +57627,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_6VLType___init__(struct __pyx_obj_7netCDF } __pyx_L3:; - /* "netCDF4/_netCDF4.pyx":4886 + /* "netCDF4/_netCDF4.pyx":4885 * else: * xtype, dt = _def_vlen(grp, dt, dtype_name) * self._nc_type = xtype # <<<<<<<<<<<<<< @@ -57634,7 +57636,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_6VLType___init__(struct __pyx_obj_7netCDF */ __pyx_v_self->_nc_type = __pyx_v_xtype; - /* "netCDF4/_netCDF4.pyx":4887 + /* "netCDF4/_netCDF4.pyx":4886 * xtype, dt = _def_vlen(grp, dt, dtype_name) * self._nc_type = xtype * self.dtype = dt # <<<<<<<<<<<<<< @@ -57647,19 +57649,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_6VLType___init__(struct __pyx_obj_7netCDF __Pyx_DECREF(__pyx_v_self->dtype); __pyx_v_self->dtype = __pyx_v_dt; - /* "netCDF4/_netCDF4.pyx":4888 + /* "netCDF4/_netCDF4.pyx":4887 * self._nc_type = xtype * self.dtype = dt * if dt == str: # <<<<<<<<<<<<<< * self.name = None * else: */ - __pyx_t_3 = PyObject_RichCompare(__pyx_v_dt, ((PyObject *)(&PyString_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4888, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4888, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_dt, ((PyObject *)(&PyString_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4887, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4887, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":4889 + /* "netCDF4/_netCDF4.pyx":4888 * self.dtype = dt * if dt == str: * self.name = None # <<<<<<<<<<<<<< @@ -57672,7 +57674,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_6VLType___init__(struct __pyx_obj_7netCDF __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = Py_None; - /* "netCDF4/_netCDF4.pyx":4888 + /* "netCDF4/_netCDF4.pyx":4887 * self._nc_type = xtype * self.dtype = dt * if dt == str: # <<<<<<<<<<<<<< @@ -57682,7 +57684,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_6VLType___init__(struct __pyx_obj_7netCDF goto __pyx_L6; } - /* "netCDF4/_netCDF4.pyx":4891 + /* "netCDF4/_netCDF4.pyx":4890 * self.name = None * else: * self.name = dtype_name # <<<<<<<<<<<<<< @@ -57698,7 +57700,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_6VLType___init__(struct __pyx_obj_7netCDF } __pyx_L6:; - /* "netCDF4/_netCDF4.pyx":4863 + /* "netCDF4/_netCDF4.pyx":4862 * __pdoc__['VLType.dtype'] = \ * """A numpy dtype object describing the component type for the VLEN.""" * def __init__(self, grp, object dt, object dtype_name, **kwargs): # <<<<<<<<<<<<<< @@ -57722,7 +57724,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_6VLType___init__(struct __pyx_obj_7netCDF return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4893 +/* "netCDF4/_netCDF4.pyx":4892 * self.name = dtype_name * * def __repr__(self): # <<<<<<<<<<<<<< @@ -57754,20 +57756,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_2__repr__(struct __pyx_obj_ PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - /* "netCDF4/_netCDF4.pyx":4894 + /* "netCDF4/_netCDF4.pyx":4893 * * def __repr__(self): * if python3: # <<<<<<<<<<<<<< * return self.__unicode__() * else: */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4894, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4893, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4894, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4893, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":4895 + /* "netCDF4/_netCDF4.pyx":4894 * def __repr__(self): * if python3: * return self.__unicode__() # <<<<<<<<<<<<<< @@ -57775,7 +57777,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_2__repr__(struct __pyx_obj_ * return unicode(self).encode(default_encoding) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4895, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4894, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -57788,10 +57790,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_2__repr__(struct __pyx_obj_ } } if (__pyx_t_4) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4895, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4894, __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, 4895, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4894, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -57799,7 +57801,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_2__repr__(struct __pyx_obj_ __pyx_t_1 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":4894 + /* "netCDF4/_netCDF4.pyx":4893 * * def __repr__(self): * if python3: # <<<<<<<<<<<<<< @@ -57808,7 +57810,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_2__repr__(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":4897 + /* "netCDF4/_netCDF4.pyx":4896 * return self.__unicode__() * else: * return unicode(self).encode(default_encoding) # <<<<<<<<<<<<<< @@ -57817,18 +57819,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_2__repr__(struct __pyx_obj_ */ /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4897, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self)); - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4897, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4897, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4897, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -57841,14 +57843,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_2__repr__(struct __pyx_obj_ } } if (!__pyx_t_5) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4897, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4896, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4897, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4896, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -57857,20 +57859,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_2__repr__(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4897, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4896, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4897, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4897, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -57881,7 +57883,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_2__repr__(struct __pyx_obj_ goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":4893 + /* "netCDF4/_netCDF4.pyx":4892 * self.name = dtype_name * * def __repr__(self): # <<<<<<<<<<<<<< @@ -57904,7 +57906,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_2__repr__(struct __pyx_obj_ return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4899 +/* "netCDF4/_netCDF4.pyx":4898 * return unicode(self).encode(default_encoding) * * def __unicode__(self): # <<<<<<<<<<<<<< @@ -57934,19 +57936,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_4__unicode__(struct __pyx_o PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__unicode__", 0); - /* "netCDF4/_netCDF4.pyx":4900 + /* "netCDF4/_netCDF4.pyx":4899 * * def __unicode__(self): * if self.dtype == str: # <<<<<<<<<<<<<< * return repr(type(self))+': string type' * else: */ - __pyx_t_1 = PyObject_RichCompare(__pyx_v_self->dtype, ((PyObject *)(&PyString_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4900, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4900, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_v_self->dtype, ((PyObject *)(&PyString_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4899, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4899, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":4901 + /* "netCDF4/_netCDF4.pyx":4900 * def __unicode__(self): * if self.dtype == str: * return repr(type(self))+': string type' # <<<<<<<<<<<<<< @@ -57954,16 +57956,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_4__unicode__(struct __pyx_o * return repr(type(self))+": name = '%s', numpy dtype = %s\n" %\ */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_Repr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4901, __pyx_L1_error) + __pyx_t_1 = PyObject_Repr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4900, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_kp_s_string_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4901, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_kp_s_string_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4900, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":4900 + /* "netCDF4/_netCDF4.pyx":4899 * * def __unicode__(self): * if self.dtype == str: # <<<<<<<<<<<<<< @@ -57972,7 +57974,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_4__unicode__(struct __pyx_o */ } - /* "netCDF4/_netCDF4.pyx":4903 + /* "netCDF4/_netCDF4.pyx":4902 * return repr(type(self))+': string type' * else: * return repr(type(self))+": name = '%s', numpy dtype = %s\n" %\ # <<<<<<<<<<<<<< @@ -57981,17 +57983,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_4__unicode__(struct __pyx_o */ /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyObject_Repr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4903, __pyx_L1_error) + __pyx_t_3 = PyObject_Repr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - /* "netCDF4/_netCDF4.pyx":4904 + /* "netCDF4/_netCDF4.pyx":4903 * else: * return repr(type(self))+": name = '%s', numpy dtype = %s\n" %\ * (self.name, self.dtype) # <<<<<<<<<<<<<< * * def __reduce__(self): */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4904, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4903, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self->name); __Pyx_GIVEREF(__pyx_v_self->name); @@ -58000,17 +58002,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_4__unicode__(struct __pyx_o __Pyx_GIVEREF(__pyx_v_self->dtype); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->dtype); - /* "netCDF4/_netCDF4.pyx":4903 + /* "netCDF4/_netCDF4.pyx":4902 * return repr(type(self))+': string type' * else: * return repr(type(self))+": name = '%s', numpy dtype = %s\n" %\ # <<<<<<<<<<<<<< * (self.name, self.dtype) * */ - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_name_s_numpy_dtype_s, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4903, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_name_s_numpy_dtype_s, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4903, __pyx_L1_error) + __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -58019,7 +58021,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_4__unicode__(struct __pyx_o goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":4899 + /* "netCDF4/_netCDF4.pyx":4898 * return unicode(self).encode(default_encoding) * * def __unicode__(self): # <<<<<<<<<<<<<< @@ -58040,7 +58042,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_4__unicode__(struct __pyx_o return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4906 +/* "netCDF4/_netCDF4.pyx":4905 * (self.name, self.dtype) * * def __reduce__(self): # <<<<<<<<<<<<<< @@ -58067,20 +58069,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_6__reduce__(CYTHON_UNUSED s PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__reduce__", 0); - /* "netCDF4/_netCDF4.pyx":4908 + /* "netCDF4/_netCDF4.pyx":4907 * def __reduce__(self): * # raise error is user tries to pickle a VLType object. * raise NotImplementedError('VLType is not picklable') # <<<<<<<<<<<<<< * * cdef _def_vlen(grp, object dt, object dtype_name): */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__97, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4908, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__97, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4907, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 4908, __pyx_L1_error) + __PYX_ERR(0, 4907, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4906 + /* "netCDF4/_netCDF4.pyx":4905 * (self.name, self.dtype) * * def __reduce__(self): # <<<<<<<<<<<<<< @@ -58098,7 +58100,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_6__reduce__(CYTHON_UNUSED s return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4857 +/* "netCDF4/_netCDF4.pyx":4856 * the user. * """ * cdef public nc_type _nc_type # <<<<<<<<<<<<<< @@ -58125,7 +58127,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_8_nc_type___get__(struct __ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_nc_type(__pyx_v_self->_nc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4857, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_nc_type(__pyx_v_self->_nc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -58160,7 +58162,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_6VLType_8_nc_type_2__set__(struct __pyx_o __Pyx_RefNannyDeclarations nc_type __pyx_t_1; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyInt_As_nc_type(__pyx_v_value); if (unlikely((__pyx_t_1 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4857, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_nc_type(__pyx_v_value); if (unlikely((__pyx_t_1 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4856, __pyx_L1_error) __pyx_v_self->_nc_type = __pyx_t_1; /* function exit code */ @@ -58174,7 +58176,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_6VLType_8_nc_type_2__set__(struct __pyx_o return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4858 +/* "netCDF4/_netCDF4.pyx":4857 * """ * cdef public nc_type _nc_type * cdef public dtype, name # <<<<<<<<<<<<<< @@ -58356,7 +58358,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_6VLType_4name_4__del__(struct __pyx_obj_7 return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4910 +/* "netCDF4/_netCDF4.pyx":4909 * raise NotImplementedError('VLType is not picklable') * * cdef _def_vlen(grp, object dt, object dtype_name): # <<<<<<<<<<<<<< @@ -58384,19 +58386,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_vlen(PyObject *__pyx_v_grp, PyO __Pyx_RefNannySetupContext("_def_vlen", 0); __Pyx_INCREF(__pyx_v_dt); - /* "netCDF4/_netCDF4.pyx":4918 + /* "netCDF4/_netCDF4.pyx":4917 * cdef char *namstring * cdef char *nested_namstring * if dt == str: # python string, use NC_STRING # <<<<<<<<<<<<<< * xtype = NC_STRING * # dtype_name ignored */ - __pyx_t_1 = PyObject_RichCompare(__pyx_v_dt, ((PyObject *)(&PyString_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4918, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4918, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_v_dt, ((PyObject *)(&PyString_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4917, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4917, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":4919 + /* "netCDF4/_netCDF4.pyx":4918 * cdef char *nested_namstring * if dt == str: # python string, use NC_STRING * xtype = NC_STRING # <<<<<<<<<<<<<< @@ -58405,7 +58407,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_vlen(PyObject *__pyx_v_grp, PyO */ __pyx_v_xtype = NC_STRING; - /* "netCDF4/_netCDF4.pyx":4918 + /* "netCDF4/_netCDF4.pyx":4917 * cdef char *namstring * cdef char *nested_namstring * if dt == str: # python string, use NC_STRING # <<<<<<<<<<<<<< @@ -58415,7 +58417,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_vlen(PyObject *__pyx_v_grp, PyO goto __pyx_L3; } - /* "netCDF4/_netCDF4.pyx":4922 + /* "netCDF4/_netCDF4.pyx":4921 * # dtype_name ignored * else: # numpy datatype * bytestr = _strencode(dtype_name) # <<<<<<<<<<<<<< @@ -58423,31 +58425,31 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_vlen(PyObject *__pyx_v_grp, PyO * dt = numpy.dtype(dt) # convert to numpy datatype. */ /*else*/ { - __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_dtype_name, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4922, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_dtype_name, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4921, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_bytestr = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":4923 + /* "netCDF4/_netCDF4.pyx":4922 * else: # numpy datatype * bytestr = _strencode(dtype_name) * namstring = bytestr # <<<<<<<<<<<<<< * dt = numpy.dtype(dt) # convert to numpy datatype. * if dt.str[1:] in _supportedtypes: */ - __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 4923, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 4922, __pyx_L1_error) __pyx_v_namstring = __pyx_t_3; - /* "netCDF4/_netCDF4.pyx":4924 + /* "netCDF4/_netCDF4.pyx":4923 * bytestr = _strencode(dtype_name) * namstring = bytestr * dt = numpy.dtype(dt) # convert to numpy datatype. # <<<<<<<<<<<<<< * if dt.str[1:] in _supportedtypes: * # find netCDF primitive data type corresponding to */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4924, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4923, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4924, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4923, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -58461,13 +58463,13 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_vlen(PyObject *__pyx_v_grp, PyO } } if (!__pyx_t_4) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_dt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4924, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_dt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4923, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_dt}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4924, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4923, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -58475,19 +58477,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_vlen(PyObject *__pyx_v_grp, PyO #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_dt}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4924, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4923, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4924, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4923, __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_INCREF(__pyx_v_dt); __Pyx_GIVEREF(__pyx_v_dt); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_dt); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4924, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4923, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -58496,62 +58498,62 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_vlen(PyObject *__pyx_v_grp, PyO __Pyx_DECREF_SET(__pyx_v_dt, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":4925 + /* "netCDF4/_netCDF4.pyx":4924 * namstring = bytestr * dt = numpy.dtype(dt) # convert to numpy datatype. * if dt.str[1:] in _supportedtypes: # <<<<<<<<<<<<<< * # find netCDF primitive data type corresponding to * # specified numpy data type. */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_str); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4925, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_str); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4924, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_1, 1, 0, NULL, NULL, &__pyx_slice__98, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4925, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_1, 1, 0, NULL, NULL, &__pyx_slice__98, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4924, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_supportedtypes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4925, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_supportedtypes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4924, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_5, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4925, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_5, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4924, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = (__pyx_t_2 != 0); if (__pyx_t_7) { - /* "netCDF4/_netCDF4.pyx":4928 + /* "netCDF4/_netCDF4.pyx":4927 * # find netCDF primitive data type corresponding to * # specified numpy data type. * xtype_tmp = _nptonctype[dt.str[1:]] # <<<<<<<<<<<<<< * ierr = nc_def_vlen(grp._grpid, namstring, xtype_tmp, &xtype); * if ierr != NC_NOERR: */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4928, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4927, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_str); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4928, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_str); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4927, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_t_5, 1, 0, NULL, NULL, &__pyx_slice__99, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4928, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_t_5, 1, 0, NULL, NULL, &__pyx_slice__99, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4927, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyObject_GetItem(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4928, __pyx_L1_error) + __pyx_t_5 = PyObject_GetItem(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4927, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_8 = __Pyx_PyInt_As_nc_type(__pyx_t_5); if (unlikely((__pyx_t_8 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4928, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_As_nc_type(__pyx_t_5); if (unlikely((__pyx_t_8 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4927, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_xtype_tmp = __pyx_t_8; - /* "netCDF4/_netCDF4.pyx":4929 + /* "netCDF4/_netCDF4.pyx":4928 * # specified numpy data type. * xtype_tmp = _nptonctype[dt.str[1:]] * ierr = nc_def_vlen(grp._grpid, namstring, xtype_tmp, &xtype); # <<<<<<<<<<<<<< * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4929, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4928, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4929, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4928, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_ierr = nc_def_vlen(__pyx_t_9, __pyx_v_namstring, __pyx_v_xtype_tmp, (&__pyx_v_xtype)); - /* "netCDF4/_netCDF4.pyx":4930 + /* "netCDF4/_netCDF4.pyx":4929 * xtype_tmp = _nptonctype[dt.str[1:]] * ierr = nc_def_vlen(grp._grpid, namstring, xtype_tmp, &xtype); * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -58561,7 +58563,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_vlen(PyObject *__pyx_v_grp, PyO __pyx_t_7 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_7) { - /* "netCDF4/_netCDF4.pyx":4931 + /* "netCDF4/_netCDF4.pyx":4930 * ierr = nc_def_vlen(grp._grpid, namstring, xtype_tmp, &xtype); * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -58569,22 +58571,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_vlen(PyObject *__pyx_v_grp, PyO * raise KeyError("unsupported datatype specified for VLEN") */ __pyx_t_3 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, strlen(__pyx_t_3), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4931, __pyx_L1_error) + __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, strlen(__pyx_t_3), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4930, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4931, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4930, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4931, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4930, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __PYX_ERR(0, 4931, __pyx_L1_error) + __PYX_ERR(0, 4930, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4930 + /* "netCDF4/_netCDF4.pyx":4929 * xtype_tmp = _nptonctype[dt.str[1:]] * ierr = nc_def_vlen(grp._grpid, namstring, xtype_tmp, &xtype); * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -58593,7 +58595,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_vlen(PyObject *__pyx_v_grp, PyO */ } - /* "netCDF4/_netCDF4.pyx":4925 + /* "netCDF4/_netCDF4.pyx":4924 * namstring = bytestr * dt = numpy.dtype(dt) # convert to numpy datatype. * if dt.str[1:] in _supportedtypes: # <<<<<<<<<<<<<< @@ -58603,7 +58605,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_vlen(PyObject *__pyx_v_grp, PyO goto __pyx_L4; } - /* "netCDF4/_netCDF4.pyx":4933 + /* "netCDF4/_netCDF4.pyx":4932 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * else: * raise KeyError("unsupported datatype specified for VLEN") # <<<<<<<<<<<<<< @@ -58611,17 +58613,17 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_vlen(PyObject *__pyx_v_grp, PyO * */ /*else*/ { - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_tuple__100, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4933, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_tuple__100, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4932, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __PYX_ERR(0, 4933, __pyx_L1_error) + __PYX_ERR(0, 4932, __pyx_L1_error) } __pyx_L4:; } __pyx_L3:; - /* "netCDF4/_netCDF4.pyx":4934 + /* "netCDF4/_netCDF4.pyx":4933 * else: * raise KeyError("unsupported datatype specified for VLEN") * return xtype, dt # <<<<<<<<<<<<<< @@ -58629,9 +58631,9 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_vlen(PyObject *__pyx_v_grp, PyO * cdef _read_vlen(group, nc_type xtype, endian=None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = __Pyx_PyInt_From_nc_type(__pyx_v_xtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4934, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_nc_type(__pyx_v_xtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4933, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4934, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4933, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); @@ -58643,7 +58645,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_vlen(PyObject *__pyx_v_grp, PyO __pyx_t_6 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":4910 + /* "netCDF4/_netCDF4.pyx":4909 * raise NotImplementedError('VLType is not picklable') * * cdef _def_vlen(grp, object dt, object dtype_name): # <<<<<<<<<<<<<< @@ -58667,7 +58669,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_vlen(PyObject *__pyx_v_grp, PyO return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4936 +/* "netCDF4/_netCDF4.pyx":4935 * return xtype, dt * * cdef _read_vlen(group, nc_type xtype, endian=None): # <<<<<<<<<<<<<< @@ -58707,20 +58709,20 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group, } } - /* "netCDF4/_netCDF4.pyx":4945 + /* "netCDF4/_netCDF4.pyx":4944 * cdef nc_type base_xtype * cdef char vl_namstring[NC_MAX_NAME+1] * _grpid = group._grpid # <<<<<<<<<<<<<< * if xtype == NC_STRING: * dt = str */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4945, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4944, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4945, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4944, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v__grpid = __pyx_t_2; - /* "netCDF4/_netCDF4.pyx":4946 + /* "netCDF4/_netCDF4.pyx":4945 * cdef char vl_namstring[NC_MAX_NAME+1] * _grpid = group._grpid * if xtype == NC_STRING: # <<<<<<<<<<<<<< @@ -58730,7 +58732,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group, __pyx_t_3 = ((__pyx_v_xtype == NC_STRING) != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":4947 + /* "netCDF4/_netCDF4.pyx":4946 * _grpid = group._grpid * if xtype == NC_STRING: * dt = str # <<<<<<<<<<<<<< @@ -58740,7 +58742,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group, __Pyx_INCREF(((PyObject *)(&PyString_Type))); __pyx_v_dt = ((PyObject *)(&PyString_Type)); - /* "netCDF4/_netCDF4.pyx":4948 + /* "netCDF4/_netCDF4.pyx":4947 * if xtype == NC_STRING: * dt = str * name = None # <<<<<<<<<<<<<< @@ -58750,7 +58752,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group, __Pyx_INCREF(Py_None); __pyx_v_name = Py_None; - /* "netCDF4/_netCDF4.pyx":4946 + /* "netCDF4/_netCDF4.pyx":4945 * cdef char vl_namstring[NC_MAX_NAME+1] * _grpid = group._grpid * if xtype == NC_STRING: # <<<<<<<<<<<<<< @@ -58760,7 +58762,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group, goto __pyx_L3; } - /* "netCDF4/_netCDF4.pyx":4950 + /* "netCDF4/_netCDF4.pyx":4949 * name = None * else: * with nogil: # <<<<<<<<<<<<<< @@ -58775,7 +58777,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group, #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":4951 + /* "netCDF4/_netCDF4.pyx":4950 * else: * with nogil: * ierr = nc_inq_vlen(_grpid, xtype, vl_namstring, &vlsize, &base_xtype) # <<<<<<<<<<<<<< @@ -58785,7 +58787,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group, __pyx_v_ierr = nc_inq_vlen(__pyx_v__grpid, __pyx_v_xtype, __pyx_v_vl_namstring, (&__pyx_v_vlsize), (&__pyx_v_base_xtype)); } - /* "netCDF4/_netCDF4.pyx":4950 + /* "netCDF4/_netCDF4.pyx":4949 * name = None * else: * with nogil: # <<<<<<<<<<<<<< @@ -58803,7 +58805,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group, } } - /* "netCDF4/_netCDF4.pyx":4952 + /* "netCDF4/_netCDF4.pyx":4951 * with nogil: * ierr = nc_inq_vlen(_grpid, xtype, vl_namstring, &vlsize, &base_xtype) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -58813,7 +58815,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group, __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":4953 + /* "netCDF4/_netCDF4.pyx":4952 * ierr = nc_inq_vlen(_grpid, xtype, vl_namstring, &vlsize, &base_xtype) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -58821,22 +58823,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group, * try: */ __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4953, __pyx_L1_error) + __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4952, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4953, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4952, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4953, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4952, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 4953, __pyx_L1_error) + __PYX_ERR(0, 4952, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4952 + /* "netCDF4/_netCDF4.pyx":4951 * with nogil: * ierr = nc_inq_vlen(_grpid, xtype, vl_namstring, &vlsize, &base_xtype) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -58845,21 +58847,21 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group, */ } - /* "netCDF4/_netCDF4.pyx":4954 + /* "netCDF4/_netCDF4.pyx":4953 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * name = vl_namstring.decode(default_encoding,unicode_error) # <<<<<<<<<<<<<< * try: * datatype = _nctonptype[base_xtype] */ - __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_vl_namstring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4954, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_vl_namstring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4953, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4954, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4953, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4954, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4953, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4954, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4953, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; __pyx_t_2 = 0; @@ -58876,7 +58878,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group, #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_5, __pyx_t_7}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4954, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4953, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -58886,7 +58888,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group, #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_5, __pyx_t_7}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4954, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4953, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -58894,7 +58896,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group, } else #endif { - __pyx_t_9 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4954, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4953, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; @@ -58905,7 +58907,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group, PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_2, __pyx_t_7); __pyx_t_5 = 0; __pyx_t_7 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4954, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4953, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -58913,7 +58915,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group, __pyx_v_name = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":4955 + /* "netCDF4/_netCDF4.pyx":4954 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * name = vl_namstring.decode(default_encoding,unicode_error) * try: # <<<<<<<<<<<<<< @@ -58929,22 +58931,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group, __Pyx_XGOTREF(__pyx_t_12); /*try:*/ { - /* "netCDF4/_netCDF4.pyx":4956 + /* "netCDF4/_netCDF4.pyx":4955 * name = vl_namstring.decode(default_encoding,unicode_error) * try: * datatype = _nctonptype[base_xtype] # <<<<<<<<<<<<<< * if endian is not None: datatype = endian + datatype * dt = numpy.dtype(datatype) # see if it is a primitive type */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4956, __pyx_L8_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4955, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_base_xtype, nc_type, 1, __Pyx_PyInt_From_nc_type, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4956, __pyx_L8_error) + __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_base_xtype, nc_type, 1, __Pyx_PyInt_From_nc_type, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4955, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_datatype = __pyx_t_6; __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":4957 + /* "netCDF4/_netCDF4.pyx":4956 * try: * datatype = _nctonptype[base_xtype] * if endian is not None: datatype = endian + datatype # <<<<<<<<<<<<<< @@ -58954,22 +58956,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group, __pyx_t_3 = (__pyx_v_endian != Py_None); __pyx_t_13 = (__pyx_t_3 != 0); if (__pyx_t_13) { - __pyx_t_6 = PyNumber_Add(__pyx_v_endian, __pyx_v_datatype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4957, __pyx_L8_error) + __pyx_t_6 = PyNumber_Add(__pyx_v_endian, __pyx_v_datatype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4956, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_datatype, __pyx_t_6); __pyx_t_6 = 0; } - /* "netCDF4/_netCDF4.pyx":4958 + /* "netCDF4/_netCDF4.pyx":4957 * datatype = _nctonptype[base_xtype] * if endian is not None: datatype = endian + datatype * dt = numpy.dtype(datatype) # see if it is a primitive type # <<<<<<<<<<<<<< * except KeyError: * raise KeyError("unsupported component type for VLEN") */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4958, __pyx_L8_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4957, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dtype); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4958, __pyx_L8_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dtype); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4957, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -58983,13 +58985,13 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group, } } if (!__pyx_t_1) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_datatype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4958, __pyx_L8_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_datatype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4957, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_6); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_9)) { PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_datatype}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4958, __pyx_L8_error) + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4957, __pyx_L8_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_6); } else @@ -58997,19 +58999,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group, #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) { PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_datatype}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4958, __pyx_L8_error) + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4957, __pyx_L8_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_6); } else #endif { - __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4958, __pyx_L8_error) + __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4957, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __pyx_t_1 = NULL; __Pyx_INCREF(__pyx_v_datatype); __Pyx_GIVEREF(__pyx_v_datatype); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_datatype); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4958, __pyx_L8_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4957, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -59018,7 +59020,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group, __pyx_v_dt = __pyx_t_6; __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":4955 + /* "netCDF4/_netCDF4.pyx":4954 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * name = vl_namstring.decode(default_encoding,unicode_error) * try: # <<<<<<<<<<<<<< @@ -59039,7 +59041,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group, __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":4959 + /* "netCDF4/_netCDF4.pyx":4958 * if endian is not None: datatype = endian + datatype * dt = numpy.dtype(datatype) # see if it is a primitive type * except KeyError: # <<<<<<<<<<<<<< @@ -59049,28 +59051,28 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group, __pyx_t_2 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_2) { __Pyx_AddTraceback("netCDF4._netCDF4._read_vlen", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_9, &__pyx_t_7) < 0) __PYX_ERR(0, 4959, __pyx_L10_except_error) + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_9, &__pyx_t_7) < 0) __PYX_ERR(0, 4958, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_7); - /* "netCDF4/_netCDF4.pyx":4960 + /* "netCDF4/_netCDF4.pyx":4959 * dt = numpy.dtype(datatype) # see if it is a primitive type * except KeyError: * raise KeyError("unsupported component type for VLEN") # <<<<<<<<<<<<<< * return VLType(group, dt, name, typeid=xtype) * */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_tuple__101, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4960, __pyx_L10_except_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_tuple__101, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4959, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 4960, __pyx_L10_except_error) + __PYX_ERR(0, 4959, __pyx_L10_except_error) } goto __pyx_L10_except_error; __pyx_L10_except_error:; - /* "netCDF4/_netCDF4.pyx":4955 + /* "netCDF4/_netCDF4.pyx":4954 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * name = vl_namstring.decode(default_encoding,unicode_error) * try: # <<<<<<<<<<<<<< @@ -59088,7 +59090,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group, } __pyx_L3:; - /* "netCDF4/_netCDF4.pyx":4961 + /* "netCDF4/_netCDF4.pyx":4960 * except KeyError: * raise KeyError("unsupported component type for VLEN") * return VLType(group, dt, name, typeid=xtype) # <<<<<<<<<<<<<< @@ -59096,7 +59098,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group, * # Enum datatype support. */ __Pyx_XDECREF(__pyx_r); - __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4961, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4960, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_group); __Pyx_GIVEREF(__pyx_v_group); @@ -59107,13 +59109,13 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group, __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_name); - __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4961, __pyx_L1_error) + __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4960, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_6 = __Pyx_PyInt_From_nc_type(__pyx_v_xtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4961, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_nc_type(__pyx_v_xtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4960, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_typeid, __pyx_t_6) < 0) __PYX_ERR(0, 4961, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_typeid, __pyx_t_6) < 0) __PYX_ERR(0, 4960, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7netCDF4_8_netCDF4_VLType), __pyx_t_7, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4961, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7netCDF4_8_netCDF4_VLType), __pyx_t_7, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4960, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; @@ -59121,7 +59123,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group, __pyx_t_6 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":4936 + /* "netCDF4/_netCDF4.pyx":4935 * return xtype, dt * * cdef _read_vlen(group, nc_type xtype, endian=None): # <<<<<<<<<<<<<< @@ -59148,7 +59150,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group, return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4983 +/* "netCDF4/_netCDF4.pyx":4982 * __pdoc__['EnumType.enum_dict'] = \ * """A python dictionary describing the enum fields and values.""" * def __init__(self, grp, object dt, object dtype_name, object enum_dict, **kwargs): # <<<<<<<<<<<<<< @@ -59195,21 +59197,21 @@ static int __pyx_pw_7netCDF4_8_netCDF4_8EnumType_1__init__(PyObject *__pyx_v_sel case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dt)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 1); __PYX_ERR(0, 4983, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 1); __PYX_ERR(0, 4982, __pyx_L3_error) } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dtype_name)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 2); __PYX_ERR(0, 4983, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 2); __PYX_ERR(0, 4982, __pyx_L3_error) } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_enum_dict)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 3); __PYX_ERR(0, 4983, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 3); __PYX_ERR(0, 4982, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 4983, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 4982, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; @@ -59226,7 +59228,7 @@ static int __pyx_pw_7netCDF4_8_netCDF4_8EnumType_1__init__(PyObject *__pyx_v_sel } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4983, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4982, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_AddTraceback("netCDF4._netCDF4.EnumType.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -59256,31 +59258,31 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8EnumType___init__(struct __pyx_obj_7netC __Pyx_RefNannySetupContext("__init__", 0); __Pyx_INCREF(__pyx_v_dt); - /* "netCDF4/_netCDF4.pyx":5005 + /* "netCDF4/_netCDF4.pyx":5004 * """ * cdef nc_type xtype * if 'typeid' in kwargs: # <<<<<<<<<<<<<< * xtype = kwargs['typeid'] * else: */ - __pyx_t_1 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_typeid, __pyx_v_kwargs, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5005, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_typeid, __pyx_v_kwargs, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5004, __pyx_L1_error) __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":5006 + /* "netCDF4/_netCDF4.pyx":5005 * cdef nc_type xtype * if 'typeid' in kwargs: * xtype = kwargs['typeid'] # <<<<<<<<<<<<<< * else: * xtype, dt = _def_enum(grp, dt, dtype_name, enum_dict) */ - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_s_typeid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5006, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_s_typeid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5005, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyInt_As_nc_type(__pyx_t_3); if (unlikely((__pyx_t_4 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 5006, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_As_nc_type(__pyx_t_3); if (unlikely((__pyx_t_4 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 5005, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_xtype = __pyx_t_4; - /* "netCDF4/_netCDF4.pyx":5005 + /* "netCDF4/_netCDF4.pyx":5004 * """ * cdef nc_type xtype * if 'typeid' in kwargs: # <<<<<<<<<<<<<< @@ -59290,7 +59292,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8EnumType___init__(struct __pyx_obj_7netC goto __pyx_L3; } - /* "netCDF4/_netCDF4.pyx":5008 + /* "netCDF4/_netCDF4.pyx":5007 * xtype = kwargs['typeid'] * else: * xtype, dt = _def_enum(grp, dt, dtype_name, enum_dict) # <<<<<<<<<<<<<< @@ -59298,7 +59300,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8EnumType___init__(struct __pyx_obj_7netC * self.dtype = dt */ /*else*/ { - __pyx_t_3 = __pyx_f_7netCDF4_8_netCDF4__def_enum(__pyx_v_grp, __pyx_v_dt, __pyx_v_dtype_name, __pyx_v_enum_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5008, __pyx_L1_error) + __pyx_t_3 = __pyx_f_7netCDF4_8_netCDF4__def_enum(__pyx_v_grp, __pyx_v_dt, __pyx_v_dtype_name, __pyx_v_enum_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5007, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { PyObject* sequence = __pyx_t_3; @@ -59310,7 +59312,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8EnumType___init__(struct __pyx_obj_7netC if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 5008, __pyx_L1_error) + __PYX_ERR(0, 5007, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -59323,15 +59325,15 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8EnumType___init__(struct __pyx_obj_7netC __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5008, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5007, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5008, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5007, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_7 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5008, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5007, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; @@ -59339,7 +59341,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8EnumType___init__(struct __pyx_obj_7netC __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 5008, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 5007, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L5_unpacking_done; @@ -59347,10 +59349,10 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8EnumType___init__(struct __pyx_obj_7netC __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 5008, __pyx_L1_error) + __PYX_ERR(0, 5007, __pyx_L1_error) __pyx_L5_unpacking_done:; } - __pyx_t_4 = __Pyx_PyInt_As_nc_type(__pyx_t_5); if (unlikely((__pyx_t_4 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 5008, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_As_nc_type(__pyx_t_5); if (unlikely((__pyx_t_4 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 5007, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_xtype = __pyx_t_4; __Pyx_DECREF_SET(__pyx_v_dt, __pyx_t_6); @@ -59358,7 +59360,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8EnumType___init__(struct __pyx_obj_7netC } __pyx_L3:; - /* "netCDF4/_netCDF4.pyx":5009 + /* "netCDF4/_netCDF4.pyx":5008 * else: * xtype, dt = _def_enum(grp, dt, dtype_name, enum_dict) * self._nc_type = xtype # <<<<<<<<<<<<<< @@ -59367,7 +59369,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8EnumType___init__(struct __pyx_obj_7netC */ __pyx_v_self->_nc_type = __pyx_v_xtype; - /* "netCDF4/_netCDF4.pyx":5010 + /* "netCDF4/_netCDF4.pyx":5009 * xtype, dt = _def_enum(grp, dt, dtype_name, enum_dict) * self._nc_type = xtype * self.dtype = dt # <<<<<<<<<<<<<< @@ -59380,7 +59382,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8EnumType___init__(struct __pyx_obj_7netC __Pyx_DECREF(__pyx_v_self->dtype); __pyx_v_self->dtype = __pyx_v_dt; - /* "netCDF4/_netCDF4.pyx":5011 + /* "netCDF4/_netCDF4.pyx":5010 * self._nc_type = xtype * self.dtype = dt * self.name = dtype_name # <<<<<<<<<<<<<< @@ -59393,7 +59395,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8EnumType___init__(struct __pyx_obj_7netC __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = __pyx_v_dtype_name; - /* "netCDF4/_netCDF4.pyx":5012 + /* "netCDF4/_netCDF4.pyx":5011 * self.dtype = dt * self.name = dtype_name * self.enum_dict = enum_dict # <<<<<<<<<<<<<< @@ -59406,7 +59408,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8EnumType___init__(struct __pyx_obj_7netC __Pyx_DECREF(__pyx_v_self->enum_dict); __pyx_v_self->enum_dict = __pyx_v_enum_dict; - /* "netCDF4/_netCDF4.pyx":4983 + /* "netCDF4/_netCDF4.pyx":4982 * __pdoc__['EnumType.enum_dict'] = \ * """A python dictionary describing the enum fields and values.""" * def __init__(self, grp, object dt, object dtype_name, object enum_dict, **kwargs): # <<<<<<<<<<<<<< @@ -59430,7 +59432,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8EnumType___init__(struct __pyx_obj_7netC return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5014 +/* "netCDF4/_netCDF4.pyx":5013 * self.enum_dict = enum_dict * * def __repr__(self): # <<<<<<<<<<<<<< @@ -59462,20 +59464,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8EnumType_2__repr__(struct __pyx_ob PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - /* "netCDF4/_netCDF4.pyx":5015 + /* "netCDF4/_netCDF4.pyx":5014 * * def __repr__(self): * if python3: # <<<<<<<<<<<<<< * return self.__unicode__() * else: */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5015, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5014, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5015, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5014, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":5016 + /* "netCDF4/_netCDF4.pyx":5015 * def __repr__(self): * if python3: * return self.__unicode__() # <<<<<<<<<<<<<< @@ -59483,7 +59485,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8EnumType_2__repr__(struct __pyx_ob * return unicode(self).encode(default_encoding) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5016, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5015, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -59496,10 +59498,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8EnumType_2__repr__(struct __pyx_ob } } if (__pyx_t_4) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5016, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5015, __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, 5016, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5015, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -59507,7 +59509,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8EnumType_2__repr__(struct __pyx_ob __pyx_t_1 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":5015 + /* "netCDF4/_netCDF4.pyx":5014 * * def __repr__(self): * if python3: # <<<<<<<<<<<<<< @@ -59516,7 +59518,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8EnumType_2__repr__(struct __pyx_ob */ } - /* "netCDF4/_netCDF4.pyx":5018 + /* "netCDF4/_netCDF4.pyx":5017 * return self.__unicode__() * else: * return unicode(self).encode(default_encoding) # <<<<<<<<<<<<<< @@ -59525,18 +59527,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8EnumType_2__repr__(struct __pyx_ob */ /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5018, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self)); - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5018, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5018, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5018, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -59549,14 +59551,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8EnumType_2__repr__(struct __pyx_ob } } if (!__pyx_t_5) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5018, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5017, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5018, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5017, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -59565,20 +59567,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8EnumType_2__repr__(struct __pyx_ob #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5018, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5017, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5018, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5018, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -59589,7 +59591,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8EnumType_2__repr__(struct __pyx_ob goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":5014 + /* "netCDF4/_netCDF4.pyx":5013 * self.enum_dict = enum_dict * * def __repr__(self): # <<<<<<<<<<<<<< @@ -59612,7 +59614,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8EnumType_2__repr__(struct __pyx_ob return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5020 +/* "netCDF4/_netCDF4.pyx":5019 * return unicode(self).encode(default_encoding) * * def __unicode__(self): # <<<<<<<<<<<<<< @@ -59641,7 +59643,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8EnumType_4__unicode__(struct __pyx PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__unicode__", 0); - /* "netCDF4/_netCDF4.pyx":5021 + /* "netCDF4/_netCDF4.pyx":5020 * * def __unicode__(self): * return repr(type(self))+\ # <<<<<<<<<<<<<< @@ -59649,17 +59651,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8EnumType_4__unicode__(struct __pyx * (self.name, self.dtype, self.enum_dict) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_Repr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5021, __pyx_L1_error) + __pyx_t_1 = PyObject_Repr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5020, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "netCDF4/_netCDF4.pyx":5023 + /* "netCDF4/_netCDF4.pyx":5022 * return repr(type(self))+\ * ": name = '%s', numpy dtype = %s, fields/values =%s\n" %\ * (self.name, self.dtype, self.enum_dict) # <<<<<<<<<<<<<< * * def __reduce__(self): */ - __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5023, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5022, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_self->name); __Pyx_GIVEREF(__pyx_v_self->name); @@ -59671,25 +59673,25 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8EnumType_4__unicode__(struct __pyx __Pyx_GIVEREF(__pyx_v_self->enum_dict); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_self->enum_dict); - /* "netCDF4/_netCDF4.pyx":5022 + /* "netCDF4/_netCDF4.pyx":5021 * def __unicode__(self): * return repr(type(self))+\ * ": name = '%s', numpy dtype = %s, fields/values =%s\n" %\ # <<<<<<<<<<<<<< * (self.name, self.dtype, self.enum_dict) * */ - __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_name_s_numpy_dtype_s_fields_val, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5022, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_name_s_numpy_dtype_s_fields_val, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5021, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5021 + /* "netCDF4/_netCDF4.pyx":5020 * * def __unicode__(self): * return repr(type(self))+\ # <<<<<<<<<<<<<< * ": name = '%s', numpy dtype = %s, fields/values =%s\n" %\ * (self.name, self.dtype, self.enum_dict) */ - __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5021, __pyx_L1_error) + __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5020, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -59697,7 +59699,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8EnumType_4__unicode__(struct __pyx __pyx_t_2 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":5020 + /* "netCDF4/_netCDF4.pyx":5019 * return unicode(self).encode(default_encoding) * * def __unicode__(self): # <<<<<<<<<<<<<< @@ -59718,7 +59720,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8EnumType_4__unicode__(struct __pyx return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5025 +/* "netCDF4/_netCDF4.pyx":5024 * (self.name, self.dtype, self.enum_dict) * * def __reduce__(self): # <<<<<<<<<<<<<< @@ -59745,20 +59747,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8EnumType_6__reduce__(CYTHON_UNUSED PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__reduce__", 0); - /* "netCDF4/_netCDF4.pyx":5027 + /* "netCDF4/_netCDF4.pyx":5026 * def __reduce__(self): * # raise error is user tries to pickle a EnumType object. * raise NotImplementedError('EnumType is not picklable') # <<<<<<<<<<<<<< * * cdef _def_enum(grp, object dt, object dtype_name, object enum_dict): */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__102, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5027, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__102, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5026, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 5027, __pyx_L1_error) + __PYX_ERR(0, 5026, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5025 + /* "netCDF4/_netCDF4.pyx":5024 * (self.name, self.dtype, self.enum_dict) * * def __reduce__(self): # <<<<<<<<<<<<<< @@ -59776,7 +59778,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8EnumType_6__reduce__(CYTHON_UNUSED return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4975 +/* "netCDF4/_netCDF4.pyx":4974 * the user. * """ * cdef public nc_type _nc_type # <<<<<<<<<<<<<< @@ -59803,7 +59805,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8EnumType_8_nc_type___get__(struct PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_nc_type(__pyx_v_self->_nc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4975, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_nc_type(__pyx_v_self->_nc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4974, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -59838,7 +59840,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8EnumType_8_nc_type_2__set__(struct __pyx __Pyx_RefNannyDeclarations nc_type __pyx_t_1; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyInt_As_nc_type(__pyx_v_value); if (unlikely((__pyx_t_1 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4975, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_nc_type(__pyx_v_value); if (unlikely((__pyx_t_1 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4974, __pyx_L1_error) __pyx_v_self->_nc_type = __pyx_t_1; /* function exit code */ @@ -59852,7 +59854,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8EnumType_8_nc_type_2__set__(struct __pyx return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4976 +/* "netCDF4/_netCDF4.pyx":4975 * """ * cdef public nc_type _nc_type * cdef public dtype, name, enum_dict # <<<<<<<<<<<<<< @@ -60121,7 +60123,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8EnumType_9enum_dict_4__del__(struct __py return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5029 +/* "netCDF4/_netCDF4.pyx":5028 * raise NotImplementedError('EnumType is not picklable') * * cdef _def_enum(grp, object dt, object dtype_name, object enum_dict): # <<<<<<<<<<<<<< @@ -60156,38 +60158,38 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_enum(PyObject *__pyx_v_grp, PyO __Pyx_RefNannySetupContext("_def_enum", 0); __Pyx_INCREF(__pyx_v_dt); - /* "netCDF4/_netCDF4.pyx":5036 + /* "netCDF4/_netCDF4.pyx":5035 * cdef char *namstring * cdef ndarray value_arr * bytestr = _strencode(dtype_name) # <<<<<<<<<<<<<< * namstring = bytestr * dt = numpy.dtype(dt) # convert to numpy datatype. */ - __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_dtype_name, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5036, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_dtype_name, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5035, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_bytestr = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5037 + /* "netCDF4/_netCDF4.pyx":5036 * cdef ndarray value_arr * bytestr = _strencode(dtype_name) * namstring = bytestr # <<<<<<<<<<<<<< * dt = numpy.dtype(dt) # convert to numpy datatype. * if dt.str[1:] in _intnptonctype.keys(): */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 5037, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 5036, __pyx_L1_error) __pyx_v_namstring = __pyx_t_2; - /* "netCDF4/_netCDF4.pyx":5038 + /* "netCDF4/_netCDF4.pyx":5037 * bytestr = _strencode(dtype_name) * namstring = bytestr * dt = numpy.dtype(dt) # convert to numpy datatype. # <<<<<<<<<<<<<< * if dt.str[1:] in _intnptonctype.keys(): * # find netCDF primitive data type corresponding to */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5038, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5038, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -60201,13 +60203,13 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_enum(PyObject *__pyx_v_grp, PyO } } if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_dt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5038, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_dt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_dt}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5038, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5037, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -60215,19 +60217,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_enum(PyObject *__pyx_v_grp, PyO #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_dt}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5038, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5037, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5038, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_INCREF(__pyx_v_dt); __Pyx_GIVEREF(__pyx_v_dt); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_dt); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5038, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -60236,21 +60238,21 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_enum(PyObject *__pyx_v_grp, PyO __Pyx_DECREF_SET(__pyx_v_dt, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5039 + /* "netCDF4/_netCDF4.pyx":5038 * namstring = bytestr * dt = numpy.dtype(dt) # convert to numpy datatype. * if dt.str[1:] in _intnptonctype.keys(): # <<<<<<<<<<<<<< * # find netCDF primitive data type corresponding to * # specified numpy data type. */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_str); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5039, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_str); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5038, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_t_1, 1, 0, NULL, NULL, &__pyx_slice__103, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5039, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_t_1, 1, 0, NULL, NULL, &__pyx_slice__103, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5038, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_intnptonctype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5039, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_intnptonctype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5038, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_keys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5039, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_keys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5038, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -60264,55 +60266,55 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_enum(PyObject *__pyx_v_grp, PyO } } if (__pyx_t_5) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5039, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5038, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5039, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5038, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_t_4, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 5039, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_t_4, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 5038, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = (__pyx_t_6 != 0); if (__pyx_t_7) { - /* "netCDF4/_netCDF4.pyx":5042 + /* "netCDF4/_netCDF4.pyx":5041 * # find netCDF primitive data type corresponding to * # specified numpy data type. * xtype_tmp = _intnptonctype[dt.str[1:]] # <<<<<<<<<<<<<< * ierr = nc_def_enum(grp._grpid, xtype_tmp, namstring, &xtype); * if ierr != NC_NOERR: */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_intnptonctype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5042, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_intnptonctype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5041, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_str); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5042, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_str); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5041, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_4, 1, 0, NULL, NULL, &__pyx_slice__104, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5042, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_4, 1, 0, NULL, NULL, &__pyx_slice__104, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5041, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyObject_GetItem(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5042, __pyx_L1_error) + __pyx_t_4 = PyObject_GetItem(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5041, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_8 = __Pyx_PyInt_As_nc_type(__pyx_t_4); if (unlikely((__pyx_t_8 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 5042, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_As_nc_type(__pyx_t_4); if (unlikely((__pyx_t_8 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 5041, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_xtype_tmp = __pyx_t_8; - /* "netCDF4/_netCDF4.pyx":5043 + /* "netCDF4/_netCDF4.pyx":5042 * # specified numpy data type. * xtype_tmp = _intnptonctype[dt.str[1:]] * ierr = nc_def_enum(grp._grpid, xtype_tmp, namstring, &xtype); # <<<<<<<<<<<<<< * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5043, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5042, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5043, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5042, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_ierr = nc_def_enum(__pyx_t_9, __pyx_v_xtype_tmp, __pyx_v_namstring, (&__pyx_v_xtype)); - /* "netCDF4/_netCDF4.pyx":5044 + /* "netCDF4/_netCDF4.pyx":5043 * xtype_tmp = _intnptonctype[dt.str[1:]] * ierr = nc_def_enum(grp._grpid, xtype_tmp, namstring, &xtype); * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -60322,7 +60324,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_enum(PyObject *__pyx_v_grp, PyO __pyx_t_7 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_7) { - /* "netCDF4/_netCDF4.pyx":5045 + /* "netCDF4/_netCDF4.pyx":5044 * ierr = nc_def_enum(grp._grpid, xtype_tmp, namstring, &xtype); * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -60330,22 +60332,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_enum(PyObject *__pyx_v_grp, PyO * msg="unsupported datatype specified for Enum (must be integer)" */ __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5045, __pyx_L1_error) + __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5044, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5045, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5044, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5045, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5044, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(0, 5045, __pyx_L1_error) + __PYX_ERR(0, 5044, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5044 + /* "netCDF4/_netCDF4.pyx":5043 * xtype_tmp = _intnptonctype[dt.str[1:]] * ierr = nc_def_enum(grp._grpid, xtype_tmp, namstring, &xtype); * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -60354,7 +60356,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_enum(PyObject *__pyx_v_grp, PyO */ } - /* "netCDF4/_netCDF4.pyx":5039 + /* "netCDF4/_netCDF4.pyx":5038 * namstring = bytestr * dt = numpy.dtype(dt) # convert to numpy datatype. * if dt.str[1:] in _intnptonctype.keys(): # <<<<<<<<<<<<<< @@ -60364,7 +60366,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_enum(PyObject *__pyx_v_grp, PyO goto __pyx_L3; } - /* "netCDF4/_netCDF4.pyx":5047 + /* "netCDF4/_netCDF4.pyx":5046 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * else: * msg="unsupported datatype specified for Enum (must be integer)" # <<<<<<<<<<<<<< @@ -60375,28 +60377,28 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_enum(PyObject *__pyx_v_grp, PyO __Pyx_INCREF(__pyx_kp_s_unsupported_datatype_specified_f_2); __pyx_v_msg = __pyx_kp_s_unsupported_datatype_specified_f_2; - /* "netCDF4/_netCDF4.pyx":5048 + /* "netCDF4/_netCDF4.pyx":5047 * else: * msg="unsupported datatype specified for Enum (must be integer)" * raise KeyError(msg) # <<<<<<<<<<<<<< * # insert named members into enum type. * for field in enum_dict: */ - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5048, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5047, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_msg); __Pyx_GIVEREF(__pyx_v_msg); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_msg); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5048, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5047, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 5048, __pyx_L1_error) + __PYX_ERR(0, 5047, __pyx_L1_error) } __pyx_L3:; - /* "netCDF4/_netCDF4.pyx":5050 + /* "netCDF4/_netCDF4.pyx":5049 * raise KeyError(msg) * # insert named members into enum type. * for field in enum_dict: # <<<<<<<<<<<<<< @@ -60407,26 +60409,26 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_enum(PyObject *__pyx_v_grp, PyO __pyx_t_3 = __pyx_v_enum_dict; __Pyx_INCREF(__pyx_t_3); __pyx_t_10 = 0; __pyx_t_11 = NULL; } else { - __pyx_t_10 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_enum_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5050, __pyx_L1_error) + __pyx_t_10 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_enum_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_11 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5050, __pyx_L1_error) + __pyx_t_11 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5049, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_11)) { if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_10); __Pyx_INCREF(__pyx_t_4); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 5050, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_10); __Pyx_INCREF(__pyx_t_4); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 5049, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5050, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_10); __Pyx_INCREF(__pyx_t_4); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 5050, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_10); __Pyx_INCREF(__pyx_t_4); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 5049, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5050, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -60436,7 +60438,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_enum(PyObject *__pyx_v_grp, PyO PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 5050, __pyx_L1_error) + else __PYX_ERR(0, 5049, __pyx_L1_error) } break; } @@ -60445,19 +60447,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_enum(PyObject *__pyx_v_grp, PyO __Pyx_XDECREF_SET(__pyx_v_field, __pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":5051 + /* "netCDF4/_netCDF4.pyx":5050 * # insert named members into enum type. * for field in enum_dict: * value_arr = numpy.array(enum_dict[field],dt) # <<<<<<<<<<<<<< * bytestr = _strencode(field) * namstring = bytestr */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5051, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5050, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5051, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5050, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_GetItem(__pyx_v_enum_dict, __pyx_v_field); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5051, __pyx_L1_error) + __pyx_t_1 = PyObject_GetItem(__pyx_v_enum_dict, __pyx_v_field); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5050, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_12 = NULL; __pyx_t_9 = 0; @@ -60474,7 +60476,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_enum(PyObject *__pyx_v_grp, PyO #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_t_1, __pyx_v_dt}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5051, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5050, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -60483,14 +60485,14 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_enum(PyObject *__pyx_v_grp, PyO #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_t_1, __pyx_v_dt}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5051, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5050, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else #endif { - __pyx_t_13 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5051, __pyx_L1_error) + __pyx_t_13 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5050, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); if (__pyx_t_12) { __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __pyx_t_12 = NULL; @@ -60501,51 +60503,51 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_enum(PyObject *__pyx_v_grp, PyO __Pyx_GIVEREF(__pyx_v_dt); PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_9, __pyx_v_dt); __pyx_t_1 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_13, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5051, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_13, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5050, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_7netCDF4_8_netCDF4_ndarray))))) __PYX_ERR(0, 5051, __pyx_L1_error) + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_7netCDF4_8_netCDF4_ndarray))))) __PYX_ERR(0, 5050, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_value_arr, ((PyArrayObject *)__pyx_t_4)); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":5052 + /* "netCDF4/_netCDF4.pyx":5051 * for field in enum_dict: * value_arr = numpy.array(enum_dict[field],dt) * bytestr = _strencode(field) # <<<<<<<<<<<<<< * namstring = bytestr * ierr = nc_insert_enum(grp._grpid, xtype, namstring, value_arr.data) */ - __pyx_t_4 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_field, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5052, __pyx_L1_error) + __pyx_t_4 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_field, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5051, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_bytestr, __pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":5053 + /* "netCDF4/_netCDF4.pyx":5052 * value_arr = numpy.array(enum_dict[field],dt) * bytestr = _strencode(field) * namstring = bytestr # <<<<<<<<<<<<<< * ierr = nc_insert_enum(grp._grpid, xtype, namstring, value_arr.data) * if ierr != NC_NOERR: */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 5053, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 5052, __pyx_L1_error) __pyx_v_namstring = __pyx_t_2; - /* "netCDF4/_netCDF4.pyx":5054 + /* "netCDF4/_netCDF4.pyx":5053 * bytestr = _strencode(field) * namstring = bytestr * ierr = nc_insert_enum(grp._grpid, xtype, namstring, value_arr.data) # <<<<<<<<<<<<<< * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5054, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5053, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5054, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5053, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_ierr = nc_insert_enum(__pyx_t_9, __pyx_v_xtype, __pyx_v_namstring, __pyx_v_value_arr->data); - /* "netCDF4/_netCDF4.pyx":5055 + /* "netCDF4/_netCDF4.pyx":5054 * namstring = bytestr * ierr = nc_insert_enum(grp._grpid, xtype, namstring, value_arr.data) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -60555,7 +60557,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_enum(PyObject *__pyx_v_grp, PyO __pyx_t_7 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_7) { - /* "netCDF4/_netCDF4.pyx":5056 + /* "netCDF4/_netCDF4.pyx":5055 * ierr = nc_insert_enum(grp._grpid, xtype, namstring, value_arr.data) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -60563,22 +60565,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_enum(PyObject *__pyx_v_grp, PyO * */ __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5056, __pyx_L1_error) + __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5056, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5056, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(0, 5056, __pyx_L1_error) + __PYX_ERR(0, 5055, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5055 + /* "netCDF4/_netCDF4.pyx":5054 * namstring = bytestr * ierr = nc_insert_enum(grp._grpid, xtype, namstring, value_arr.data) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -60587,7 +60589,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_enum(PyObject *__pyx_v_grp, PyO */ } - /* "netCDF4/_netCDF4.pyx":5050 + /* "netCDF4/_netCDF4.pyx":5049 * raise KeyError(msg) * # insert named members into enum type. * for field in enum_dict: # <<<<<<<<<<<<<< @@ -60597,7 +60599,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_enum(PyObject *__pyx_v_grp, PyO } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":5057 + /* "netCDF4/_netCDF4.pyx":5056 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * return xtype, dt # <<<<<<<<<<<<<< @@ -60605,9 +60607,9 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_enum(PyObject *__pyx_v_grp, PyO * cdef _read_enum(group, nc_type xtype, endian=None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyInt_From_nc_type(__pyx_v_xtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5057, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_nc_type(__pyx_v_xtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5056, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5057, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5056, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); @@ -60619,7 +60621,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_enum(PyObject *__pyx_v_grp, PyO __pyx_t_4 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":5029 + /* "netCDF4/_netCDF4.pyx":5028 * raise NotImplementedError('EnumType is not picklable') * * cdef _def_enum(grp, object dt, object dtype_name, object enum_dict): # <<<<<<<<<<<<<< @@ -60648,7 +60650,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_enum(PyObject *__pyx_v_grp, PyO return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5059 +/* "netCDF4/_netCDF4.pyx":5058 * return xtype, dt * * cdef _read_enum(group, nc_type xtype, endian=None): # <<<<<<<<<<<<<< @@ -60692,20 +60694,20 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, } } - /* "netCDF4/_netCDF4.pyx":5069 + /* "netCDF4/_netCDF4.pyx":5068 * cdef char enum_namstring[NC_MAX_NAME+1] * cdef size_t nmembers * _grpid = group._grpid # <<<<<<<<<<<<<< * # get name, datatype, and number of members. * with nogil: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5069, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5068, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5069, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5068, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v__grpid = __pyx_t_2; - /* "netCDF4/_netCDF4.pyx":5071 + /* "netCDF4/_netCDF4.pyx":5070 * _grpid = group._grpid * # get name, datatype, and number of members. * with nogil: # <<<<<<<<<<<<<< @@ -60719,7 +60721,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":5072 + /* "netCDF4/_netCDF4.pyx":5071 * # get name, datatype, and number of members. * with nogil: * ierr = nc_inq_enum(_grpid, xtype, enum_namstring, &base_xtype, NULL,\ # <<<<<<<<<<<<<< @@ -60729,7 +60731,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, __pyx_v_ierr = nc_inq_enum(__pyx_v__grpid, __pyx_v_xtype, __pyx_v_enum_namstring, (&__pyx_v_base_xtype), NULL, (&__pyx_v_nmembers)); } - /* "netCDF4/_netCDF4.pyx":5071 + /* "netCDF4/_netCDF4.pyx":5070 * _grpid = group._grpid * # get name, datatype, and number of members. * with nogil: # <<<<<<<<<<<<<< @@ -60747,7 +60749,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, } } - /* "netCDF4/_netCDF4.pyx":5074 + /* "netCDF4/_netCDF4.pyx":5073 * ierr = nc_inq_enum(_grpid, xtype, enum_namstring, &base_xtype, NULL,\ * &nmembers) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -60757,7 +60759,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":5075 + /* "netCDF4/_netCDF4.pyx":5074 * &nmembers) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -60765,22 +60767,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, * try: */ __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5075, __pyx_L1_error) + __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5075, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5075, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 5075, __pyx_L1_error) + __PYX_ERR(0, 5074, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5074 + /* "netCDF4/_netCDF4.pyx":5073 * ierr = nc_inq_enum(_grpid, xtype, enum_namstring, &base_xtype, NULL,\ * &nmembers) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -60789,21 +60791,21 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, */ } - /* "netCDF4/_netCDF4.pyx":5076 + /* "netCDF4/_netCDF4.pyx":5075 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * name = enum_namstring.decode(default_encoding,unicode_error) # <<<<<<<<<<<<<< * try: * datatype = _nctonptype[base_xtype] */ - __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_enum_namstring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5076, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_enum_namstring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5075, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5076, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5075, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5076, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5075, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5076, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5075, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; __pyx_t_2 = 0; @@ -60820,7 +60822,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_5, __pyx_t_7}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5076, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5075, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -60830,7 +60832,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_5, __pyx_t_7}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5076, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5075, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -60838,7 +60840,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, } else #endif { - __pyx_t_9 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5076, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5075, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; @@ -60849,7 +60851,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_2, __pyx_t_7); __pyx_t_5 = 0; __pyx_t_7 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5076, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5075, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -60857,7 +60859,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, __pyx_v_name = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5077 + /* "netCDF4/_netCDF4.pyx":5076 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * name = enum_namstring.decode(default_encoding,unicode_error) * try: # <<<<<<<<<<<<<< @@ -60873,22 +60875,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, __Pyx_XGOTREF(__pyx_t_12); /*try:*/ { - /* "netCDF4/_netCDF4.pyx":5078 + /* "netCDF4/_netCDF4.pyx":5077 * name = enum_namstring.decode(default_encoding,unicode_error) * try: * datatype = _nctonptype[base_xtype] # <<<<<<<<<<<<<< * if endian is not None: datatype = endian + datatype * dt = numpy.dtype(datatype) # see if it is a primitive type */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5078, __pyx_L7_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5077, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_base_xtype, nc_type, 1, __Pyx_PyInt_From_nc_type, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5078, __pyx_L7_error) + __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_base_xtype, nc_type, 1, __Pyx_PyInt_From_nc_type, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5077, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_datatype = __pyx_t_6; __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":5079 + /* "netCDF4/_netCDF4.pyx":5078 * try: * datatype = _nctonptype[base_xtype] * if endian is not None: datatype = endian + datatype # <<<<<<<<<<<<<< @@ -60898,22 +60900,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, __pyx_t_3 = (__pyx_v_endian != Py_None); __pyx_t_13 = (__pyx_t_3 != 0); if (__pyx_t_13) { - __pyx_t_6 = PyNumber_Add(__pyx_v_endian, __pyx_v_datatype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5079, __pyx_L7_error) + __pyx_t_6 = PyNumber_Add(__pyx_v_endian, __pyx_v_datatype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5078, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_datatype, __pyx_t_6); __pyx_t_6 = 0; } - /* "netCDF4/_netCDF4.pyx":5080 + /* "netCDF4/_netCDF4.pyx":5079 * datatype = _nctonptype[base_xtype] * if endian is not None: datatype = endian + datatype * dt = numpy.dtype(datatype) # see if it is a primitive type # <<<<<<<<<<<<<< * except KeyError: * raise KeyError("unsupported component type for VLEN") */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5080, __pyx_L7_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5079, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dtype); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5080, __pyx_L7_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dtype); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5079, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -60927,13 +60929,13 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, } } if (!__pyx_t_1) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_datatype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5080, __pyx_L7_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_datatype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5079, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_9)) { PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_datatype}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5080, __pyx_L7_error) + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5079, __pyx_L7_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_6); } else @@ -60941,19 +60943,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) { PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_datatype}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5080, __pyx_L7_error) + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5079, __pyx_L7_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_6); } else #endif { - __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5080, __pyx_L7_error) + __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5079, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __pyx_t_1 = NULL; __Pyx_INCREF(__pyx_v_datatype); __Pyx_GIVEREF(__pyx_v_datatype); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_datatype); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5080, __pyx_L7_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5079, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -60962,7 +60964,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, __pyx_v_dt = __pyx_t_6; __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":5077 + /* "netCDF4/_netCDF4.pyx":5076 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * name = enum_namstring.decode(default_encoding,unicode_error) * try: # <<<<<<<<<<<<<< @@ -60983,7 +60985,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":5081 + /* "netCDF4/_netCDF4.pyx":5080 * if endian is not None: datatype = endian + datatype * dt = numpy.dtype(datatype) # see if it is a primitive type * except KeyError: # <<<<<<<<<<<<<< @@ -60993,28 +60995,28 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, __pyx_t_2 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_2) { __Pyx_AddTraceback("netCDF4._netCDF4._read_enum", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_9, &__pyx_t_7) < 0) __PYX_ERR(0, 5081, __pyx_L9_except_error) + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_9, &__pyx_t_7) < 0) __PYX_ERR(0, 5080, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_7); - /* "netCDF4/_netCDF4.pyx":5082 + /* "netCDF4/_netCDF4.pyx":5081 * dt = numpy.dtype(datatype) # see if it is a primitive type * except KeyError: * raise KeyError("unsupported component type for VLEN") # <<<<<<<<<<<<<< * # loop over members, build dict. * enum_dict = {} */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_tuple__105, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5082, __pyx_L9_except_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_tuple__105, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5081, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 5082, __pyx_L9_except_error) + __PYX_ERR(0, 5081, __pyx_L9_except_error) } goto __pyx_L9_except_error; __pyx_L9_except_error:; - /* "netCDF4/_netCDF4.pyx":5077 + /* "netCDF4/_netCDF4.pyx":5076 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * name = enum_namstring.decode(default_encoding,unicode_error) * try: # <<<<<<<<<<<<<< @@ -61030,19 +61032,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, __pyx_L14_try_end:; } - /* "netCDF4/_netCDF4.pyx":5084 + /* "netCDF4/_netCDF4.pyx":5083 * raise KeyError("unsupported component type for VLEN") * # loop over members, build dict. * enum_dict = {} # <<<<<<<<<<<<<< * for nmem from 0 <= nmem < nmembers: * with nogil: */ - __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5084, __pyx_L1_error) + __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5083, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_v_enum_dict = ((PyObject*)__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5085 + /* "netCDF4/_netCDF4.pyx":5084 * # loop over members, build dict. * enum_dict = {} * for nmem from 0 <= nmem < nmembers: # <<<<<<<<<<<<<< @@ -61052,7 +61054,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, __pyx_t_14 = __pyx_v_nmembers; for (__pyx_v_nmem = 0; __pyx_v_nmem < __pyx_t_14; __pyx_v_nmem++) { - /* "netCDF4/_netCDF4.pyx":5086 + /* "netCDF4/_netCDF4.pyx":5085 * enum_dict = {} * for nmem from 0 <= nmem < nmembers: * with nogil: # <<<<<<<<<<<<<< @@ -61066,7 +61068,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":5087 + /* "netCDF4/_netCDF4.pyx":5086 * for nmem from 0 <= nmem < nmembers: * with nogil: * ierr = nc_inq_enum_member(_grpid, xtype, nmem, \ # <<<<<<<<<<<<<< @@ -61076,7 +61078,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, __pyx_v_ierr = nc_inq_enum_member(__pyx_v__grpid, __pyx_v_xtype, __pyx_v_nmem, __pyx_v_enum_namstring, (&__pyx_v_enum_val)); } - /* "netCDF4/_netCDF4.pyx":5086 + /* "netCDF4/_netCDF4.pyx":5085 * enum_dict = {} * for nmem from 0 <= nmem < nmembers: * with nogil: # <<<<<<<<<<<<<< @@ -61094,7 +61096,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, } } - /* "netCDF4/_netCDF4.pyx":5089 + /* "netCDF4/_netCDF4.pyx":5088 * ierr = nc_inq_enum_member(_grpid, xtype, nmem, \ * enum_namstring, &enum_val) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -61104,7 +61106,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, __pyx_t_13 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_13) { - /* "netCDF4/_netCDF4.pyx":5090 + /* "netCDF4/_netCDF4.pyx":5089 * enum_namstring, &enum_val) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -61112,22 +61114,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, * enum_dict[name] = int(enum_val) */ __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_7 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5090, __pyx_L1_error) + __pyx_t_7 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5089, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5090, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5089, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_9, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5090, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_9, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5089, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __PYX_ERR(0, 5090, __pyx_L1_error) + __PYX_ERR(0, 5089, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5089 + /* "netCDF4/_netCDF4.pyx":5088 * ierr = nc_inq_enum_member(_grpid, xtype, nmem, \ * enum_namstring, &enum_val) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -61136,21 +61138,21 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, */ } - /* "netCDF4/_netCDF4.pyx":5091 + /* "netCDF4/_netCDF4.pyx":5090 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * name = enum_namstring.decode(default_encoding,unicode_error) # <<<<<<<<<<<<<< * enum_dict[name] = int(enum_val) * return EnumType(group, dt, name, enum_dict, typeid=xtype) */ - __pyx_t_9 = __Pyx_PyObject_FromString(__pyx_v_enum_namstring); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5091, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_FromString(__pyx_v_enum_namstring); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5090, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5091, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5090, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5091, __pyx_L1_error) + __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5090, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5091, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5090, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = NULL; __pyx_t_2 = 0; @@ -61167,7 +61169,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_9, __pyx_t_1}; - __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5091, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5090, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; @@ -61177,7 +61179,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_9, __pyx_t_1}; - __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5091, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5090, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; @@ -61185,7 +61187,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, } else #endif { - __pyx_t_8 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5091, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5090, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -61196,7 +61198,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_2, __pyx_t_1); __pyx_t_9 = 0; __pyx_t_1 = 0; - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5091, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5090, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -61204,28 +61206,28 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5092 + /* "netCDF4/_netCDF4.pyx":5091 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * name = enum_namstring.decode(default_encoding,unicode_error) * enum_dict[name] = int(enum_val) # <<<<<<<<<<<<<< * return EnumType(group, dt, name, enum_dict, typeid=xtype) * */ - __pyx_t_7 = __Pyx_PyInt_From_char(__pyx_v_enum_val); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5092, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_From_char(__pyx_v_enum_val); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5091, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5092, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5091, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)(&PyInt_Type)), __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5092, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)(&PyInt_Type)), __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5091, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(PyDict_SetItem(__pyx_v_enum_dict, __pyx_v_name, __pyx_t_7) < 0)) __PYX_ERR(0, 5092, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_enum_dict, __pyx_v_name, __pyx_t_7) < 0)) __PYX_ERR(0, 5091, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } - /* "netCDF4/_netCDF4.pyx":5093 + /* "netCDF4/_netCDF4.pyx":5092 * name = enum_namstring.decode(default_encoding,unicode_error) * enum_dict[name] = int(enum_val) * return EnumType(group, dt, name, enum_dict, typeid=xtype) # <<<<<<<<<<<<<< @@ -61233,7 +61235,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, * cdef _strencode(pystr,encoding=None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5093, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_group); __Pyx_GIVEREF(__pyx_v_group); @@ -61247,13 +61249,13 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, __Pyx_INCREF(__pyx_v_enum_dict); __Pyx_GIVEREF(__pyx_v_enum_dict); PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_v_enum_dict); - __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5093, __pyx_L1_error) + __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = __Pyx_PyInt_From_nc_type(__pyx_v_xtype); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5093, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_From_nc_type(__pyx_v_xtype); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_typeid, __pyx_t_8) < 0) __PYX_ERR(0, 5093, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_typeid, __pyx_t_8) < 0) __PYX_ERR(0, 5092, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7netCDF4_8_netCDF4_EnumType), __pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5093, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7netCDF4_8_netCDF4_EnumType), __pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -61261,7 +61263,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, __pyx_t_8 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":5059 + /* "netCDF4/_netCDF4.pyx":5058 * return xtype, dt * * cdef _read_enum(group, nc_type xtype, endian=None): # <<<<<<<<<<<<<< @@ -61289,7 +61291,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5095 +/* "netCDF4/_netCDF4.pyx":5094 * return EnumType(group, dt, name, enum_dict, typeid=xtype) * * cdef _strencode(pystr,encoding=None): # <<<<<<<<<<<<<< @@ -61319,7 +61321,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__strencode(PyObject *__pyx_v_pystr, } __Pyx_INCREF(__pyx_v_encoding); - /* "netCDF4/_netCDF4.pyx":5098 + /* "netCDF4/_netCDF4.pyx":5097 * # encode a string into bytes. If already bytes, do nothing. * # uses default_encoding module variable for default encoding. * if encoding is None: # <<<<<<<<<<<<<< @@ -61330,19 +61332,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__strencode(PyObject *__pyx_v_pystr, __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":5099 + /* "netCDF4/_netCDF4.pyx":5098 * # uses default_encoding module variable for default encoding. * if encoding is None: * encoding = default_encoding # <<<<<<<<<<<<<< * try: * return pystr.encode(encoding) */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5099, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5098, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_encoding, __pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":5098 + /* "netCDF4/_netCDF4.pyx":5097 * # encode a string into bytes. If already bytes, do nothing. * # uses default_encoding module variable for default encoding. * if encoding is None: # <<<<<<<<<<<<<< @@ -61351,7 +61353,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__strencode(PyObject *__pyx_v_pystr, */ } - /* "netCDF4/_netCDF4.pyx":5100 + /* "netCDF4/_netCDF4.pyx":5099 * if encoding is None: * encoding = default_encoding * try: # <<<<<<<<<<<<<< @@ -61367,7 +61369,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__strencode(PyObject *__pyx_v_pystr, __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { - /* "netCDF4/_netCDF4.pyx":5101 + /* "netCDF4/_netCDF4.pyx":5100 * encoding = default_encoding * try: * return pystr.encode(encoding) # <<<<<<<<<<<<<< @@ -61375,7 +61377,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__strencode(PyObject *__pyx_v_pystr, * return pystr # already bytes or unicode? */ __Pyx_XDECREF(__pyx_r); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_pystr, __pyx_n_s_encode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5101, __pyx_L4_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_pystr, __pyx_n_s_encode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5100, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -61388,13 +61390,13 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__strencode(PyObject *__pyx_v_pystr, } } if (!__pyx_t_8) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_encoding); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5101, __pyx_L4_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_encoding); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5100, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_encoding}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5101, __pyx_L4_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5100, __pyx_L4_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -61402,19 +61404,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__strencode(PyObject *__pyx_v_pystr, #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_encoding}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5101, __pyx_L4_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5100, __pyx_L4_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5101, __pyx_L4_error) + __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5100, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; __Pyx_INCREF(__pyx_v_encoding); __Pyx_GIVEREF(__pyx_v_encoding); PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_encoding); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5101, __pyx_L4_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5100, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -61424,7 +61426,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__strencode(PyObject *__pyx_v_pystr, __pyx_t_3 = 0; goto __pyx_L8_try_return; - /* "netCDF4/_netCDF4.pyx":5100 + /* "netCDF4/_netCDF4.pyx":5099 * if encoding is None: * encoding = default_encoding * try: # <<<<<<<<<<<<<< @@ -61439,7 +61441,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__strencode(PyObject *__pyx_v_pystr, __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":5102 + /* "netCDF4/_netCDF4.pyx":5101 * try: * return pystr.encode(encoding) * except (AttributeError, UnicodeDecodeError): # <<<<<<<<<<<<<< @@ -61449,12 +61451,12 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__strencode(PyObject *__pyx_v_pystr, __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); if (__pyx_t_10) { __Pyx_AddTraceback("netCDF4._netCDF4._strencode", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_7, &__pyx_t_9) < 0) __PYX_ERR(0, 5102, __pyx_L6_except_error) + if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_7, &__pyx_t_9) < 0) __PYX_ERR(0, 5101, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_9); - /* "netCDF4/_netCDF4.pyx":5103 + /* "netCDF4/_netCDF4.pyx":5102 * return pystr.encode(encoding) * except (AttributeError, UnicodeDecodeError): * return pystr # already bytes or unicode? # <<<<<<<<<<<<<< @@ -61472,7 +61474,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__strencode(PyObject *__pyx_v_pystr, goto __pyx_L6_except_error; __pyx_L6_except_error:; - /* "netCDF4/_netCDF4.pyx":5100 + /* "netCDF4/_netCDF4.pyx":5099 * if encoding is None: * encoding = default_encoding * try: # <<<<<<<<<<<<<< @@ -61501,7 +61503,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__strencode(PyObject *__pyx_v_pystr, goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":5095 + /* "netCDF4/_netCDF4.pyx":5094 * return EnumType(group, dt, name, enum_dict, typeid=xtype) * * cdef _strencode(pystr,encoding=None): # <<<<<<<<<<<<<< @@ -61524,7 +61526,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__strencode(PyObject *__pyx_v_pystr, return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5105 +/* "netCDF4/_netCDF4.pyx":5104 * return pystr # already bytes or unicode? * * def _to_ascii(bytestr): # <<<<<<<<<<<<<< @@ -61555,20 +61557,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6_to_ascii(CYTHON_UNUSED PyObject * PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("_to_ascii", 0); - /* "netCDF4/_netCDF4.pyx":5107 + /* "netCDF4/_netCDF4.pyx":5106 * def _to_ascii(bytestr): * # encode a byte string to an ascii encoded string. * if python3: # <<<<<<<<<<<<<< * return str(bytestr,encoding='ascii') * else: */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5107, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5107, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5106, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":5108 + /* "netCDF4/_netCDF4.pyx":5107 * # encode a byte string to an ascii encoded string. * if python3: * return str(bytestr,encoding='ascii') # <<<<<<<<<<<<<< @@ -61576,15 +61578,15 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6_to_ascii(CYTHON_UNUSED PyObject * * return bytestr.encode('ascii') */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5108, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_bytestr); __Pyx_GIVEREF(__pyx_v_bytestr); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_bytestr); - __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5108, __pyx_L1_error) + __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_encoding, __pyx_n_s_ascii) < 0) __PYX_ERR(0, 5108, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5108, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_encoding, __pyx_n_s_ascii) < 0) __PYX_ERR(0, 5107, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -61592,7 +61594,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6_to_ascii(CYTHON_UNUSED PyObject * __pyx_t_4 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":5107 + /* "netCDF4/_netCDF4.pyx":5106 * def _to_ascii(bytestr): * # encode a byte string to an ascii encoded string. * if python3: # <<<<<<<<<<<<<< @@ -61601,7 +61603,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6_to_ascii(CYTHON_UNUSED PyObject * */ } - /* "netCDF4/_netCDF4.pyx":5110 + /* "netCDF4/_netCDF4.pyx":5109 * return str(bytestr,encoding='ascii') * else: * return bytestr.encode('ascii') # <<<<<<<<<<<<<< @@ -61610,9 +61612,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6_to_ascii(CYTHON_UNUSED PyObject * */ /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_bytestr, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5110, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_bytestr, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__106, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5110, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__106, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; @@ -61620,7 +61622,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6_to_ascii(CYTHON_UNUSED PyObject * goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":5105 + /* "netCDF4/_netCDF4.pyx":5104 * return pystr # already bytes or unicode? * * def _to_ascii(bytestr): # <<<<<<<<<<<<<< @@ -61641,7 +61643,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6_to_ascii(CYTHON_UNUSED PyObject * return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5122 +/* "netCDF4/_netCDF4.pyx":5121 * gregorian = datetime(1582,10,15) * * def _dateparse(timestr): # <<<<<<<<<<<<<< @@ -61694,14 +61696,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8_dateparse(CYTHON_UNUSED PyObject int __pyx_t_13; __Pyx_RefNannySetupContext("_dateparse", 0); - /* "netCDF4/_netCDF4.pyx":5127 + /* "netCDF4/_netCDF4.pyx":5126 * # same as version in netcdftime, but returns a timezone naive * # python datetime instance with the utc_offset included. * timestr_split = timestr.split() # <<<<<<<<<<<<<< * units = timestr_split[0].lower() * if timestr_split[1].lower() != 'since': */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_timestr, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5127, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_timestr, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -61714,26 +61716,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8_dateparse(CYTHON_UNUSED PyObject } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5127, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5126, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5127, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5126, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_timestr_split = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5128 + /* "netCDF4/_netCDF4.pyx":5127 * # python datetime instance with the utc_offset included. * timestr_split = timestr.split() * units = timestr_split[0].lower() # <<<<<<<<<<<<<< * if timestr_split[1].lower() != 'since': * raise ValueError("no 'since' in unit_string") */ - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_timestr_split, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5128, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_timestr_split, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_lower); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5128, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_lower); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -61747,26 +61749,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8_dateparse(CYTHON_UNUSED PyObject } } if (__pyx_t_2) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5128, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5127, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5128, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5127, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_units = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5129 + /* "netCDF4/_netCDF4.pyx":5128 * timestr_split = timestr.split() * units = timestr_split[0].lower() * if timestr_split[1].lower() != 'since': # <<<<<<<<<<<<<< * raise ValueError("no 'since' in unit_string") * # parse the date string. */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_timestr_split, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5129, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_timestr_split, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5129, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -61780,31 +61782,31 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8_dateparse(CYTHON_UNUSED PyObject } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5129, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5128, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5129, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5128, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_since, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 5129, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_since, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 5128, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":5130 + /* "netCDF4/_netCDF4.pyx":5129 * units = timestr_split[0].lower() * if timestr_split[1].lower() != 'since': * raise ValueError("no 'since' in unit_string") # <<<<<<<<<<<<<< * # parse the date string. * n = timestr.find('since')+6 */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__107, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5130, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__107, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 5130, __pyx_L1_error) + __PYX_ERR(0, 5129, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5129 + /* "netCDF4/_netCDF4.pyx":5128 * timestr_split = timestr.split() * units = timestr_split[0].lower() * if timestr_split[1].lower() != 'since': # <<<<<<<<<<<<<< @@ -61813,46 +61815,46 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8_dateparse(CYTHON_UNUSED PyObject */ } - /* "netCDF4/_netCDF4.pyx":5132 + /* "netCDF4/_netCDF4.pyx":5131 * raise ValueError("no 'since' in unit_string") * # parse the date string. * n = timestr.find('since')+6 # <<<<<<<<<<<<<< * isostring = timestr[n:] * year, month, day, hour, minute, second, utc_offset =\ */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_timestr, __pyx_n_s_find); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5132, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_timestr, __pyx_n_s_find); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__108, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5132, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__108, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_6, 6, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5132, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_6, 6, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_n = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5133 + /* "netCDF4/_netCDF4.pyx":5132 * # parse the date string. * n = timestr.find('since')+6 * isostring = timestr[n:] # <<<<<<<<<<<<<< * year, month, day, hour, minute, second, utc_offset =\ * _parse_date( isostring.strip() ) */ - __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_timestr, 0, 0, &__pyx_v_n, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5133, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_timestr, 0, 0, &__pyx_v_n, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_isostring = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5135 + /* "netCDF4/_netCDF4.pyx":5134 * isostring = timestr[n:] * year, month, day, hour, minute, second, utc_offset =\ * _parse_date( isostring.strip() ) # <<<<<<<<<<<<<< * if year >= MINYEAR: * basedate = datetime(year, month, day, hour, minute, second) */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_parse_date); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5135, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_parse_date); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_isostring, __pyx_n_s_strip); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5135, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_isostring, __pyx_n_s_strip); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -61865,10 +61867,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8_dateparse(CYTHON_UNUSED PyObject } } if (__pyx_t_6) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5135, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5134, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5135, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5134, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -61883,14 +61885,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8_dateparse(CYTHON_UNUSED PyObject } } if (!__pyx_t_5) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5135, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5134, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5135, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5134, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -61899,20 +61901,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8_dateparse(CYTHON_UNUSED PyObject #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5135, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5134, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5135, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5135, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -61928,7 +61930,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8_dateparse(CYTHON_UNUSED PyObject if (unlikely(size != 7)) { if (size > 7) __Pyx_RaiseTooManyValuesError(7); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 5134, __pyx_L1_error) + __PYX_ERR(0, 5133, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -61960,7 +61962,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8_dateparse(CYTHON_UNUSED PyObject Py_ssize_t i; PyObject** temps[7] = {&__pyx_t_2,&__pyx_t_6,&__pyx_t_3,&__pyx_t_5,&__pyx_t_7,&__pyx_t_8,&__pyx_t_9}; for (i=0; i < 7; i++) { - PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 5134, __pyx_L1_error) + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 5133, __pyx_L1_error) __Pyx_GOTREF(item); *(temps[i]) = item; } @@ -61970,7 +61972,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8_dateparse(CYTHON_UNUSED PyObject } else { Py_ssize_t index = -1; PyObject** temps[7] = {&__pyx_t_2,&__pyx_t_6,&__pyx_t_3,&__pyx_t_5,&__pyx_t_7,&__pyx_t_8,&__pyx_t_9}; - __pyx_t_10 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5134, __pyx_L1_error) + __pyx_t_10 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext; @@ -61979,7 +61981,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8_dateparse(CYTHON_UNUSED PyObject __Pyx_GOTREF(item); *(temps[index]) = item; } - if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 7) < 0) __PYX_ERR(0, 5134, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 7) < 0) __PYX_ERR(0, 5133, __pyx_L1_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L5_unpacking_done; @@ -61987,11 +61989,11 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8_dateparse(CYTHON_UNUSED PyObject __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 5134, __pyx_L1_error) + __PYX_ERR(0, 5133, __pyx_L1_error) __pyx_L5_unpacking_done:; } - /* "netCDF4/_netCDF4.pyx":5134 + /* "netCDF4/_netCDF4.pyx":5133 * n = timestr.find('since')+6 * isostring = timestr[n:] * year, month, day, hour, minute, second, utc_offset =\ # <<<<<<<<<<<<<< @@ -62013,29 +62015,29 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8_dateparse(CYTHON_UNUSED PyObject __pyx_v_utc_offset = __pyx_t_9; __pyx_t_9 = 0; - /* "netCDF4/_netCDF4.pyx":5136 + /* "netCDF4/_netCDF4.pyx":5135 * year, month, day, hour, minute, second, utc_offset =\ * _parse_date( isostring.strip() ) * if year >= MINYEAR: # <<<<<<<<<<<<<< * basedate = datetime(year, month, day, hour, minute, second) * # add utc_offset to basedate time instance (which is timezone naive) */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_MINYEAR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5136, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_MINYEAR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = PyObject_RichCompare(__pyx_v_year, __pyx_t_1, Py_GE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5136, __pyx_L1_error) + __pyx_t_9 = PyObject_RichCompare(__pyx_v_year, __pyx_t_1, Py_GE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5135, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 5136, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 5135, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":5137 + /* "netCDF4/_netCDF4.pyx":5136 * _parse_date( isostring.strip() ) * if year >= MINYEAR: * basedate = datetime(year, month, day, hour, minute, second) # <<<<<<<<<<<<<< * # add utc_offset to basedate time instance (which is timezone naive) * basedate += timedelta(days=utc_offset/1440.) */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5137, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = NULL; __pyx_t_12 = 0; @@ -62052,7 +62054,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8_dateparse(CYTHON_UNUSED PyObject #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[7] = {__pyx_t_8, __pyx_v_year, __pyx_v_month, __pyx_v_day, __pyx_v_hour, __pyx_v_minute, __pyx_v_second}; - __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_12, 6+__pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5137, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_12, 6+__pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5136, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_9); } else @@ -62060,13 +62062,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8_dateparse(CYTHON_UNUSED PyObject #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[7] = {__pyx_t_8, __pyx_v_year, __pyx_v_month, __pyx_v_day, __pyx_v_hour, __pyx_v_minute, __pyx_v_second}; - __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_12, 6+__pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5137, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_12, 6+__pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5136, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_9); } else #endif { - __pyx_t_7 = PyTuple_New(6+__pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5137, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(6+__pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); __pyx_t_8 = NULL; @@ -62089,7 +62091,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8_dateparse(CYTHON_UNUSED PyObject __Pyx_INCREF(__pyx_v_second); __Pyx_GIVEREF(__pyx_v_second); PyTuple_SET_ITEM(__pyx_t_7, 5+__pyx_t_12, __pyx_v_second); - __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5137, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -62097,32 +62099,32 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8_dateparse(CYTHON_UNUSED PyObject __pyx_v_basedate = __pyx_t_9; __pyx_t_9 = 0; - /* "netCDF4/_netCDF4.pyx":5139 + /* "netCDF4/_netCDF4.pyx":5138 * basedate = datetime(year, month, day, hour, minute, second) * # add utc_offset to basedate time instance (which is timezone naive) * basedate += timedelta(days=utc_offset/1440.) # <<<<<<<<<<<<<< * else: * if not utc_offset: */ - __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_timedelta); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5139, __pyx_L1_error) + __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_timedelta); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5139, __pyx_L1_error) + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyFloat_DivideObjC(__pyx_v_utc_offset, __pyx_float_1440_, 1440., 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5139, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyFloat_DivideObjC(__pyx_v_utc_offset, __pyx_float_1440_, 1440., 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_days, __pyx_t_7) < 0) __PYX_ERR(0, 5139, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_days, __pyx_t_7) < 0) __PYX_ERR(0, 5138, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5139, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_basedate, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5139, __pyx_L1_error) + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_basedate, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF_SET(__pyx_v_basedate, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5136 + /* "netCDF4/_netCDF4.pyx":5135 * year, month, day, hour, minute, second, utc_offset =\ * _parse_date( isostring.strip() ) * if year >= MINYEAR: # <<<<<<<<<<<<<< @@ -62132,7 +62134,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8_dateparse(CYTHON_UNUSED PyObject goto __pyx_L6; } - /* "netCDF4/_netCDF4.pyx":5141 + /* "netCDF4/_netCDF4.pyx":5140 * basedate += timedelta(days=utc_offset/1440.) * else: * if not utc_offset: # <<<<<<<<<<<<<< @@ -62140,20 +62142,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8_dateparse(CYTHON_UNUSED PyObject * else: */ /*else*/ { - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_utc_offset); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 5141, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_utc_offset); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 5140, __pyx_L1_error) __pyx_t_13 = ((!__pyx_t_4) != 0); if (__pyx_t_13) { - /* "netCDF4/_netCDF4.pyx":5142 + /* "netCDF4/_netCDF4.pyx":5141 * else: * if not utc_offset: * basedate = netcdftime.datetime(year, month, day, hour, minute, second) # <<<<<<<<<<<<<< * else: * raise ValueError('cannot use utc_offset for reference years <= 0') */ - __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdftime); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5142, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdftime); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_datetime); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5142, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_datetime); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; @@ -62171,7 +62173,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8_dateparse(CYTHON_UNUSED PyObject #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_9)) { PyObject *__pyx_temp[7] = {__pyx_t_7, __pyx_v_year, __pyx_v_month, __pyx_v_day, __pyx_v_hour, __pyx_v_minute, __pyx_v_second}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_12, 6+__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5142, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_12, 6+__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5141, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -62179,13 +62181,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8_dateparse(CYTHON_UNUSED PyObject #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) { PyObject *__pyx_temp[7] = {__pyx_t_7, __pyx_v_year, __pyx_v_month, __pyx_v_day, __pyx_v_hour, __pyx_v_minute, __pyx_v_second}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_12, 6+__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5142, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_12, 6+__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5141, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_8 = PyTuple_New(6+__pyx_t_12); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5142, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(6+__pyx_t_12); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -62208,7 +62210,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8_dateparse(CYTHON_UNUSED PyObject __Pyx_INCREF(__pyx_v_second); __Pyx_GIVEREF(__pyx_v_second); PyTuple_SET_ITEM(__pyx_t_8, 5+__pyx_t_12, __pyx_v_second); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5142, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -62216,7 +62218,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8_dateparse(CYTHON_UNUSED PyObject __pyx_v_basedate = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5141 + /* "netCDF4/_netCDF4.pyx":5140 * basedate += timedelta(days=utc_offset/1440.) * else: * if not utc_offset: # <<<<<<<<<<<<<< @@ -62226,7 +62228,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8_dateparse(CYTHON_UNUSED PyObject goto __pyx_L7; } - /* "netCDF4/_netCDF4.pyx":5144 + /* "netCDF4/_netCDF4.pyx":5143 * basedate = netcdftime.datetime(year, month, day, hour, minute, second) * else: * raise ValueError('cannot use utc_offset for reference years <= 0') # <<<<<<<<<<<<<< @@ -62234,17 +62236,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8_dateparse(CYTHON_UNUSED PyObject * */ /*else*/ { - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__109, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5144, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__109, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 5144, __pyx_L1_error) + __PYX_ERR(0, 5143, __pyx_L1_error) } __pyx_L7:; } __pyx_L6:; - /* "netCDF4/_netCDF4.pyx":5145 + /* "netCDF4/_netCDF4.pyx":5144 * else: * raise ValueError('cannot use utc_offset for reference years <= 0') * return basedate # <<<<<<<<<<<<<< @@ -62256,7 +62258,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8_dateparse(CYTHON_UNUSED PyObject __pyx_r = __pyx_v_basedate; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":5122 + /* "netCDF4/_netCDF4.pyx":5121 * gregorian = datetime(1582,10,15) * * def _dateparse(timestr): # <<<<<<<<<<<<<< @@ -62295,7 +62297,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8_dateparse(CYTHON_UNUSED PyObject return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5147 +/* "netCDF4/_netCDF4.pyx":5146 * return basedate * * def stringtoarr(string,NUMCHARS,dtype='S'): # <<<<<<<<<<<<<< @@ -62336,7 +62338,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_11stringtoarr(PyObject *__pyx_self, case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_NUMCHARS)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("stringtoarr", 0, 2, 3, 1); __PYX_ERR(0, 5147, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("stringtoarr", 0, 2, 3, 1); __PYX_ERR(0, 5146, __pyx_L3_error) } case 2: if (kw_args > 0) { @@ -62345,7 +62347,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_11stringtoarr(PyObject *__pyx_self, } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "stringtoarr") < 0)) __PYX_ERR(0, 5147, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "stringtoarr") < 0)) __PYX_ERR(0, 5146, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -62362,7 +62364,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_11stringtoarr(PyObject *__pyx_self, } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("stringtoarr", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5147, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("stringtoarr", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5146, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("netCDF4._netCDF4.stringtoarr", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -62390,7 +62392,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10stringtoarr(CYTHON_UNUSED PyObjec Py_ssize_t __pyx_t_9; __Pyx_RefNannySetupContext("stringtoarr", 0); - /* "netCDF4/_netCDF4.pyx":5164 + /* "netCDF4/_netCDF4.pyx":5163 * returns a rank 1 numpy character array of length NUMCHARS with datatype `'S1'` * (default) or `'U1'` (if dtype=`'U'`)""" * if dtype not in ["S","U"]: # <<<<<<<<<<<<<< @@ -62399,33 +62401,33 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10stringtoarr(CYTHON_UNUSED PyObjec */ __Pyx_INCREF(__pyx_v_dtype); __pyx_t_1 = __pyx_v_dtype; - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_S, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5164, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_S, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5163, __pyx_L1_error) if (__pyx_t_3) { } else { __pyx_t_2 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_U, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5164, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_U, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5163, __pyx_L1_error) __pyx_t_2 = __pyx_t_3; __pyx_L4_bool_binop_done:; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":5165 + /* "netCDF4/_netCDF4.pyx":5164 * (default) or `'U1'` (if dtype=`'U'`)""" * if dtype not in ["S","U"]: * raise ValueError("dtype must string or unicode ('S' or 'U')") # <<<<<<<<<<<<<< * arr = numpy.zeros(NUMCHARS,dtype+'1') * arr[0:len(string)] = tuple(string) */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__110, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5165, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__110, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 5165, __pyx_L1_error) + __PYX_ERR(0, 5164, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5164 + /* "netCDF4/_netCDF4.pyx":5163 * returns a rank 1 numpy character array of length NUMCHARS with datatype `'S1'` * (default) or `'U1'` (if dtype=`'U'`)""" * if dtype not in ["S","U"]: # <<<<<<<<<<<<<< @@ -62434,19 +62436,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10stringtoarr(CYTHON_UNUSED PyObjec */ } - /* "netCDF4/_netCDF4.pyx":5166 + /* "netCDF4/_netCDF4.pyx":5165 * if dtype not in ["S","U"]: * raise ValueError("dtype must string or unicode ('S' or 'U')") * arr = numpy.zeros(NUMCHARS,dtype+'1') # <<<<<<<<<<<<<< * arr[0:len(string)] = tuple(string) * return arr */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5166, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5166, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyNumber_Add(__pyx_v_dtype, __pyx_kp_s_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5166, __pyx_L1_error) + __pyx_t_4 = PyNumber_Add(__pyx_v_dtype, __pyx_kp_s_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; __pyx_t_7 = 0; @@ -62463,7 +62465,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10stringtoarr(CYTHON_UNUSED PyObjec #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_NUMCHARS, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5166, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5165, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -62472,14 +62474,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10stringtoarr(CYTHON_UNUSED PyObjec #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_NUMCHARS, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5166, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5165, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { - __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5166, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -62490,7 +62492,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10stringtoarr(CYTHON_UNUSED PyObjec __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5166, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -62498,20 +62500,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10stringtoarr(CYTHON_UNUSED PyObjec __pyx_v_arr = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5167 + /* "netCDF4/_netCDF4.pyx":5166 * raise ValueError("dtype must string or unicode ('S' or 'U')") * arr = numpy.zeros(NUMCHARS,dtype+'1') * arr[0:len(string)] = tuple(string) # <<<<<<<<<<<<<< * return arr * */ - __pyx_t_1 = PySequence_Tuple(__pyx_v_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5167, __pyx_L1_error) + __pyx_t_1 = PySequence_Tuple(__pyx_v_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = PyObject_Length(__pyx_v_string); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 5167, __pyx_L1_error) - if (__Pyx_PyObject_SetSlice(__pyx_v_arr, __pyx_t_1, 0, __pyx_t_9, NULL, NULL, NULL, 1, 1, 1) < 0) __PYX_ERR(0, 5167, __pyx_L1_error) + __pyx_t_9 = PyObject_Length(__pyx_v_string); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 5166, __pyx_L1_error) + if (__Pyx_PyObject_SetSlice(__pyx_v_arr, __pyx_t_1, 0, __pyx_t_9, NULL, NULL, NULL, 1, 1, 1) < 0) __PYX_ERR(0, 5166, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5168 + /* "netCDF4/_netCDF4.pyx":5167 * arr = numpy.zeros(NUMCHARS,dtype+'1') * arr[0:len(string)] = tuple(string) * return arr # <<<<<<<<<<<<<< @@ -62523,7 +62525,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10stringtoarr(CYTHON_UNUSED PyObjec __pyx_r = __pyx_v_arr; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":5147 + /* "netCDF4/_netCDF4.pyx":5146 * return basedate * * def stringtoarr(string,NUMCHARS,dtype='S'): # <<<<<<<<<<<<<< @@ -62547,7 +62549,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10stringtoarr(CYTHON_UNUSED PyObjec return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5170 +/* "netCDF4/_netCDF4.pyx":5169 * return arr * * def stringtochar(a): # <<<<<<<<<<<<<< @@ -62587,22 +62589,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12stringtochar(CYTHON_UNUSED PyObje int __pyx_t_10; __Pyx_RefNannySetupContext("stringtochar", 0); - /* "netCDF4/_netCDF4.pyx":5182 + /* "netCDF4/_netCDF4.pyx":5181 * returns a numpy character array with datatype `'S1'` or `'U1'` * and shape `a.shape + (N,)`, where N is the length of each string in a.""" * dtype = a.dtype.kind # <<<<<<<<<<<<<< * if dtype not in ["S","U"]: * raise ValueError("type must string or unicode ('S' or 'U')") */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5182, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_kind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5182, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_kind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dtype = __pyx_t_2; __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5183 + /* "netCDF4/_netCDF4.pyx":5182 * and shape `a.shape + (N,)`, where N is the length of each string in a.""" * dtype = a.dtype.kind * if dtype not in ["S","U"]: # <<<<<<<<<<<<<< @@ -62611,33 +62613,33 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12stringtochar(CYTHON_UNUSED PyObje */ __Pyx_INCREF(__pyx_v_dtype); __pyx_t_2 = __pyx_v_dtype; - __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_S, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 5183, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_S, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 5182, __pyx_L1_error) if (__pyx_t_4) { } else { __pyx_t_3 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } - __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_U, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 5183, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_U, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 5182, __pyx_L1_error) __pyx_t_3 = __pyx_t_4; __pyx_L4_bool_binop_done:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":5184 + /* "netCDF4/_netCDF4.pyx":5183 * dtype = a.dtype.kind * if dtype not in ["S","U"]: * raise ValueError("type must string or unicode ('S' or 'U')") # <<<<<<<<<<<<<< * b = numpy.array(tuple(a.tostring().decode(default_encoding)),dtype+'1') * b.shape = a.shape + (a.itemsize,) */ - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__111, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5184, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__111, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 5184, __pyx_L1_error) + __PYX_ERR(0, 5183, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5183 + /* "netCDF4/_netCDF4.pyx":5182 * and shape `a.shape + (N,)`, where N is the length of each string in a.""" * dtype = a.dtype.kind * if dtype not in ["S","U"]: # <<<<<<<<<<<<<< @@ -62646,19 +62648,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12stringtochar(CYTHON_UNUSED PyObje */ } - /* "netCDF4/_netCDF4.pyx":5185 + /* "netCDF4/_netCDF4.pyx":5184 * if dtype not in ["S","U"]: * raise ValueError("type must string or unicode ('S' or 'U')") * b = numpy.array(tuple(a.tostring().decode(default_encoding)),dtype+'1') # <<<<<<<<<<<<<< * b.shape = a.shape + (a.itemsize,) * return b */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5185, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5185, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s_tostring); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5185, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s_tostring); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -62671,17 +62673,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12stringtochar(CYTHON_UNUSED PyObje } } if (__pyx_t_8) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5185, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5184, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else { - __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5185, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5184, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_decode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5185, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_decode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5185, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -62694,14 +62696,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12stringtochar(CYTHON_UNUSED PyObje } } if (!__pyx_t_8) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5185, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5184, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5185, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5184, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -62710,29 +62712,29 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12stringtochar(CYTHON_UNUSED PyObje #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5185, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5184, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { - __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5185, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6); __pyx_t_6 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5185, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5185, __pyx_L1_error) + __pyx_t_7 = PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Add(__pyx_v_dtype, __pyx_kp_s_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5185, __pyx_L1_error) + __pyx_t_1 = PyNumber_Add(__pyx_v_dtype, __pyx_kp_s_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = NULL; __pyx_t_10 = 0; @@ -62749,7 +62751,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12stringtochar(CYTHON_UNUSED PyObje #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_7, __pyx_t_1}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5185, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5184, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -62759,7 +62761,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12stringtochar(CYTHON_UNUSED PyObje #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_7, __pyx_t_1}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5185, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5184, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -62767,7 +62769,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12stringtochar(CYTHON_UNUSED PyObje } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5185, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_9) { __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_9); __pyx_t_9 = NULL; @@ -62778,7 +62780,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12stringtochar(CYTHON_UNUSED PyObje PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_10, __pyx_t_1); __pyx_t_7 = 0; __pyx_t_1 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5185, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -62786,30 +62788,30 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12stringtochar(CYTHON_UNUSED PyObje __pyx_v_b = __pyx_t_2; __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5186 + /* "netCDF4/_netCDF4.pyx":5185 * raise ValueError("type must string or unicode ('S' or 'U')") * b = numpy.array(tuple(a.tostring().decode(default_encoding)),dtype+'1') * b.shape = a.shape + (a.itemsize,) # <<<<<<<<<<<<<< * return b * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5186, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5186, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5186, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyNumber_Add(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5186, __pyx_L1_error) + __pyx_t_5 = PyNumber_Add(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (__Pyx_PyObject_SetAttrStr(__pyx_v_b, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(0, 5186, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_b, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(0, 5185, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":5187 + /* "netCDF4/_netCDF4.pyx":5186 * b = numpy.array(tuple(a.tostring().decode(default_encoding)),dtype+'1') * b.shape = a.shape + (a.itemsize,) * return b # <<<<<<<<<<<<<< @@ -62821,7 +62823,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12stringtochar(CYTHON_UNUSED PyObje __pyx_r = __pyx_v_b; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":5170 + /* "netCDF4/_netCDF4.pyx":5169 * return arr * * def stringtochar(a): # <<<<<<<<<<<<<< @@ -62848,7 +62850,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12stringtochar(CYTHON_UNUSED PyObje return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5189 +/* "netCDF4/_netCDF4.pyx":5188 * return b * * def chartostring(b): # <<<<<<<<<<<<<< @@ -62892,22 +62894,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_14chartostring(CYTHON_UNUSED PyObje int __pyx_t_11; __Pyx_RefNannySetupContext("chartostring", 0); - /* "netCDF4/_netCDF4.pyx":5201 + /* "netCDF4/_netCDF4.pyx":5200 * returns a numpy string array with datatype `'SN'` or `'UN'` and shape * `b.shape[:-1]` where where `N=b.shape[-1]`.""" * dtype = b.dtype.kind # <<<<<<<<<<<<<< * if dtype not in ["S","U"]: * raise ValueError("type must string or unicode ('S' or 'U')") */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5201, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_kind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5201, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_kind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dtype = __pyx_t_2; __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5202 + /* "netCDF4/_netCDF4.pyx":5201 * `b.shape[:-1]` where where `N=b.shape[-1]`.""" * dtype = b.dtype.kind * if dtype not in ["S","U"]: # <<<<<<<<<<<<<< @@ -62916,33 +62918,33 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_14chartostring(CYTHON_UNUSED PyObje */ __Pyx_INCREF(__pyx_v_dtype); __pyx_t_2 = __pyx_v_dtype; - __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_S, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 5202, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_S, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 5201, __pyx_L1_error) if (__pyx_t_4) { } else { __pyx_t_3 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } - __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_U, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 5202, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_U, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 5201, __pyx_L1_error) __pyx_t_3 = __pyx_t_4; __pyx_L4_bool_binop_done:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":5203 + /* "netCDF4/_netCDF4.pyx":5202 * dtype = b.dtype.kind * if dtype not in ["S","U"]: * raise ValueError("type must string or unicode ('S' or 'U')") # <<<<<<<<<<<<<< * bs = b.tostring().decode(default_encoding) * slen = int(b.shape[-1]) */ - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__112, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5203, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__112, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 5203, __pyx_L1_error) + __PYX_ERR(0, 5202, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5202 + /* "netCDF4/_netCDF4.pyx":5201 * `b.shape[:-1]` where where `N=b.shape[-1]`.""" * dtype = b.dtype.kind * if dtype not in ["S","U"]: # <<<<<<<<<<<<<< @@ -62951,14 +62953,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_14chartostring(CYTHON_UNUSED PyObje */ } - /* "netCDF4/_netCDF4.pyx":5204 + /* "netCDF4/_netCDF4.pyx":5203 * if dtype not in ["S","U"]: * raise ValueError("type must string or unicode ('S' or 'U')") * bs = b.tostring().decode(default_encoding) # <<<<<<<<<<<<<< * slen = int(b.shape[-1]) * a = numpy.array([bs[n1:n1+slen] for n1 in range(0,len(bs),slen)],dtype+repr(slen)) */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_tostring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5204, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_tostring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -62971,17 +62973,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_14chartostring(CYTHON_UNUSED PyObje } } if (__pyx_t_6) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5204, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5203, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5204, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5203, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_decode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5204, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_decode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5204, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -62994,14 +62996,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_14chartostring(CYTHON_UNUSED PyObje } } if (!__pyx_t_6) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5204, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5203, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_1}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5204, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5203, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -63010,20 +63012,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_14chartostring(CYTHON_UNUSED PyObje #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_1}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5204, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5203, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else #endif { - __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5204, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5203, __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_1); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5204, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -63032,42 +63034,42 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_14chartostring(CYTHON_UNUSED PyObje __pyx_v_bs = __pyx_t_2; __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5205 + /* "netCDF4/_netCDF4.pyx":5204 * raise ValueError("type must string or unicode ('S' or 'U')") * bs = b.tostring().decode(default_encoding) * slen = int(b.shape[-1]) # <<<<<<<<<<<<<< * a = numpy.array([bs[n1:n1+slen] for n1 in range(0,len(bs),slen)],dtype+repr(slen)) * a.shape = b.shape[:-1] */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5205, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_2, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5205, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_2, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5205, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_slen = __pyx_t_2; __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5206 + /* "netCDF4/_netCDF4.pyx":5205 * bs = b.tostring().decode(default_encoding) * slen = int(b.shape[-1]) * a = numpy.array([bs[n1:n1+slen] for n1 in range(0,len(bs),slen)],dtype+repr(slen)) # <<<<<<<<<<<<<< * a.shape = b.shape[:-1] * return a */ - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5206, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5206, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5206, __pyx_L1_error) + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_8 = PyObject_Length(__pyx_v_bs); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 5206, __pyx_L1_error) - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5206, __pyx_L1_error) + __pyx_t_8 = PyObject_Length(__pyx_v_bs); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 5205, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5206, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); @@ -63078,16 +63080,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_14chartostring(CYTHON_UNUSED PyObje __Pyx_GIVEREF(__pyx_v_slen); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_slen); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5206, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_6 = __pyx_t_1; __Pyx_INCREF(__pyx_t_6); __pyx_t_8 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5206, __pyx_L1_error) + __pyx_t_8 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_9 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5206, __pyx_L1_error) + __pyx_t_9 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5205, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -63095,17 +63097,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_14chartostring(CYTHON_UNUSED PyObje if (likely(PyList_CheckExact(__pyx_t_6))) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 5206, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 5205, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5206, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 5206, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 5205, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5206, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -63115,7 +63117,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_14chartostring(CYTHON_UNUSED PyObje PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 5206, __pyx_L1_error) + else __PYX_ERR(0, 5205, __pyx_L1_error) } break; } @@ -63123,18 +63125,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_14chartostring(CYTHON_UNUSED PyObje } __Pyx_XDECREF_SET(__pyx_v_n1, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Add(__pyx_v_n1, __pyx_v_slen); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5206, __pyx_L1_error) + __pyx_t_1 = PyNumber_Add(__pyx_v_n1, __pyx_v_slen); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_10 = __Pyx_PyObject_GetSlice(__pyx_v_bs, 0, 0, &__pyx_v_n1, &__pyx_t_1, NULL, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5206, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_GetSlice(__pyx_v_bs, 0, 0, &__pyx_v_n1, &__pyx_t_1, NULL, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_10))) __PYX_ERR(0, 5206, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_10))) __PYX_ERR(0, 5205, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyObject_Repr(__pyx_v_slen); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5206, __pyx_L1_error) + __pyx_t_6 = PyObject_Repr(__pyx_v_slen); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_10 = PyNumber_Add(__pyx_v_dtype, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5206, __pyx_L1_error) + __pyx_t_10 = PyNumber_Add(__pyx_v_dtype, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -63152,7 +63154,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_14chartostring(CYTHON_UNUSED PyObje #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_5, __pyx_t_10}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5206, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5205, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -63162,7 +63164,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_14chartostring(CYTHON_UNUSED PyObje #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_5, __pyx_t_10}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5206, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5205, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -63170,7 +63172,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_14chartostring(CYTHON_UNUSED PyObje } else #endif { - __pyx_t_1 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5206, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -63181,7 +63183,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_14chartostring(CYTHON_UNUSED PyObje PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_11, __pyx_t_10); __pyx_t_5 = 0; __pyx_t_10 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5206, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } @@ -63189,22 +63191,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_14chartostring(CYTHON_UNUSED PyObje __pyx_v_a = __pyx_t_2; __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5207 + /* "netCDF4/_netCDF4.pyx":5206 * slen = int(b.shape[-1]) * a = numpy.array([bs[n1:n1+slen] for n1 in range(0,len(bs),slen)],dtype+repr(slen)) * a.shape = b.shape[:-1] # <<<<<<<<<<<<<< * return a * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5207, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_t_2, 0, -1L, NULL, NULL, &__pyx_slice__113, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5207, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_t_2, 0, -1L, NULL, NULL, &__pyx_slice__113, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_shape, __pyx_t_7) < 0) __PYX_ERR(0, 5207, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_shape, __pyx_t_7) < 0) __PYX_ERR(0, 5206, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5208 + /* "netCDF4/_netCDF4.pyx":5207 * a = numpy.array([bs[n1:n1+slen] for n1 in range(0,len(bs),slen)],dtype+repr(slen)) * a.shape = b.shape[:-1] * return a # <<<<<<<<<<<<<< @@ -63216,7 +63218,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_14chartostring(CYTHON_UNUSED PyObje __pyx_r = __pyx_v_a; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":5189 + /* "netCDF4/_netCDF4.pyx":5188 * return b * * def chartostring(b): # <<<<<<<<<<<<<< @@ -63245,7 +63247,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_14chartostring(CYTHON_UNUSED PyObje return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5210 +/* "netCDF4/_netCDF4.pyx":5209 * return a * * def date2num(dates,units,calendar='standard'): # <<<<<<<<<<<<<< @@ -63286,7 +63288,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_17date2num(PyObject *__pyx_self, Py case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_units)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("date2num", 0, 2, 3, 1); __PYX_ERR(0, 5210, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("date2num", 0, 2, 3, 1); __PYX_ERR(0, 5209, __pyx_L3_error) } case 2: if (kw_args > 0) { @@ -63295,7 +63297,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_17date2num(PyObject *__pyx_self, Py } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "date2num") < 0)) __PYX_ERR(0, 5210, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "date2num") < 0)) __PYX_ERR(0, 5209, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -63312,7 +63314,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_17date2num(PyObject *__pyx_self, Py } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("date2num", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5210, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("date2num", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5209, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("netCDF4._netCDF4.date2num", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -63360,14 +63362,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * __Pyx_INCREF(__pyx_v_dates); __Pyx_INCREF(__pyx_v_calendar); - /* "netCDF4/_netCDF4.pyx":5239 + /* "netCDF4/_netCDF4.pyx":5238 * with approximately millisecond accuracy. * """ * calendar = calendar.lower() # <<<<<<<<<<<<<< * basedate = _dateparse(units) * unit = units.split()[0].lower() */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_calendar, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5239, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_calendar, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -63380,24 +63382,24 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5239, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5238, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5239, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5238, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_calendar, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5240 + /* "netCDF4/_netCDF4.pyx":5239 * """ * calendar = calendar.lower() * basedate = _dateparse(units) # <<<<<<<<<<<<<< * unit = units.split()[0].lower() * # real-world calendars limited to positive reference years. */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_dateparse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5240, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_dateparse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -63410,13 +63412,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * } } if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_units); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5240, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_units); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_units}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5240, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5239, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -63424,19 +63426,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_units}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5240, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5239, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5240, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5239, __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_units); __Pyx_GIVEREF(__pyx_v_units); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_units); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5240, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -63445,14 +63447,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * __pyx_v_basedate = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5241 + /* "netCDF4/_netCDF4.pyx":5240 * calendar = calendar.lower() * basedate = _dateparse(units) * unit = units.split()[0].lower() # <<<<<<<<<<<<<< * # real-world calendars limited to positive reference years. * if calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']: */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_units, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5241, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_units, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -63465,17 +63467,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * } } if (__pyx_t_3) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5241, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5240, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5241, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5240, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5241, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5241, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -63489,17 +63491,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * } } if (__pyx_t_4) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5241, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5240, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5241, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5240, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_unit = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5243 + /* "netCDF4/_netCDF4.pyx":5242 * unit = units.split()[0].lower() * # real-world calendars limited to positive reference years. * if calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']: # <<<<<<<<<<<<<< @@ -63508,48 +63510,48 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * */ __Pyx_INCREF(__pyx_v_calendar); __pyx_t_1 = __pyx_v_calendar; - __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_julian, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 5243, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_julian, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 5242, __pyx_L1_error) if (!__pyx_t_6) { } else { __pyx_t_5 = __pyx_t_6; goto __pyx_L4_bool_binop_done; } - __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_standard, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 5243, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_standard, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 5242, __pyx_L1_error) if (!__pyx_t_6) { } else { __pyx_t_5 = __pyx_t_6; goto __pyx_L4_bool_binop_done; } - __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_gregorian, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 5243, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_gregorian, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 5242, __pyx_L1_error) if (!__pyx_t_6) { } else { __pyx_t_5 = __pyx_t_6; goto __pyx_L4_bool_binop_done; } - __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_proleptic_gregorian, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 5243, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_proleptic_gregorian, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 5242, __pyx_L1_error) __pyx_t_5 = __pyx_t_6; __pyx_L4_bool_binop_done:; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "netCDF4/_netCDF4.pyx":5244 + /* "netCDF4/_netCDF4.pyx":5243 * # real-world calendars limited to positive reference years. * if calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']: * if basedate.year == 0: # <<<<<<<<<<<<<< * msg='zero not allowed as a reference year, does not exist in Julian or Gregorian calendars' * raise ValueError(msg) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_basedate, __pyx_n_s_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5244, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_basedate, __pyx_n_s_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5244, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 5244, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 5243, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_6) { - /* "netCDF4/_netCDF4.pyx":5245 + /* "netCDF4/_netCDF4.pyx":5244 * if calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']: * if basedate.year == 0: * msg='zero not allowed as a reference year, does not exist in Julian or Gregorian calendars' # <<<<<<<<<<<<<< @@ -63559,26 +63561,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * __Pyx_INCREF(__pyx_kp_s_zero_not_allowed_as_a_reference); __pyx_v_msg = __pyx_kp_s_zero_not_allowed_as_a_reference; - /* "netCDF4/_netCDF4.pyx":5246 + /* "netCDF4/_netCDF4.pyx":5245 * if basedate.year == 0: * msg='zero not allowed as a reference year, does not exist in Julian or Gregorian calendars' * raise ValueError(msg) # <<<<<<<<<<<<<< * elif basedate.year < 0: * msg='negative reference year in time units, must be >= 1' */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5246, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_msg); __Pyx_GIVEREF(__pyx_v_msg); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_msg); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5246, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 5246, __pyx_L1_error) + __PYX_ERR(0, 5245, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5244 + /* "netCDF4/_netCDF4.pyx":5243 * # real-world calendars limited to positive reference years. * if calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']: * if basedate.year == 0: # <<<<<<<<<<<<<< @@ -63587,22 +63589,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * */ } - /* "netCDF4/_netCDF4.pyx":5247 + /* "netCDF4/_netCDF4.pyx":5246 * msg='zero not allowed as a reference year, does not exist in Julian or Gregorian calendars' * raise ValueError(msg) * elif basedate.year < 0: # <<<<<<<<<<<<<< * msg='negative reference year in time units, must be >= 1' * raise ValueError(msg) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_basedate, __pyx_n_s_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5247, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_basedate, __pyx_n_s_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5247, __pyx_L1_error) + __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5246, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 5247, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 5246, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_6) { - /* "netCDF4/_netCDF4.pyx":5248 + /* "netCDF4/_netCDF4.pyx":5247 * raise ValueError(msg) * elif basedate.year < 0: * msg='negative reference year in time units, must be >= 1' # <<<<<<<<<<<<<< @@ -63612,26 +63614,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * __Pyx_INCREF(__pyx_kp_s_negative_reference_year_in_time); __pyx_v_msg = __pyx_kp_s_negative_reference_year_in_time; - /* "netCDF4/_netCDF4.pyx":5249 + /* "netCDF4/_netCDF4.pyx":5248 * elif basedate.year < 0: * msg='negative reference year in time units, must be >= 1' * raise ValueError(msg) # <<<<<<<<<<<<<< * * if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \ */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5249, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_msg); __Pyx_GIVEREF(__pyx_v_msg); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_msg); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5249, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 5249, __pyx_L1_error) + __PYX_ERR(0, 5248, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5247 + /* "netCDF4/_netCDF4.pyx":5246 * msg='zero not allowed as a reference year, does not exist in Julian or Gregorian calendars' * raise ValueError(msg) * elif basedate.year < 0: # <<<<<<<<<<<<<< @@ -63640,7 +63642,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * */ } - /* "netCDF4/_netCDF4.pyx":5243 + /* "netCDF4/_netCDF4.pyx":5242 * unit = units.split()[0].lower() * # real-world calendars limited to positive reference years. * if calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']: # <<<<<<<<<<<<<< @@ -63649,26 +63651,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * */ } - /* "netCDF4/_netCDF4.pyx":5251 + /* "netCDF4/_netCDF4.pyx":5250 * raise ValueError(msg) * * if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \ # <<<<<<<<<<<<<< * (calendar in ['gregorian','standard'] and basedate > gregorian): * # use python datetime module, */ - __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_calendar, __pyx_n_s_proleptic_gregorian, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 5251, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_calendar, __pyx_n_s_proleptic_gregorian, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 5250, __pyx_L1_error) if (!__pyx_t_5) { goto __pyx_L11_next_or; } else { } - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_basedate, __pyx_n_s_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5251, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_basedate, __pyx_n_s_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_MINYEAR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5251, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_MINYEAR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5251, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5250, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 5251, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 5250, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!__pyx_t_5) { } else { @@ -63677,7 +63679,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * } __pyx_L11_next_or:; - /* "netCDF4/_netCDF4.pyx":5252 + /* "netCDF4/_netCDF4.pyx":5251 * * if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \ * (calendar in ['gregorian','standard'] and basedate > gregorian): # <<<<<<<<<<<<<< @@ -63686,13 +63688,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * */ __Pyx_INCREF(__pyx_v_calendar); __pyx_t_4 = __pyx_v_calendar; - __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_gregorian, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 5252, __pyx_L1_error) + __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_gregorian, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 5251, __pyx_L1_error) if (!__pyx_t_7) { } else { __pyx_t_5 = __pyx_t_7; goto __pyx_L14_bool_binop_done; } - __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_standard, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 5252, __pyx_L1_error) + __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_standard, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 5251, __pyx_L1_error) __pyx_t_5 = __pyx_t_7; __pyx_L14_bool_binop_done:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -63702,16 +63704,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * __pyx_t_6 = __pyx_t_7; goto __pyx_L10_bool_binop_done; } - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_gregorian); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5252, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_gregorian); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = PyObject_RichCompare(__pyx_v_basedate, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5252, __pyx_L1_error) + __pyx_t_2 = PyObject_RichCompare(__pyx_v_basedate, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5251, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 5252, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 5251, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = __pyx_t_7; __pyx_L10_bool_binop_done:; - /* "netCDF4/_netCDF4.pyx":5251 + /* "netCDF4/_netCDF4.pyx":5250 * raise ValueError(msg) * * if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \ # <<<<<<<<<<<<<< @@ -63720,7 +63722,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * */ if (__pyx_t_6) { - /* "netCDF4/_netCDF4.pyx":5254 + /* "netCDF4/_netCDF4.pyx":5253 * (calendar in ['gregorian','standard'] and basedate > gregorian): * # use python datetime module, * isscalar = False # <<<<<<<<<<<<<< @@ -63729,7 +63731,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * */ __pyx_v_isscalar = 0; - /* "netCDF4/_netCDF4.pyx":5255 + /* "netCDF4/_netCDF4.pyx":5254 * # use python datetime module, * isscalar = False * try: # <<<<<<<<<<<<<< @@ -63745,18 +63747,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { - /* "netCDF4/_netCDF4.pyx":5256 + /* "netCDF4/_netCDF4.pyx":5255 * isscalar = False * try: * dates[0] # <<<<<<<<<<<<<< * except: * isscalar = True */ - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_dates, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5256, __pyx_L16_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_dates, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5255, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5255 + /* "netCDF4/_netCDF4.pyx":5254 * # use python datetime module, * isscalar = False * try: # <<<<<<<<<<<<<< @@ -63775,7 +63777,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5257 + /* "netCDF4/_netCDF4.pyx":5256 * try: * dates[0] * except: # <<<<<<<<<<<<<< @@ -63784,12 +63786,12 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * */ /*except:*/ { __Pyx_AddTraceback("netCDF4._netCDF4.date2num", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_1) < 0) __PYX_ERR(0, 5257, __pyx_L18_except_error) + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_1) < 0) __PYX_ERR(0, 5256, __pyx_L18_except_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_1); - /* "netCDF4/_netCDF4.pyx":5258 + /* "netCDF4/_netCDF4.pyx":5257 * dates[0] * except: * isscalar = True # <<<<<<<<<<<<<< @@ -63804,7 +63806,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * } __pyx_L18_except_error:; - /* "netCDF4/_netCDF4.pyx":5255 + /* "netCDF4/_netCDF4.pyx":5254 * # use python datetime module, * isscalar = False * try: # <<<<<<<<<<<<<< @@ -63826,7 +63828,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * __pyx_L23_try_end:; } - /* "netCDF4/_netCDF4.pyx":5259 + /* "netCDF4/_netCDF4.pyx":5258 * except: * isscalar = True * if isscalar: # <<<<<<<<<<<<<< @@ -63836,19 +63838,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * __pyx_t_6 = (__pyx_v_isscalar != 0); if (__pyx_t_6) { - /* "netCDF4/_netCDF4.pyx":5260 + /* "netCDF4/_netCDF4.pyx":5259 * isscalar = True * if isscalar: * dates = numpy.array([dates]) # <<<<<<<<<<<<<< * else: * dates = numpy.array(dates) */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5260, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5260, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5260, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_dates); __Pyx_GIVEREF(__pyx_v_dates); @@ -63864,14 +63866,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * } } if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5260, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5259, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5260, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5259, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -63880,20 +63882,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5260, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5259, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { - __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5260, __pyx_L1_error) + __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5260, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } @@ -63902,7 +63904,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * __Pyx_DECREF_SET(__pyx_v_dates, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5259 + /* "netCDF4/_netCDF4.pyx":5258 * except: * isscalar = True * if isscalar: # <<<<<<<<<<<<<< @@ -63912,7 +63914,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * goto __pyx_L26; } - /* "netCDF4/_netCDF4.pyx":5262 + /* "netCDF4/_netCDF4.pyx":5261 * dates = numpy.array([dates]) * else: * dates = numpy.array(dates) # <<<<<<<<<<<<<< @@ -63920,9 +63922,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * * ismasked = False */ /*else*/ { - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5262, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5261, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5262, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5261, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -63936,13 +63938,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * } } if (!__pyx_t_2) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_dates); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5262, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_dates); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5261, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_11)) { PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_dates}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5262, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5261, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -63950,19 +63952,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) { PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_dates}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5262, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5261, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5262, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5261, __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_dates); __Pyx_GIVEREF(__pyx_v_dates); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_dates); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5262, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5261, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -63971,21 +63973,21 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * __Pyx_DECREF_SET(__pyx_v_dates, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5263 + /* "netCDF4/_netCDF4.pyx":5262 * else: * dates = numpy.array(dates) * shape = dates.shape # <<<<<<<<<<<<<< * ismasked = False * if hasattr(dates,'mask'): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dates, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5263, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dates, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_shape = __pyx_t_1; __pyx_t_1 = 0; } __pyx_L26:; - /* "netCDF4/_netCDF4.pyx":5264 + /* "netCDF4/_netCDF4.pyx":5263 * dates = numpy.array(dates) * shape = dates.shape * ismasked = False # <<<<<<<<<<<<<< @@ -63994,30 +63996,30 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * */ __pyx_v_ismasked = 0; - /* "netCDF4/_netCDF4.pyx":5265 + /* "netCDF4/_netCDF4.pyx":5264 * shape = dates.shape * ismasked = False * if hasattr(dates,'mask'): # <<<<<<<<<<<<<< * mask = dates.mask * ismasked = True */ - __pyx_t_6 = PyObject_HasAttr(__pyx_v_dates, __pyx_n_s_mask); if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(0, 5265, __pyx_L1_error) + __pyx_t_6 = PyObject_HasAttr(__pyx_v_dates, __pyx_n_s_mask); if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(0, 5264, __pyx_L1_error) __pyx_t_7 = (__pyx_t_6 != 0); if (__pyx_t_7) { - /* "netCDF4/_netCDF4.pyx":5266 + /* "netCDF4/_netCDF4.pyx":5265 * ismasked = False * if hasattr(dates,'mask'): * mask = dates.mask # <<<<<<<<<<<<<< * ismasked = True * times = [] */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dates, __pyx_n_s_mask); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5266, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dates, __pyx_n_s_mask); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_mask = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5267 + /* "netCDF4/_netCDF4.pyx":5266 * if hasattr(dates,'mask'): * mask = dates.mask * ismasked = True # <<<<<<<<<<<<<< @@ -64026,7 +64028,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * */ __pyx_v_ismasked = 1; - /* "netCDF4/_netCDF4.pyx":5265 + /* "netCDF4/_netCDF4.pyx":5264 * shape = dates.shape * ismasked = False * if hasattr(dates,'mask'): # <<<<<<<<<<<<<< @@ -64035,34 +64037,34 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * */ } - /* "netCDF4/_netCDF4.pyx":5268 + /* "netCDF4/_netCDF4.pyx":5267 * mask = dates.mask * ismasked = True * times = [] # <<<<<<<<<<<<<< * for date in dates.flat: * if ismasked and not date: */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5268, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_times = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5269 + /* "netCDF4/_netCDF4.pyx":5268 * ismasked = True * times = [] * for date in dates.flat: # <<<<<<<<<<<<<< * if ismasked and not date: * times.append(None) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dates, __pyx_n_s_flat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5269, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dates, __pyx_n_s_flat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_11 = __pyx_t_1; __Pyx_INCREF(__pyx_t_11); __pyx_t_12 = 0; __pyx_t_13 = NULL; } else { - __pyx_t_12 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5269, __pyx_L1_error) + __pyx_t_12 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_13 = Py_TYPE(__pyx_t_11)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5269, __pyx_L1_error) + __pyx_t_13 = Py_TYPE(__pyx_t_11)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5268, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -64070,17 +64072,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * if (likely(PyList_CheckExact(__pyx_t_11))) { if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_11)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_12); __Pyx_INCREF(__pyx_t_1); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 5269, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_12); __Pyx_INCREF(__pyx_t_1); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 5268, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_11, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5269, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_11, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_11)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_12); __Pyx_INCREF(__pyx_t_1); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 5269, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_12); __Pyx_INCREF(__pyx_t_1); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 5268, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_11, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5269, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_11, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -64090,7 +64092,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 5269, __pyx_L1_error) + else __PYX_ERR(0, 5268, __pyx_L1_error) } break; } @@ -64099,7 +64101,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * __Pyx_XDECREF_SET(__pyx_v_date, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5270 + /* "netCDF4/_netCDF4.pyx":5269 * times = [] * for date in dates.flat: * if ismasked and not date: # <<<<<<<<<<<<<< @@ -64112,22 +64114,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * __pyx_t_7 = __pyx_t_6; goto __pyx_L31_bool_binop_done; } - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_date); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 5270, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_date); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 5269, __pyx_L1_error) __pyx_t_5 = ((!__pyx_t_6) != 0); __pyx_t_7 = __pyx_t_5; __pyx_L31_bool_binop_done:; if (__pyx_t_7) { - /* "netCDF4/_netCDF4.pyx":5271 + /* "netCDF4/_netCDF4.pyx":5270 * for date in dates.flat: * if ismasked and not date: * times.append(None) # <<<<<<<<<<<<<< * else: * td = date - basedate */ - __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_times, Py_None); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 5271, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_times, Py_None); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 5270, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5270 + /* "netCDF4/_netCDF4.pyx":5269 * times = [] * for date in dates.flat: * if ismasked and not date: # <<<<<<<<<<<<<< @@ -64137,7 +64139,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * goto __pyx_L30; } - /* "netCDF4/_netCDF4.pyx":5273 + /* "netCDF4/_netCDF4.pyx":5272 * times.append(None) * else: * td = date - basedate # <<<<<<<<<<<<<< @@ -64145,68 +64147,68 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * * totaltime = td.microseconds + (td.seconds + td.days * 24 * 3600) * 1.e6 */ /*else*/ { - __pyx_t_1 = PyNumber_Subtract(__pyx_v_date, __pyx_v_basedate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5273, __pyx_L1_error) + __pyx_t_1 = PyNumber_Subtract(__pyx_v_date, __pyx_v_basedate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_td, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5275 + /* "netCDF4/_netCDF4.pyx":5274 * td = date - basedate * # total time in microseconds. * totaltime = td.microseconds + (td.seconds + td.days * 24 * 3600) * 1.e6 # <<<<<<<<<<<<<< * if unit in microsec_units: * times.append(totaltime) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_td, __pyx_n_s_microseconds); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5275, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_td, __pyx_n_s_microseconds); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_td, __pyx_n_s_seconds); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5275, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_td, __pyx_n_s_seconds); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_td, __pyx_n_s_days); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5275, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_td, __pyx_n_s_days); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyNumber_Multiply(__pyx_t_2, __pyx_int_24); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5275, __pyx_L1_error) + __pyx_t_3 = PyNumber_Multiply(__pyx_t_2, __pyx_int_24); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyNumber_Multiply(__pyx_t_3, __pyx_int_3600); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5275, __pyx_L1_error) + __pyx_t_2 = PyNumber_Multiply(__pyx_t_3, __pyx_int_3600); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5275, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyNumber_Multiply(__pyx_t_3, __pyx_float_1_e6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5275, __pyx_L1_error) + __pyx_t_2 = PyNumber_Multiply(__pyx_t_3, __pyx_float_1_e6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5275, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_totaltime, __pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":5276 + /* "netCDF4/_netCDF4.pyx":5275 * # total time in microseconds. * totaltime = td.microseconds + (td.seconds + td.days * 24 * 3600) * 1.e6 * if unit in microsec_units: # <<<<<<<<<<<<<< * times.append(totaltime) * elif unit in millisec_units: */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_microsec_units); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5276, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_microsec_units); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_unit, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 5276, __pyx_L1_error) + __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_unit, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 5275, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = (__pyx_t_7 != 0); if (__pyx_t_5) { - /* "netCDF4/_netCDF4.pyx":5277 + /* "netCDF4/_netCDF4.pyx":5276 * totaltime = td.microseconds + (td.seconds + td.days * 24 * 3600) * 1.e6 * if unit in microsec_units: * times.append(totaltime) # <<<<<<<<<<<<<< * elif unit in millisec_units: * times.append(totaltime/1.e3) */ - __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_times, __pyx_v_totaltime); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 5277, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_times, __pyx_v_totaltime); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 5276, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5276 + /* "netCDF4/_netCDF4.pyx":5275 * # total time in microseconds. * totaltime = td.microseconds + (td.seconds + td.days * 24 * 3600) * 1.e6 * if unit in microsec_units: # <<<<<<<<<<<<<< @@ -64216,33 +64218,33 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * goto __pyx_L33; } - /* "netCDF4/_netCDF4.pyx":5278 + /* "netCDF4/_netCDF4.pyx":5277 * if unit in microsec_units: * times.append(totaltime) * elif unit in millisec_units: # <<<<<<<<<<<<<< * times.append(totaltime/1.e3) * elif unit in sec_units: */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_millisec_units); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5278, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_millisec_units); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_unit, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 5278, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_unit, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 5277, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = (__pyx_t_5 != 0); if (__pyx_t_7) { - /* "netCDF4/_netCDF4.pyx":5279 + /* "netCDF4/_netCDF4.pyx":5278 * times.append(totaltime) * elif unit in millisec_units: * times.append(totaltime/1.e3) # <<<<<<<<<<<<<< * elif unit in sec_units: * times.append(totaltime/1.e6) */ - __pyx_t_3 = __Pyx_PyFloat_DivideObjC(__pyx_v_totaltime, __pyx_float_1_e3, 1.e3, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5279, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFloat_DivideObjC(__pyx_v_totaltime, __pyx_float_1_e3, 1.e3, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_times, __pyx_t_3); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 5279, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_times, __pyx_t_3); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 5278, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":5278 + /* "netCDF4/_netCDF4.pyx":5277 * if unit in microsec_units: * times.append(totaltime) * elif unit in millisec_units: # <<<<<<<<<<<<<< @@ -64252,33 +64254,33 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * goto __pyx_L33; } - /* "netCDF4/_netCDF4.pyx":5280 + /* "netCDF4/_netCDF4.pyx":5279 * elif unit in millisec_units: * times.append(totaltime/1.e3) * elif unit in sec_units: # <<<<<<<<<<<<<< * times.append(totaltime/1.e6) * elif unit in min_units: */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_sec_units); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5280, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_sec_units); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_unit, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 5280, __pyx_L1_error) + __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_unit, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 5279, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = (__pyx_t_7 != 0); if (__pyx_t_5) { - /* "netCDF4/_netCDF4.pyx":5281 + /* "netCDF4/_netCDF4.pyx":5280 * times.append(totaltime/1.e3) * elif unit in sec_units: * times.append(totaltime/1.e6) # <<<<<<<<<<<<<< * elif unit in min_units: * times.append(totaltime/1.e6/60) */ - __pyx_t_3 = __Pyx_PyFloat_DivideObjC(__pyx_v_totaltime, __pyx_float_1_e6, 1.e6, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5281, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFloat_DivideObjC(__pyx_v_totaltime, __pyx_float_1_e6, 1.e6, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_times, __pyx_t_3); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 5281, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_times, __pyx_t_3); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 5280, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":5280 + /* "netCDF4/_netCDF4.pyx":5279 * elif unit in millisec_units: * times.append(totaltime/1.e3) * elif unit in sec_units: # <<<<<<<<<<<<<< @@ -64288,36 +64290,36 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * goto __pyx_L33; } - /* "netCDF4/_netCDF4.pyx":5282 + /* "netCDF4/_netCDF4.pyx":5281 * elif unit in sec_units: * times.append(totaltime/1.e6) * elif unit in min_units: # <<<<<<<<<<<<<< * times.append(totaltime/1.e6/60) * elif unit in hr_units: */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_min_units); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5282, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_min_units); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5281, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_unit, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 5282, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_unit, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 5281, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = (__pyx_t_5 != 0); if (__pyx_t_7) { - /* "netCDF4/_netCDF4.pyx":5283 + /* "netCDF4/_netCDF4.pyx":5282 * times.append(totaltime/1.e6) * elif unit in min_units: * times.append(totaltime/1.e6/60) # <<<<<<<<<<<<<< * elif unit in hr_units: * times.append(totaltime/1.e6/3600) */ - __pyx_t_3 = __Pyx_PyFloat_DivideObjC(__pyx_v_totaltime, __pyx_float_1_e6, 1.e6, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5283, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFloat_DivideObjC(__pyx_v_totaltime, __pyx_float_1_e6, 1.e6, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_t_3, __pyx_int_60); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5283, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_t_3, __pyx_int_60); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_times, __pyx_t_2); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 5283, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_times, __pyx_t_2); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 5282, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5282 + /* "netCDF4/_netCDF4.pyx":5281 * elif unit in sec_units: * times.append(totaltime/1.e6) * elif unit in min_units: # <<<<<<<<<<<<<< @@ -64327,36 +64329,36 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * goto __pyx_L33; } - /* "netCDF4/_netCDF4.pyx":5284 + /* "netCDF4/_netCDF4.pyx":5283 * elif unit in min_units: * times.append(totaltime/1.e6/60) * elif unit in hr_units: # <<<<<<<<<<<<<< * times.append(totaltime/1.e6/3600) * elif unit in day_units: */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hr_units); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5284, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hr_units); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_unit, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 5284, __pyx_L1_error) + __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_unit, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 5283, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = (__pyx_t_7 != 0); if (__pyx_t_5) { - /* "netCDF4/_netCDF4.pyx":5285 + /* "netCDF4/_netCDF4.pyx":5284 * times.append(totaltime/1.e6/60) * elif unit in hr_units: * times.append(totaltime/1.e6/3600) # <<<<<<<<<<<<<< * elif unit in day_units: * times.append(totaltime/1.e6/3600./24.) */ - __pyx_t_2 = __Pyx_PyFloat_DivideObjC(__pyx_v_totaltime, __pyx_float_1_e6, 1.e6, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5285, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFloat_DivideObjC(__pyx_v_totaltime, __pyx_float_1_e6, 1.e6, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_int_3600); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5285, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_int_3600); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_times, __pyx_t_3); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 5285, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_times, __pyx_t_3); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 5284, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":5284 + /* "netCDF4/_netCDF4.pyx":5283 * elif unit in min_units: * times.append(totaltime/1.e6/60) * elif unit in hr_units: # <<<<<<<<<<<<<< @@ -64366,39 +64368,39 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * goto __pyx_L33; } - /* "netCDF4/_netCDF4.pyx":5286 + /* "netCDF4/_netCDF4.pyx":5285 * elif unit in hr_units: * times.append(totaltime/1.e6/3600) * elif unit in day_units: # <<<<<<<<<<<<<< * times.append(totaltime/1.e6/3600./24.) * else: */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_day_units); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5286, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_day_units); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_unit, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 5286, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_unit, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 5285, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = (__pyx_t_5 != 0); if (__pyx_t_7) { - /* "netCDF4/_netCDF4.pyx":5287 + /* "netCDF4/_netCDF4.pyx":5286 * times.append(totaltime/1.e6/3600) * elif unit in day_units: * times.append(totaltime/1.e6/3600./24.) # <<<<<<<<<<<<<< * else: * raise ValueError('unsupported time units') */ - __pyx_t_3 = __Pyx_PyFloat_DivideObjC(__pyx_v_totaltime, __pyx_float_1_e6, 1.e6, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5287, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFloat_DivideObjC(__pyx_v_totaltime, __pyx_float_1_e6, 1.e6, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyFloat_DivideObjC(__pyx_t_3, __pyx_float_3600_, 3600., 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5287, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFloat_DivideObjC(__pyx_t_3, __pyx_float_3600_, 3600., 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyFloat_DivideObjC(__pyx_t_2, __pyx_float_24_, 24., 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5287, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFloat_DivideObjC(__pyx_t_2, __pyx_float_24_, 24., 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_times, __pyx_t_3); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 5287, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_times, __pyx_t_3); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 5286, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":5286 + /* "netCDF4/_netCDF4.pyx":5285 * elif unit in hr_units: * times.append(totaltime/1.e6/3600) * elif unit in day_units: # <<<<<<<<<<<<<< @@ -64408,7 +64410,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * goto __pyx_L33; } - /* "netCDF4/_netCDF4.pyx":5289 + /* "netCDF4/_netCDF4.pyx":5288 * times.append(totaltime/1.e6/3600./24.) * else: * raise ValueError('unsupported time units') # <<<<<<<<<<<<<< @@ -64416,17 +64418,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * * return times[0] */ /*else*/ { - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__114, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5289, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__114, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5288, __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, 5289, __pyx_L1_error) + __PYX_ERR(0, 5288, __pyx_L1_error) } __pyx_L33:; } __pyx_L30:; - /* "netCDF4/_netCDF4.pyx":5269 + /* "netCDF4/_netCDF4.pyx":5268 * ismasked = True * times = [] * for date in dates.flat: # <<<<<<<<<<<<<< @@ -64436,7 +64438,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":5290 + /* "netCDF4/_netCDF4.pyx":5289 * else: * raise ValueError('unsupported time units') * if isscalar: # <<<<<<<<<<<<<< @@ -64446,7 +64448,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * __pyx_t_7 = (__pyx_v_isscalar != 0); if (__pyx_t_7) { - /* "netCDF4/_netCDF4.pyx":5291 + /* "netCDF4/_netCDF4.pyx":5290 * raise ValueError('unsupported time units') * if isscalar: * return times[0] # <<<<<<<<<<<<<< @@ -64454,13 +64456,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * * return numpy.reshape(numpy.array(times), shape) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_11 = __Pyx_GetItemInt_List(__pyx_v_times, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5291, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetItemInt_List(__pyx_v_times, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_r = __pyx_t_11; __pyx_t_11 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":5290 + /* "netCDF4/_netCDF4.pyx":5289 * else: * raise ValueError('unsupported time units') * if isscalar: # <<<<<<<<<<<<<< @@ -64469,7 +64471,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * */ } - /* "netCDF4/_netCDF4.pyx":5293 + /* "netCDF4/_netCDF4.pyx":5292 * return times[0] * else: * return numpy.reshape(numpy.array(times), shape) # <<<<<<<<<<<<<< @@ -64478,14 +64480,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * */ /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5293, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5292, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5293, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5292, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5293, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5292, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5293, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5292, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -64499,13 +64501,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * } } if (!__pyx_t_1) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_times); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5293, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_times); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5292, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_times}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5293, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5292, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -64513,25 +64515,25 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_times}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5293, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5292, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5293, __pyx_L1_error) + __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5292, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_1); __pyx_t_1 = NULL; __Pyx_INCREF(__pyx_v_times); __Pyx_GIVEREF(__pyx_v_times); PyTuple_SET_ITEM(__pyx_t_15, 0+1, __pyx_v_times); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_15, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5293, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_15, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5292, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_v_shape)) { __Pyx_RaiseUnboundLocalError("shape"); __PYX_ERR(0, 5293, __pyx_L1_error) } + if (unlikely(!__pyx_v_shape)) { __Pyx_RaiseUnboundLocalError("shape"); __PYX_ERR(0, 5292, __pyx_L1_error) } __pyx_t_4 = NULL; __pyx_t_16 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -64547,7 +64549,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_shape}; - __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5293, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5292, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -64556,14 +64558,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_shape}; - __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5293, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5292, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { - __pyx_t_15 = PyTuple_New(2+__pyx_t_16); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5293, __pyx_L1_error) + __pyx_t_15 = PyTuple_New(2+__pyx_t_16); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5292, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -64574,7 +64576,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * __Pyx_GIVEREF(__pyx_v_shape); PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_16, __pyx_v_shape); __pyx_t_3 = 0; - __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_15, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5293, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_15, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5292, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; } @@ -64584,7 +64586,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":5251 + /* "netCDF4/_netCDF4.pyx":5250 * raise ValueError(msg) * * if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \ # <<<<<<<<<<<<<< @@ -64593,7 +64595,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * */ } - /* "netCDF4/_netCDF4.pyx":5295 + /* "netCDF4/_netCDF4.pyx":5294 * return numpy.reshape(numpy.array(times), shape) * else: # use netcdftime module for other calendars * cdftime = netcdftime.utime(units,calendar=calendar) # <<<<<<<<<<<<<< @@ -64601,20 +64603,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * * */ /*else*/ { - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdftime); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5295, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdftime); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_utime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5295, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_utime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5295, __pyx_L1_error) + __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(__pyx_v_units); __Pyx_GIVEREF(__pyx_v_units); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_units); - __pyx_t_15 = PyDict_New(); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5295, __pyx_L1_error) + __pyx_t_15 = PyDict_New(); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); - if (PyDict_SetItem(__pyx_t_15, __pyx_n_s_calendar, __pyx_v_calendar) < 0) __PYX_ERR(0, 5295, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, __pyx_t_15); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5295, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_15, __pyx_n_s_calendar, __pyx_v_calendar) < 0) __PYX_ERR(0, 5294, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, __pyx_t_15); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; @@ -64622,7 +64624,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * __pyx_v_cdftime = __pyx_t_3; __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":5296 + /* "netCDF4/_netCDF4.pyx":5295 * else: # use netcdftime module for other calendars * cdftime = netcdftime.utime(units,calendar=calendar) * return cdftime.date2num(dates) # <<<<<<<<<<<<<< @@ -64630,7 +64632,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * * def num2date(times,units,calendar='standard'): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_cdftime, __pyx_n_s_date2num); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5296, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_cdftime, __pyx_n_s_date2num); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_11 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) { @@ -64643,13 +64645,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * } } if (!__pyx_t_11) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_v_dates); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5296, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_v_dates); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_15)) { PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_v_dates}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5296, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5295, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -64657,19 +64659,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) { PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_v_dates}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5296, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5295, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5296, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_11); __pyx_t_11 = NULL; __Pyx_INCREF(__pyx_v_dates); __Pyx_GIVEREF(__pyx_v_dates); PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_dates); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5296, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -64680,7 +64682,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":5210 + /* "netCDF4/_netCDF4.pyx":5209 * return a * * def date2num(dates,units,calendar='standard'): # <<<<<<<<<<<<<< @@ -64716,7 +64718,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5298 +/* "netCDF4/_netCDF4.pyx":5297 * return cdftime.date2num(dates) * * def num2date(times,units,calendar='standard'): # <<<<<<<<<<<<<< @@ -64757,7 +64759,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_19num2date(PyObject *__pyx_self, Py case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_units)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("num2date", 0, 2, 3, 1); __PYX_ERR(0, 5298, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("num2date", 0, 2, 3, 1); __PYX_ERR(0, 5297, __pyx_L3_error) } case 2: if (kw_args > 0) { @@ -64766,7 +64768,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_19num2date(PyObject *__pyx_self, Py } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "num2date") < 0)) __PYX_ERR(0, 5298, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "num2date") < 0)) __PYX_ERR(0, 5297, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -64783,7 +64785,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_19num2date(PyObject *__pyx_self, Py } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("num2date", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5298, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("num2date", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5297, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("netCDF4._netCDF4.num2date", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -64800,6 +64802,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * PyObject *__pyx_v_basedate = NULL; PyObject *__pyx_v_unit = NULL; PyObject *__pyx_v_msg = NULL; + PyObject *__pyx_v_postimes = NULL; int __pyx_v_isscalar; PyObject *__pyx_v_shape = NULL; int __pyx_v_ismasked; @@ -64822,28 +64825,28 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; - int __pyx_t_7; - PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; - Py_ssize_t __pyx_t_11; - PyObject *(*__pyx_t_12)(PyObject *); - int __pyx_t_13; - PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_11 = NULL; + Py_ssize_t __pyx_t_12; + PyObject *(*__pyx_t_13)(PyObject *); + int __pyx_t_14; PyObject *__pyx_t_15 = NULL; int __pyx_t_16; __Pyx_RefNannySetupContext("num2date", 0); __Pyx_INCREF(__pyx_v_times); __Pyx_INCREF(__pyx_v_calendar); - /* "netCDF4/_netCDF4.pyx":5335 + /* "netCDF4/_netCDF4.pyx":5334 * contains one. * """ * calendar = calendar.lower() # <<<<<<<<<<<<<< * basedate = _dateparse(units) * unit = units.split()[0].lower() */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_calendar, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5335, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_calendar, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5334, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -64856,24 +64859,24 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5335, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5334, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5335, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5334, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_calendar, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5336 + /* "netCDF4/_netCDF4.pyx":5335 * """ * calendar = calendar.lower() * basedate = _dateparse(units) # <<<<<<<<<<<<<< * unit = units.split()[0].lower() * # real-world calendars limited to positive reference years. */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_dateparse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5336, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_dateparse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5335, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -64886,13 +64889,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * } } if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_units); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5336, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_units); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5335, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_units}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5336, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5335, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -64900,19 +64903,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_units}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5336, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5335, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5336, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5335, __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_units); __Pyx_GIVEREF(__pyx_v_units); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_units); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5336, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5335, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -64921,14 +64924,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * __pyx_v_basedate = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5337 + /* "netCDF4/_netCDF4.pyx":5336 * calendar = calendar.lower() * basedate = _dateparse(units) * unit = units.split()[0].lower() # <<<<<<<<<<<<<< * # real-world calendars limited to positive reference years. * if calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']: */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_units, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5337, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_units, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -64941,17 +64944,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * } } if (__pyx_t_3) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5337, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5336, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5337, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5336, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5337, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5337, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -64965,17 +64968,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * } } if (__pyx_t_4) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5337, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5336, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5337, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5336, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_unit = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5339 + /* "netCDF4/_netCDF4.pyx":5338 * unit = units.split()[0].lower() * # real-world calendars limited to positive reference years. * if calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']: # <<<<<<<<<<<<<< @@ -64984,48 +64987,48 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * */ __Pyx_INCREF(__pyx_v_calendar); __pyx_t_1 = __pyx_v_calendar; - __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_julian, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 5339, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_julian, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 5338, __pyx_L1_error) if (!__pyx_t_6) { } else { __pyx_t_5 = __pyx_t_6; goto __pyx_L4_bool_binop_done; } - __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_standard, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 5339, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_standard, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 5338, __pyx_L1_error) if (!__pyx_t_6) { } else { __pyx_t_5 = __pyx_t_6; goto __pyx_L4_bool_binop_done; } - __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_gregorian, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 5339, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_gregorian, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 5338, __pyx_L1_error) if (!__pyx_t_6) { } else { __pyx_t_5 = __pyx_t_6; goto __pyx_L4_bool_binop_done; } - __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_proleptic_gregorian, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 5339, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_proleptic_gregorian, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 5338, __pyx_L1_error) __pyx_t_5 = __pyx_t_6; __pyx_L4_bool_binop_done:; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "netCDF4/_netCDF4.pyx":5340 + /* "netCDF4/_netCDF4.pyx":5339 * # real-world calendars limited to positive reference years. * if calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']: * if basedate.year == 0: # <<<<<<<<<<<<<< * msg='zero not allowed as a reference year, does not exist in Julian or Gregorian calendars' * raise ValueError(msg) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_basedate, __pyx_n_s_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5340, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_basedate, __pyx_n_s_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5340, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 5340, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 5339, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_6) { - /* "netCDF4/_netCDF4.pyx":5341 + /* "netCDF4/_netCDF4.pyx":5340 * if calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']: * if basedate.year == 0: * msg='zero not allowed as a reference year, does not exist in Julian or Gregorian calendars' # <<<<<<<<<<<<<< @@ -65035,26 +65038,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * __Pyx_INCREF(__pyx_kp_s_zero_not_allowed_as_a_reference); __pyx_v_msg = __pyx_kp_s_zero_not_allowed_as_a_reference; - /* "netCDF4/_netCDF4.pyx":5342 + /* "netCDF4/_netCDF4.pyx":5341 * if basedate.year == 0: * msg='zero not allowed as a reference year, does not exist in Julian or Gregorian calendars' * raise ValueError(msg) # <<<<<<<<<<<<<< * elif basedate.year < 0: * msg='negative reference year in time units, must be >= 1' */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5342, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_msg); __Pyx_GIVEREF(__pyx_v_msg); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_msg); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5342, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 5342, __pyx_L1_error) + __PYX_ERR(0, 5341, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5340 + /* "netCDF4/_netCDF4.pyx":5339 * # real-world calendars limited to positive reference years. * if calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']: * if basedate.year == 0: # <<<<<<<<<<<<<< @@ -65063,22 +65066,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * */ } - /* "netCDF4/_netCDF4.pyx":5343 + /* "netCDF4/_netCDF4.pyx":5342 * msg='zero not allowed as a reference year, does not exist in Julian or Gregorian calendars' * raise ValueError(msg) * elif basedate.year < 0: # <<<<<<<<<<<<<< * msg='negative reference year in time units, must be >= 1' * raise ValueError(msg) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_basedate, __pyx_n_s_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5343, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_basedate, __pyx_n_s_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5343, __pyx_L1_error) + __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5342, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 5343, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 5342, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_6) { - /* "netCDF4/_netCDF4.pyx":5344 + /* "netCDF4/_netCDF4.pyx":5343 * raise ValueError(msg) * elif basedate.year < 0: * msg='negative reference year in time units, must be >= 1' # <<<<<<<<<<<<<< @@ -65088,26 +65091,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * __Pyx_INCREF(__pyx_kp_s_negative_reference_year_in_time); __pyx_v_msg = __pyx_kp_s_negative_reference_year_in_time; - /* "netCDF4/_netCDF4.pyx":5345 + /* "netCDF4/_netCDF4.pyx":5344 * elif basedate.year < 0: * msg='negative reference year in time units, must be >= 1' * raise ValueError(msg) # <<<<<<<<<<<<<< * - * if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \ + * postimes = (numpy.asarray(times) > 0).all() */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5345, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_msg); __Pyx_GIVEREF(__pyx_v_msg); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_msg); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5345, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 5345, __pyx_L1_error) + __PYX_ERR(0, 5344, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5343 + /* "netCDF4/_netCDF4.pyx":5342 * msg='zero not allowed as a reference year, does not exist in Julian or Gregorian calendars' * raise ValueError(msg) * elif basedate.year < 0: # <<<<<<<<<<<<<< @@ -65116,7 +65119,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * */ } - /* "netCDF4/_netCDF4.pyx":5339 + /* "netCDF4/_netCDF4.pyx":5338 * unit = units.split()[0].lower() * # real-world calendars limited to positive reference years. * if calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']: # <<<<<<<<<<<<<< @@ -65125,79 +65128,166 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * */ } - /* "netCDF4/_netCDF4.pyx":5347 + /* "netCDF4/_netCDF4.pyx":5346 * raise ValueError(msg) * - * if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \ # <<<<<<<<<<<<<< - * (calendar in ['gregorian','standard'] and basedate > gregorian): + * postimes = (numpy.asarray(times) > 0).all() # <<<<<<<<<<<<<< + * if postimes and ((calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \ + * (calendar in ['gregorian','standard'] and basedate > gregorian)): + */ + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5346, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5346, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(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_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_times); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5346, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } else { + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_times}; + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5346, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GOTREF(__pyx_t_2); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_times}; + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5346, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GOTREF(__pyx_t_2); + } else + #endif + { + __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5346, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_v_times); + __Pyx_GIVEREF(__pyx_v_times); + PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_times); + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5346, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5346, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_all); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5346, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + if (__pyx_t_3) { + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5346, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else { + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5346, __pyx_L1_error) + } + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_postimes = __pyx_t_1; + __pyx_t_1 = 0; + + /* "netCDF4/_netCDF4.pyx":5347 + * + * postimes = (numpy.asarray(times) > 0).all() + * if postimes and ((calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \ # <<<<<<<<<<<<<< + * (calendar in ['gregorian','standard'] and basedate > gregorian)): * # use python datetime module, */ + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_postimes); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 5347, __pyx_L1_error) + if (__pyx_t_5) { + } else { + __pyx_t_6 = __pyx_t_5; + goto __pyx_L10_bool_binop_done; + } __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_calendar, __pyx_n_s_proleptic_gregorian, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 5347, __pyx_L1_error) if (!__pyx_t_5) { - goto __pyx_L11_next_or; + goto __pyx_L12_next_or; } else { } __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_basedate, __pyx_n_s_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_MINYEAR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5347, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5347, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 5347, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 5347, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_5) { } else { __pyx_t_6 = __pyx_t_5; goto __pyx_L10_bool_binop_done; } - __pyx_L11_next_or:; + __pyx_L12_next_or:; /* "netCDF4/_netCDF4.pyx":5348 - * - * if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \ - * (calendar in ['gregorian','standard'] and basedate > gregorian): # <<<<<<<<<<<<<< + * postimes = (numpy.asarray(times) > 0).all() + * if postimes and ((calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \ + * (calendar in ['gregorian','standard'] and basedate > gregorian)): # <<<<<<<<<<<<<< * # use python datetime module, * isscalar = False */ __Pyx_INCREF(__pyx_v_calendar); - __pyx_t_4 = __pyx_v_calendar; - __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_gregorian, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 5348, __pyx_L1_error) - if (!__pyx_t_7) { + __pyx_t_3 = __pyx_v_calendar; + __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_gregorian, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 5348, __pyx_L1_error) + if (!__pyx_t_8) { } else { - __pyx_t_5 = __pyx_t_7; - goto __pyx_L14_bool_binop_done; + __pyx_t_5 = __pyx_t_8; + goto __pyx_L15_bool_binop_done; } - __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_standard, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 5348, __pyx_L1_error) - __pyx_t_5 = __pyx_t_7; - __pyx_L14_bool_binop_done:; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_7 = (__pyx_t_5 != 0); - if (__pyx_t_7) { + __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_standard, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 5348, __pyx_L1_error) + __pyx_t_5 = __pyx_t_8; + __pyx_L15_bool_binop_done:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_8 = (__pyx_t_5 != 0); + if (__pyx_t_8) { } else { - __pyx_t_6 = __pyx_t_7; + __pyx_t_6 = __pyx_t_8; goto __pyx_L10_bool_binop_done; } - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_gregorian); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5348, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = PyObject_RichCompare(__pyx_v_basedate, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5348, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 5348, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_gregorian); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5348, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyObject_RichCompare(__pyx_v_basedate, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5348, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 5348, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_6 = __pyx_t_7; + __pyx_t_6 = __pyx_t_8; __pyx_L10_bool_binop_done:; /* "netCDF4/_netCDF4.pyx":5347 - * raise ValueError(msg) * - * if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \ # <<<<<<<<<<<<<< - * (calendar in ['gregorian','standard'] and basedate > gregorian): + * postimes = (numpy.asarray(times) > 0).all() + * if postimes and ((calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \ # <<<<<<<<<<<<<< + * (calendar in ['gregorian','standard'] and basedate > gregorian)): * # use python datetime module, */ if (__pyx_t_6) { /* "netCDF4/_netCDF4.pyx":5350 - * (calendar in ['gregorian','standard'] and basedate > gregorian): + * (calendar in ['gregorian','standard'] and basedate > gregorian)): * # use python datetime module, * isscalar = False # <<<<<<<<<<<<<< * try: @@ -65215,10 +65305,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_8); + __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_11); /*try:*/ { /* "netCDF4/_netCDF4.pyx":5352 @@ -65228,7 +65318,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * * except: * isscalar = True */ - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_times, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5352, __pyx_L16_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_times, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5352, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -65240,15 +65330,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * * except: */ } - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - goto __pyx_L23_try_end; - __pyx_L16_error:; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + goto __pyx_L24_try_end; + __pyx_L17_error:; __Pyx_PyThreadState_assign - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "netCDF4/_netCDF4.pyx":5353 @@ -65260,9 +65351,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * */ /*except:*/ { __Pyx_AddTraceback("netCDF4._netCDF4.num2date", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_1) < 0) __PYX_ERR(0, 5353, __pyx_L18_except_error) + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_1) < 0) __PYX_ERR(0, 5353, __pyx_L19_except_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GOTREF(__pyx_t_4); + __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_1); /* "netCDF4/_netCDF4.pyx":5354 @@ -65274,11 +65365,11 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * */ __pyx_v_isscalar = 1; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L17_exception_handled; + goto __pyx_L18_exception_handled; } - __pyx_L18_except_error:; + __pyx_L19_except_error:; /* "netCDF4/_netCDF4.pyx":5351 * # use python datetime module, @@ -65288,18 +65379,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * * except: */ __Pyx_PyThreadState_assign - __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); goto __pyx_L1_error; - __pyx_L17_exception_handled:; + __pyx_L18_exception_handled:; __Pyx_PyThreadState_assign - __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); - __pyx_L23_try_end:; + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); + __pyx_L24_try_end:; } /* "netCDF4/_netCDF4.pyx":5355 @@ -65321,8 +65412,8 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5356, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -65337,13 +65428,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_n_s_d) < 0) __PYX_ERR(0, 5356, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5356, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF_SET(__pyx_v_times, __pyx_t_3); - __pyx_t_3 = 0; + __Pyx_DECREF_SET(__pyx_v_times, __pyx_t_7); + __pyx_t_7 = 0; /* "netCDF4/_netCDF4.pyx":5355 * except: @@ -65352,7 +65443,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * * times = numpy.array([times],dtype='d') * else: */ - goto __pyx_L26; + goto __pyx_L27; } /* "netCDF4/_netCDF4.pyx":5358 @@ -65363,26 +65454,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * * ismasked = False */ /*else*/ { - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5358, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5358, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5358, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5358, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5358, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5358, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_times); __Pyx_GIVEREF(__pyx_v_times); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_times); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_times); __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5358, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_n_s_d) < 0) __PYX_ERR(0, 5358, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5358, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5358, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF_SET(__pyx_v_times, __pyx_t_4); - __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_times, __pyx_t_3); + __pyx_t_3 = 0; /* "netCDF4/_netCDF4.pyx":5359 * else: @@ -65391,12 +65482,12 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * * ismasked = False * if hasattr(times,'mask'): */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_times, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5359, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_v_shape = __pyx_t_4; - __pyx_t_4 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_times, __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5359, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_shape = __pyx_t_3; + __pyx_t_3 = 0; } - __pyx_L26:; + __pyx_L27:; /* "netCDF4/_netCDF4.pyx":5360 * times = numpy.array(times, dtype='d') @@ -65415,8 +65506,8 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * * ismasked = True */ __pyx_t_6 = PyObject_HasAttr(__pyx_v_times, __pyx_n_s_mask); if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(0, 5361, __pyx_L1_error) - __pyx_t_7 = (__pyx_t_6 != 0); - if (__pyx_t_7) { + __pyx_t_8 = (__pyx_t_6 != 0); + if (__pyx_t_8) { /* "netCDF4/_netCDF4.pyx":5362 * ismasked = False @@ -65425,10 +65516,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * * ismasked = True * dates = [] */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_times, __pyx_n_s_mask); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5362, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_v_mask = __pyx_t_4; - __pyx_t_4 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_times, __pyx_n_s_mask); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_mask = __pyx_t_3; + __pyx_t_3 = 0; /* "netCDF4/_netCDF4.pyx":5363 * if hasattr(times,'mask'): @@ -65455,10 +65546,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * * for time in times.flat: * if ismasked and not time: */ - __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5364, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_v_dates = ((PyObject*)__pyx_t_4); - __pyx_t_4 = 0; + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5364, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_dates = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; /* "netCDF4/_netCDF4.pyx":5365 * ismasked = True @@ -65467,39 +65558,39 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * * if ismasked and not time: * dates.append(None) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_times, __pyx_n_s_flat); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5365, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { - __pyx_t_2 = __pyx_t_4; __Pyx_INCREF(__pyx_t_2); __pyx_t_11 = 0; - __pyx_t_12 = NULL; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_times, __pyx_n_s_flat); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5365, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { + __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_12 = 0; + __pyx_t_13 = NULL; } else { - __pyx_t_11 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5365, __pyx_L1_error) + __pyx_t_12 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5365, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_12 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5365, __pyx_L1_error) + __pyx_t_13 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5365, __pyx_L1_error) } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { - if (likely(!__pyx_t_12)) { + if (likely(!__pyx_t_13)) { if (likely(PyList_CheckExact(__pyx_t_2))) { - if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_2)) break; + if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 5365, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_12); __Pyx_INCREF(__pyx_t_3); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 5365, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5365, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5365, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); #endif } else { - if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_2)) break; + if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 5365, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_12); __Pyx_INCREF(__pyx_t_3); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 5365, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5365, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5365, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); #endif } } else { - __pyx_t_4 = __pyx_t_12(__pyx_t_2); - if (unlikely(!__pyx_t_4)) { + __pyx_t_3 = __pyx_t_13(__pyx_t_2); + if (unlikely(!__pyx_t_3)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); @@ -65507,10 +65598,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * } break; } - __Pyx_GOTREF(__pyx_t_4); + __Pyx_GOTREF(__pyx_t_3); } - __Pyx_XDECREF_SET(__pyx_v_time, __pyx_t_4); - __pyx_t_4 = 0; + __Pyx_XDECREF_SET(__pyx_v_time, __pyx_t_3); + __pyx_t_3 = 0; /* "netCDF4/_netCDF4.pyx":5366 * dates = [] @@ -65522,14 +65613,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * __pyx_t_6 = (__pyx_v_ismasked != 0); if (__pyx_t_6) { } else { - __pyx_t_7 = __pyx_t_6; - goto __pyx_L31_bool_binop_done; + __pyx_t_8 = __pyx_t_6; + goto __pyx_L32_bool_binop_done; } __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_time); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 5366, __pyx_L1_error) __pyx_t_5 = ((!__pyx_t_6) != 0); - __pyx_t_7 = __pyx_t_5; - __pyx_L31_bool_binop_done:; - if (__pyx_t_7) { + __pyx_t_8 = __pyx_t_5; + __pyx_L32_bool_binop_done:; + if (__pyx_t_8) { /* "netCDF4/_netCDF4.pyx":5367 * for time in times.flat: @@ -65538,7 +65629,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * * else: * # convert to total seconds */ - __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_dates, Py_None); if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 5367, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_dates, Py_None); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 5367, __pyx_L1_error) /* "netCDF4/_netCDF4.pyx":5366 * dates = [] @@ -65547,7 +65638,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * * dates.append(None) * else: */ - goto __pyx_L30; + goto __pyx_L31; } /* "netCDF4/_netCDF4.pyx":5370 @@ -65558,11 +65649,11 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * * elif unit in millisec_units: */ /*else*/ { - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_microsec_units); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5370, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_unit, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 5370, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_5 = (__pyx_t_7 != 0); + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_microsec_units); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_unit, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 5370, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = (__pyx_t_8 != 0); if (__pyx_t_5) { /* "netCDF4/_netCDF4.pyx":5371 @@ -65572,10 +65663,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * * elif unit in millisec_units: * tsecs = time/1.e3 */ - __pyx_t_4 = __Pyx_PyFloat_DivideObjC(__pyx_v_time, __pyx_float_1_e6, 1.e6, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5371, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_XDECREF_SET(__pyx_v_tsecs, __pyx_t_4); - __pyx_t_4 = 0; + __pyx_t_3 = __Pyx_PyFloat_DivideObjC(__pyx_v_time, __pyx_float_1_e6, 1.e6, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5371, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_tsecs, __pyx_t_3); + __pyx_t_3 = 0; /* "netCDF4/_netCDF4.pyx":5370 * else: @@ -65584,7 +65675,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * * tsecs = time/1.e6 * elif unit in millisec_units: */ - goto __pyx_L33; + goto __pyx_L34; } /* "netCDF4/_netCDF4.pyx":5372 @@ -65594,12 +65685,12 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * * tsecs = time/1.e3 * elif unit in sec_units: */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_millisec_units); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5372, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_unit, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 5372, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_7 = (__pyx_t_5 != 0); - if (__pyx_t_7) { + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_millisec_units); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5372, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_unit, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 5372, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_8 = (__pyx_t_5 != 0); + if (__pyx_t_8) { /* "netCDF4/_netCDF4.pyx":5373 * tsecs = time/1.e6 @@ -65608,10 +65699,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * * elif unit in sec_units: * tsecs = time */ - __pyx_t_4 = __Pyx_PyFloat_DivideObjC(__pyx_v_time, __pyx_float_1_e3, 1.e3, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5373, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_XDECREF_SET(__pyx_v_tsecs, __pyx_t_4); - __pyx_t_4 = 0; + __pyx_t_3 = __Pyx_PyFloat_DivideObjC(__pyx_v_time, __pyx_float_1_e3, 1.e3, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5373, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_tsecs, __pyx_t_3); + __pyx_t_3 = 0; /* "netCDF4/_netCDF4.pyx":5372 * if unit in microsec_units: @@ -65620,7 +65711,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * * tsecs = time/1.e3 * elif unit in sec_units: */ - goto __pyx_L33; + goto __pyx_L34; } /* "netCDF4/_netCDF4.pyx":5374 @@ -65630,11 +65721,11 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * * tsecs = time * elif unit in min_units: */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_sec_units); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5374, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_unit, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 5374, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_5 = (__pyx_t_7 != 0); + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_sec_units); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_unit, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 5374, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = (__pyx_t_8 != 0); if (__pyx_t_5) { /* "netCDF4/_netCDF4.pyx":5375 @@ -65654,7 +65745,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * * tsecs = time * elif unit in min_units: */ - goto __pyx_L33; + goto __pyx_L34; } /* "netCDF4/_netCDF4.pyx":5376 @@ -65664,12 +65755,12 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * * tsecs = time*60. * elif unit in hr_units: */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_min_units); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5376, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_unit, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 5376, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_7 = (__pyx_t_5 != 0); - if (__pyx_t_7) { + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_min_units); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5376, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_unit, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 5376, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_8 = (__pyx_t_5 != 0); + if (__pyx_t_8) { /* "netCDF4/_netCDF4.pyx":5377 * tsecs = time @@ -65678,10 +65769,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * * elif unit in hr_units: * tsecs = time*3600. */ - __pyx_t_4 = PyNumber_Multiply(__pyx_v_time, __pyx_float_60_); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5377, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_XDECREF_SET(__pyx_v_tsecs, __pyx_t_4); - __pyx_t_4 = 0; + __pyx_t_3 = PyNumber_Multiply(__pyx_v_time, __pyx_float_60_); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_tsecs, __pyx_t_3); + __pyx_t_3 = 0; /* "netCDF4/_netCDF4.pyx":5376 * elif unit in sec_units: @@ -65690,7 +65781,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * * tsecs = time*60. * elif unit in hr_units: */ - goto __pyx_L33; + goto __pyx_L34; } /* "netCDF4/_netCDF4.pyx":5378 @@ -65700,11 +65791,11 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * * tsecs = time*3600. * elif unit in day_units: */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_hr_units); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5378, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_unit, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 5378, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_5 = (__pyx_t_7 != 0); + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_hr_units); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5378, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_unit, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 5378, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = (__pyx_t_8 != 0); if (__pyx_t_5) { /* "netCDF4/_netCDF4.pyx":5379 @@ -65714,10 +65805,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * * elif unit in day_units: * tsecs = time*86400. */ - __pyx_t_4 = PyNumber_Multiply(__pyx_v_time, __pyx_float_3600_); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5379, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_XDECREF_SET(__pyx_v_tsecs, __pyx_t_4); - __pyx_t_4 = 0; + __pyx_t_3 = PyNumber_Multiply(__pyx_v_time, __pyx_float_3600_); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5379, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_tsecs, __pyx_t_3); + __pyx_t_3 = 0; /* "netCDF4/_netCDF4.pyx":5378 * elif unit in min_units: @@ -65726,7 +65817,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * * tsecs = time*3600. * elif unit in day_units: */ - goto __pyx_L33; + goto __pyx_L34; } /* "netCDF4/_netCDF4.pyx":5380 @@ -65736,12 +65827,12 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * * tsecs = time*86400. * else: */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_day_units); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5380, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_unit, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 5380, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_7 = (__pyx_t_5 != 0); - if (__pyx_t_7) { + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_day_units); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5380, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_unit, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 5380, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_8 = (__pyx_t_5 != 0); + if (__pyx_t_8) { /* "netCDF4/_netCDF4.pyx":5381 * tsecs = time*3600. @@ -65750,10 +65841,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * * else: * raise ValueError('unsupported time units') */ - __pyx_t_4 = PyNumber_Multiply(__pyx_v_time, __pyx_float_86400_); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5381, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_XDECREF_SET(__pyx_v_tsecs, __pyx_t_4); - __pyx_t_4 = 0; + __pyx_t_3 = PyNumber_Multiply(__pyx_v_time, __pyx_float_86400_); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5381, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_tsecs, __pyx_t_3); + __pyx_t_3 = 0; /* "netCDF4/_netCDF4.pyx":5380 * elif unit in hr_units: @@ -65762,7 +65853,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * * tsecs = time*86400. * else: */ - goto __pyx_L33; + goto __pyx_L34; } /* "netCDF4/_netCDF4.pyx":5383 @@ -65773,13 +65864,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * * days = tsecs // 86400. */ /*else*/ { - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__115, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5383, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_Raise(__pyx_t_4, 0, 0, 0); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__115, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5383, __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, 5383, __pyx_L1_error) } - __pyx_L33:; + __pyx_L34:; /* "netCDF4/_netCDF4.pyx":5385 * raise ValueError('unsupported time units') @@ -65788,10 +65879,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * * msecsd = tsecs*1.e6 - days*86400.*1.e6 * secs = msecsd // 1.e6 */ - __pyx_t_4 = PyNumber_FloorDivide(__pyx_v_tsecs, __pyx_float_86400_); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5385, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_XDECREF_SET(__pyx_v_days, __pyx_t_4); - __pyx_t_4 = 0; + __pyx_t_3 = PyNumber_FloorDivide(__pyx_v_tsecs, __pyx_float_86400_); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5385, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_days, __pyx_t_3); + __pyx_t_3 = 0; /* "netCDF4/_netCDF4.pyx":5386 * # compute time delta. @@ -65800,19 +65891,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * * secs = msecsd // 1.e6 * msecs = numpy.round(msecsd - secs*1.e6) */ - __pyx_t_4 = PyNumber_Multiply(__pyx_v_tsecs, __pyx_float_1_e6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5386, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyNumber_Multiply(__pyx_v_days, __pyx_float_86400_); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5386, __pyx_L1_error) + __pyx_t_3 = PyNumber_Multiply(__pyx_v_tsecs, __pyx_float_1_e6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5386, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = PyNumber_Multiply(__pyx_t_3, __pyx_float_1_e6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5386, __pyx_L1_error) + __pyx_t_7 = PyNumber_Multiply(__pyx_v_days, __pyx_float_86400_); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5386, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_1 = PyNumber_Multiply(__pyx_t_7, __pyx_float_1_e6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5386, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = PyNumber_Subtract(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5386, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5386, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF_SET(__pyx_v_msecsd, __pyx_t_3); - __pyx_t_3 = 0; + __Pyx_XDECREF_SET(__pyx_v_msecsd, __pyx_t_7); + __pyx_t_7 = 0; /* "netCDF4/_netCDF4.pyx":5387 * days = tsecs // 86400. @@ -65821,10 +65912,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * * msecs = numpy.round(msecsd - secs*1.e6) * td = timedelta(days=days,seconds=secs,microseconds=msecs) */ - __pyx_t_3 = PyNumber_FloorDivide(__pyx_v_msecsd, __pyx_float_1_e6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5387, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_XDECREF_SET(__pyx_v_secs, __pyx_t_3); - __pyx_t_3 = 0; + __pyx_t_7 = PyNumber_FloorDivide(__pyx_v_msecsd, __pyx_float_1_e6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5387, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_XDECREF_SET(__pyx_v_secs, __pyx_t_7); + __pyx_t_7 = 0; /* "netCDF4/_netCDF4.pyx":5388 * msecsd = tsecs*1.e6 - days*86400.*1.e6 @@ -65835,62 +65926,62 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_round); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5388, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_round); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5388, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Multiply(__pyx_v_secs, __pyx_float_1_e6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_14 = PyNumber_Subtract(__pyx_v_msecsd, __pyx_t_1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5388, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); + __pyx_t_4 = PyNumber_Subtract(__pyx_v_msecsd, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5388, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_1)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); + __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_1) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_14); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5388, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5388, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GOTREF(__pyx_t_7); } else { #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_14}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5388, __pyx_L1_error) + if (PyFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_4}; + __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5388, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_14}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5388, __pyx_L1_error) + if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_4}; + __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5388, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_1); __pyx_t_1 = NULL; - __Pyx_GIVEREF(__pyx_t_14); - PyTuple_SET_ITEM(__pyx_t_15, 0+1, __pyx_t_14); - __pyx_t_14 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_15, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5388, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_15, 0+1, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_15, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5388, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; } } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_XDECREF_SET(__pyx_v_msecs, __pyx_t_3); - __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF_SET(__pyx_v_msecs, __pyx_t_7); + __pyx_t_7 = 0; /* "netCDF4/_netCDF4.pyx":5389 * secs = msecsd // 1.e6 @@ -65899,17 +65990,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * * # add time delta to base date. * date = basedate + td */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_timedelta); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5389, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_timedelta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5389, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5389, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_days, __pyx_v_days) < 0) __PYX_ERR(0, 5389, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_seconds, __pyx_v_secs) < 0) __PYX_ERR(0, 5389, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_microseconds, __pyx_v_msecs) < 0) __PYX_ERR(0, 5389, __pyx_L1_error) - __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5389, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_days, __pyx_v_days) < 0) __PYX_ERR(0, 5389, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_seconds, __pyx_v_secs) < 0) __PYX_ERR(0, 5389, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_microseconds, __pyx_v_msecs) < 0) __PYX_ERR(0, 5389, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_td, __pyx_t_15); __pyx_t_15 = 0; @@ -65932,9 +66023,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * * if isscalar: * return dates[0] */ - __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_dates, __pyx_v_date); if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 5392, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_dates, __pyx_v_date); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 5392, __pyx_L1_error) } - __pyx_L30:; + __pyx_L31:; /* "netCDF4/_netCDF4.pyx":5365 * ismasked = True @@ -65953,8 +66044,8 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * * return dates[0] * else: */ - __pyx_t_7 = (__pyx_v_isscalar != 0); - if (__pyx_t_7) { + __pyx_t_8 = (__pyx_v_isscalar != 0); + if (__pyx_t_8) { /* "netCDF4/_netCDF4.pyx":5394 * dates.append(date) @@ -65990,84 +66081,84 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * __Pyx_XDECREF(__pyx_r); __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5396, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5396, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5396, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) { - __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_14); - if (likely(__pyx_t_3)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14); - __Pyx_INCREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5396, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5396, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_14, function); + __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (!__pyx_t_3) { - __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_v_dates); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5396, __pyx_L1_error) + if (!__pyx_t_7) { + __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_dates); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); } else { #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_14)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_dates}; - __pyx_t_15 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5396, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_dates}; + __pyx_t_15 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5396, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_15); } else #endif #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_dates}; - __pyx_t_15 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5396, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_dates}; + __pyx_t_15 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5396, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_15); } else #endif { __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __pyx_t_3 = NULL; + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7); __pyx_t_7 = NULL; __Pyx_INCREF(__pyx_v_dates); __Pyx_GIVEREF(__pyx_v_dates); PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_dates); - __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_1, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5396, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } } - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_v_shape)) { __Pyx_RaiseUnboundLocalError("shape"); __PYX_ERR(0, 5396, __pyx_L1_error) } - __pyx_t_14 = NULL; + __pyx_t_4 = NULL; __pyx_t_16 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_14)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_14); + if (CYTHON_UNPACK_METHODS && unlikely(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_4, function); + __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_16 = 1; } } #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_15, __pyx_v_shape}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5396, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + if (PyFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_15, __pyx_v_shape}; + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5396, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; } else #endif #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_15, __pyx_v_shape}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5396, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_15, __pyx_v_shape}; + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5396, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; } else @@ -66075,8 +66166,8 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * { __pyx_t_1 = PyTuple_New(2+__pyx_t_16); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (__pyx_t_14) { - __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_14); __pyx_t_14 = NULL; + if (__pyx_t_4) { + __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_16, __pyx_t_15); @@ -66084,21 +66175,21 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * __Pyx_GIVEREF(__pyx_v_shape); PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_16, __pyx_v_shape); __pyx_t_15 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5396, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } /* "netCDF4/_netCDF4.pyx":5347 - * raise ValueError(msg) * - * if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \ # <<<<<<<<<<<<<< - * (calendar in ['gregorian','standard'] and basedate > gregorian): + * postimes = (numpy.asarray(times) > 0).all() + * if postimes and ((calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \ # <<<<<<<<<<<<<< + * (calendar in ['gregorian','standard'] and basedate > gregorian)): * # use python datetime module, */ } @@ -66113,8 +66204,8 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * /*else*/ { __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdftime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5398, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_utime); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5398, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_utime); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5398, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5398, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -66124,9 +66215,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5398, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_calendar, __pyx_v_calendar) < 0) __PYX_ERR(0, 5398, __pyx_L1_error) - __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5398, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5398, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_cdftime = __pyx_t_15; @@ -66173,15 +66264,15 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * } else #endif { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5399, __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_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5399, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = NULL; __Pyx_INCREF(__pyx_v_times); __Pyx_GIVEREF(__pyx_v_times); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_times); - __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5399, __pyx_L1_error) + PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_times); + __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5399, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -66190,7 +66281,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":5298 + /* "netCDF4/_netCDF4.pyx":5297 * return cdftime.date2num(dates) * * def num2date(times,units,calendar='standard'): # <<<<<<<<<<<<<< @@ -66204,7 +66295,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_14); + __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_15); __Pyx_AddTraceback("netCDF4._netCDF4.num2date", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; @@ -66212,6 +66303,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * __Pyx_XDECREF(__pyx_v_basedate); __Pyx_XDECREF(__pyx_v_unit); __Pyx_XDECREF(__pyx_v_msg); + __Pyx_XDECREF(__pyx_v_postimes); __Pyx_XDECREF(__pyx_v_shape); __Pyx_XDECREF(__pyx_v_mask); __Pyx_XDECREF(__pyx_v_dates); @@ -80069,6 +80161,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s_please_install_ordereddict_https, __pyx_k_please_install_ordereddict_https, sizeof(__pyx_k_please_install_ordereddict_https), 0, 0, 1, 0}, {&__pyx_n_s_pop, __pyx_k_pop, sizeof(__pyx_k_pop), 0, 0, 1, 1}, {&__pyx_n_s_posixpath, __pyx_k_posixpath, sizeof(__pyx_k_posixpath), 0, 0, 1, 1}, + {&__pyx_n_s_postimes, __pyx_k_postimes, sizeof(__pyx_k_postimes), 0, 0, 1, 1}, {&__pyx_n_s_preemption, __pyx_k_preemption, sizeof(__pyx_k_preemption), 0, 0, 1, 1}, {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1}, {&__pyx_n_s_private_atts, __pyx_k_private_atts, sizeof(__pyx_k_private_atts), 0, 0, 1, 1}, @@ -80273,9 +80366,9 @@ static int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 1931, __pyx_L1_error) __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(0, 2033, __pyx_L1_error) __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 3764, __pyx_L1_error) - __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(0, 4049, __pyx_L1_error) - __pyx_builtin_sum = __Pyx_GetBuiltinName(__pyx_n_s_sum); if (!__pyx_builtin_sum) __PYX_ERR(0, 4378, __pyx_L1_error) - __pyx_builtin_UnicodeDecodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeDecodeError); if (!__pyx_builtin_UnicodeDecodeError) __PYX_ERR(0, 5102, __pyx_L1_error) + __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(0, 4048, __pyx_L1_error) + __pyx_builtin_sum = __Pyx_GetBuiltinName(__pyx_n_s_sum); if (!__pyx_builtin_sum) __PYX_ERR(0, 4377, __pyx_L1_error) + __pyx_builtin_UnicodeDecodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeDecodeError); if (!__pyx_builtin_UnicodeDecodeError) __PYX_ERR(0, 5101, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; @@ -80775,597 +80868,597 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_slice__60); __Pyx_GIVEREF(__pyx_slice__60); - /* "netCDF4/_netCDF4.pyx":3868 + /* "netCDF4/_netCDF4.pyx":3867 * # If the _FillValue is positive then it defines a valid maximum, * # otherwise it defines a valid minimum." * byte_type = self.dtype.str[1:] in ['u1','i1'] # <<<<<<<<<<<<<< * if hasattr(self, '_FillValue'): * fval = numpy.array(self._FillValue, self.dtype) */ - __pyx_slice__61 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__61)) __PYX_ERR(0, 3868, __pyx_L1_error) + __pyx_slice__61 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__61)) __PYX_ERR(0, 3867, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__61); __Pyx_GIVEREF(__pyx_slice__61); - /* "netCDF4/_netCDF4.pyx":3872 + /* "netCDF4/_netCDF4.pyx":3871 * fval = numpy.array(self._FillValue, self.dtype) * else: * fval = numpy.array(default_fillvals[self.dtype.str[1:]],self.dtype) # <<<<<<<<<<<<<< * if byte_type: fval = None * if validmin is None and (fval is not None and fval <= 0): */ - __pyx_slice__62 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__62)) __PYX_ERR(0, 3872, __pyx_L1_error) + __pyx_slice__62 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__62)) __PYX_ERR(0, 3871, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__62); __Pyx_GIVEREF(__pyx_slice__62); - /* "netCDF4/_netCDF4.pyx":3937 + /* "netCDF4/_netCDF4.pyx":3936 * # small to assume one of the values should appear as a missing * # value unless a _FillValue attribute is set explicitly." * if no_fill != 1 and self.dtype.str[1:] not in ['u1','i1']: # <<<<<<<<<<<<<< * fillval = numpy.array(default_fillvals[self.dtype.str[1:]],self.dtype) * has_fillval = data == fillval */ - __pyx_slice__63 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__63)) __PYX_ERR(0, 3937, __pyx_L1_error) + __pyx_slice__63 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__63)) __PYX_ERR(0, 3936, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__63); __Pyx_GIVEREF(__pyx_slice__63); - /* "netCDF4/_netCDF4.pyx":3938 + /* "netCDF4/_netCDF4.pyx":3937 * # value unless a _FillValue attribute is set explicitly." * if no_fill != 1 and self.dtype.str[1:] not in ['u1','i1']: * fillval = numpy.array(default_fillvals[self.dtype.str[1:]],self.dtype) # <<<<<<<<<<<<<< * has_fillval = data == fillval * # if data is an array scalar, has_fillval will be a boolean. */ - __pyx_slice__64 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__64)) __PYX_ERR(0, 3938, __pyx_L1_error) + __pyx_slice__64 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__64)) __PYX_ERR(0, 3937, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__64); __Pyx_GIVEREF(__pyx_slice__64); - /* "netCDF4/_netCDF4.pyx":3969 + /* "netCDF4/_netCDF4.pyx":3968 * cdef ndarray data2 * if not self._isvlen: * raise TypeError('_assign_vlen method only for use with VLEN variables') # <<<<<<<<<<<<<< * ndims = self.ndim * msg="data can only be assigned to VLEN variables using integer indices" */ - __pyx_tuple__65 = PyTuple_Pack(1, __pyx_kp_s_assign_vlen_method_only_for_use); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 3969, __pyx_L1_error) + __pyx_tuple__65 = PyTuple_Pack(1, __pyx_kp_s_assign_vlen_method_only_for_use); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 3968, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__65); __Pyx_GIVEREF(__pyx_tuple__65); - /* "netCDF4/_netCDF4.pyx":3981 + /* "netCDF4/_netCDF4.pyx":3980 * elem = self.shape[0]+elem * else: * raise IndexError("Illegal index") # <<<<<<<<<<<<<< * elif isinstance(elem, tuple): * if len(elem) != ndims: */ - __pyx_tuple__66 = PyTuple_Pack(1, __pyx_kp_s_Illegal_index); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 3981, __pyx_L1_error) + __pyx_tuple__66 = PyTuple_Pack(1, __pyx_kp_s_Illegal_index); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 3980, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__66); __Pyx_GIVEREF(__pyx_tuple__66); - /* "netCDF4/_netCDF4.pyx":3984 + /* "netCDF4/_netCDF4.pyx":3983 * elif isinstance(elem, tuple): * if len(elem) != ndims: * raise IndexError("Illegal index") # <<<<<<<<<<<<<< * elemnew = [] * for n,e in enumerate(elem): */ - __pyx_tuple__67 = PyTuple_Pack(1, __pyx_kp_s_Illegal_index); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 3984, __pyx_L1_error) + __pyx_tuple__67 = PyTuple_Pack(1, __pyx_kp_s_Illegal_index); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 3983, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__67); __Pyx_GIVEREF(__pyx_tuple__67); - /* "netCDF4/_netCDF4.pyx":3992 + /* "netCDF4/_netCDF4.pyx":3991 * enew = self.shape[n]+e * if enew < 0: * raise IndexError("Illegal index") # <<<<<<<<<<<<<< * else: * elemnew.append(self.shape[n]+e) */ - __pyx_tuple__68 = PyTuple_Pack(1, __pyx_kp_s_Illegal_index); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 3992, __pyx_L1_error) + __pyx_tuple__68 = PyTuple_Pack(1, __pyx_kp_s_Illegal_index); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 3991, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__68); __Pyx_GIVEREF(__pyx_tuple__68); - /* "netCDF4/_netCDF4.pyx":4164 + /* "netCDF4/_netCDF4.pyx":4163 * fillval = self._FillValue * else: * fillval = default_fillvals[self.dtype.str[1:]] # <<<<<<<<<<<<<< * data = data.filled(fill_value=fillval) * */ - __pyx_slice__69 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__69)) __PYX_ERR(0, 4164, __pyx_L1_error) + __pyx_slice__69 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__69)) __PYX_ERR(0, 4163, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__69); __Pyx_GIVEREF(__pyx_slice__69); - /* "netCDF4/_netCDF4.pyx":4182 + /* "netCDF4/_netCDF4.pyx":4181 * def __len__(self): * if not self.shape: * raise TypeError('len() of unsized object') # <<<<<<<<<<<<<< * else: * return self.shape[0] */ - __pyx_tuple__70 = PyTuple_Pack(1, __pyx_kp_s_len_of_unsized_object); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 4182, __pyx_L1_error) + __pyx_tuple__70 = PyTuple_Pack(1, __pyx_kp_s_len_of_unsized_object); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 4181, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__70); __Pyx_GIVEREF(__pyx_tuple__70); - /* "netCDF4/_netCDF4.pyx":4194 + /* "netCDF4/_netCDF4.pyx":4193 * Scientific.IO.NetCDF, can also be done by assigning to an Ellipsis slice ([...]).""" * if len(self.dimensions): * raise IndexError('to assign values to a non-scalar variable, use a slice') # <<<<<<<<<<<<<< * self[:]=val * */ - __pyx_tuple__71 = PyTuple_Pack(1, __pyx_kp_s_to_assign_values_to_a_non_scalar); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 4194, __pyx_L1_error) + __pyx_tuple__71 = PyTuple_Pack(1, __pyx_kp_s_to_assign_values_to_a_non_scalar); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 4193, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__71); __Pyx_GIVEREF(__pyx_tuple__71); - /* "netCDF4/_netCDF4.pyx":4195 + /* "netCDF4/_netCDF4.pyx":4194 * if len(self.dimensions): * raise IndexError('to assign values to a non-scalar variable, use a slice') * self[:]=val # <<<<<<<<<<<<<< * * def getValue(self): */ - __pyx_slice__72 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__72)) __PYX_ERR(0, 4195, __pyx_L1_error) + __pyx_slice__72 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__72)) __PYX_ERR(0, 4194, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__72); __Pyx_GIVEREF(__pyx_slice__72); - /* "netCDF4/_netCDF4.pyx":4204 + /* "netCDF4/_netCDF4.pyx":4203 * Scientific.IO.NetCDF, can also be done by slicing with an Ellipsis ([...]).""" * if len(self.dimensions): * raise IndexError('to retrieve values from a non-scalar variable, use slicing') # <<<<<<<<<<<<<< * return self[slice(None)] * */ - __pyx_tuple__73 = PyTuple_Pack(1, __pyx_kp_s_to_retrieve_values_from_a_non_sc); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 4204, __pyx_L1_error) + __pyx_tuple__73 = PyTuple_Pack(1, __pyx_kp_s_to_retrieve_values_from_a_non_sc); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 4203, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__73); __Pyx_GIVEREF(__pyx_tuple__73); - /* "netCDF4/_netCDF4.pyx":4205 + /* "netCDF4/_netCDF4.pyx":4204 * if len(self.dimensions): * raise IndexError('to retrieve values from a non-scalar variable, use slicing') * return self[slice(None)] # <<<<<<<<<<<<<< * * def set_auto_maskandscale(self,maskandscale): */ - __pyx_slice__74 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__74)) __PYX_ERR(0, 4205, __pyx_L1_error) + __pyx_slice__74 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__74)) __PYX_ERR(0, 4204, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__74); __Pyx_GIVEREF(__pyx_slice__74); - /* "netCDF4/_netCDF4.pyx":4352 + /* "netCDF4/_netCDF4.pyx":4351 * startp[n] = start[n]+stride[n]*(count[n]-1) * stride[n] = -stride[n] * sl.append(slice(None, None, -1)) # this slice will reverse the data # <<<<<<<<<<<<<< * else: * startp[n] = start[n] */ - __pyx_slice__75 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__75)) __PYX_ERR(0, 4352, __pyx_L1_error) + __pyx_slice__75 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__75)) __PYX_ERR(0, 4351, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__75); __Pyx_GIVEREF(__pyx_slice__75); - /* "netCDF4/_netCDF4.pyx":4356 + /* "netCDF4/_netCDF4.pyx":4355 * startp[n] = start[n] * stridep[n] = stride[n] * sl.append(slice(None,None, 1)) # <<<<<<<<<<<<<< * totelem = totelem*countp[n] * # check to see that size of data array is what is expected */ - __pyx_slice__76 = PySlice_New(Py_None, Py_None, __pyx_int_1); if (unlikely(!__pyx_slice__76)) __PYX_ERR(0, 4356, __pyx_L1_error) + __pyx_slice__76 = PySlice_New(Py_None, Py_None, __pyx_int_1); if (unlikely(!__pyx_slice__76)) __PYX_ERR(0, 4355, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__76); __Pyx_GIVEREF(__pyx_slice__76); - /* "netCDF4/_netCDF4.pyx":4362 + /* "netCDF4/_netCDF4.pyx":4361 * dataelem = PyArray_SIZE(data) * if totelem != dataelem: * raise IndexError('size of data array does not conform to slice') # <<<<<<<<<<<<<< * if negstride: * # reverse data along axes with negative strides. */ - __pyx_tuple__77 = PyTuple_Pack(1, __pyx_kp_s_size_of_data_array_does_not_conf); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 4362, __pyx_L1_error) + __pyx_tuple__77 = PyTuple_Pack(1, __pyx_kp_s_size_of_data_array_does_not_conf); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 4361, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__77); __Pyx_GIVEREF(__pyx_tuple__77); - /* "netCDF4/_netCDF4.pyx":4388 + /* "netCDF4/_netCDF4.pyx":4387 * elif self._isvlen: * if data.dtype.char !='O': * raise TypeError('data to put in string variable must be an object array containing Python strings') # <<<<<<<<<<<<<< * # flatten data array. * data = data.flatten() */ - __pyx_tuple__78 = PyTuple_Pack(1, __pyx_kp_s_data_to_put_in_string_variable_m); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(0, 4388, __pyx_L1_error) + __pyx_tuple__78 = PyTuple_Pack(1, __pyx_kp_s_data_to_put_in_string_variable_m); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(0, 4387, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__78); __Pyx_GIVEREF(__pyx_tuple__78); - /* "netCDF4/_netCDF4.pyx":4407 + /* "netCDF4/_netCDF4.pyx":4406 * startp, countp, strdata) * else: * raise IndexError('strides must all be 1 for string variables') # <<<<<<<<<<<<<< * #ierr = nc_put_vars(self._grpid, self._varid, * # startp, countp, stridep, strdata) */ - __pyx_tuple__79 = PyTuple_Pack(1, __pyx_kp_s_strides_must_all_be_1_for_string); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 4407, __pyx_L1_error) + __pyx_tuple__79 = PyTuple_Pack(1, __pyx_kp_s_strides_must_all_be_1_for_string); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 4406, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__79); __Pyx_GIVEREF(__pyx_tuple__79); - /* "netCDF4/_netCDF4.pyx":4423 + /* "netCDF4/_netCDF4.pyx":4422 * elptr = (databuff)[0] * dataarr = elptr * if self.dtype != dataarr.dtype.str[1:]: # <<<<<<<<<<<<<< * #dataarr = dataarr.astype(self.dtype) # cast data, if necessary. * # casting doesn't work ?? just raise TypeError */ - __pyx_slice__80 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__80)) __PYX_ERR(0, 4423, __pyx_L1_error) + __pyx_slice__80 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__80)) __PYX_ERR(0, 4422, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__80); __Pyx_GIVEREF(__pyx_slice__80); - /* "netCDF4/_netCDF4.pyx":4435 + /* "netCDF4/_netCDF4.pyx":4434 * startp, countp, vldata) * else: * raise IndexError('strides must all be 1 for vlen variables') # <<<<<<<<<<<<<< * #ierr = nc_put_vars(self._grpid, self._varid, * # startp, countp, stridep, vldata) */ - __pyx_tuple__81 = PyTuple_Pack(1, __pyx_kp_s_strides_must_all_be_1_for_vlen_v); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 4435, __pyx_L1_error) + __pyx_tuple__81 = PyTuple_Pack(1, __pyx_kp_s_strides_must_all_be_1_for_vlen_v); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 4434, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__81); __Pyx_GIVEREF(__pyx_tuple__81); - /* "netCDF4/_netCDF4.pyx":4463 + /* "netCDF4/_netCDF4.pyx":4462 * for lendim in count: * if lendim == -1: * shapeout = shapeout + (1,) # <<<<<<<<<<<<<< * squeeze_out = True * else: */ - __pyx_tuple__82 = PyTuple_Pack(1, __pyx_int_1); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(0, 4463, __pyx_L1_error) + __pyx_tuple__82 = PyTuple_Pack(1, __pyx_int_1); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(0, 4462, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__82); __Pyx_GIVEREF(__pyx_tuple__82); - /* "netCDF4/_netCDF4.pyx":4484 + /* "netCDF4/_netCDF4.pyx":4483 * startp[n] = start[n]+stride[n]*(count[n]-1) * stride[n] = -stride[n] * sl.append(slice(None, None, -1)) # this slice will reverse the data # <<<<<<<<<<<<<< * else: * startp[n] = start[n] */ - __pyx_slice__83 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__83)) __PYX_ERR(0, 4484, __pyx_L1_error) + __pyx_slice__83 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__83)) __PYX_ERR(0, 4483, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__83); __Pyx_GIVEREF(__pyx_slice__83); - /* "netCDF4/_netCDF4.pyx":4488 + /* "netCDF4/_netCDF4.pyx":4487 * startp[n] = start[n] * stridep[n] = stride[n] * sl.append(slice(None,None, 1)) # <<<<<<<<<<<<<< * if self._isprimitive or self._iscompound or self._isenum: * data = numpy.empty(shapeout, self.dtype) */ - __pyx_slice__84 = PySlice_New(Py_None, Py_None, __pyx_int_1); if (unlikely(!__pyx_slice__84)) __PYX_ERR(0, 4488, __pyx_L1_error) + __pyx_slice__84 = PySlice_New(Py_None, Py_None, __pyx_int_1); if (unlikely(!__pyx_slice__84)) __PYX_ERR(0, 4487, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__84); __Pyx_GIVEREF(__pyx_slice__84); - /* "netCDF4/_netCDF4.pyx":4521 + /* "netCDF4/_netCDF4.pyx":4520 * else: * # FIXME: is this a bug in netCDF4? * raise IndexError('strides must all be 1 for string variables') # <<<<<<<<<<<<<< * #ierr = nc_get_vars(self._grpid, self._varid, * # startp, countp, stridep, strdata) */ - __pyx_tuple__85 = PyTuple_Pack(1, __pyx_kp_s_strides_must_all_be_1_for_string); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 4521, __pyx_L1_error) + __pyx_tuple__85 = PyTuple_Pack(1, __pyx_kp_s_strides_must_all_be_1_for_string); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 4520, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__85); __Pyx_GIVEREF(__pyx_tuple__85); - /* "netCDF4/_netCDF4.pyx":4551 + /* "netCDF4/_netCDF4.pyx":4550 * startp, countp, vldata) * else: * raise IndexError('strides must all be 1 for vlen variables') # <<<<<<<<<<<<<< * #ierr = nc_get_vars(self._grpid, self._varid, * # startp, countp, stridep, vldata) */ - __pyx_tuple__86 = PyTuple_Pack(1, __pyx_kp_s_strides_must_all_be_1_for_vlen_v); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(0, 4551, __pyx_L1_error) + __pyx_tuple__86 = PyTuple_Pack(1, __pyx_kp_s_strides_must_all_be_1_for_vlen_v); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(0, 4550, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__86); __Pyx_GIVEREF(__pyx_tuple__86); - /* "netCDF4/_netCDF4.pyx":4584 + /* "netCDF4/_netCDF4.pyx":4583 * # (pull request #555, issue #554). * if not data.dtype.isnative: * data.byteswap(True) # in-place byteswap # <<<<<<<<<<<<<< * if not self.dimensions: * return data[0] # a scalar */ - __pyx_tuple__87 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 4584, __pyx_L1_error) + __pyx_tuple__87 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 4583, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__87); __Pyx_GIVEREF(__pyx_tuple__87); - /* "netCDF4/_netCDF4.pyx":4594 + /* "netCDF4/_netCDF4.pyx":4593 * def __reduce__(self): * # raise error is user tries to pickle a Variable object. * raise NotImplementedError('Variable is not picklable') # <<<<<<<<<<<<<< * * # Compound datatype support. */ - __pyx_tuple__88 = PyTuple_Pack(1, __pyx_kp_s_Variable_is_not_picklable); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 4594, __pyx_L1_error) + __pyx_tuple__88 = PyTuple_Pack(1, __pyx_kp_s_Variable_is_not_picklable); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 4593, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__88); __Pyx_GIVEREF(__pyx_tuple__88); - /* "netCDF4/_netCDF4.pyx":4661 + /* "netCDF4/_netCDF4.pyx":4660 * def __reduce__(self): * # raise error is user tries to pickle a CompoundType object. * raise NotImplementedError('CompoundType is not picklable') # <<<<<<<<<<<<<< * * cdef _def_compound(grp, object dt, object dtype_name): */ - __pyx_tuple__89 = PyTuple_Pack(1, __pyx_kp_s_CompoundType_is_not_picklable); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(0, 4661, __pyx_L1_error) + __pyx_tuple__89 = PyTuple_Pack(1, __pyx_kp_s_CompoundType_is_not_picklable); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(0, 4660, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__89); __Pyx_GIVEREF(__pyx_tuple__89); - /* "netCDF4/_netCDF4.pyx":4691 + /* "netCDF4/_netCDF4.pyx":4690 * if format.kind != 'V': # scalar primitive type * try: * xtype_tmp = _nptonctype[format.str[1:]] # <<<<<<<<<<<<<< * except KeyError: * raise ValueError('Unsupported compound type element') */ - __pyx_slice__90 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__90)) __PYX_ERR(0, 4691, __pyx_L1_error) + __pyx_slice__90 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__90)) __PYX_ERR(0, 4690, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__90); __Pyx_GIVEREF(__pyx_slice__90); - /* "netCDF4/_netCDF4.pyx":4693 + /* "netCDF4/_netCDF4.pyx":4692 * xtype_tmp = _nptonctype[format.str[1:]] * except KeyError: * raise ValueError('Unsupported compound type element') # <<<<<<<<<<<<<< * ierr = nc_insert_compound(grp._grpid, xtype, namstring, * offset, xtype_tmp) */ - __pyx_tuple__91 = PyTuple_Pack(1, __pyx_kp_s_Unsupported_compound_type_elemen); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(0, 4693, __pyx_L1_error) + __pyx_tuple__91 = PyTuple_Pack(1, __pyx_kp_s_Unsupported_compound_type_elemen); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(0, 4692, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__91); __Pyx_GIVEREF(__pyx_tuple__91); - /* "netCDF4/_netCDF4.pyx":4716 + /* "netCDF4/_netCDF4.pyx":4715 * if format.subdtype[0].str[1] != 'V': # primitive type. * try: * xtype_tmp = _nptonctype[format.subdtype[0].str[1:]] # <<<<<<<<<<<<<< * except KeyError: * raise ValueError('Unsupported compound type element') */ - __pyx_slice__92 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__92)) __PYX_ERR(0, 4716, __pyx_L1_error) + __pyx_slice__92 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__92)) __PYX_ERR(0, 4715, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__92); __Pyx_GIVEREF(__pyx_slice__92); - /* "netCDF4/_netCDF4.pyx":4718 + /* "netCDF4/_netCDF4.pyx":4717 * xtype_tmp = _nptonctype[format.subdtype[0].str[1:]] * except KeyError: * raise ValueError('Unsupported compound type element') # <<<<<<<<<<<<<< * ierr = nc_insert_array_compound(grp._grpid,xtype,namstring, * offset,xtype_tmp,ndims,dim_sizes) */ - __pyx_tuple__93 = PyTuple_Pack(1, __pyx_kp_s_Unsupported_compound_type_elemen); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(0, 4718, __pyx_L1_error) + __pyx_tuple__93 = PyTuple_Pack(1, __pyx_kp_s_Unsupported_compound_type_elemen); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(0, 4717, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__93); __Pyx_GIVEREF(__pyx_tuple__93); - /* "netCDF4/_netCDF4.pyx":4756 + /* "netCDF4/_netCDF4.pyx":4755 * parent_grp = grp.parent * except AttributeError: * raise ValueError("cannot find compound type in this group or parent groups") # <<<<<<<<<<<<<< * if parent_grp is None: * raise ValueError("cannot find compound type in this group or parent groups") */ - __pyx_tuple__94 = PyTuple_Pack(1, __pyx_kp_s_cannot_find_compound_type_in_thi); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(0, 4756, __pyx_L1_error) + __pyx_tuple__94 = PyTuple_Pack(1, __pyx_kp_s_cannot_find_compound_type_in_thi); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(0, 4755, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__94); __Pyx_GIVEREF(__pyx_tuple__94); - /* "netCDF4/_netCDF4.pyx":4758 + /* "netCDF4/_netCDF4.pyx":4757 * raise ValueError("cannot find compound type in this group or parent groups") * if parent_grp is None: * raise ValueError("cannot find compound type in this group or parent groups") # <<<<<<<<<<<<<< * else: * xtype = _find_cmptype(parent_grp,dtype) */ - __pyx_tuple__95 = PyTuple_Pack(1, __pyx_kp_s_cannot_find_compound_type_in_thi); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(0, 4758, __pyx_L1_error) + __pyx_tuple__95 = PyTuple_Pack(1, __pyx_kp_s_cannot_find_compound_type_in_thi); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(0, 4757, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__95); __Pyx_GIVEREF(__pyx_tuple__95); - /* "netCDF4/_netCDF4.pyx":4832 + /* "netCDF4/_netCDF4.pyx":4831 * field_type = _read_compound(group, field_typeid, endian=endian) * else: * raise KeyError('compound field of an unsupported data type') # <<<<<<<<<<<<<< * if field_shape != (): * formats.append((field_type,field_shape)) */ - __pyx_tuple__96 = PyTuple_Pack(1, __pyx_kp_s_compound_field_of_an_unsupported); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(0, 4832, __pyx_L1_error) + __pyx_tuple__96 = PyTuple_Pack(1, __pyx_kp_s_compound_field_of_an_unsupported); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(0, 4831, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__96); __Pyx_GIVEREF(__pyx_tuple__96); - /* "netCDF4/_netCDF4.pyx":4908 + /* "netCDF4/_netCDF4.pyx":4907 * def __reduce__(self): * # raise error is user tries to pickle a VLType object. * raise NotImplementedError('VLType is not picklable') # <<<<<<<<<<<<<< * * cdef _def_vlen(grp, object dt, object dtype_name): */ - __pyx_tuple__97 = PyTuple_Pack(1, __pyx_kp_s_VLType_is_not_picklable); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(0, 4908, __pyx_L1_error) + __pyx_tuple__97 = PyTuple_Pack(1, __pyx_kp_s_VLType_is_not_picklable); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(0, 4907, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__97); __Pyx_GIVEREF(__pyx_tuple__97); - /* "netCDF4/_netCDF4.pyx":4925 + /* "netCDF4/_netCDF4.pyx":4924 * namstring = bytestr * dt = numpy.dtype(dt) # convert to numpy datatype. * if dt.str[1:] in _supportedtypes: # <<<<<<<<<<<<<< * # find netCDF primitive data type corresponding to * # specified numpy data type. */ - __pyx_slice__98 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__98)) __PYX_ERR(0, 4925, __pyx_L1_error) + __pyx_slice__98 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__98)) __PYX_ERR(0, 4924, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__98); __Pyx_GIVEREF(__pyx_slice__98); - /* "netCDF4/_netCDF4.pyx":4928 + /* "netCDF4/_netCDF4.pyx":4927 * # find netCDF primitive data type corresponding to * # specified numpy data type. * xtype_tmp = _nptonctype[dt.str[1:]] # <<<<<<<<<<<<<< * ierr = nc_def_vlen(grp._grpid, namstring, xtype_tmp, &xtype); * if ierr != NC_NOERR: */ - __pyx_slice__99 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__99)) __PYX_ERR(0, 4928, __pyx_L1_error) + __pyx_slice__99 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__99)) __PYX_ERR(0, 4927, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__99); __Pyx_GIVEREF(__pyx_slice__99); - /* "netCDF4/_netCDF4.pyx":4933 + /* "netCDF4/_netCDF4.pyx":4932 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * else: * raise KeyError("unsupported datatype specified for VLEN") # <<<<<<<<<<<<<< * return xtype, dt * */ - __pyx_tuple__100 = PyTuple_Pack(1, __pyx_kp_s_unsupported_datatype_specified_f); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(0, 4933, __pyx_L1_error) + __pyx_tuple__100 = PyTuple_Pack(1, __pyx_kp_s_unsupported_datatype_specified_f); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(0, 4932, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__100); __Pyx_GIVEREF(__pyx_tuple__100); - /* "netCDF4/_netCDF4.pyx":4960 + /* "netCDF4/_netCDF4.pyx":4959 * dt = numpy.dtype(datatype) # see if it is a primitive type * except KeyError: * raise KeyError("unsupported component type for VLEN") # <<<<<<<<<<<<<< * return VLType(group, dt, name, typeid=xtype) * */ - __pyx_tuple__101 = PyTuple_Pack(1, __pyx_kp_s_unsupported_component_type_for_V); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(0, 4960, __pyx_L1_error) + __pyx_tuple__101 = PyTuple_Pack(1, __pyx_kp_s_unsupported_component_type_for_V); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(0, 4959, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__101); __Pyx_GIVEREF(__pyx_tuple__101); - /* "netCDF4/_netCDF4.pyx":5027 + /* "netCDF4/_netCDF4.pyx":5026 * def __reduce__(self): * # raise error is user tries to pickle a EnumType object. * raise NotImplementedError('EnumType is not picklable') # <<<<<<<<<<<<<< * * cdef _def_enum(grp, object dt, object dtype_name, object enum_dict): */ - __pyx_tuple__102 = PyTuple_Pack(1, __pyx_kp_s_EnumType_is_not_picklable); if (unlikely(!__pyx_tuple__102)) __PYX_ERR(0, 5027, __pyx_L1_error) + __pyx_tuple__102 = PyTuple_Pack(1, __pyx_kp_s_EnumType_is_not_picklable); if (unlikely(!__pyx_tuple__102)) __PYX_ERR(0, 5026, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__102); __Pyx_GIVEREF(__pyx_tuple__102); - /* "netCDF4/_netCDF4.pyx":5039 + /* "netCDF4/_netCDF4.pyx":5038 * namstring = bytestr * dt = numpy.dtype(dt) # convert to numpy datatype. * if dt.str[1:] in _intnptonctype.keys(): # <<<<<<<<<<<<<< * # find netCDF primitive data type corresponding to * # specified numpy data type. */ - __pyx_slice__103 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__103)) __PYX_ERR(0, 5039, __pyx_L1_error) + __pyx_slice__103 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__103)) __PYX_ERR(0, 5038, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__103); __Pyx_GIVEREF(__pyx_slice__103); - /* "netCDF4/_netCDF4.pyx":5042 + /* "netCDF4/_netCDF4.pyx":5041 * # find netCDF primitive data type corresponding to * # specified numpy data type. * xtype_tmp = _intnptonctype[dt.str[1:]] # <<<<<<<<<<<<<< * ierr = nc_def_enum(grp._grpid, xtype_tmp, namstring, &xtype); * if ierr != NC_NOERR: */ - __pyx_slice__104 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__104)) __PYX_ERR(0, 5042, __pyx_L1_error) + __pyx_slice__104 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__104)) __PYX_ERR(0, 5041, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__104); __Pyx_GIVEREF(__pyx_slice__104); - /* "netCDF4/_netCDF4.pyx":5082 + /* "netCDF4/_netCDF4.pyx":5081 * dt = numpy.dtype(datatype) # see if it is a primitive type * except KeyError: * raise KeyError("unsupported component type for VLEN") # <<<<<<<<<<<<<< * # loop over members, build dict. * enum_dict = {} */ - __pyx_tuple__105 = PyTuple_Pack(1, __pyx_kp_s_unsupported_component_type_for_V); if (unlikely(!__pyx_tuple__105)) __PYX_ERR(0, 5082, __pyx_L1_error) + __pyx_tuple__105 = PyTuple_Pack(1, __pyx_kp_s_unsupported_component_type_for_V); if (unlikely(!__pyx_tuple__105)) __PYX_ERR(0, 5081, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__105); __Pyx_GIVEREF(__pyx_tuple__105); - /* "netCDF4/_netCDF4.pyx":5110 + /* "netCDF4/_netCDF4.pyx":5109 * return str(bytestr,encoding='ascii') * else: * return bytestr.encode('ascii') # <<<<<<<<<<<<<< * * #---------------------------------------- */ - __pyx_tuple__106 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(0, 5110, __pyx_L1_error) + __pyx_tuple__106 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(0, 5109, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__106); __Pyx_GIVEREF(__pyx_tuple__106); - /* "netCDF4/_netCDF4.pyx":5130 + /* "netCDF4/_netCDF4.pyx":5129 * units = timestr_split[0].lower() * if timestr_split[1].lower() != 'since': * raise ValueError("no 'since' in unit_string") # <<<<<<<<<<<<<< * # parse the date string. * n = timestr.find('since')+6 */ - __pyx_tuple__107 = PyTuple_Pack(1, __pyx_kp_s_no_since_in_unit_string); if (unlikely(!__pyx_tuple__107)) __PYX_ERR(0, 5130, __pyx_L1_error) + __pyx_tuple__107 = PyTuple_Pack(1, __pyx_kp_s_no_since_in_unit_string); if (unlikely(!__pyx_tuple__107)) __PYX_ERR(0, 5129, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__107); __Pyx_GIVEREF(__pyx_tuple__107); - /* "netCDF4/_netCDF4.pyx":5132 + /* "netCDF4/_netCDF4.pyx":5131 * raise ValueError("no 'since' in unit_string") * # parse the date string. * n = timestr.find('since')+6 # <<<<<<<<<<<<<< * isostring = timestr[n:] * year, month, day, hour, minute, second, utc_offset =\ */ - __pyx_tuple__108 = PyTuple_Pack(1, __pyx_n_s_since); if (unlikely(!__pyx_tuple__108)) __PYX_ERR(0, 5132, __pyx_L1_error) + __pyx_tuple__108 = PyTuple_Pack(1, __pyx_n_s_since); if (unlikely(!__pyx_tuple__108)) __PYX_ERR(0, 5131, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__108); __Pyx_GIVEREF(__pyx_tuple__108); - /* "netCDF4/_netCDF4.pyx":5144 + /* "netCDF4/_netCDF4.pyx":5143 * basedate = netcdftime.datetime(year, month, day, hour, minute, second) * else: * raise ValueError('cannot use utc_offset for reference years <= 0') # <<<<<<<<<<<<<< * return basedate * */ - __pyx_tuple__109 = PyTuple_Pack(1, __pyx_kp_s_cannot_use_utc_offset_for_refere); if (unlikely(!__pyx_tuple__109)) __PYX_ERR(0, 5144, __pyx_L1_error) + __pyx_tuple__109 = PyTuple_Pack(1, __pyx_kp_s_cannot_use_utc_offset_for_refere); if (unlikely(!__pyx_tuple__109)) __PYX_ERR(0, 5143, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__109); __Pyx_GIVEREF(__pyx_tuple__109); - /* "netCDF4/_netCDF4.pyx":5165 + /* "netCDF4/_netCDF4.pyx":5164 * (default) or `'U1'` (if dtype=`'U'`)""" * if dtype not in ["S","U"]: * raise ValueError("dtype must string or unicode ('S' or 'U')") # <<<<<<<<<<<<<< * arr = numpy.zeros(NUMCHARS,dtype+'1') * arr[0:len(string)] = tuple(string) */ - __pyx_tuple__110 = PyTuple_Pack(1, __pyx_kp_s_dtype_must_string_or_unicode_S_o); if (unlikely(!__pyx_tuple__110)) __PYX_ERR(0, 5165, __pyx_L1_error) + __pyx_tuple__110 = PyTuple_Pack(1, __pyx_kp_s_dtype_must_string_or_unicode_S_o); if (unlikely(!__pyx_tuple__110)) __PYX_ERR(0, 5164, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__110); __Pyx_GIVEREF(__pyx_tuple__110); - /* "netCDF4/_netCDF4.pyx":5184 + /* "netCDF4/_netCDF4.pyx":5183 * dtype = a.dtype.kind * if dtype not in ["S","U"]: * raise ValueError("type must string or unicode ('S' or 'U')") # <<<<<<<<<<<<<< * b = numpy.array(tuple(a.tostring().decode(default_encoding)),dtype+'1') * b.shape = a.shape + (a.itemsize,) */ - __pyx_tuple__111 = PyTuple_Pack(1, __pyx_kp_s_type_must_string_or_unicode_S_or); if (unlikely(!__pyx_tuple__111)) __PYX_ERR(0, 5184, __pyx_L1_error) + __pyx_tuple__111 = PyTuple_Pack(1, __pyx_kp_s_type_must_string_or_unicode_S_or); if (unlikely(!__pyx_tuple__111)) __PYX_ERR(0, 5183, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__111); __Pyx_GIVEREF(__pyx_tuple__111); - /* "netCDF4/_netCDF4.pyx":5203 + /* "netCDF4/_netCDF4.pyx":5202 * dtype = b.dtype.kind * if dtype not in ["S","U"]: * raise ValueError("type must string or unicode ('S' or 'U')") # <<<<<<<<<<<<<< * bs = b.tostring().decode(default_encoding) * slen = int(b.shape[-1]) */ - __pyx_tuple__112 = PyTuple_Pack(1, __pyx_kp_s_type_must_string_or_unicode_S_or); if (unlikely(!__pyx_tuple__112)) __PYX_ERR(0, 5203, __pyx_L1_error) + __pyx_tuple__112 = PyTuple_Pack(1, __pyx_kp_s_type_must_string_or_unicode_S_or); if (unlikely(!__pyx_tuple__112)) __PYX_ERR(0, 5202, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__112); __Pyx_GIVEREF(__pyx_tuple__112); - /* "netCDF4/_netCDF4.pyx":5207 + /* "netCDF4/_netCDF4.pyx":5206 * slen = int(b.shape[-1]) * a = numpy.array([bs[n1:n1+slen] for n1 in range(0,len(bs),slen)],dtype+repr(slen)) * a.shape = b.shape[:-1] # <<<<<<<<<<<<<< * return a * */ - __pyx_slice__113 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__113)) __PYX_ERR(0, 5207, __pyx_L1_error) + __pyx_slice__113 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__113)) __PYX_ERR(0, 5206, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__113); __Pyx_GIVEREF(__pyx_slice__113); - /* "netCDF4/_netCDF4.pyx":5289 + /* "netCDF4/_netCDF4.pyx":5288 * times.append(totaltime/1.e6/3600./24.) * else: * raise ValueError('unsupported time units') # <<<<<<<<<<<<<< * if isscalar: * return times[0] */ - __pyx_tuple__114 = PyTuple_Pack(1, __pyx_kp_s_unsupported_time_units); if (unlikely(!__pyx_tuple__114)) __PYX_ERR(0, 5289, __pyx_L1_error) + __pyx_tuple__114 = PyTuple_Pack(1, __pyx_kp_s_unsupported_time_units); if (unlikely(!__pyx_tuple__114)) __PYX_ERR(0, 5288, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__114); __Pyx_GIVEREF(__pyx_tuple__114); @@ -81658,100 +81751,100 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GIVEREF(__pyx_tuple__142); __pyx_codeobj__143 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__142, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_set_default_format, 1185, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__143)) __PYX_ERR(0, 1185, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5105 + /* "netCDF4/_netCDF4.pyx":5104 * return pystr # already bytes or unicode? * * def _to_ascii(bytestr): # <<<<<<<<<<<<<< * # encode a byte string to an ascii encoded string. * if python3: */ - __pyx_tuple__144 = PyTuple_Pack(1, __pyx_n_s_bytestr); if (unlikely(!__pyx_tuple__144)) __PYX_ERR(0, 5105, __pyx_L1_error) + __pyx_tuple__144 = PyTuple_Pack(1, __pyx_n_s_bytestr); if (unlikely(!__pyx_tuple__144)) __PYX_ERR(0, 5104, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__144); __Pyx_GIVEREF(__pyx_tuple__144); - __pyx_codeobj__145 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__144, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_to_ascii, 5105, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__145)) __PYX_ERR(0, 5105, __pyx_L1_error) + __pyx_codeobj__145 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__144, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_to_ascii, 5104, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__145)) __PYX_ERR(0, 5104, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5120 + /* "netCDF4/_netCDF4.pyx":5119 * * # start of the gregorian calendar * gregorian = datetime(1582,10,15) # <<<<<<<<<<<<<< * * def _dateparse(timestr): */ - __pyx_tuple__146 = PyTuple_Pack(3, __pyx_int_1582, __pyx_int_10, __pyx_int_15); if (unlikely(!__pyx_tuple__146)) __PYX_ERR(0, 5120, __pyx_L1_error) + __pyx_tuple__146 = PyTuple_Pack(3, __pyx_int_1582, __pyx_int_10, __pyx_int_15); if (unlikely(!__pyx_tuple__146)) __PYX_ERR(0, 5119, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__146); __Pyx_GIVEREF(__pyx_tuple__146); - /* "netCDF4/_netCDF4.pyx":5122 + /* "netCDF4/_netCDF4.pyx":5121 * gregorian = datetime(1582,10,15) * * def _dateparse(timestr): # <<<<<<<<<<<<<< * """parse a string of the form time-units since yyyy-mm-dd hh:mm:ss, * return a datetime instance""" */ - __pyx_tuple__147 = PyTuple_Pack(13, __pyx_n_s_timestr, __pyx_n_s_timestr_split, __pyx_n_s_units, __pyx_n_s_n, __pyx_n_s_isostring, __pyx_n_s_year, __pyx_n_s_month, __pyx_n_s_day, __pyx_n_s_hour, __pyx_n_s_minute, __pyx_n_s_second, __pyx_n_s_utc_offset, __pyx_n_s_basedate); if (unlikely(!__pyx_tuple__147)) __PYX_ERR(0, 5122, __pyx_L1_error) + __pyx_tuple__147 = PyTuple_Pack(13, __pyx_n_s_timestr, __pyx_n_s_timestr_split, __pyx_n_s_units, __pyx_n_s_n, __pyx_n_s_isostring, __pyx_n_s_year, __pyx_n_s_month, __pyx_n_s_day, __pyx_n_s_hour, __pyx_n_s_minute, __pyx_n_s_second, __pyx_n_s_utc_offset, __pyx_n_s_basedate); if (unlikely(!__pyx_tuple__147)) __PYX_ERR(0, 5121, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__147); __Pyx_GIVEREF(__pyx_tuple__147); - __pyx_codeobj__148 = (PyObject*)__Pyx_PyCode_New(1, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__147, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_dateparse, 5122, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__148)) __PYX_ERR(0, 5122, __pyx_L1_error) + __pyx_codeobj__148 = (PyObject*)__Pyx_PyCode_New(1, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__147, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_dateparse, 5121, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__148)) __PYX_ERR(0, 5121, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5147 + /* "netCDF4/_netCDF4.pyx":5146 * return basedate * * def stringtoarr(string,NUMCHARS,dtype='S'): # <<<<<<<<<<<<<< * """ * **`stringtoarr(a, NUMCHARS,dtype='S')`** */ - __pyx_tuple__149 = PyTuple_Pack(4, __pyx_n_s_string, __pyx_n_s_NUMCHARS, __pyx_n_s_dtype, __pyx_n_s_arr); if (unlikely(!__pyx_tuple__149)) __PYX_ERR(0, 5147, __pyx_L1_error) + __pyx_tuple__149 = PyTuple_Pack(4, __pyx_n_s_string, __pyx_n_s_NUMCHARS, __pyx_n_s_dtype, __pyx_n_s_arr); if (unlikely(!__pyx_tuple__149)) __PYX_ERR(0, 5146, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__149); __Pyx_GIVEREF(__pyx_tuple__149); - __pyx_codeobj__150 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__149, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_stringtoarr, 5147, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__150)) __PYX_ERR(0, 5147, __pyx_L1_error) + __pyx_codeobj__150 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__149, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_stringtoarr, 5146, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__150)) __PYX_ERR(0, 5146, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5170 + /* "netCDF4/_netCDF4.pyx":5169 * return arr * * def stringtochar(a): # <<<<<<<<<<<<<< * """ * **`stringtochar(a)`** */ - __pyx_tuple__151 = PyTuple_Pack(3, __pyx_n_s_a, __pyx_n_s_dtype, __pyx_n_s_b); if (unlikely(!__pyx_tuple__151)) __PYX_ERR(0, 5170, __pyx_L1_error) + __pyx_tuple__151 = PyTuple_Pack(3, __pyx_n_s_a, __pyx_n_s_dtype, __pyx_n_s_b); if (unlikely(!__pyx_tuple__151)) __PYX_ERR(0, 5169, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__151); __Pyx_GIVEREF(__pyx_tuple__151); - __pyx_codeobj__152 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__151, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_stringtochar, 5170, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__152)) __PYX_ERR(0, 5170, __pyx_L1_error) + __pyx_codeobj__152 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__151, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_stringtochar, 5169, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__152)) __PYX_ERR(0, 5169, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5189 + /* "netCDF4/_netCDF4.pyx":5188 * return b * * def chartostring(b): # <<<<<<<<<<<<<< * """ * **`chartostring(b)`** */ - __pyx_tuple__153 = PyTuple_Pack(6, __pyx_n_s_b, __pyx_n_s_dtype, __pyx_n_s_bs, __pyx_n_s_slen, __pyx_n_s_a, __pyx_n_s_n1); if (unlikely(!__pyx_tuple__153)) __PYX_ERR(0, 5189, __pyx_L1_error) + __pyx_tuple__153 = PyTuple_Pack(6, __pyx_n_s_b, __pyx_n_s_dtype, __pyx_n_s_bs, __pyx_n_s_slen, __pyx_n_s_a, __pyx_n_s_n1); if (unlikely(!__pyx_tuple__153)) __PYX_ERR(0, 5188, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__153); __Pyx_GIVEREF(__pyx_tuple__153); - __pyx_codeobj__154 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__153, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_chartostring, 5189, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__154)) __PYX_ERR(0, 5189, __pyx_L1_error) + __pyx_codeobj__154 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__153, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_chartostring, 5188, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__154)) __PYX_ERR(0, 5188, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5210 + /* "netCDF4/_netCDF4.pyx":5209 * return a * * def date2num(dates,units,calendar='standard'): # <<<<<<<<<<<<<< * """ * **`date2num(dates,units,calendar='standard')`** */ - __pyx_tuple__155 = PyTuple_Pack(15, __pyx_n_s_dates, __pyx_n_s_units, __pyx_n_s_calendar, __pyx_n_s_basedate, __pyx_n_s_unit, __pyx_n_s_msg, __pyx_n_s_isscalar, __pyx_n_s_shape, __pyx_n_s_ismasked, __pyx_n_s_mask, __pyx_n_s_times, __pyx_n_s_date, __pyx_n_s_td, __pyx_n_s_totaltime, __pyx_n_s_cdftime); if (unlikely(!__pyx_tuple__155)) __PYX_ERR(0, 5210, __pyx_L1_error) + __pyx_tuple__155 = PyTuple_Pack(15, __pyx_n_s_dates, __pyx_n_s_units, __pyx_n_s_calendar, __pyx_n_s_basedate, __pyx_n_s_unit, __pyx_n_s_msg, __pyx_n_s_isscalar, __pyx_n_s_shape, __pyx_n_s_ismasked, __pyx_n_s_mask, __pyx_n_s_times, __pyx_n_s_date, __pyx_n_s_td, __pyx_n_s_totaltime, __pyx_n_s_cdftime); if (unlikely(!__pyx_tuple__155)) __PYX_ERR(0, 5209, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__155); __Pyx_GIVEREF(__pyx_tuple__155); - __pyx_codeobj__156 = (PyObject*)__Pyx_PyCode_New(3, 0, 15, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__155, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_date2num, 5210, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__156)) __PYX_ERR(0, 5210, __pyx_L1_error) + __pyx_codeobj__156 = (PyObject*)__Pyx_PyCode_New(3, 0, 15, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__155, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_date2num, 5209, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__156)) __PYX_ERR(0, 5209, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5298 + /* "netCDF4/_netCDF4.pyx":5297 * return cdftime.date2num(dates) * * def num2date(times,units,calendar='standard'): # <<<<<<<<<<<<<< * """ * **`num2date(times,units,calendar='standard')`** */ - __pyx_tuple__157 = PyTuple_Pack(20, __pyx_n_s_times, __pyx_n_s_units, __pyx_n_s_calendar, __pyx_n_s_basedate, __pyx_n_s_unit, __pyx_n_s_msg, __pyx_n_s_isscalar, __pyx_n_s_shape, __pyx_n_s_ismasked, __pyx_n_s_mask, __pyx_n_s_dates, __pyx_n_s_time, __pyx_n_s_tsecs, __pyx_n_s_days, __pyx_n_s_msecsd, __pyx_n_s_secs, __pyx_n_s_msecs, __pyx_n_s_td, __pyx_n_s_date, __pyx_n_s_cdftime); if (unlikely(!__pyx_tuple__157)) __PYX_ERR(0, 5298, __pyx_L1_error) + __pyx_tuple__157 = PyTuple_Pack(21, __pyx_n_s_times, __pyx_n_s_units, __pyx_n_s_calendar, __pyx_n_s_basedate, __pyx_n_s_unit, __pyx_n_s_msg, __pyx_n_s_postimes, __pyx_n_s_isscalar, __pyx_n_s_shape, __pyx_n_s_ismasked, __pyx_n_s_mask, __pyx_n_s_dates, __pyx_n_s_time, __pyx_n_s_tsecs, __pyx_n_s_days, __pyx_n_s_msecsd, __pyx_n_s_secs, __pyx_n_s_msecs, __pyx_n_s_td, __pyx_n_s_date, __pyx_n_s_cdftime); if (unlikely(!__pyx_tuple__157)) __PYX_ERR(0, 5297, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__157); __Pyx_GIVEREF(__pyx_tuple__157); - __pyx_codeobj__158 = (PyObject*)__Pyx_PyCode_New(3, 0, 20, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__157, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_num2date, 5298, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__158)) __PYX_ERR(0, 5298, __pyx_L1_error) + __pyx_codeobj__158 = (PyObject*)__Pyx_PyCode_New(3, 0, 21, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__157, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_num2date, 5297, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__158)) __PYX_ERR(0, 5297, __pyx_L1_error) /* "netCDF4/_netCDF4.pyx":5401 * return cdftime.num2date(times) @@ -82257,11 +82350,11 @@ PyMODINIT_FUNC PyInit__netCDF4(void) #endif if (PyObject_SetAttrString(__pyx_m, "Variable", (PyObject *)&__pyx_type_7netCDF4_8_netCDF4_Variable) < 0) __PYX_ERR(0, 2883, __pyx_L1_error) __pyx_ptype_7netCDF4_8_netCDF4_Variable = &__pyx_type_7netCDF4_8_netCDF4_Variable; - if (PyType_Ready(&__pyx_type_7netCDF4_8_netCDF4_CompoundType) < 0) __PYX_ERR(0, 4598, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_7netCDF4_8_netCDF4_CompoundType) < 0) __PYX_ERR(0, 4597, __pyx_L1_error) __pyx_type_7netCDF4_8_netCDF4_CompoundType.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_7netCDF4_8_netCDF4_CompoundType, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 4598, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_7netCDF4_8_netCDF4_CompoundType, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 4597, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_7netCDF4_8_netCDF4_12CompoundType___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_7netCDF4_8_netCDF4_12CompoundType___init__.doc = __pyx_doc_7netCDF4_8_netCDF4_12CompoundType___init__; @@ -82269,13 +82362,13 @@ PyMODINIT_FUNC PyInit__netCDF4(void) } } #endif - if (PyObject_SetAttrString(__pyx_m, "CompoundType", (PyObject *)&__pyx_type_7netCDF4_8_netCDF4_CompoundType) < 0) __PYX_ERR(0, 4598, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "CompoundType", (PyObject *)&__pyx_type_7netCDF4_8_netCDF4_CompoundType) < 0) __PYX_ERR(0, 4597, __pyx_L1_error) __pyx_ptype_7netCDF4_8_netCDF4_CompoundType = &__pyx_type_7netCDF4_8_netCDF4_CompoundType; - if (PyType_Ready(&__pyx_type_7netCDF4_8_netCDF4_VLType) < 0) __PYX_ERR(0, 4847, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_7netCDF4_8_netCDF4_VLType) < 0) __PYX_ERR(0, 4846, __pyx_L1_error) __pyx_type_7netCDF4_8_netCDF4_VLType.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_7netCDF4_8_netCDF4_VLType, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 4847, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_7netCDF4_8_netCDF4_VLType, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 4846, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_7netCDF4_8_netCDF4_6VLType___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_7netCDF4_8_netCDF4_6VLType___init__.doc = __pyx_doc_7netCDF4_8_netCDF4_6VLType___init__; @@ -82283,13 +82376,13 @@ PyMODINIT_FUNC PyInit__netCDF4(void) } } #endif - if (PyObject_SetAttrString(__pyx_m, "VLType", (PyObject *)&__pyx_type_7netCDF4_8_netCDF4_VLType) < 0) __PYX_ERR(0, 4847, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "VLType", (PyObject *)&__pyx_type_7netCDF4_8_netCDF4_VLType) < 0) __PYX_ERR(0, 4846, __pyx_L1_error) __pyx_ptype_7netCDF4_8_netCDF4_VLType = &__pyx_type_7netCDF4_8_netCDF4_VLType; - if (PyType_Ready(&__pyx_type_7netCDF4_8_netCDF4_EnumType) < 0) __PYX_ERR(0, 4965, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_7netCDF4_8_netCDF4_EnumType) < 0) __PYX_ERR(0, 4964, __pyx_L1_error) __pyx_type_7netCDF4_8_netCDF4_EnumType.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_7netCDF4_8_netCDF4_EnumType, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 4965, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_7netCDF4_8_netCDF4_EnumType, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 4964, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_7netCDF4_8_netCDF4_8EnumType___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_7netCDF4_8_netCDF4_8EnumType___init__.doc = __pyx_doc_7netCDF4_8_netCDF4_8EnumType___init__; @@ -82297,7 +82390,7 @@ PyMODINIT_FUNC PyInit__netCDF4(void) } } #endif - if (PyObject_SetAttrString(__pyx_m, "EnumType", (PyObject *)&__pyx_type_7netCDF4_8_netCDF4_EnumType) < 0) __PYX_ERR(0, 4965, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "EnumType", (PyObject *)&__pyx_type_7netCDF4_8_netCDF4_EnumType) < 0) __PYX_ERR(0, 4964, __pyx_L1_error) __pyx_ptype_7netCDF4_8_netCDF4_EnumType = &__pyx_type_7netCDF4_8_netCDF4_EnumType; if (PyType_Ready(&__pyx_type_7netCDF4_8_netCDF4___pyx_scope_struct__genexpr) < 0) __PYX_ERR(0, 1033, __pyx_L1_error) __pyx_type_7netCDF4_8_netCDF4___pyx_scope_struct__genexpr.tp_print = 0; @@ -84377,110 +84470,110 @@ PyMODINIT_FUNC PyInit__netCDF4(void) if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Variable_size, __pyx_kp_s_The_number_of_stored_elements) < 0)) __PYX_ERR(0, 2974, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":4611 + /* "netCDF4/_netCDF4.pyx":4610 * cdef public nc_type _nc_type * cdef public dtype, name * __pdoc__['CompoundType.name'] = \ # <<<<<<<<<<<<<< * """String name.""" * __pdoc__['CompoundType.dtype'] = \ */ - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4611, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4610, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_CompoundType_name, __pyx_kp_s_String_name) < 0)) __PYX_ERR(0, 4611, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_CompoundType_name, __pyx_kp_s_String_name) < 0)) __PYX_ERR(0, 4610, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":4613 + /* "netCDF4/_netCDF4.pyx":4612 * __pdoc__['CompoundType.name'] = \ * """String name.""" * __pdoc__['CompoundType.dtype'] = \ # <<<<<<<<<<<<<< * """A numpy dtype object describing the compound data type.""" * def __init__(self, grp, object dt, object dtype_name, **kwargs): */ - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4613, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_CompoundType_dtype, __pyx_kp_s_A_numpy_dtype_object_describing_2) < 0)) __PYX_ERR(0, 4613, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_CompoundType_dtype, __pyx_kp_s_A_numpy_dtype_object_describing_2) < 0)) __PYX_ERR(0, 4612, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":4859 + /* "netCDF4/_netCDF4.pyx":4858 * cdef public nc_type _nc_type * cdef public dtype, name * __pdoc__['VLType.name'] = \ # <<<<<<<<<<<<<< * """String name.""" * __pdoc__['VLType.dtype'] = \ */ - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4859, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4858, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_VLType_name, __pyx_kp_s_String_name) < 0)) __PYX_ERR(0, 4859, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_VLType_name, __pyx_kp_s_String_name) < 0)) __PYX_ERR(0, 4858, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":4861 + /* "netCDF4/_netCDF4.pyx":4860 * __pdoc__['VLType.name'] = \ * """String name.""" * __pdoc__['VLType.dtype'] = \ # <<<<<<<<<<<<<< * """A numpy dtype object describing the component type for the VLEN.""" * def __init__(self, grp, object dt, object dtype_name, **kwargs): */ - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4861, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4860, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_VLType_dtype, __pyx_kp_s_A_numpy_dtype_object_describing_3) < 0)) __PYX_ERR(0, 4861, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_VLType_dtype, __pyx_kp_s_A_numpy_dtype_object_describing_3) < 0)) __PYX_ERR(0, 4860, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":4977 + /* "netCDF4/_netCDF4.pyx":4976 * cdef public nc_type _nc_type * cdef public dtype, name, enum_dict * __pdoc__['EnumType.name'] = \ # <<<<<<<<<<<<<< * """String name.""" * __pdoc__['EnumType.dtype'] = \ */ - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4977, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4976, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_EnumType_name, __pyx_kp_s_String_name) < 0)) __PYX_ERR(0, 4977, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_EnumType_name, __pyx_kp_s_String_name) < 0)) __PYX_ERR(0, 4976, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":4979 + /* "netCDF4/_netCDF4.pyx":4978 * __pdoc__['EnumType.name'] = \ * """String name.""" * __pdoc__['EnumType.dtype'] = \ # <<<<<<<<<<<<<< * """A numpy integer dtype object describing the base type for the Enum.""" * __pdoc__['EnumType.enum_dict'] = \ */ - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4979, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4978, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_EnumType_dtype, __pyx_kp_s_A_numpy_integer_dtype_object_des) < 0)) __PYX_ERR(0, 4979, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_EnumType_dtype, __pyx_kp_s_A_numpy_integer_dtype_object_des) < 0)) __PYX_ERR(0, 4978, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":4981 + /* "netCDF4/_netCDF4.pyx":4980 * __pdoc__['EnumType.dtype'] = \ * """A numpy integer dtype object describing the base type for the Enum.""" * __pdoc__['EnumType.enum_dict'] = \ # <<<<<<<<<<<<<< * """A python dictionary describing the enum fields and values.""" * def __init__(self, grp, object dt, object dtype_name, object enum_dict, **kwargs): */ - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4981, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4980, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_EnumType_enum_dict, __pyx_kp_s_A_python_dictionary_describing_t) < 0)) __PYX_ERR(0, 4981, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_EnumType_enum_dict, __pyx_kp_s_A_python_dictionary_describing_t) < 0)) __PYX_ERR(0, 4980, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":5105 + /* "netCDF4/_netCDF4.pyx":5104 * return pystr # already bytes or unicode? * * def _to_ascii(bytestr): # <<<<<<<<<<<<<< * # encode a byte string to an ascii encoded string. * if python3: */ - __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_7_to_ascii, NULL, __pyx_n_s_netCDF4__netCDF4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5105, __pyx_L1_error) + __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_7_to_ascii, NULL, __pyx_n_s_netCDF4__netCDF4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_to_ascii, __pyx_t_11) < 0) __PYX_ERR(0, 5105, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_to_ascii, __pyx_t_11) < 0) __PYX_ERR(0, 5104, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":5115 + /* "netCDF4/_netCDF4.pyx":5114 * # extra utilities (formerly in utils.pyx) * #---------------------------------------- * from datetime import timedelta, datetime, MINYEAR # <<<<<<<<<<<<<< * from netcdftime import _parse_date, microsec_units, millisec_units,\ * sec_units, min_units, hr_units, day_units */ - __pyx_t_11 = PyList_New(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5115, __pyx_L1_error) + __pyx_t_11 = PyList_New(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(__pyx_n_s_timedelta); __Pyx_GIVEREF(__pyx_n_s_timedelta); @@ -84491,31 +84584,31 @@ PyMODINIT_FUNC PyInit__netCDF4(void) __Pyx_INCREF(__pyx_n_s_MINYEAR); __Pyx_GIVEREF(__pyx_n_s_MINYEAR); PyList_SET_ITEM(__pyx_t_11, 2, __pyx_n_s_MINYEAR); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_datetime, __pyx_t_11, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5115, __pyx_L1_error) + __pyx_t_2 = __Pyx_Import(__pyx_n_s_datetime, __pyx_t_11, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_timedelta); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5115, __pyx_L1_error) + __pyx_t_11 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_timedelta); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_timedelta, __pyx_t_11) < 0) __PYX_ERR(0, 5115, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_timedelta, __pyx_t_11) < 0) __PYX_ERR(0, 5114, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_datetime); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5115, __pyx_L1_error) + __pyx_t_11 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_datetime); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_datetime, __pyx_t_11) < 0) __PYX_ERR(0, 5115, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_datetime, __pyx_t_11) < 0) __PYX_ERR(0, 5114, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_MINYEAR); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5115, __pyx_L1_error) + __pyx_t_11 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_MINYEAR); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_MINYEAR, __pyx_t_11) < 0) __PYX_ERR(0, 5115, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_MINYEAR, __pyx_t_11) < 0) __PYX_ERR(0, 5114, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5116 + /* "netCDF4/_netCDF4.pyx":5115 * #---------------------------------------- * from datetime import timedelta, datetime, MINYEAR * from netcdftime import _parse_date, microsec_units, millisec_units,\ # <<<<<<<<<<<<<< * sec_units, min_units, hr_units, day_units * */ - __pyx_t_2 = PyList_New(7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5116, __pyx_L1_error) + __pyx_t_2 = PyList_New(7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_parse_date); __Pyx_GIVEREF(__pyx_n_s_parse_date); @@ -84538,124 +84631,124 @@ PyMODINIT_FUNC PyInit__netCDF4(void) __Pyx_INCREF(__pyx_n_s_day_units); __Pyx_GIVEREF(__pyx_n_s_day_units); PyList_SET_ITEM(__pyx_t_2, 6, __pyx_n_s_day_units); - __pyx_t_11 = __Pyx_Import(__pyx_n_s_netcdftime, __pyx_t_2, -1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5116, __pyx_L1_error) + __pyx_t_11 = __Pyx_Import(__pyx_n_s_netcdftime, __pyx_t_2, -1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_11, __pyx_n_s_parse_date); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5116, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_11, __pyx_n_s_parse_date); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse_date, __pyx_t_2) < 0) __PYX_ERR(0, 5116, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse_date, __pyx_t_2) < 0) __PYX_ERR(0, 5115, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_11, __pyx_n_s_microsec_units); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5116, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_11, __pyx_n_s_microsec_units); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_microsec_units, __pyx_t_2) < 0) __PYX_ERR(0, 5116, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_microsec_units, __pyx_t_2) < 0) __PYX_ERR(0, 5115, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_11, __pyx_n_s_millisec_units); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5116, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_11, __pyx_n_s_millisec_units); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_millisec_units, __pyx_t_2) < 0) __PYX_ERR(0, 5116, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_millisec_units, __pyx_t_2) < 0) __PYX_ERR(0, 5115, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_11, __pyx_n_s_sec_units); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5116, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_11, __pyx_n_s_sec_units); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_sec_units, __pyx_t_2) < 0) __PYX_ERR(0, 5117, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_sec_units, __pyx_t_2) < 0) __PYX_ERR(0, 5116, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_11, __pyx_n_s_min_units); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5116, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_11, __pyx_n_s_min_units); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_min_units, __pyx_t_2) < 0) __PYX_ERR(0, 5117, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_min_units, __pyx_t_2) < 0) __PYX_ERR(0, 5116, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_11, __pyx_n_s_hr_units); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5116, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_11, __pyx_n_s_hr_units); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_hr_units, __pyx_t_2) < 0) __PYX_ERR(0, 5117, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_hr_units, __pyx_t_2) < 0) __PYX_ERR(0, 5116, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_11, __pyx_n_s_day_units); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5116, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_11, __pyx_n_s_day_units); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_day_units, __pyx_t_2) < 0) __PYX_ERR(0, 5117, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_day_units, __pyx_t_2) < 0) __PYX_ERR(0, 5116, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":5120 + /* "netCDF4/_netCDF4.pyx":5119 * * # start of the gregorian calendar * gregorian = datetime(1582,10,15) # <<<<<<<<<<<<<< * * def _dateparse(timestr): */ - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5120, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__146, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5120, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__146, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_gregorian, __pyx_t_2) < 0) __PYX_ERR(0, 5120, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_gregorian, __pyx_t_2) < 0) __PYX_ERR(0, 5119, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5122 + /* "netCDF4/_netCDF4.pyx":5121 * gregorian = datetime(1582,10,15) * * def _dateparse(timestr): # <<<<<<<<<<<<<< * """parse a string of the form time-units since yyyy-mm-dd hh:mm:ss, * return a datetime instance""" */ - __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9_dateparse, NULL, __pyx_n_s_netCDF4__netCDF4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5122, __pyx_L1_error) + __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9_dateparse, NULL, __pyx_n_s_netCDF4__netCDF4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_dateparse, __pyx_t_2) < 0) __PYX_ERR(0, 5122, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_dateparse, __pyx_t_2) < 0) __PYX_ERR(0, 5121, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5147 + /* "netCDF4/_netCDF4.pyx":5146 * return basedate * * def stringtoarr(string,NUMCHARS,dtype='S'): # <<<<<<<<<<<<<< * """ * **`stringtoarr(a, NUMCHARS,dtype='S')`** */ - __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_11stringtoarr, NULL, __pyx_n_s_netCDF4__netCDF4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5147, __pyx_L1_error) + __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_11stringtoarr, NULL, __pyx_n_s_netCDF4__netCDF4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_stringtoarr, __pyx_t_2) < 0) __PYX_ERR(0, 5147, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_stringtoarr, __pyx_t_2) < 0) __PYX_ERR(0, 5146, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5170 + /* "netCDF4/_netCDF4.pyx":5169 * return arr * * def stringtochar(a): # <<<<<<<<<<<<<< * """ * **`stringtochar(a)`** */ - __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_13stringtochar, NULL, __pyx_n_s_netCDF4__netCDF4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5170, __pyx_L1_error) + __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_13stringtochar, NULL, __pyx_n_s_netCDF4__netCDF4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_stringtochar, __pyx_t_2) < 0) __PYX_ERR(0, 5170, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_stringtochar, __pyx_t_2) < 0) __PYX_ERR(0, 5169, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5189 + /* "netCDF4/_netCDF4.pyx":5188 * return b * * def chartostring(b): # <<<<<<<<<<<<<< * """ * **`chartostring(b)`** */ - __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_15chartostring, NULL, __pyx_n_s_netCDF4__netCDF4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5189, __pyx_L1_error) + __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_15chartostring, NULL, __pyx_n_s_netCDF4__netCDF4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_chartostring, __pyx_t_2) < 0) __PYX_ERR(0, 5189, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_chartostring, __pyx_t_2) < 0) __PYX_ERR(0, 5188, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5210 + /* "netCDF4/_netCDF4.pyx":5209 * return a * * def date2num(dates,units,calendar='standard'): # <<<<<<<<<<<<<< * """ * **`date2num(dates,units,calendar='standard')`** */ - __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_17date2num, NULL, __pyx_n_s_netCDF4__netCDF4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5210, __pyx_L1_error) + __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_17date2num, NULL, __pyx_n_s_netCDF4__netCDF4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_date2num, __pyx_t_2) < 0) __PYX_ERR(0, 5210, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_date2num, __pyx_t_2) < 0) __PYX_ERR(0, 5209, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5298 + /* "netCDF4/_netCDF4.pyx":5297 * return cdftime.date2num(dates) * * def num2date(times,units,calendar='standard'): # <<<<<<<<<<<<<< * """ * **`num2date(times,units,calendar='standard')`** */ - __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_19num2date, NULL, __pyx_n_s_netCDF4__netCDF4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5298, __pyx_L1_error) + __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_19num2date, NULL, __pyx_n_s_netCDF4__netCDF4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5297, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_num2date, __pyx_t_2) < 0) __PYX_ERR(0, 5298, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_num2date, __pyx_t_2) < 0) __PYX_ERR(0, 5297, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "netCDF4/_netCDF4.pyx":5401 diff --git a/netCDF4/_netCDF4.pyx b/netCDF4/_netCDF4.pyx index c02831d30..205ea18e9 100644 --- a/netCDF4/_netCDF4.pyx +++ b/netCDF4/_netCDF4.pyx @@ -5343,8 +5343,9 @@ contains one. msg='negative reference year in time units, must be >= 1' raise ValueError(msg) - if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \ - (calendar in ['gregorian','standard'] and basedate > gregorian): + postimes = (numpy.asarray(times) > 0).all() + if postimes and ((calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \ + (calendar in ['gregorian','standard'] and basedate > gregorian)): # use python datetime module, isscalar = False try: diff --git a/test/tst_netcdftime.py b/test/tst_netcdftime.py index 9e5a478b8..c925c9499 100644 --- a/test/tst_netcdftime.py +++ b/test/tst_netcdftime.py @@ -476,6 +476,13 @@ def runTest(self): assert (d.month == 1) assert (d.day == 1) assert (d.hour == 0) + # test fix for issue #659 (proper treatment of negative time values). + units = 'days since 1800-01-01 00:00:0.0' + d = num2date(-657073, units, calendar='standard') + assert (d.year == 1) + assert (d.month == 1) + assert (d.day == 1) + assert (d.hour == 0) class TestDate2index(unittest.TestCase):