diff --git a/Changelog b/Changelog index b14e4b3e9..f9ae8ba9b 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,7 @@ + version 1.2.8a0 (tag XXXX) +=========================== + * add Dataset init memory parameter to allow loading a file from memory + version 1.2.7 (tag v1.2.7rel) ============================== * fix for issue #624 (error in conversion to masked array when variable slice diff --git a/include/constants.pyx b/include/constants.pyx index 973197843..0f4af053d 100644 --- a/include/constants.pyx +++ b/include/constants.pyx @@ -2,3 +2,4 @@ DEF HAS_RENAME_GRP = 0 DEF HAS_NC_INQ_PATH = 0 DEF HAS_NC_INQ_FORMAT_EXTENDED = 0 DEF HAS_CDF5_FORMAT = 0 +DEF HAS_NC_OPEN_MEM = 0 diff --git a/include/netCDF4.pxi b/include/netCDF4.pxi index b68013e9c..9cae29a4e 100644 --- a/include/netCDF4.pxi +++ b/include/netCDF4.pxi @@ -250,6 +250,7 @@ cdef extern from "netcdf.h": int nc_create(char *path, int cmode, int *ncidp) int nc__create(char *path, int cmode, size_t initialsz, size_t *chunksizehintp, int *ncidp) int nc_open(char *path, int mode, int *ncidp) + int nc_open_mem(const char *path, int mode, size_t size, void* memory, int *ncidp) int nc__open(char *path, int mode, size_t *chunksizehintp, int *ncidp) int nc_inq_path(int ncid, size_t *pathlen, char *path) nogil int nc_inq_format_extended(int ncid, int *formatp, int* modep) nogil diff --git a/netCDF4/__init__.py b/netCDF4/__init__.py index cb9f3088b..65ba376fc 100644 --- a/netCDF4/__init__.py +++ b/netCDF4/__init__.py @@ -5,6 +5,6 @@ from ._netCDF4 import __doc__, __pdoc__ from ._netCDF4 import (__version__, __netcdf4libversion__, __hdf5libversion__, __has_rename_grp__, __has_nc_inq_path__, - __has_nc_inq_format_extended__) + __has_nc_inq_format_extended__, __has_nc_open_mem__) __all__ =\ ['Dataset','Variable','Dimension','Group','MFDataset','MFTime','CompoundType','VLType','date2num','num2date','date2index','stringtochar','chartostring','stringtoarr','getlibversion','EnumType'] diff --git a/netCDF4/_netCDF4.c b/netCDF4/_netCDF4.c index 5fcaf1147..b9e7097ad 100644 --- a/netCDF4/_netCDF4.c +++ b/netCDF4/_netCDF4.c @@ -1,4 +1,4 @@ -/* Generated by Cython 0.25.1 */ +/* Generated by Cython 0.25.2 */ #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -7,7 +7,7 @@ #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000) #error Cython requires Python 2.6+ or Python 3.2+. #else -#define CYTHON_ABI "0_25_1" +#define CYTHON_ABI "0_25_2" #include #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) @@ -190,7 +190,7 @@ #endif #if CYTHON_FAST_PYCCALL #define __Pyx_PyFastCFunction_Check(func)\ - ((PyCFunction_Check(func) && METH_FASTCALL == PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST))) + ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST))))) #else #define __Pyx_PyFastCFunction_Check(func) 0 #endif @@ -343,10 +343,39 @@ #define CYTHON_RESTRICT #endif #endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_MAYBE_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) #ifndef CYTHON_INLINE - #if defined(__GNUC__) + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #elif defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline @@ -414,26 +443,6 @@ static CYTHON_INLINE float __PYX_NAN() { #define CYTHON_WITHOUT_ASSERTIONS #endif -#ifndef CYTHON_UNUSED -# if defined(__GNUC__) -# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define CYTHON_UNUSED __attribute__ ((__unused__)) -# else -# define CYTHON_UNUSED -# endif -# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) -# define CYTHON_UNUSED __attribute__ ((__unused__)) -# else -# define CYTHON_UNUSED -# endif -#endif -#ifndef CYTHON_NCP_UNUSED -# if CYTHON_COMPILING_IN_CPYTHON -# define CYTHON_NCP_UNUSED -# else -# define CYTHON_NCP_UNUSED CYTHON_UNUSED -# endif -#endif typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; @@ -635,6 +644,7 @@ struct __pyx_obj_7netCDF4_8_netCDF4_VLType; struct __pyx_obj_7netCDF4_8_netCDF4_EnumType; struct __pyx_obj_7netCDF4_8_netCDF4___pyx_scope_struct__genexpr; struct __pyx_opt_args_7netCDF4_8_netCDF4__set_att; +struct __pyx_opt_args_7netCDF4_8_netCDF4__ensure_nc_success; struct __pyx_opt_args_7netCDF4_8_netCDF4__read_compound; struct __pyx_opt_args_7netCDF4_8_netCDF4__read_vlen; struct __pyx_opt_args_7netCDF4_8_netCDF4__read_enum; @@ -642,7 +652,7 @@ struct __pyx_opt_args_7netCDF4_8_netCDF4__strencode; struct __pyx_defaults; typedef struct __pyx_defaults __pyx_defaults; -/* "netCDF4/_netCDF4.pyx":1242 +/* "netCDF4/_netCDF4.pyx":1244 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * * cdef _set_att(grp, int varid, name, value,\ # <<<<<<<<<<<<<< @@ -655,7 +665,19 @@ struct __pyx_opt_args_7netCDF4_8_netCDF4__set_att { PyObject *force_ncstring; }; -/* "netCDF4/_netCDF4.pyx":4732 +/* "netCDF4/_netCDF4.pyx":1583 + * return variables + * + * cdef _ensure_nc_success(ierr, err_cls=RuntimeError): # <<<<<<<<<<<<<< + * if ierr != NC_NOERR: + * raise err_cls((nc_strerror(ierr)).decode('ascii')) + */ +struct __pyx_opt_args_7netCDF4_8_netCDF4__ensure_nc_success { + int __pyx_n; + PyObject *err_cls; +}; + +/* "netCDF4/_netCDF4.pyx":4755 * return xtype * * cdef _read_compound(group, nc_type xtype, endian=None): # <<<<<<<<<<<<<< @@ -667,7 +689,7 @@ struct __pyx_opt_args_7netCDF4_8_netCDF4__read_compound { PyObject *endian; }; -/* "netCDF4/_netCDF4.pyx":4905 +/* "netCDF4/_netCDF4.pyx":4928 * return xtype, dt * * cdef _read_vlen(group, nc_type xtype, endian=None): # <<<<<<<<<<<<<< @@ -679,7 +701,7 @@ struct __pyx_opt_args_7netCDF4_8_netCDF4__read_vlen { PyObject *endian; }; -/* "netCDF4/_netCDF4.pyx":5028 +/* "netCDF4/_netCDF4.pyx":5051 * return xtype, dt * * cdef _read_enum(group, nc_type xtype, endian=None): # <<<<<<<<<<<<<< @@ -691,7 +713,7 @@ struct __pyx_opt_args_7netCDF4_8_netCDF4__read_enum { PyObject *endian; }; -/* "netCDF4/_netCDF4.pyx":5064 +/* "netCDF4/_netCDF4.pyx":5087 * return EnumType(group, dt, name, enum_dict, typeid=xtype) * * cdef _strencode(pystr,encoding=None): # <<<<<<<<<<<<<< @@ -706,7 +728,7 @@ struct __pyx_defaults { PyObject *__pyx_arg_exclude; }; -/* "netCDF4/_netCDF4.pyx":1591 +/* "netCDF4/_netCDF4.pyx":1597 * __pdoc__ = {} * * cdef class Dataset: # <<<<<<<<<<<<<< @@ -718,6 +740,7 @@ struct __pyx_obj_7netCDF4_8_netCDF4_Dataset { PyObject *__weakref__; int _grpid; int _isopen; + Py_buffer _buffer; PyObject *groups; PyObject *dimensions; PyObject *variables; @@ -734,7 +757,7 @@ struct __pyx_obj_7netCDF4_8_netCDF4_Dataset { }; -/* "netCDF4/_netCDF4.pyx":2604 +/* "netCDF4/_netCDF4.pyx":2631 * * * cdef class Group(Dataset): # <<<<<<<<<<<<<< @@ -746,7 +769,7 @@ struct __pyx_obj_7netCDF4_8_netCDF4_Group { }; -/* "netCDF4/_netCDF4.pyx":2699 +/* "netCDF4/_netCDF4.pyx":2722 * * * cdef class Dimension: # <<<<<<<<<<<<<< @@ -763,7 +786,7 @@ struct __pyx_obj_7netCDF4_8_netCDF4_Dimension { }; -/* "netCDF4/_netCDF4.pyx":2860 +/* "netCDF4/_netCDF4.pyx":2883 * return False * * cdef class Variable: # <<<<<<<<<<<<<< @@ -793,7 +816,7 @@ struct __pyx_obj_7netCDF4_8_netCDF4_Variable { }; -/* "netCDF4/_netCDF4.pyx":4567 +/* "netCDF4/_netCDF4.pyx":4590 * # Compound datatype support. * * cdef class CompoundType: # <<<<<<<<<<<<<< @@ -808,7 +831,7 @@ struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType { }; -/* "netCDF4/_netCDF4.pyx":4816 +/* "netCDF4/_netCDF4.pyx":4839 * # VLEN datatype support. * * cdef class VLType: # <<<<<<<<<<<<<< @@ -823,7 +846,7 @@ struct __pyx_obj_7netCDF4_8_netCDF4_VLType { }; -/* "netCDF4/_netCDF4.pyx":4934 +/* "netCDF4/_netCDF4.pyx":4957 * # Enum datatype support. * * cdef class EnumType: # <<<<<<<<<<<<<< @@ -839,7 +862,7 @@ struct __pyx_obj_7netCDF4_8_netCDF4_EnumType { }; -/* "netCDF4/_netCDF4.pyx":1032 +/* "netCDF4/_netCDF4.pyx":1033 * _format_dict['NETCDF3_64BIT'] = NC_FORMAT_64BIT * # invert dictionary mapping * _reverse_format_dict = dict((v, k) for k, v in _format_dict.iteritems()) # <<<<<<<<<<<<<< @@ -1195,6 +1218,11 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values); #endif +/* WriteUnraisableException.proto */ +static void __Pyx_WriteUnraisable(const char *name, int clineno, + int lineno, const char *filename, + int full_traceback, int nogil); + /* KeywordStringCheck.proto */ static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); @@ -1577,6 +1605,8 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /* Module declarations from 'cpython.mem' */ +/* Module declarations from 'cpython.buffer' */ + /* Module declarations from 'libc.string' */ /* Module declarations from 'libc.stdlib' */ @@ -1603,6 +1633,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *); /*proto*/ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *); /*proto*/ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *); /*proto*/ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *); /*proto*/ +static PyObject *__pyx_f_7netCDF4_8_netCDF4__ensure_nc_success(PyObject *, struct __pyx_opt_args_7netCDF4_8_netCDF4__ensure_nc_success *__pyx_optional_args); /*proto*/ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *, PyObject *, PyObject *); /*proto*/ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *, PyObject *); /*proto*/ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *, nc_type, struct __pyx_opt_args_7netCDF4_8_netCDF4__read_compound *__pyx_optional_args); /*proto*/ @@ -1617,13 +1648,13 @@ int __pyx_module_is_main_netCDF4___netCDF4 = 0; /* Implementation of 'netCDF4._netCDF4' */ static PyObject *__pyx_builtin_ImportError; static PyObject *__pyx_builtin_memoryview; +static PyObject *__pyx_builtin_RuntimeError; static PyObject *__pyx_builtin_object; static PyObject *__pyx_builtin_AttributeError; static PyObject *__pyx_builtin_MemoryError; static PyObject *__pyx_builtin_range; static PyObject *__pyx_builtin_KeyError; static PyObject *__pyx_builtin_ValueError; -static PyObject *__pyx_builtin_RuntimeError; static PyObject *__pyx_builtin_UnicodeError; static PyObject *__pyx_builtin_TypeError; static PyObject *__pyx_builtin_IOError; @@ -1679,15 +1710,15 @@ static const char __pyx_k_u8[] = "u8"; static const char __pyx_k_ws[] = "ws"; static const char __pyx_k__13[] = "<"; static const char __pyx_k__14[] = ">"; -static const char __pyx_k__15[] = "/"; -static const char __pyx_k__18[] = "'"; -static const char __pyx_k__20[] = ", "; -static const char __pyx_k__21[] = ","; -static const char __pyx_k__23[] = ",)"; -static const char __pyx_k__24[] = ")"; -static const char __pyx_k__28[] = "__"; -static const char __pyx_k__36[] = "="; -static const char __pyx_k__37[] = "|"; +static const char __pyx_k__17[] = "/"; +static const char __pyx_k__20[] = "'"; +static const char __pyx_k__22[] = ", "; +static const char __pyx_k__23[] = ","; +static const char __pyx_k__25[] = ",)"; +static const char __pyx_k__26[] = ")"; +static const char __pyx_k__32[] = "__"; +static const char __pyx_k__40[] = "="; +static const char __pyx_k__41[] = "|"; static const char __pyx_k_all[] = "all"; static const char __pyx_k_any[] = "any"; static const char __pyx_k_arr[] = "arr"; @@ -1783,7 +1814,6 @@ static const char __pyx_k_vlen[] = "vlen"; static const char __pyx_k_warn[] = "warn"; static const char __pyx_k_year[] = "year"; static const char __pyx_k_zlib[] = "zlib"; -static const char __pyx_k_1_2_7[] = "1.2.7"; static const char __pyx_k_4_2_1[] = "4.2.1"; static const char __pyx_k_4_4_0[] = "4.4.0"; static const char __pyx_k_4_4_1[] = "4.4.1"; @@ -1862,6 +1892,7 @@ static const char __pyx_k_julian[] = "julian"; static const char __pyx_k_little[] = "little"; static const char __pyx_k_lstArr[] = "lstArr"; static const char __pyx_k_master[] = "master"; +static const char __pyx_k_memory[] = "memory"; static const char __pyx_k_minute[] = "minute"; static const char __pyx_k_module[] = "__module__"; static const char __pyx_k_msecsd[] = "msecsd"; @@ -1886,6 +1917,7 @@ static const char __pyx_k_tolist[] = "tolist"; static const char __pyx_k_typeid[] = "typeid"; static const char __pyx_k_values[] = "values"; static const char __pyx_k_vltype[] = "_vltype"; +static const char __pyx_k_1_2_8a0[] = "1.2.8a0"; static const char __pyx_k_IOError[] = "IOError"; static const char __pyx_k_MINYEAR[] = "MINYEAR"; static const char __pyx_k_NETCDF3[] = "NETCDF3"; @@ -1896,6 +1928,7 @@ static const char __pyx_k_cdfTLen[] = "_cdfTLen"; static const char __pyx_k_cdfVLen[] = "_cdfVLen"; static const char __pyx_k_cdftime[] = "cdftime"; static const char __pyx_k_clobber[] = "clobber"; +static const char __pyx_k_close_2[] = "_close"; static const char __pyx_k_cmptype[] = "_cmptype"; static const char __pyx_k_d_d_d_s[] = "%d.%d.%d-%s"; static const char __pyx_k_dimlens[] = "dimlens"; @@ -1946,6 +1979,7 @@ static const char __pyx_k_NUMCHARS[] = "NUMCHARS"; static const char __pyx_k_Variable[] = "_Variable"; static const char __pyx_k_aggDimId[] = "aggDimId"; static const char __pyx_k_basedate[] = "basedate"; +static const char __pyx_k_buffer_2[] = "_buffer"; static const char __pyx_k_byteswap[] = "byteswap"; static const char __pyx_k_calendar[] = "calendar"; static const char __pyx_k_cmptypes[] = "cmptypes"; @@ -2143,6 +2177,7 @@ static const char __pyx_k_Variable___repr[] = "_Variable.__repr__"; static const char __pyx_k_Variable__shape[] = "_Variable._shape"; static const char __pyx_k_current_shape_s[] = "current shape = %s\n"; static const char __pyx_k_has_nc_inq_path[] = "__has_nc_inq_path__"; +static const char __pyx_k_has_nc_open_mem[] = "__has_nc_open_mem__"; static const char __pyx_k_out_array_shape[] = "_out_array_shape"; static const char __pyx_k_Dataset_cmptypes[] = "Dataset.cmptypes"; static const char __pyx_k_Dimension___init[] = "_Dimension.__init__"; @@ -2224,6 +2259,7 @@ static const char __pyx_k_Variable___orthogonal_indexing[] = "Variable.__orthogo static const char __pyx_k_Variable_set_auto_maskandscale[] = "_Variable.set_auto_maskandscale"; static const char __pyx_k_WARNING_Backwards_incompatible[] = "\nWARNING: Backwards incompatible files will be created with HDF5 1.10.x \nand netCDF < 4.4.1. Upgrading to netCDF4 >= 4.4.1 or downgrading to \nto HDF5 version 1.8.x is highly recommended \n(see https://github.com/Unidata/netcdf-c/issues/250)."; static const char __pyx_k_filepath_method_not_enabled_To[] = "\nfilepath method not enabled. To enable, install Cython, make sure you have\nversion 4.1.2 or higher of the netcdf C lib, and rebuild netcdf4-python."; +static const char __pyx_k_nc_open_mem_method_not_enabled[] = "\n nc_open_mem method not enabled. To enable, install Cython, make sure you have\n version 4.4.1 or higher of the netcdf C lib, and rebuild netcdf4-python."; static const char __pyx_k_path_shows_the_location_of_the[] = "`path` shows the location of the `netCDF4.Group` in\n the `netCDF4.Dataset` in a unix directory format (the names of groups in the\n hierarchy separated by backslashes). A `netCDF4.Dataset` instance is the root\n group, so the path is simply `'/'`."; static const char __pyx_k_renameGroup_method_not_enabled[] = "\nrenameGroup method not enabled. To enable, install Cython, make sure you have\nversion 4.3.1 or higher of the netcdf C lib, and rebuild netcdf4-python."; static const char __pyx_k_A_numpy_dtype_object_describing[] = "A numpy dtype object describing the\n variable's data type."; @@ -2234,9 +2270,9 @@ static const char __pyx_k_Class_for_reading_multi_file_ne[] = "\nClass for readi static const char __pyx_k_Class_providing_an_interface_to[] = "\nClass providing an interface to a MFDataset time Variable by imposing a unique common\ntime unit to all files. \n\nExample usage (See `netCDF4.MFTime.__init__` for more details):\n\n :::python\n >>> import numpy\n >>> f1 = Dataset(\"mftest_1.nc\",\"w\", format=\"NETCDF4_CLASSIC\")\n >>> f2 = Dataset(\"mftest_2.nc\",\"w\", format=\"NETCDF4_CLASSIC\")\n >>> f1.createDimension(\"time\",None)\n >>> f2.createDimension(\"time\",None)\n >>> t1 = f1.createVariable(\"time\",\"i\",(\"time\",))\n >>> t2 = f2.createVariable(\"time\",\"i\",(\"time\",))\n >>> t1.units = \"days since 2000-01-01\"\n >>> t2.units = \"days since 2000-02-01\"\n >>> t1.calendar = \"standard\"\n >>> t2.calendar = \"standard\"\n >>> t1[:] = numpy.arange(31)\n >>> t2[:] = numpy.arange(30)\n >>> f1.close()\n >>> f2.close()\n >>> # Read the two files in at once, in one Dataset.\n >>> f = MFDataset(\"mftest*nc\")\n >>> t = f.variables[\"time\"]\n >>> print t.units\n days since 2000-01-01\n >>> print t[32] # The value written in the file, inconsistent with the MF time units.\n 1\n >>> T = MFTime(t)\n >>> print T[32]\n 32\n "; static const char __pyx_k_FillValue_attribute_must_be_set[] = "_FillValue attribute must be set when variable is "; static const char __pyx_k_The_vltypes_dictionary_maps_the[] = "The `vltypes` dictionary maps the names of\n variable-length types defined for the `netCDF4.Group` or `netCDF4.Dataset` to instances of the\n `netCDF4.VLType` class."; -static const char __pyx_k_Users_jsw_python_netcdf4_python[] = "/Users/jsw/python/netcdf4-python.git/netCDF4/_netCDF4.pyx"; +static const char __pyx_k_Users_amohr_dev_thehesiod_netcd[] = "/Users/amohr/dev/thehesiod/netcdf4-python/netCDF4/_netCDF4.pyx"; static const char __pyx_k_Variable_object_no_longer_valid[] = "Variable object no longer valid"; -static const char __pyx_k_Version_1_2_7_Introduction_netc[] = "\nVersion 1.2.7\n-------------\n- - - \n\nIntroduction\n============\n\nnetcdf4-python is a Python interface to the netCDF C library. \n\n[netCDF](http://www.unidata.ucar.edu/software/netcdf/) version 4 has many features\nnot found in earlier versions of the library and is implemented on top of\n[HDF5](http://www.hdfgroup.org/HDF5). This module can read and write\nfiles in both the new netCDF 4 and the old netCDF 3 format, and can create\nfiles that are readable by HDF5 clients. The API modelled after\n[Scientific.IO.NetCDF](http://dirac.cnrs-orleans.fr/ScientificPython/),\nand should be familiar to users of that module.\n\nMost new features of netCDF 4 are implemented, such as multiple\nunlimited dimensions, groups and zlib data compression. All the new\nnumeric data types (such as 64 bit and unsigned integer types) are\nimplemented. Compound (struct), variable length (vlen) and\nenumerated (enum) data types are supported, but not the opaque data type.\nMixtures of compound, vlen and enum data types (such as\ncompound types containing enums, or vlens containing compound\ntypes) are not supported.\n\nDownload\n========\n\n - Latest bleeding-edge code from the \n [github repository](http://github.com/Unidata/netcdf4-python).\n - Latest [releases](https://pypi.python.org/pypi/netCDF4)\n (source code and windows installers).\n\nRequires\n========\n\n - Python 2.7 or later (python 3 works too).\n - [numpy array module](http://numpy.scipy.org), version 1.7.0 or later.\n - [Cython](http://cython.org), version 0.19 or later, is optional - if it is installed setup.py will\n use it to recompile the Cython source code into C, using conditional compilation\n to enable features in the netCDF API that have been added since version 4.1.1. If\n Cython is not installed, these features (such as the ability to rename Group objects)\n will be disabled to preserve backward compatibility with older versions of the netCDF\n library.\n - The HDF5 C library version 1.8.4-p""atch1 or higher (1.8.x recommended)\n from [](ftp://ftp.hdfgroup.org/HDF5/current/src).\n ***netCDF version 4.4.1 or higher is recommended if using HDF5 1.10.x -\n otherwise resulting files may be unreadable by clients using earlier\n versions of HDF5. For netCDF < 4.4.1, HDF5 version 1.8.x is recommended.***\n Be sure to build with `--enable-hl --enable-shared`.\n - [Libcurl](http://curl.haxx.se/libcurl), if you want\n [OPeNDAP](http://opendap.org) support.\n - [HDF4](http://www.hdfgroup.org/products/hdf4), if you want\n to be able to read HDF4 \"Scientific Dataset\" (SD) files.\n - The netCDF-4 C library from the [github releases\n page](https://github.com/Unidata/netcdf-c/releases). \n Version 4.1.1 or higher is required (4.2 or higher recommended).\n Be sure to build with `--enable-netcdf-4 --enable-shared`, and set\n `CPPFLAGS=\"-I $HDF5_DIR/include\"` and `LDFLAGS=\"-L $HDF5_DIR/lib\"`,\n where `$HDF5_DIR` is the directory where HDF5 was installed.\n If you want [OPeNDAP](http://opendap.org) support, add `--enable-dap`.\n If you want HDF4 SD support, add `--enable-hdf4` and add\n the location of the HDF4 headers and library to `$CPPFLAGS` and `$LDFLAGS`.\n\n\nInstall\n=======\n\n - install the requisite python modules and C libraries (see above). It's\n easiest if all the C libs are built as shared libraries.\n - By default, the utility `nc-config`, installed with netcdf 4.1.2 or higher,\n will be run used to determine where all the dependencies live.\n - If `nc-config` is not in your default `$PATH`, rename the\n file `setup.cfg.template` to `setup.cfg`, then edit\n in a text editor (follow the instructions in the comments).\n In addition to specifying the path to `nc-config`,\n you can manually set the paths to all the libraries and their include files\n (in case `nc-config` does not do the right thing).\n - run `python setup.py build`, then `python setup.py install` (as root if\n necessary).\n - [`pip install`](https://pip.pypa.io/en/latest/reference/pip""_install.html) can\n also be used, with library paths set with environment variables. To make\n this work, the `USE_SETUPCFG` environment variable must be used to tell \n setup.py not to use `setup.cfg`.\n For example, `USE_SETUPCFG=0 HDF5_INCDIR=/usr/include/hdf5/serial\n HDF5_LIBDIR=/usr/lib/x86_64-linux-gnu/hdf5/serial pip install` has been\n shown to work on an Ubuntu/Debian linux system. Similarly, environment variables\n (all capitalized) can be used to set the include and library paths for\n `hdf5`, `netCDF4`, `hdf4`, `szip`, `jpeg`, `curl` and `zlib`. If the\n libraries are installed in standard places (e.g. `/usr` or `/usr/local`), \n the environment variables do not need to be set.\n - run the tests in the 'test' directory by running `python run_all.py`.\n\nTutorial\n========\n\n1. [Creating/Opening/Closing a netCDF file.](#section1)\n2. [Groups in a netCDF file.](#section2)\n3. [Dimensions in a netCDF file.](#section3)\n4. [Variables in a netCDF file.](#section4)\n5. [Attributes in a netCDF file.](#section5)\n6. [Writing data to and retrieving data from a netCDF variable.](#section6)\n7. [Dealing with time coordinates.](#section7)\n8. [Reading data from a multi-file netCDF dataset.](#section8)\n9. [Efficient compression of netCDF variables.](#section9)\n10. [Beyond homogeneous arrays of a fixed type - compound data types.](#section10)\n11. [Variable-length (vlen) data types.](#section11)\n12. [Enum data type.](#section12)\n\n\n##
1) Creating/Opening/Closing a netCDF file.\n\nTo create a netCDF file from python, you simply call the `netCDF4.Dataset`\nconstructor. This is also the method used to open an existing netCDF\nfile. If the file is open for write access (`mode='w', 'r+'` or `'a'`), you may\nwrite any type of data including new dimensions, groups, variables and\nattributes. netCDF files come in five flavors (`NETCDF3_CLASSIC,\nNETCDF3_64BIT_OFFSET, NETCDF3_64BIT_DATA, NETCDF4_CLASSIC`, and `NETCDF4`). \n`NETC""DF3_CLASSIC` was the original netcdf binary format, and was limited \nto file sizes less than 2 Gb. `NETCDF3_64BIT_OFFSET` was introduced\nin version 3.6.0 of the library, and extended the original binary format\nto allow for file sizes greater than 2 Gb. \n`NETCDF3_64BIT_DATA` is a new format that requires version 4.4.0 of\nthe C library - it extends the `NETCDF3_64BIT_OFFSET` binary format to\nallow for unsigned/64 bit integer data types and 64-bit dimension sizes.\n`NETCDF3_64BIT` is an alias for `NETCDF3_64BIT_OFFSET`.\n`NETCDF4_CLASSIC` files use the version 4 disk format (HDF5), but omits features\nnot found in the version 3 API. They can be read by netCDF 3 clients\nonly if they have been relinked against the netCDF 4 library. They can\nalso be read by HDF5 clients. `NETCDF4` files use the version 4 disk\nformat (HDF5) and use the new features of the version 4 API. The\n`netCDF4` module can read and write files in any of these formats. When\ncreating a new file, the format may be specified using the `format`\nkeyword in the `Dataset` constructor. The default format is\n`NETCDF4`. To see how a given file is formatted, you can examine the\n`data_model` attribute. Closing the netCDF file is\naccomplished via the `netCDF4.Dataset.close` method of the `netCDF4.Dataset`\ninstance.\n\nHere's an example:\n\n :::python\n >>> from netCDF4 import Dataset\n >>> rootgrp = Dataset(\"test.nc\", \"w\", format=\"NETCDF4\")\n >>> print rootgrp.data_model\n NETCDF4\n >>> rootgrp.close()\n\nRemote [OPeNDAP](http://opendap.org)-hosted datasets can be accessed for\nreading over http if a URL is provided to the `netCDF4.Dataset` constructor instead of a\nfilename. However, this requires that the netCDF library be built with\nOPenDAP support, via the `--enable-dap` configure option (added in\nversion 4.0.1).\n\n\n##
2) Groups in a netCDF file.\n\nnetCDF version 4 added support for organizing data in hierarchical\ngroups, which are analogous t""o directories in a filesystem. Groups serve\nas containers for variables, dimensions and attributes, as well as other\ngroups. A `netCDF4.Dataset` creates a special group, called\nthe 'root group', which is similar to the root directory in a unix\nfilesystem. To create `netCDF4.Group` instances, use the\n`netCDF4.Dataset.createGroup` method of a `netCDF4.Dataset` or `netCDF4.Group`\ninstance. `netCDF4.Dataset.createGroup` takes a single argument, a\npython string containing the name of the new group. The new `netCDF4.Group`\ninstances contained within the root group can be accessed by name using\nthe `groups` dictionary attribute of the `netCDF4.Dataset` instance. Only\n`NETCDF4` formatted files support Groups, if you try to create a Group\nin a netCDF 3 file you will get an error message.\n\n :::python\n >>> rootgrp = Dataset(\"test.nc\", \"a\")\n >>> fcstgrp = rootgrp.createGroup(\"forecasts\")\n >>> analgrp = rootgrp.createGroup(\"analyses\")\n >>> print rootgrp.groups\n OrderedDict([(\"forecasts\", \n ),\n (\"analyses\", \n )])\n\nGroups can exist within groups in a `netCDF4.Dataset`, just as directories\nexist within directories in a unix filesystem. Each `netCDF4.Group` instance\nhas a `groups` attribute dictionary containing all of the group\ninstances contained within that group. Each `netCDF4.Group` instance also has a\n`path` attribute that contains a simulated unix directory path to\nthat group. To simplify the creation of nested groups, you can\nuse a unix-like path as an argument to `netCDF4.Dataset.createGroup`.\n\n :::python\n >>> fcstgrp1 = rootgrp.createGroup(\"/forecasts/model1\")\n >>> fcstgrp2 = rootgrp.createGroup(\"/forecasts/model2\")\n\nIf any of the intermediate elements of the path do not exist, they are created,\njust as with the unix command `'mkdir -p'`. If you try to cre""ate a group\nthat already exists, no error will be raised, and the existing group will be \nreturned.\n\nHere's an example that shows how to navigate all the groups in a\n`netCDF4.Dataset`. The function `walktree` is a Python generator that is used\nto walk the directory tree. Note that printing the `netCDF4.Dataset` or `netCDF4.Group`\nobject yields summary information about it's contents.\n\n :::python\n >>> def walktree(top):\n >>> values = top.groups.values()\n >>> yield values\n >>> for value in top.groups.values():\n >>> for children in walktree(value):\n >>> yield children\n >>> print rootgrp\n >>> for children in walktree(rootgrp):\n >>> for child in children:\n >>> print child\n \n root group (NETCDF4 file format):\n dimensions:\n variables:\n groups: forecasts, analyses\n \n group /forecasts:\n dimensions:\n variables:\n groups: model1, model2\n \n group /analyses:\n dimensions:\n variables:\n groups:\n \n group /forecasts/model1:\n dimensions:\n variables:\n groups:\n \n group /forecasts/model2:\n dimensions:\n variables:\n groups:\n\n##
3) Dimensions in a netCDF file.\n\nnetCDF defines the sizes of all variables in terms of dimensions, so\nbefore any variables can be created the dimensions they use must be\ncreated first. A special case, not often used in practice, is that of a\nscalar variable, which has no dimensions. A dimension is created using\nthe `netCDF4.Dataset.createDimension` method of a `netCDF4.Dataset`\nor `netCDF4.Group` instance. A Python string is used to set the name of the\ndimension, and an integer value is used to set the size. To create an""\nunlimited dimension (a dimension that can be appended to), the size\nvalue is set to `None` or 0. In this example, there both the `time` and\n`level` dimensions are unlimited. Having more than one unlimited\ndimension is a new netCDF 4 feature, in netCDF 3 files there may be only\none, and it must be the first (leftmost) dimension of the variable.\n\n :::python\n >>> level = rootgrp.createDimension(\"level\", None)\n >>> time = rootgrp.createDimension(\"time\", None)\n >>> lat = rootgrp.createDimension(\"lat\", 73)\n >>> lon = rootgrp.createDimension(\"lon\", 144)\n\n\nAll of the `netCDF4.Dimension` instances are stored in a python dictionary.\n\n :::python\n >>> print rootgrp.dimensions\n OrderedDict([(\"level\", ),\n (\"time\", ),\n (\"lat\", ),\n (\"lon\", )])\n\nCalling the python `len` function with a `netCDF4.Dimension` instance returns\nthe current size of that dimension.\nThe `netCDF4.Dimension.isunlimited` method of a `netCDF4.Dimension` instance\ncan be used to determine if the dimensions is unlimited, or appendable.\n\n :::python\n >>> print len(lon)\n 144\n >>> print lon.isunlimited()\n False\n >>> print time.isunlimited()\n True\n\nPrinting the `netCDF4.Dimension` object\nprovides useful summary info, including the name and length of the dimension,\nand whether it is unlimited.\n\n :::python\n >>> for dimobj in rootgrp.dimensions.values():\n >>> print dimobj\n (unlimited): name = \"level\", size = 0\n (unlimited): name = \"time\", size = 0\n : name = \"lat\", size = 73\n : name = \"lon\", size = 144""\n (unlimited): name = \"time\", size = 0\n\n`netCDF4.Dimension` names can be changed using the\n`netCDF4.Datatset.renameDimension` method of a `netCDF4.Dataset` or\n`netCDF4.Group` instance.\n\n##
4) Variables in a netCDF file.\n\nnetCDF variables behave much like python multidimensional array objects\nsupplied by the [numpy module](http://numpy.scipy.org). However,\nunlike numpy arrays, netCDF4 variables can be appended to along one or\nmore 'unlimited' dimensions. To create a netCDF variable, use the\n`netCDF4.Dataset.createVariable` method of a `netCDF4.Dataset` or\n`netCDF4.Group` instance. The `netCDF4.Dataset.createVariable` method\nhas two mandatory arguments, the variable name (a Python string), and\nthe variable datatype. The variable's dimensions are given by a tuple\ncontaining the dimension names (defined previously with\n`netCDF4.Dataset.createDimension`). To create a scalar\nvariable, simply leave out the dimensions keyword. The variable\nprimitive datatypes correspond to the dtype attribute of a numpy array.\nYou can specify the datatype as a numpy dtype object, or anything that\ncan be converted to a numpy dtype object. Valid datatype specifiers\ninclude: `'f4'` (32-bit floating point), `'f8'` (64-bit floating\npoint), `'i4'` (32-bit signed integer), `'i2'` (16-bit signed\ninteger), `'i8'` (64-bit signed integer), `'i1'` (8-bit signed\ninteger), `'u1'` (8-bit unsigned integer), `'u2'` (16-bit unsigned\ninteger), `'u4'` (32-bit unsigned integer), `'u8'` (64-bit unsigned\ninteger), or `'S1'` (single-character string). The old Numeric\nsingle-character typecodes (`'f'`,`'d'`,`'h'`,\n`'s'`,`'b'`,`'B'`,`'c'`,`'i'`,`'l'`), corresponding to\n(`'f4'`,`'f8'`,`'i2'`,`'i2'`,`'i1'`,`'i1'`,`'S1'`,`'i4'`,`'i4'`),\nwill also work. The unsigned integer types and the 64-bit integer type\ncan only be used if the file format is `NETCDF4`.\n\nThe dimensions themselves are usually also defined as variables, c""alled\ncoordinate variables. The `netCDF4.Dataset.createVariable`\nmethod returns an instance of the `netCDF4.Variable` class whose methods can be\nused later to access and set variable data and attributes.\n\n :::python\n >>> times = rootgrp.createVariable(\"time\",\"f8\",(\"time\",))\n >>> levels = rootgrp.createVariable(\"level\",\"i4\",(\"level\",))\n >>> latitudes = rootgrp.createVariable(\"lat\",\"f4\",(\"lat\",))\n >>> longitudes = rootgrp.createVariable(\"lon\",\"f4\",(\"lon\",))\n >>> # two dimensions unlimited\n >>> temp = rootgrp.createVariable(\"temp\",\"f4\",(\"time\",\"level\",\"lat\",\"lon\",))\n\nTo get summary info on a `netCDF4.Variable` instance in an interactive session, just print it.\n\n :::python\n >>> print temp\n \n float32 temp(time, level, lat, lon)\n least_significant_digit: 3\n units: K\n unlimited dimensions: time, level\n current shape = (0, 0, 73, 144)\n\nYou can use a path to create a Variable inside a hierarchy of groups.\n\n :::python\n >>> ftemp = rootgrp.createVariable(\"/forecasts/model1/temp\",\"f4\",(\"time\",\"level\",\"lat\",\"lon\",))\n\nIf the intermediate groups do not yet exist, they will be created.\n\nYou can also query a `netCDF4.Dataset` or `netCDF4.Group` instance directly to obtain `netCDF4.Group` or \n`netCDF4.Variable` instances using paths.\n\n :::python\n >>> print rootgrp[\"/forecasts/model1\"] # a Group instance\n \n group /forecasts/model1:\n dimensions(sizes):\n variables(dimensions): float32 temp(time,level,lat,lon)\n groups:\n >>> print rootgrp[\"/forecasts/model1/temp\"] # a Variable instance\n \n float32 temp(time, level, lat, lon)\n path = /forecasts/model1\n unlimited dimensions: time, level\n current shape = (0, 0, 73, 144)\n filling on, default _FillValue of 9.96920996839e+36 used\n""\nAll of the variables in the `netCDF4.Dataset` or `netCDF4.Group` are stored in a\nPython dictionary, in the same way as the dimensions:\n\n :::python\n >>> print rootgrp.variables\n OrderedDict([(\"time\", ),\n (\"level\", ),\n (\"lat\", ),\n (\"lon\", ),\n (\"temp\", )])\n\n`netCDF4.Variable` names can be changed using the\n`netCDF4.Dataset.renameVariable` method of a `netCDF4.Dataset`\ninstance.\n\n\n##
5) Attributes in a netCDF file.\n\nThere are two types of attributes in a netCDF file, global and variable.\nGlobal attributes provide information about a group, or the entire\ndataset, as a whole. `netCDF4.Variable` attributes provide information about\none of the variables in a group. Global attributes are set by assigning\nvalues to `netCDF4.Dataset` or `netCDF4.Group` instance variables. `netCDF4.Variable`\nattributes are set by assigning values to `netCDF4.Variable` instances\nvariables. Attributes can be strings, numbers or sequences. Returning to\nour example,\n\n :::python\n >>> import time\n >>> rootgrp.description = \"bogus example script\"\n >>> rootgrp.history = \"Created \" + time.ctime(time.time())\n >>> rootgrp.source = \"netCDF4 python module tutorial\"\n >>> latitudes.units = \"degrees north\"\n >>> longitudes.units = \"degrees east\"\n >>> levels.units = \"hPa\"\n >>> temp.units = \"K\"\n >>> times.units = \"hours since 0001-01-01 00:00:00.0\"\n >>> times.calendar = \"gregorian\"\n\nThe `netCDF4.Dataset.ncattrs` method of a `netCDF4.Dataset`, `netCDF4.Group` or\n`netCDF4.Variable` instance can be used to retrieve the names of all the netCDF\nattributes. This method is provided as a convenience, since using the\nbuilt-in `dir` Python fun""ction will return a bunch of private methods\nand attributes that cannot (or should not) be modified by the user.\n\n :::python\n >>> for name in rootgrp.ncattrs():\n >>> print \"Global attr\", name, \"=\", getattr(rootgrp,name)\n Global attr description = bogus example script\n Global attr history = Created Mon Nov 7 10.30:56 2005\n Global attr source = netCDF4 python module tutorial\n\nThe `__dict__` attribute of a `netCDF4.Dataset`, `netCDF4.Group` or `netCDF4.Variable`\ninstance provides all the netCDF attribute name/value pairs in a python\ndictionary:\n\n :::python\n >>> print rootgrp.__dict__\n OrderedDict([(u\"description\", u\"bogus example script\"),\n (u\"history\", u\"Created Thu Mar 3 19:30:33 2011\"),\n (u\"source\", u\"netCDF4 python module tutorial\")])\n\nAttributes can be deleted from a netCDF `netCDF4.Dataset`, `netCDF4.Group` or\n`netCDF4.Variable` using the python `del` statement (i.e. `del grp.foo`\nremoves the attribute `foo` the the group `grp`).\n\n##
6) Writing data to and retrieving data from a netCDF variable.\n\nNow that you have a netCDF `netCDF4.Variable` instance, how do you put data\ninto it? You can just treat it like an array and assign data to a slice.\n\n :::python\n >>> import numpy\n >>> lats = numpy.arange(-90,91,2.5)\n >>> lons = numpy.arange(-180,180,2.5)\n >>> latitudes[:] = lats\n >>> longitudes[:] = lons\n >>> print \"latitudes =\\n\",latitudes[:]\n latitudes =\n [-90. -87.5 -85. -82.5 -80. -77.5 -75. -72.5 -70. -67.5 -65. -62.5\n -60. -57.5 -55. -52.5 -50. -47.5 -45. -42.5 -40. -37.5 -35. -32.5\n -30. -27.5 -25. -22.5 -20. -17.5 -15. -12.5 -10. -7.5 -5. -2.5\n 0. 2.5 5. 7.5 10. 12.5 15. 17.5 20. 22.5 25. 27.5\n 30. 32.5 35. 37.5 40. 42.5 45. 47.5 50. 52.5 55. 57.5\n 60. 62.5 65. 67.5 70. 72.5 75. 77.5 80. 82.5 85. "" 87.5\n 90. ]\n\nUnlike NumPy's array objects, netCDF `netCDF4.Variable`\nobjects with unlimited dimensions will grow along those dimensions if you\nassign data outside the currently defined range of indices.\n\n :::python\n >>> # append along two unlimited dimensions by assigning to slice.\n >>> nlats = len(rootgrp.dimensions[\"lat\"])\n >>> nlons = len(rootgrp.dimensions[\"lon\"])\n >>> print \"temp shape before adding data = \",temp.shape\n temp shape before adding data = (0, 0, 73, 144)\n >>>\n >>> from numpy.random import uniform\n >>> temp[0:5,0:10,:,:] = uniform(size=(5,10,nlats,nlons))\n >>> print \"temp shape after adding data = \",temp.shape\n temp shape after adding data = (6, 10, 73, 144)\n >>>\n >>> # levels have grown, but no values yet assigned.\n >>> print \"levels shape after adding pressure data = \",levels.shape\n levels shape after adding pressure data = (10,)\n\nNote that the size of the levels variable grows when data is appended\nalong the `level` dimension of the variable `temp`, even though no\ndata has yet been assigned to levels.\n\n :::python\n >>> # now, assign data to levels dimension variable.\n >>> levels[:] = [1000.,850.,700.,500.,300.,250.,200.,150.,100.,50.]\n\nHowever, that there are some differences between NumPy and netCDF\nvariable slicing rules. Slices behave as usual, being specified as a\n`start:stop:step` triplet. Using a scalar integer index `i` takes the ith\nelement and reduces the rank of the output array by one. Boolean array and\ninteger sequence indexing behaves differently for netCDF variables\nthan for numpy arrays. Only 1-d boolean arrays and integer sequences are\nallowed, and these indices work independently along each dimension (similar\nto the way vector subscripts work in fortran). This means that\n\n :::python\n >>> temp[0, 0, [0,1,2,3], [0,1,2,3]]\n\nreturns an array of shape (4,4) when slicing a netCDF variable, but for a\nnumpy array ""it returns an array of shape (4,).\nSimilarly, a netCDF variable of shape `(2,3,4,5)` indexed\nwith `[0, array([True, False, True]), array([False, True, True, True]), :]`\nwould return a `(2, 3, 5)` array. In NumPy, this would raise an error since\nit would be equivalent to `[0, [0,1], [1,2,3], :]`. When slicing with integer\nsequences, the indices ***need not be sorted*** and ***may contain\nduplicates*** (both of these are new features in version 1.2.1).\nWhile this behaviour may cause some confusion for those used to NumPy's 'fancy indexing' rules,\nit provides a very powerful way to extract data from multidimensional netCDF\nvariables by using logical operations on the dimension arrays to create slices.\n\nFor example,\n\n :::python\n >>> tempdat = temp[::2, [1,3,6], lats>0, lons>0]\n\nwill extract time indices 0,2 and 4, pressure levels\n850, 500 and 200 hPa, all Northern Hemisphere latitudes and Eastern\nHemisphere longitudes, resulting in a numpy array of shape (3, 3, 36, 71).\n\n :::python\n >>> print \"shape of fancy temp slice = \",tempdat.shape\n shape of fancy temp slice = (3, 3, 36, 71)\n\n***Special note for scalar variables***: To extract data from a scalar variable\n`v` with no associated dimensions, use `np.asarray(v)` or `v[...]`. The result\nwill be a numpy scalar array.\n\n##
7) Dealing with time coordinates.\n\nTime coordinate values pose a special challenge to netCDF users. Most\nmetadata standards (such as CF) specify that time should be\nmeasure relative to a fixed date using a certain calendar, with units\nspecified like `hours since YY-MM-DD hh:mm:ss`. These units can be\nawkward to deal with, without a utility to convert the values to and\nfrom calendar dates. The function called `netCDF4.num2date` and `netCDF4.date2num` are\nprovided with this package to do just that. Here's an example of how they\ncan be used:\n\n :::python\n >>> # fill in times.\n >>> from datetime import datetime, timede""lta\n >>> from netCDF4 import num2date, date2num\n >>> dates = [datetime(2001,3,1)+n*timedelta(hours=12) for n in range(temp.shape[0])]\n >>> times[:] = date2num(dates,units=times.units,calendar=times.calendar)\n >>> print \"time values (in units %s): \" % times.units+\"\\n\",times[:]\n time values (in units hours since January 1, 0001):\n [ 17533056. 17533068. 17533080. 17533092. 17533104.]\n >>> dates = num2date(times[:],units=times.units,calendar=times.calendar)\n >>> print \"dates corresponding to time values:\\n\",dates\n dates corresponding to time values:\n [2001-03-01 00:00:00 2001-03-01 12:00:00 2001-03-02 00:00:00\n 2001-03-02 12:00:00 2001-03-03 00:00:00]\n\n`netCDF4.num2date` converts numeric values of time in the specified `units`\nand `calendar` to datetime objects, and `netCDF4.date2num` does the reverse.\nAll the calendars currently defined in the\n[CF metadata convention](http://cfconventions.org) are supported.\nA function called `netCDF4.date2index` is also provided which returns the indices\nof a netCDF time variable corresponding to a sequence of datetime instances.\n\n\n##
8) Reading data from a multi-file netCDF dataset.\n\nIf you want to read data from a variable that spans multiple netCDF files,\nyou can use the `netCDF4.MFDataset` class to read the data as if it were\ncontained in a single file. Instead of using a single filename to create\na `netCDF4.Dataset` instance, create a `netCDF4.MFDataset` instance with either a list\nof filenames, or a string with a wildcard (which is then converted to\na sorted list of files using the python glob module).\nVariables in the list of files that share the same unlimited\ndimension are aggregated together, and can be sliced across multiple\nfiles. To illustrate this, let's first create a bunch of netCDF files with\nthe same variable (with the same unlimited dimension). The files\nmust in be in `NETCDF3_64BIT_OFFSET`, `NETCDF3_64BIT_DATA`, `NET""CDF3_CLASSIC` or\n`NETCDF4_CLASSIC` format (`NETCDF4` formatted multi-file\ndatasets are not supported).\n\n :::python\n >>> for nf in range(10):\n >>> f = Dataset(\"mftest%s.nc\" % nf,\"w\")\n >>> f.createDimension(\"x\",None)\n >>> x = f.createVariable(\"x\",\"i\",(\"x\",))\n >>> x[0:10] = numpy.arange(nf*10,10*(nf+1))\n >>> f.close()\n\nNow read all the files back in at once with `netCDF4.MFDataset`\n\n :::python\n >>> from netCDF4 import MFDataset\n >>> f = MFDataset(\"mftest*nc\")\n >>> print f.variables[\"x\"][:]\n [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24\n 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49\n 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74\n 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99]\n\nNote that `netCDF4.MFDataset` can only be used to read, not write, multi-file\ndatasets.\n\n##
9) Efficient compression of netCDF variables.\n\nData stored in netCDF 4 `netCDF4.Variable` objects can be compressed and\ndecompressed on the fly. The parameters for the compression are\ndetermined by the `zlib`, `complevel` and `shuffle` keyword arguments\nto the `netCDF4.Dataset.createVariable` method. To turn on\ncompression, set `zlib=True`. The `complevel` keyword regulates the\nspeed and efficiency of the compression (1 being fastest, but lowest\ncompression ratio, 9 being slowest but best compression ratio). The\ndefault value of `complevel` is 4. Setting `shuffle=False` will turn\noff the HDF5 shuffle filter, which de-interlaces a block of data before\ncompression by reordering the bytes. The shuffle filter can\nsignificantly improve compression ratios, and is on by default. Setting\n`fletcher32` keyword argument to\n`netCDF4.Dataset.createVariable` to `True` (it's `False` by\ndefault) enables the Fletcher32 checksum algorithm for error detection.\nIt's ""also possible to set the HDF5 chunking parameters and endian-ness\nof the binary data stored in the HDF5 file with the `chunksizes`\nand `endian` keyword arguments to\n`netCDF4.Dataset.createVariable`. These keyword arguments only\nare relevant for `NETCDF4` and `NETCDF4_CLASSIC` files (where the\nunderlying file format is HDF5) and are silently ignored if the file\nformat is `NETCDF3_CLASSIC`, `NETCDF3_64BIT_OFFSET` or `NETCDF3_64BIT_DATA`.\n\nIf your data only has a certain number of digits of precision (say for\nexample, it is temperature data that was measured with a precision of\n0.1 degrees), you can dramatically improve zlib compression by\nquantizing (or truncating) the data using the `least_significant_digit`\nkeyword argument to `netCDF4.Dataset.createVariable`. The least\nsignificant digit is the power of ten of the smallest decimal place in\nthe data that is a reliable value. For example if the data has a\nprecision of 0.1, then setting `least_significant_digit=1` will cause\ndata the data to be quantized using `numpy.around(scale*data)/scale`, where\nscale = 2**bits, and bits is determined so that a precision of 0.1 is\nretained (in this case bits=4). Effectively, this makes the compression\n'lossy' instead of 'lossless', that is some precision in the data is\nsacrificed for the sake of disk space.\n\nIn our example, try replacing the line\n\n :::python\n >>> temp = rootgrp.createVariable(\"temp\",\"f4\",(\"time\",\"level\",\"lat\",\"lon\",))\n\nwith\n\n :::python\n >>> temp = dataset.createVariable(\"temp\",\"f4\",(\"time\",\"level\",\"lat\",\"lon\",),zlib=True)\n\nand then\n\n :::python\n >>> temp = dataset.createVariable(\"temp\",\"f4\",(\"time\",\"level\",\"lat\",\"lon\",),zlib=True,least_significant_digit=3)\n\nand see how much smaller the resulting files are.\n\n##
10) Beyond homogeneous arrays of a fixed type - compound data types.\n\nCompound data types map directly to numpy structured (a.k.a 'record')""\narrays. Structured arrays are akin to C structs, or derived types\nin Fortran. They allow for the construction of table-like structures\ncomposed of combinations of other data types, including other\ncompound types. Compound types might be useful for representing multiple\nparameter values at each point on a grid, or at each time and space\nlocation for scattered (point) data. You can then access all the\ninformation for a point by reading one variable, instead of reading\ndifferent parameters from different variables. Compound data types\nare created from the corresponding numpy data type using the\n`netCDF4.Dataset.createCompoundType` method of a `netCDF4.Dataset` or `netCDF4.Group` instance.\nSince there is no native complex data type in netcdf, compound types are handy\nfor storing numpy complex arrays. Here's an example:\n\n :::python\n >>> f = Dataset(\"complex.nc\",\"w\")\n >>> size = 3 # length of 1-d complex array\n >>> # create sample complex data.\n >>> datac = numpy.exp(1j*(1.+numpy.linspace(0, numpy.pi, size)))\n >>> # create complex128 compound data type.\n >>> complex128 = numpy.dtype([(\"real\",numpy.float64),(\"imag\",numpy.float64)])\n >>> complex128_t = f.createCompoundType(complex128,\"complex128\")\n >>> # create a variable with this data type, write some data to it.\n >>> f.createDimension(\"x_dim\",None)\n >>> v = f.createVariable(\"cmplx_var\",complex128_t,\"x_dim\")\n >>> data = numpy.empty(size,complex128) # numpy structured array\n >>> data[\"real\"] = datac.real; data[\"imag\"] = datac.imag\n >>> v[:] = data # write numpy structured array to netcdf compound var\n >>> # close and reopen the file, check the contents.\n >>> f.close(); f = Dataset(\"complex.nc\")\n >>> v = f.variables[\"cmplx_var\"]\n >>> datain = v[:] # read in all the data into a numpy structured array\n >>> # create an empty numpy complex array\n >>> datac2 = numpy.empty(datain.shape,numpy.complex128)\n >>""> # .. fill it with contents of structured array.\n >>> datac2.real = datain[\"real\"]; datac2.imag = datain[\"imag\"]\n >>> print datac.dtype,datac # original data\n complex128 [ 0.54030231+0.84147098j -0.84147098+0.54030231j -0.54030231-0.84147098j]\n >>>\n >>> print datac2.dtype,datac2 # data from file\n complex128 [ 0.54030231+0.84147098j -0.84147098+0.54030231j -0.54030231-0.84147098j]\n\nCompound types can be nested, but you must create the 'inner'\nones first. All of the compound types defined for a `netCDF4.Dataset` or `netCDF4.Group` are stored in a\nPython dictionary, just like variables and dimensions. As always, printing\nobjects gives useful summary information in an interactive session:\n\n :::python\n >>> print f\n \n root group (NETCDF4 file format):\n dimensions: x_dim\n variables: cmplx_var\n groups:\n \n >>> print f.variables[\"cmplx_var\"]\n compound cmplx_var(x_dim)\n compound data type: [(\"real\", \">> print f.cmptypes\n OrderedDict([(\"complex128\", )])\n >>> print f.cmptypes[\"complex128\"]\n : name = \"complex128\", numpy dtype = [(u\"real\",\"11) Variable-length (vlen) data types.\n\nNetCDF 4 has support for variable-length or \"ragged\" arrays. These are arrays\nof variable length sequences having the same type. To create a variable-length\ndata type, use the `netCDF4.Dataset.createVLType` method\nmethod of a `netCDF4.Dataset` or `netCDF4.Group` instance.\n\n :::python\n >>> f = Dataset(\"tst_vlen.nc\",\"w\")\n >>> vlen_t = f.createVLType(numpy.int32, \"phony_vlen\")\n\nThe numpy datatype of the variable-length sequences and the name of the\nnew datatype mu""st be specified. Any of the primitive datatypes can be\nused (signed and unsigned integers, 32 and 64 bit floats, and characters),\nbut compound data types cannot.\nA new variable can then be created using this datatype.\n\n :::python\n >>> x = f.createDimension(\"x\",3)\n >>> y = f.createDimension(\"y\",4)\n >>> vlvar = f.createVariable(\"phony_vlen_var\", vlen_t, (\"y\",\"x\"))\n\nSince there is no native vlen datatype in numpy, vlen arrays are represented\nin python as object arrays (arrays of dtype `object`). These are arrays whose\nelements are Python object pointers, and can contain any type of python object.\nFor this application, they must contain 1-D numpy arrays all of the same type\nbut of varying length.\nIn this case, they contain 1-D numpy `int32` arrays of random length between\n1 and 10.\n\n :::python\n >>> import random\n >>> data = numpy.empty(len(y)*len(x),object)\n >>> for n in range(len(y)*len(x)):\n >>> data[n] = numpy.arange(random.randint(1,10),dtype=\"int32\")+1\n >>> data = numpy.reshape(data,(len(y),len(x)))\n >>> vlvar[:] = data\n >>> print \"vlen variable =\\n\",vlvar[:]\n vlen variable =\n [[[ 1 2 3 4 5 6 7 8 9 10] [1 2 3 4 5] [1 2 3 4 5 6 7 8]]\n [[1 2 3 4 5 6 7] [1 2 3 4 5 6] [1 2 3 4 5]]\n [[1 2 3 4 5] [1 2 3 4] [1]]\n [[ 1 2 3 4 5 6 7 8 9 10] [ 1 2 3 4 5 6 7 8 9 10]\n [1 2 3 4 5 6 7 8]]]\n >>> print f\n \n root group (NETCDF4 file format):\n dimensions: x, y\n variables: phony_vlen_var\n groups:\n >>> print f.variables[\"phony_vlen_var\"]\n \n vlen phony_vlen_var(y, x)\n vlen data type: int32\n unlimited dimensions:\n current shape = (4, 3)\n >>> print f.VLtypes[\"phony_vlen\"]\n : name = \"phony_vlen\", numpy dtype = int32\n\nNumpy object arrays containing python strings can also be written ""as vlen\nvariables, For vlen strings, you don't need to create a vlen data type.\nInstead, simply use the python `str` builtin (or a numpy string datatype\nwith fixed length greater than 1) when calling the\n`netCDF4.Dataset.createVariable` method.\n\n :::python\n >>> z = f.createDimension(\"z\",10)\n >>> strvar = rootgrp.createVariable(\"strvar\", str, \"z\")\n\nIn this example, an object array is filled with random python strings with\nrandom lengths between 2 and 12 characters, and the data in the object\narray is assigned to the vlen string variable.\n\n :::python\n >>> chars = \"1234567890aabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\"\n >>> data = numpy.empty(10,\"O\")\n >>> for n in range(10):\n >>> stringlen = random.randint(2,12)\n >>> data[n] = \"\".join([random.choice(chars) for i in range(stringlen)])\n >>> strvar[:] = data\n >>> print \"variable-length string variable:\\n\",strvar[:]\n variable-length string variable:\n [aDy29jPt 5DS9X8 jd7aplD b8t4RM jHh8hq KtaPWF9cQj Q1hHN5WoXSiT MMxsVeq tdLUzvVTzj]\n >>> print f\n \n root group (NETCDF4 file format):\n dimensions: x, y, z\n variables: phony_vlen_var, strvar\n groups:\n >>> print f.variables[\"strvar\"]\n \n vlen strvar(z)\n vlen data type: \n unlimited dimensions:\n current size = (10,)\n\nIt is also possible to set contents of vlen string variables with numpy arrays\nof any string or unicode data type. Note, however, that accessing the contents\nof such variables will always return numpy arrays with dtype `object`.\n\n##
12) Enum data type.\n\nnetCDF4 has an enumerated data type, which is an integer datatype that is\nrestricted to certain named values. Since Enums don't map directly to\na numpy data type, they are read and written as integer arrays.\n\nHere's an example of using an Enum type to"" hold cloud type data. \nThe base integer data type and a python dictionary describing the allowed\nvalues and their names are used to define an Enum data type using\n`netCDF4.Dataset.createEnumType`.\n\n :::python\n >>> nc = Dataset('clouds.nc','w')\n >>> # python dict with allowed values and their names.\n >>> enum_dict = {u'Altocumulus': 7, u'Missing': 255, \n >>> u'Stratus': 2, u'Clear': 0,\n >>> u'Nimbostratus': 6, u'Cumulus': 4, u'Altostratus': 5,\n >>> u'Cumulonimbus': 1, u'Stratocumulus': 3}\n >>> # create the Enum type called 'cloud_t'.\n >>> cloud_type = nc.createEnumType(numpy.uint8,'cloud_t',enum_dict)\n >>> print cloud_type\n : name = 'cloud_t',\n numpy dtype = uint8, fields/values ={u'Cumulus': 4,\n u'Altocumulus': 7, u'Missing': 255,\n u'Stratus': 2, u'Clear': 0,\n u'Cumulonimbus': 1, u'Stratocumulus': 3,\n u'Nimbostratus': 6, u'Altostratus': 5}\n\nA new variable can be created in the usual way using this data type.\nInteger data is written to the variable that represents the named\ncloud types in enum_dict. A `ValueError` will be raised if an attempt\nis made to write an integer value not associated with one of the\nspecified names.\n\n :::python\n >>> time = nc.createDimension('time',None)\n >>> # create a 1d variable of type 'cloud_type'.\n >>> # The fill_value is set to the 'Missing' named value.\n >>> cloud_var =\n >>> nc.createVariable('primary_cloud',cloud_type,'time',\n >>> fill_value=enum_dict['Missing'])\n >>> # write some data to the variable.\n >>> cloud_var[:] = [enum_dict['Clear'],enum_dict['Stratus'],\n >>> enum_dict['Cumulus'],enum_dict['Missing'],\n >>> enum_dict['Cumulonimbus']]\n >>> nc.close()\n >>> # reopen the file, read the data.\n >>> nc = Dataset('clouds.nc')\n >>> cloud_var = nc.variables['primary_cloud']\n >>> print cloud_var\n \n enum primary_cloud(time)""\n _FillValue: 255\n enum data type: uint8\n unlimited dimensions: time\n current shape = (5,)\n >>> print cloud_var.datatype.enum_dict\n {u'Altocumulus': 7, u'Missing': 255, u'Stratus': 2,\n u'Clear': 0, u'Nimbostratus': 6, u'Cumulus': 4,\n u'Altostratus': 5, u'Cumulonimbus': 1,\n u'Stratocumulus': 3}\n >>> print cloud_var[:]\n [0 2 4 -- 1]\n >>> nc.close()\n\nAll of the code in this tutorial is available in `examples/tutorial.py`,\nUnit tests are in the `test` directory.\n\n**contact**: Jeffrey Whitaker \n\n**copyright**: 2008 by Jeffrey Whitaker.\n\n**license**: Permission to use, copy, modify, and distribute this software and\nits documentation for any purpose and without fee is hereby granted,\nprovided that the above copyright notice appear in all copies and that\nboth the copyright notice and this permission notice appear in\nsupporting documentation.\nTHE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,\nINCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO\nEVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR\nCONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF\nUSE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n- - -\n"; +static const char __pyx_k_Version_1_2_8a0_Introduction_ne[] = "\nVersion 1.2.8a0\n-------------\n- - - \n\nIntroduction\n============\n\nnetcdf4-python is a Python interface to the netCDF C library. \n\n[netCDF](http://www.unidata.ucar.edu/software/netcdf/) version 4 has many features\nnot found in earlier versions of the library and is implemented on top of\n[HDF5](http://www.hdfgroup.org/HDF5). This module can read and write\nfiles in both the new netCDF 4 and the old netCDF 3 format, and can create\nfiles that are readable by HDF5 clients. The API modelled after\n[Scientific.IO.NetCDF](http://dirac.cnrs-orleans.fr/ScientificPython/),\nand should be familiar to users of that module.\n\nMost new features of netCDF 4 are implemented, such as multiple\nunlimited dimensions, groups and zlib data compression. All the new\nnumeric data types (such as 64 bit and unsigned integer types) are\nimplemented. Compound (struct), variable length (vlen) and\nenumerated (enum) data types are supported, but not the opaque data type.\nMixtures of compound, vlen and enum data types (such as\ncompound types containing enums, or vlens containing compound\ntypes) are not supported.\n\nDownload\n========\n\n - Latest bleeding-edge code from the \n [github repository](http://github.com/Unidata/netcdf4-python).\n - Latest [releases](https://pypi.python.org/pypi/netCDF4)\n (source code and windows installers).\n\nRequires\n========\n\n - Python 2.7 or later (python 3 works too).\n - [numpy array module](http://numpy.scipy.org), version 1.7.0 or later.\n - [Cython](http://cython.org), version 0.19 or later, is optional - if it is installed setup.py will\n use it to recompile the Cython source code into C, using conditional compilation\n to enable features in the netCDF API that have been added since version 4.1.1. If\n Cython is not installed, these features (such as the ability to rename Group objects)\n will be disabled to preserve backward compatibility with older versions of the netCDF\n library.\n - The HDF5 C library version 1.8.4""-patch1 or higher (1.8.x recommended)\n from [](ftp://ftp.hdfgroup.org/HDF5/current/src).\n ***netCDF version 4.4.1 or higher is recommended if using HDF5 1.10.x -\n otherwise resulting files may be unreadable by clients using earlier\n versions of HDF5. For netCDF < 4.4.1, HDF5 version 1.8.x is recommended.***\n Be sure to build with `--enable-hl --enable-shared`.\n - [Libcurl](http://curl.haxx.se/libcurl), if you want\n [OPeNDAP](http://opendap.org) support.\n - [HDF4](http://www.hdfgroup.org/products/hdf4), if you want\n to be able to read HDF4 \"Scientific Dataset\" (SD) files.\n - The netCDF-4 C library from the [github releases\n page](https://github.com/Unidata/netcdf-c/releases). \n Version 4.1.1 or higher is required (4.2 or higher recommended).\n Be sure to build with `--enable-netcdf-4 --enable-shared`, and set\n `CPPFLAGS=\"-I $HDF5_DIR/include\"` and `LDFLAGS=\"-L $HDF5_DIR/lib\"`,\n where `$HDF5_DIR` is the directory where HDF5 was installed.\n If you want [OPeNDAP](http://opendap.org) support, add `--enable-dap`.\n If you want HDF4 SD support, add `--enable-hdf4` and add\n the location of the HDF4 headers and library to `$CPPFLAGS` and `$LDFLAGS`.\n\n\nInstall\n=======\n\n - install the requisite python modules and C libraries (see above). It's\n easiest if all the C libs are built as shared libraries.\n - By default, the utility `nc-config`, installed with netcdf 4.1.2 or higher,\n will be run used to determine where all the dependencies live.\n - If `nc-config` is not in your default `$PATH`, rename the\n file `setup.cfg.template` to `setup.cfg`, then edit\n in a text editor (follow the instructions in the comments).\n In addition to specifying the path to `nc-config`,\n you can manually set the paths to all the libraries and their include files\n (in case `nc-config` does not do the right thing).\n - run `python setup.py build`, then `python setup.py install` (as root if\n necessary).\n - [`pip install`](https://pip.pypa.io/en/latest/reference/p""ip_install.html) can\n also be used, with library paths set with environment variables. To make\n this work, the `USE_SETUPCFG` environment variable must be used to tell \n setup.py not to use `setup.cfg`.\n For example, `USE_SETUPCFG=0 HDF5_INCDIR=/usr/include/hdf5/serial\n HDF5_LIBDIR=/usr/lib/x86_64-linux-gnu/hdf5/serial pip install` has been\n shown to work on an Ubuntu/Debian linux system. Similarly, environment variables\n (all capitalized) can be used to set the include and library paths for\n `hdf5`, `netCDF4`, `hdf4`, `szip`, `jpeg`, `curl` and `zlib`. If the\n libraries are installed in standard places (e.g. `/usr` or `/usr/local`), \n the environment variables do not need to be set.\n - run the tests in the 'test' directory by running `python run_all.py`.\n\nTutorial\n========\n\n1. [Creating/Opening/Closing a netCDF file.](#section1)\n2. [Groups in a netCDF file.](#section2)\n3. [Dimensions in a netCDF file.](#section3)\n4. [Variables in a netCDF file.](#section4)\n5. [Attributes in a netCDF file.](#section5)\n6. [Writing data to and retrieving data from a netCDF variable.](#section6)\n7. [Dealing with time coordinates.](#section7)\n8. [Reading data from a multi-file netCDF dataset.](#section8)\n9. [Efficient compression of netCDF variables.](#section9)\n10. [Beyond homogeneous arrays of a fixed type - compound data types.](#section10)\n11. [Variable-length (vlen) data types.](#section11)\n12. [Enum data type.](#section12)\n\n\n##
1) Creating/Opening/Closing a netCDF file.\n\nTo create a netCDF file from python, you simply call the `netCDF4.Dataset`\nconstructor. This is also the method used to open an existing netCDF\nfile. If the file is open for write access (`mode='w', 'r+'` or `'a'`), you may\nwrite any type of data including new dimensions, groups, variables and\nattributes. netCDF files come in five flavors (`NETCDF3_CLASSIC,\nNETCDF3_64BIT_OFFSET, NETCDF3_64BIT_DATA, NETCDF4_CLASSIC`, and `NETCDF4`). \n`NE""TCDF3_CLASSIC` was the original netcdf binary format, and was limited \nto file sizes less than 2 Gb. `NETCDF3_64BIT_OFFSET` was introduced\nin version 3.6.0 of the library, and extended the original binary format\nto allow for file sizes greater than 2 Gb. \n`NETCDF3_64BIT_DATA` is a new format that requires version 4.4.0 of\nthe C library - it extends the `NETCDF3_64BIT_OFFSET` binary format to\nallow for unsigned/64 bit integer data types and 64-bit dimension sizes.\n`NETCDF3_64BIT` is an alias for `NETCDF3_64BIT_OFFSET`.\n`NETCDF4_CLASSIC` files use the version 4 disk format (HDF5), but omits features\nnot found in the version 3 API. They can be read by netCDF 3 clients\nonly if they have been relinked against the netCDF 4 library. They can\nalso be read by HDF5 clients. `NETCDF4` files use the version 4 disk\nformat (HDF5) and use the new features of the version 4 API. The\n`netCDF4` module can read and write files in any of these formats. When\ncreating a new file, the format may be specified using the `format`\nkeyword in the `Dataset` constructor. The default format is\n`NETCDF4`. To see how a given file is formatted, you can examine the\n`data_model` attribute. Closing the netCDF file is\naccomplished via the `netCDF4.Dataset.close` method of the `netCDF4.Dataset`\ninstance.\n\nHere's an example:\n\n :::python\n >>> from netCDF4 import Dataset\n >>> rootgrp = Dataset(\"test.nc\", \"w\", format=\"NETCDF4\")\n >>> print rootgrp.data_model\n NETCDF4\n >>> rootgrp.close()\n\nRemote [OPeNDAP](http://opendap.org)-hosted datasets can be accessed for\nreading over http if a URL is provided to the `netCDF4.Dataset` constructor instead of a\nfilename. However, this requires that the netCDF library be built with\nOPenDAP support, via the `--enable-dap` configure option (added in\nversion 4.0.1).\n\n\n##
2) Groups in a netCDF file.\n\nnetCDF version 4 added support for organizing data in hierarchical\ngroups, which are analogous"" to directories in a filesystem. Groups serve\nas containers for variables, dimensions and attributes, as well as other\ngroups. A `netCDF4.Dataset` creates a special group, called\nthe 'root group', which is similar to the root directory in a unix\nfilesystem. To create `netCDF4.Group` instances, use the\n`netCDF4.Dataset.createGroup` method of a `netCDF4.Dataset` or `netCDF4.Group`\ninstance. `netCDF4.Dataset.createGroup` takes a single argument, a\npython string containing the name of the new group. The new `netCDF4.Group`\ninstances contained within the root group can be accessed by name using\nthe `groups` dictionary attribute of the `netCDF4.Dataset` instance. Only\n`NETCDF4` formatted files support Groups, if you try to create a Group\nin a netCDF 3 file you will get an error message.\n\n :::python\n >>> rootgrp = Dataset(\"test.nc\", \"a\")\n >>> fcstgrp = rootgrp.createGroup(\"forecasts\")\n >>> analgrp = rootgrp.createGroup(\"analyses\")\n >>> print rootgrp.groups\n OrderedDict([(\"forecasts\", \n ),\n (\"analyses\", \n )])\n\nGroups can exist within groups in a `netCDF4.Dataset`, just as directories\nexist within directories in a unix filesystem. Each `netCDF4.Group` instance\nhas a `groups` attribute dictionary containing all of the group\ninstances contained within that group. Each `netCDF4.Group` instance also has a\n`path` attribute that contains a simulated unix directory path to\nthat group. To simplify the creation of nested groups, you can\nuse a unix-like path as an argument to `netCDF4.Dataset.createGroup`.\n\n :::python\n >>> fcstgrp1 = rootgrp.createGroup(\"/forecasts/model1\")\n >>> fcstgrp2 = rootgrp.createGroup(\"/forecasts/model2\")\n\nIf any of the intermediate elements of the path do not exist, they are created,\njust as with the unix command `'mkdir -p'`. If you try to c""reate a group\nthat already exists, no error will be raised, and the existing group will be \nreturned.\n\nHere's an example that shows how to navigate all the groups in a\n`netCDF4.Dataset`. The function `walktree` is a Python generator that is used\nto walk the directory tree. Note that printing the `netCDF4.Dataset` or `netCDF4.Group`\nobject yields summary information about it's contents.\n\n :::python\n >>> def walktree(top):\n >>> values = top.groups.values()\n >>> yield values\n >>> for value in top.groups.values():\n >>> for children in walktree(value):\n >>> yield children\n >>> print rootgrp\n >>> for children in walktree(rootgrp):\n >>> for child in children:\n >>> print child\n \n root group (NETCDF4 file format):\n dimensions:\n variables:\n groups: forecasts, analyses\n \n group /forecasts:\n dimensions:\n variables:\n groups: model1, model2\n \n group /analyses:\n dimensions:\n variables:\n groups:\n \n group /forecasts/model1:\n dimensions:\n variables:\n groups:\n \n group /forecasts/model2:\n dimensions:\n variables:\n groups:\n\n##
3) Dimensions in a netCDF file.\n\nnetCDF defines the sizes of all variables in terms of dimensions, so\nbefore any variables can be created the dimensions they use must be\ncreated first. A special case, not often used in practice, is that of a\nscalar variable, which has no dimensions. A dimension is created using\nthe `netCDF4.Dataset.createDimension` method of a `netCDF4.Dataset`\nor `netCDF4.Group` instance. A Python string is used to set the name of the\ndimension, and an integer value is used to set the size. To create a""n\nunlimited dimension (a dimension that can be appended to), the size\nvalue is set to `None` or 0. In this example, there both the `time` and\n`level` dimensions are unlimited. Having more than one unlimited\ndimension is a new netCDF 4 feature, in netCDF 3 files there may be only\none, and it must be the first (leftmost) dimension of the variable.\n\n :::python\n >>> level = rootgrp.createDimension(\"level\", None)\n >>> time = rootgrp.createDimension(\"time\", None)\n >>> lat = rootgrp.createDimension(\"lat\", 73)\n >>> lon = rootgrp.createDimension(\"lon\", 144)\n\n\nAll of the `netCDF4.Dimension` instances are stored in a python dictionary.\n\n :::python\n >>> print rootgrp.dimensions\n OrderedDict([(\"level\", ),\n (\"time\", ),\n (\"lat\", ),\n (\"lon\", )])\n\nCalling the python `len` function with a `netCDF4.Dimension` instance returns\nthe current size of that dimension.\nThe `netCDF4.Dimension.isunlimited` method of a `netCDF4.Dimension` instance\ncan be used to determine if the dimensions is unlimited, or appendable.\n\n :::python\n >>> print len(lon)\n 144\n >>> print lon.isunlimited()\n False\n >>> print time.isunlimited()\n True\n\nPrinting the `netCDF4.Dimension` object\nprovides useful summary info, including the name and length of the dimension,\nand whether it is unlimited.\n\n :::python\n >>> for dimobj in rootgrp.dimensions.values():\n >>> print dimobj\n (unlimited): name = \"level\", size = 0\n (unlimited): name = \"time\", size = 0\n : name = \"lat\", size = 73\n : name = \"lon\", size = 144""\n (unlimited): name = \"time\", size = 0\n\n`netCDF4.Dimension` names can be changed using the\n`netCDF4.Datatset.renameDimension` method of a `netCDF4.Dataset` or\n`netCDF4.Group` instance.\n\n##
4) Variables in a netCDF file.\n\nnetCDF variables behave much like python multidimensional array objects\nsupplied by the [numpy module](http://numpy.scipy.org). However,\nunlike numpy arrays, netCDF4 variables can be appended to along one or\nmore 'unlimited' dimensions. To create a netCDF variable, use the\n`netCDF4.Dataset.createVariable` method of a `netCDF4.Dataset` or\n`netCDF4.Group` instance. The `netCDF4.Dataset.createVariable` method\nhas two mandatory arguments, the variable name (a Python string), and\nthe variable datatype. The variable's dimensions are given by a tuple\ncontaining the dimension names (defined previously with\n`netCDF4.Dataset.createDimension`). To create a scalar\nvariable, simply leave out the dimensions keyword. The variable\nprimitive datatypes correspond to the dtype attribute of a numpy array.\nYou can specify the datatype as a numpy dtype object, or anything that\ncan be converted to a numpy dtype object. Valid datatype specifiers\ninclude: `'f4'` (32-bit floating point), `'f8'` (64-bit floating\npoint), `'i4'` (32-bit signed integer), `'i2'` (16-bit signed\ninteger), `'i8'` (64-bit signed integer), `'i1'` (8-bit signed\ninteger), `'u1'` (8-bit unsigned integer), `'u2'` (16-bit unsigned\ninteger), `'u4'` (32-bit unsigned integer), `'u8'` (64-bit unsigned\ninteger), or `'S1'` (single-character string). The old Numeric\nsingle-character typecodes (`'f'`,`'d'`,`'h'`,\n`'s'`,`'b'`,`'B'`,`'c'`,`'i'`,`'l'`), corresponding to\n(`'f4'`,`'f8'`,`'i2'`,`'i2'`,`'i1'`,`'i1'`,`'S1'`,`'i4'`,`'i4'`),\nwill also work. The unsigned integer types and the 64-bit integer type\ncan only be used if the file format is `NETCDF4`.\n\nThe dimensions themselves are usually also defined as variables, c""alled\ncoordinate variables. The `netCDF4.Dataset.createVariable`\nmethod returns an instance of the `netCDF4.Variable` class whose methods can be\nused later to access and set variable data and attributes.\n\n :::python\n >>> times = rootgrp.createVariable(\"time\",\"f8\",(\"time\",))\n >>> levels = rootgrp.createVariable(\"level\",\"i4\",(\"level\",))\n >>> latitudes = rootgrp.createVariable(\"lat\",\"f4\",(\"lat\",))\n >>> longitudes = rootgrp.createVariable(\"lon\",\"f4\",(\"lon\",))\n >>> # two dimensions unlimited\n >>> temp = rootgrp.createVariable(\"temp\",\"f4\",(\"time\",\"level\",\"lat\",\"lon\",))\n\nTo get summary info on a `netCDF4.Variable` instance in an interactive session, just print it.\n\n :::python\n >>> print temp\n \n float32 temp(time, level, lat, lon)\n least_significant_digit: 3\n units: K\n unlimited dimensions: time, level\n current shape = (0, 0, 73, 144)\n\nYou can use a path to create a Variable inside a hierarchy of groups.\n\n :::python\n >>> ftemp = rootgrp.createVariable(\"/forecasts/model1/temp\",\"f4\",(\"time\",\"level\",\"lat\",\"lon\",))\n\nIf the intermediate groups do not yet exist, they will be created.\n\nYou can also query a `netCDF4.Dataset` or `netCDF4.Group` instance directly to obtain `netCDF4.Group` or \n`netCDF4.Variable` instances using paths.\n\n :::python\n >>> print rootgrp[\"/forecasts/model1\"] # a Group instance\n \n group /forecasts/model1:\n dimensions(sizes):\n variables(dimensions): float32 temp(time,level,lat,lon)\n groups:\n >>> print rootgrp[\"/forecasts/model1/temp\"] # a Variable instance\n \n float32 temp(time, level, lat, lon)\n path = /forecasts/model1\n unlimited dimensions: time, level\n current shape = (0, 0, 73, 144)\n filling on, default _FillValue of 9.96920996839e+36 used\n""\nAll of the variables in the `netCDF4.Dataset` or `netCDF4.Group` are stored in a\nPython dictionary, in the same way as the dimensions:\n\n :::python\n >>> print rootgrp.variables\n OrderedDict([(\"time\", ),\n (\"level\", ),\n (\"lat\", ),\n (\"lon\", ),\n (\"temp\", )])\n\n`netCDF4.Variable` names can be changed using the\n`netCDF4.Dataset.renameVariable` method of a `netCDF4.Dataset`\ninstance.\n\n\n##
5) Attributes in a netCDF file.\n\nThere are two types of attributes in a netCDF file, global and variable.\nGlobal attributes provide information about a group, or the entire\ndataset, as a whole. `netCDF4.Variable` attributes provide information about\none of the variables in a group. Global attributes are set by assigning\nvalues to `netCDF4.Dataset` or `netCDF4.Group` instance variables. `netCDF4.Variable`\nattributes are set by assigning values to `netCDF4.Variable` instances\nvariables. Attributes can be strings, numbers or sequences. Returning to\nour example,\n\n :::python\n >>> import time\n >>> rootgrp.description = \"bogus example script\"\n >>> rootgrp.history = \"Created \" + time.ctime(time.time())\n >>> rootgrp.source = \"netCDF4 python module tutorial\"\n >>> latitudes.units = \"degrees north\"\n >>> longitudes.units = \"degrees east\"\n >>> levels.units = \"hPa\"\n >>> temp.units = \"K\"\n >>> times.units = \"hours since 0001-01-01 00:00:00.0\"\n >>> times.calendar = \"gregorian\"\n\nThe `netCDF4.Dataset.ncattrs` method of a `netCDF4.Dataset`, `netCDF4.Group` or\n`netCDF4.Variable` instance can be used to retrieve the names of all the netCDF\nattributes. This method is provided as a convenience, since using the\nbuilt-in `dir` Python fun""ction will return a bunch of private methods\nand attributes that cannot (or should not) be modified by the user.\n\n :::python\n >>> for name in rootgrp.ncattrs():\n >>> print \"Global attr\", name, \"=\", getattr(rootgrp,name)\n Global attr description = bogus example script\n Global attr history = Created Mon Nov 7 10.30:56 2005\n Global attr source = netCDF4 python module tutorial\n\nThe `__dict__` attribute of a `netCDF4.Dataset`, `netCDF4.Group` or `netCDF4.Variable`\ninstance provides all the netCDF attribute name/value pairs in a python\ndictionary:\n\n :::python\n >>> print rootgrp.__dict__\n OrderedDict([(u\"description\", u\"bogus example script\"),\n (u\"history\", u\"Created Thu Mar 3 19:30:33 2011\"),\n (u\"source\", u\"netCDF4 python module tutorial\")])\n\nAttributes can be deleted from a netCDF `netCDF4.Dataset`, `netCDF4.Group` or\n`netCDF4.Variable` using the python `del` statement (i.e. `del grp.foo`\nremoves the attribute `foo` the the group `grp`).\n\n##
6) Writing data to and retrieving data from a netCDF variable.\n\nNow that you have a netCDF `netCDF4.Variable` instance, how do you put data\ninto it? You can just treat it like an array and assign data to a slice.\n\n :::python\n >>> import numpy\n >>> lats = numpy.arange(-90,91,2.5)\n >>> lons = numpy.arange(-180,180,2.5)\n >>> latitudes[:] = lats\n >>> longitudes[:] = lons\n >>> print \"latitudes =\\n\",latitudes[:]\n latitudes =\n [-90. -87.5 -85. -82.5 -80. -77.5 -75. -72.5 -70. -67.5 -65. -62.5\n -60. -57.5 -55. -52.5 -50. -47.5 -45. -42.5 -40. -37.5 -35. -32.5\n -30. -27.5 -25. -22.5 -20. -17.5 -15. -12.5 -10. -7.5 -5. -2.5\n 0. 2.5 5. 7.5 10. 12.5 15. 17.5 20. 22.5 25. 27.5\n 30. 32.5 35. 37.5 40. 42.5 45. 47.5 50. 52.5 55. 57.5\n 60. 62.5 65. 67.5 70. 72.5 75. 77.5 80. 82.5 85. "" 87.5\n 90. ]\n\nUnlike NumPy's array objects, netCDF `netCDF4.Variable`\nobjects with unlimited dimensions will grow along those dimensions if you\nassign data outside the currently defined range of indices.\n\n :::python\n >>> # append along two unlimited dimensions by assigning to slice.\n >>> nlats = len(rootgrp.dimensions[\"lat\"])\n >>> nlons = len(rootgrp.dimensions[\"lon\"])\n >>> print \"temp shape before adding data = \",temp.shape\n temp shape before adding data = (0, 0, 73, 144)\n >>>\n >>> from numpy.random import uniform\n >>> temp[0:5,0:10,:,:] = uniform(size=(5,10,nlats,nlons))\n >>> print \"temp shape after adding data = \",temp.shape\n temp shape after adding data = (6, 10, 73, 144)\n >>>\n >>> # levels have grown, but no values yet assigned.\n >>> print \"levels shape after adding pressure data = \",levels.shape\n levels shape after adding pressure data = (10,)\n\nNote that the size of the levels variable grows when data is appended\nalong the `level` dimension of the variable `temp`, even though no\ndata has yet been assigned to levels.\n\n :::python\n >>> # now, assign data to levels dimension variable.\n >>> levels[:] = [1000.,850.,700.,500.,300.,250.,200.,150.,100.,50.]\n\nHowever, that there are some differences between NumPy and netCDF\nvariable slicing rules. Slices behave as usual, being specified as a\n`start:stop:step` triplet. Using a scalar integer index `i` takes the ith\nelement and reduces the rank of the output array by one. Boolean array and\ninteger sequence indexing behaves differently for netCDF variables\nthan for numpy arrays. Only 1-d boolean arrays and integer sequences are\nallowed, and these indices work independently along each dimension (similar\nto the way vector subscripts work in fortran). This means that\n\n :::python\n >>> temp[0, 0, [0,1,2,3], [0,1,2,3]]\n\nreturns an array of shape (4,4) when slicing a netCDF variable, but for a\nnumpy array ""it returns an array of shape (4,).\nSimilarly, a netCDF variable of shape `(2,3,4,5)` indexed\nwith `[0, array([True, False, True]), array([False, True, True, True]), :]`\nwould return a `(2, 3, 5)` array. In NumPy, this would raise an error since\nit would be equivalent to `[0, [0,1], [1,2,3], :]`. When slicing with integer\nsequences, the indices ***need not be sorted*** and ***may contain\nduplicates*** (both of these are new features in version 1.2.1).\nWhile this behaviour may cause some confusion for those used to NumPy's 'fancy indexing' rules,\nit provides a very powerful way to extract data from multidimensional netCDF\nvariables by using logical operations on the dimension arrays to create slices.\n\nFor example,\n\n :::python\n >>> tempdat = temp[::2, [1,3,6], lats>0, lons>0]\n\nwill extract time indices 0,2 and 4, pressure levels\n850, 500 and 200 hPa, all Northern Hemisphere latitudes and Eastern\nHemisphere longitudes, resulting in a numpy array of shape (3, 3, 36, 71).\n\n :::python\n >>> print \"shape of fancy temp slice = \",tempdat.shape\n shape of fancy temp slice = (3, 3, 36, 71)\n\n***Special note for scalar variables***: To extract data from a scalar variable\n`v` with no associated dimensions, use `np.asarray(v)` or `v[...]`. The result\nwill be a numpy scalar array.\n\n##
7) Dealing with time coordinates.\n\nTime coordinate values pose a special challenge to netCDF users. Most\nmetadata standards (such as CF) specify that time should be\nmeasure relative to a fixed date using a certain calendar, with units\nspecified like `hours since YY-MM-DD hh:mm:ss`. These units can be\nawkward to deal with, without a utility to convert the values to and\nfrom calendar dates. The function called `netCDF4.num2date` and `netCDF4.date2num` are\nprovided with this package to do just that. Here's an example of how they\ncan be used:\n\n :::python\n >>> # fill in times.\n >>> from datetime import datetime, timede""lta\n >>> from netCDF4 import num2date, date2num\n >>> dates = [datetime(2001,3,1)+n*timedelta(hours=12) for n in range(temp.shape[0])]\n >>> times[:] = date2num(dates,units=times.units,calendar=times.calendar)\n >>> print \"time values (in units %s): \" % times.units+\"\\n\",times[:]\n time values (in units hours since January 1, 0001):\n [ 17533056. 17533068. 17533080. 17533092. 17533104.]\n >>> dates = num2date(times[:],units=times.units,calendar=times.calendar)\n >>> print \"dates corresponding to time values:\\n\",dates\n dates corresponding to time values:\n [2001-03-01 00:00:00 2001-03-01 12:00:00 2001-03-02 00:00:00\n 2001-03-02 12:00:00 2001-03-03 00:00:00]\n\n`netCDF4.num2date` converts numeric values of time in the specified `units`\nand `calendar` to datetime objects, and `netCDF4.date2num` does the reverse.\nAll the calendars currently defined in the\n[CF metadata convention](http://cfconventions.org) are supported.\nA function called `netCDF4.date2index` is also provided which returns the indices\nof a netCDF time variable corresponding to a sequence of datetime instances.\n\n\n##
8) Reading data from a multi-file netCDF dataset.\n\nIf you want to read data from a variable that spans multiple netCDF files,\nyou can use the `netCDF4.MFDataset` class to read the data as if it were\ncontained in a single file. Instead of using a single filename to create\na `netCDF4.Dataset` instance, create a `netCDF4.MFDataset` instance with either a list\nof filenames, or a string with a wildcard (which is then converted to\na sorted list of files using the python glob module).\nVariables in the list of files that share the same unlimited\ndimension are aggregated together, and can be sliced across multiple\nfiles. To illustrate this, let's first create a bunch of netCDF files with\nthe same variable (with the same unlimited dimension). The files\nmust in be in `NETCDF3_64BIT_OFFSET`, `NETCDF3_64BIT_DATA`, `NET""CDF3_CLASSIC` or\n`NETCDF4_CLASSIC` format (`NETCDF4` formatted multi-file\ndatasets are not supported).\n\n :::python\n >>> for nf in range(10):\n >>> f = Dataset(\"mftest%s.nc\" % nf,\"w\")\n >>> f.createDimension(\"x\",None)\n >>> x = f.createVariable(\"x\",\"i\",(\"x\",))\n >>> x[0:10] = numpy.arange(nf*10,10*(nf+1))\n >>> f.close()\n\nNow read all the files back in at once with `netCDF4.MFDataset`\n\n :::python\n >>> from netCDF4 import MFDataset\n >>> f = MFDataset(\"mftest*nc\")\n >>> print f.variables[\"x\"][:]\n [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24\n 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49\n 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74\n 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99]\n\nNote that `netCDF4.MFDataset` can only be used to read, not write, multi-file\ndatasets.\n\n##
9) Efficient compression of netCDF variables.\n\nData stored in netCDF 4 `netCDF4.Variable` objects can be compressed and\ndecompressed on the fly. The parameters for the compression are\ndetermined by the `zlib`, `complevel` and `shuffle` keyword arguments\nto the `netCDF4.Dataset.createVariable` method. To turn on\ncompression, set `zlib=True`. The `complevel` keyword regulates the\nspeed and efficiency of the compression (1 being fastest, but lowest\ncompression ratio, 9 being slowest but best compression ratio). The\ndefault value of `complevel` is 4. Setting `shuffle=False` will turn\noff the HDF5 shuffle filter, which de-interlaces a block of data before\ncompression by reordering the bytes. The shuffle filter can\nsignificantly improve compression ratios, and is on by default. Setting\n`fletcher32` keyword argument to\n`netCDF4.Dataset.createVariable` to `True` (it's `False` by\ndefault) enables the Fletcher32 checksum algorithm for error detection.\nIt's ""also possible to set the HDF5 chunking parameters and endian-ness\nof the binary data stored in the HDF5 file with the `chunksizes`\nand `endian` keyword arguments to\n`netCDF4.Dataset.createVariable`. These keyword arguments only\nare relevant for `NETCDF4` and `NETCDF4_CLASSIC` files (where the\nunderlying file format is HDF5) and are silently ignored if the file\nformat is `NETCDF3_CLASSIC`, `NETCDF3_64BIT_OFFSET` or `NETCDF3_64BIT_DATA`.\n\nIf your data only has a certain number of digits of precision (say for\nexample, it is temperature data that was measured with a precision of\n0.1 degrees), you can dramatically improve zlib compression by\nquantizing (or truncating) the data using the `least_significant_digit`\nkeyword argument to `netCDF4.Dataset.createVariable`. The least\nsignificant digit is the power of ten of the smallest decimal place in\nthe data that is a reliable value. For example if the data has a\nprecision of 0.1, then setting `least_significant_digit=1` will cause\ndata the data to be quantized using `numpy.around(scale*data)/scale`, where\nscale = 2**bits, and bits is determined so that a precision of 0.1 is\nretained (in this case bits=4). Effectively, this makes the compression\n'lossy' instead of 'lossless', that is some precision in the data is\nsacrificed for the sake of disk space.\n\nIn our example, try replacing the line\n\n :::python\n >>> temp = rootgrp.createVariable(\"temp\",\"f4\",(\"time\",\"level\",\"lat\",\"lon\",))\n\nwith\n\n :::python\n >>> temp = dataset.createVariable(\"temp\",\"f4\",(\"time\",\"level\",\"lat\",\"lon\",),zlib=True)\n\nand then\n\n :::python\n >>> temp = dataset.createVariable(\"temp\",\"f4\",(\"time\",\"level\",\"lat\",\"lon\",),zlib=True,least_significant_digit=3)\n\nand see how much smaller the resulting files are.\n\n##
10) Beyond homogeneous arrays of a fixed type - compound data types.\n\nCompound data types map directly to numpy structured (a.k.a 'record')""\narrays. Structured arrays are akin to C structs, or derived types\nin Fortran. They allow for the construction of table-like structures\ncomposed of combinations of other data types, including other\ncompound types. Compound types might be useful for representing multiple\nparameter values at each point on a grid, or at each time and space\nlocation for scattered (point) data. You can then access all the\ninformation for a point by reading one variable, instead of reading\ndifferent parameters from different variables. Compound data types\nare created from the corresponding numpy data type using the\n`netCDF4.Dataset.createCompoundType` method of a `netCDF4.Dataset` or `netCDF4.Group` instance.\nSince there is no native complex data type in netcdf, compound types are handy\nfor storing numpy complex arrays. Here's an example:\n\n :::python\n >>> f = Dataset(\"complex.nc\",\"w\")\n >>> size = 3 # length of 1-d complex array\n >>> # create sample complex data.\n >>> datac = numpy.exp(1j*(1.+numpy.linspace(0, numpy.pi, size)))\n >>> # create complex128 compound data type.\n >>> complex128 = numpy.dtype([(\"real\",numpy.float64),(\"imag\",numpy.float64)])\n >>> complex128_t = f.createCompoundType(complex128,\"complex128\")\n >>> # create a variable with this data type, write some data to it.\n >>> f.createDimension(\"x_dim\",None)\n >>> v = f.createVariable(\"cmplx_var\",complex128_t,\"x_dim\")\n >>> data = numpy.empty(size,complex128) # numpy structured array\n >>> data[\"real\"] = datac.real; data[\"imag\"] = datac.imag\n >>> v[:] = data # write numpy structured array to netcdf compound var\n >>> # close and reopen the file, check the contents.\n >>> f.close(); f = Dataset(\"complex.nc\")\n >>> v = f.variables[\"cmplx_var\"]\n >>> datain = v[:] # read in all the data into a numpy structured array\n >>> # create an empty numpy complex array\n >>> datac2 = numpy.empty(datain.shape,numpy.complex128)\n >>""> # .. fill it with contents of structured array.\n >>> datac2.real = datain[\"real\"]; datac2.imag = datain[\"imag\"]\n >>> print datac.dtype,datac # original data\n complex128 [ 0.54030231+0.84147098j -0.84147098+0.54030231j -0.54030231-0.84147098j]\n >>>\n >>> print datac2.dtype,datac2 # data from file\n complex128 [ 0.54030231+0.84147098j -0.84147098+0.54030231j -0.54030231-0.84147098j]\n\nCompound types can be nested, but you must create the 'inner'\nones first. All of the compound types defined for a `netCDF4.Dataset` or `netCDF4.Group` are stored in a\nPython dictionary, just like variables and dimensions. As always, printing\nobjects gives useful summary information in an interactive session:\n\n :::python\n >>> print f\n \n root group (NETCDF4 file format):\n dimensions: x_dim\n variables: cmplx_var\n groups:\n \n >>> print f.variables[\"cmplx_var\"]\n compound cmplx_var(x_dim)\n compound data type: [(\"real\", \">> print f.cmptypes\n OrderedDict([(\"complex128\", )])\n >>> print f.cmptypes[\"complex128\"]\n : name = \"complex128\", numpy dtype = [(u\"real\",\"11) Variable-length (vlen) data types.\n\nNetCDF 4 has support for variable-length or \"ragged\" arrays. These are arrays\nof variable length sequences having the same type. To create a variable-length\ndata type, use the `netCDF4.Dataset.createVLType` method\nmethod of a `netCDF4.Dataset` or `netCDF4.Group` instance.\n\n :::python\n >>> f = Dataset(\"tst_vlen.nc\",\"w\")\n >>> vlen_t = f.createVLType(numpy.int32, \"phony_vlen\")\n\nThe numpy datatype of the variable-length sequences and the name of the\nnew datatype mu""st be specified. Any of the primitive datatypes can be\nused (signed and unsigned integers, 32 and 64 bit floats, and characters),\nbut compound data types cannot.\nA new variable can then be created using this datatype.\n\n :::python\n >>> x = f.createDimension(\"x\",3)\n >>> y = f.createDimension(\"y\",4)\n >>> vlvar = f.createVariable(\"phony_vlen_var\", vlen_t, (\"y\",\"x\"))\n\nSince there is no native vlen datatype in numpy, vlen arrays are represented\nin python as object arrays (arrays of dtype `object`). These are arrays whose\nelements are Python object pointers, and can contain any type of python object.\nFor this application, they must contain 1-D numpy arrays all of the same type\nbut of varying length.\nIn this case, they contain 1-D numpy `int32` arrays of random length between\n1 and 10.\n\n :::python\n >>> import random\n >>> data = numpy.empty(len(y)*len(x),object)\n >>> for n in range(len(y)*len(x)):\n >>> data[n] = numpy.arange(random.randint(1,10),dtype=\"int32\")+1\n >>> data = numpy.reshape(data,(len(y),len(x)))\n >>> vlvar[:] = data\n >>> print \"vlen variable =\\n\",vlvar[:]\n vlen variable =\n [[[ 1 2 3 4 5 6 7 8 9 10] [1 2 3 4 5] [1 2 3 4 5 6 7 8]]\n [[1 2 3 4 5 6 7] [1 2 3 4 5 6] [1 2 3 4 5]]\n [[1 2 3 4 5] [1 2 3 4] [1]]\n [[ 1 2 3 4 5 6 7 8 9 10] [ 1 2 3 4 5 6 7 8 9 10]\n [1 2 3 4 5 6 7 8]]]\n >>> print f\n \n root group (NETCDF4 file format):\n dimensions: x, y\n variables: phony_vlen_var\n groups:\n >>> print f.variables[\"phony_vlen_var\"]\n \n vlen phony_vlen_var(y, x)\n vlen data type: int32\n unlimited dimensions:\n current shape = (4, 3)\n >>> print f.VLtypes[\"phony_vlen\"]\n : name = \"phony_vlen\", numpy dtype = int32\n\nNumpy object arrays containing python strings can also be written ""as vlen\nvariables, For vlen strings, you don't need to create a vlen data type.\nInstead, simply use the python `str` builtin (or a numpy string datatype\nwith fixed length greater than 1) when calling the\n`netCDF4.Dataset.createVariable` method.\n\n :::python\n >>> z = f.createDimension(\"z\",10)\n >>> strvar = rootgrp.createVariable(\"strvar\", str, \"z\")\n\nIn this example, an object array is filled with random python strings with\nrandom lengths between 2 and 12 characters, and the data in the object\narray is assigned to the vlen string variable.\n\n :::python\n >>> chars = \"1234567890aabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\"\n >>> data = numpy.empty(10,\"O\")\n >>> for n in range(10):\n >>> stringlen = random.randint(2,12)\n >>> data[n] = \"\".join([random.choice(chars) for i in range(stringlen)])\n >>> strvar[:] = data\n >>> print \"variable-length string variable:\\n\",strvar[:]\n variable-length string variable:\n [aDy29jPt 5DS9X8 jd7aplD b8t4RM jHh8hq KtaPWF9cQj Q1hHN5WoXSiT MMxsVeq tdLUzvVTzj]\n >>> print f\n \n root group (NETCDF4 file format):\n dimensions: x, y, z\n variables: phony_vlen_var, strvar\n groups:\n >>> print f.variables[\"strvar\"]\n \n vlen strvar(z)\n vlen data type: \n unlimited dimensions:\n current size = (10,)\n\nIt is also possible to set contents of vlen string variables with numpy arrays\nof any string or unicode data type. Note, however, that accessing the contents\nof such variables will always return numpy arrays with dtype `object`.\n\n##
12) Enum data type.\n\nnetCDF4 has an enumerated data type, which is an integer datatype that is\nrestricted to certain named values. Since Enums don't map directly to\na numpy data type, they are read and written as integer arrays.\n\nHere's an example of using an Enum type to"" hold cloud type data. \nThe base integer data type and a python dictionary describing the allowed\nvalues and their names are used to define an Enum data type using\n`netCDF4.Dataset.createEnumType`.\n\n :::python\n >>> nc = Dataset('clouds.nc','w')\n >>> # python dict with allowed values and their names.\n >>> enum_dict = {u'Altocumulus': 7, u'Missing': 255, \n >>> u'Stratus': 2, u'Clear': 0,\n >>> u'Nimbostratus': 6, u'Cumulus': 4, u'Altostratus': 5,\n >>> u'Cumulonimbus': 1, u'Stratocumulus': 3}\n >>> # create the Enum type called 'cloud_t'.\n >>> cloud_type = nc.createEnumType(numpy.uint8,'cloud_t',enum_dict)\n >>> print cloud_type\n : name = 'cloud_t',\n numpy dtype = uint8, fields/values ={u'Cumulus': 4,\n u'Altocumulus': 7, u'Missing': 255,\n u'Stratus': 2, u'Clear': 0,\n u'Cumulonimbus': 1, u'Stratocumulus': 3,\n u'Nimbostratus': 6, u'Altostratus': 5}\n\nA new variable can be created in the usual way using this data type.\nInteger data is written to the variable that represents the named\ncloud types in enum_dict. A `ValueError` will be raised if an attempt\nis made to write an integer value not associated with one of the\nspecified names.\n\n :::python\n >>> time = nc.createDimension('time',None)\n >>> # create a 1d variable of type 'cloud_type'.\n >>> # The fill_value is set to the 'Missing' named value.\n >>> cloud_var =\n >>> nc.createVariable('primary_cloud',cloud_type,'time',\n >>> fill_value=enum_dict['Missing'])\n >>> # write some data to the variable.\n >>> cloud_var[:] = [enum_dict['Clear'],enum_dict['Stratus'],\n >>> enum_dict['Cumulus'],enum_dict['Missing'],\n >>> enum_dict['Cumulonimbus']]\n >>> nc.close()\n >>> # reopen the file, read the data.\n >>> nc = Dataset('clouds.nc')\n >>> cloud_var = nc.variables['primary_cloud']\n >>> print cloud_var\n \n enum primary_cloud(time)""\n _FillValue: 255\n enum data type: uint8\n unlimited dimensions: time\n current shape = (5,)\n >>> print cloud_var.datatype.enum_dict\n {u'Altocumulus': 7, u'Missing': 255, u'Stratus': 2,\n u'Clear': 0, u'Nimbostratus': 6, u'Cumulus': 4,\n u'Altostratus': 5, u'Cumulonimbus': 1,\n u'Stratocumulus': 3}\n >>> print cloud_var[:]\n [0 2 4 -- 1]\n >>> nc.close()\n\nAll of the code in this tutorial is available in `examples/tutorial.py`,\nUnit tests are in the `test` directory.\n\n**contact**: Jeffrey Whitaker \n\n**copyright**: 2008 by Jeffrey Whitaker.\n\n**license**: Permission to use, copy, modify, and distribute this software and\nits documentation for any purpose and without fee is hereby granted,\nprovided that the above copyright notice appear in all copies and that\nboth the copyright notice and this permission notice appear in\nsupporting documentation.\nTHE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,\nINCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO\nEVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR\nCONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF\nUSE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n- - -\n"; static const char __pyx_k_assign_vlen_method_only_for_use[] = "_assign_vlen method only for use with VLEN variables"; static const char __pyx_k_cannot_set__FillValue_attribute[] = "cannot set _FillValue attribute for VLEN or compound variable"; static const char __pyx_k_cannot_specify_chunksizes_for_a[] = "cannot specify chunksizes for a contiguous dataset"; @@ -2259,7 +2295,7 @@ static const char __pyx_k_zero_not_allowed_as_a_reference[] = "zero not allowed static const char __pyx_k_A_numpy_integer_dtype_object_des[] = "A numpy integer dtype object describing the base type for the Enum."; static const char __pyx_k_A_python_dictionary_describing_t[] = "A python dictionary describing the enum fields and values."; static const char __pyx_k_A_tuple_with_the_current_shape_l[] = "A tuple with the current shape (length of all dimensions)."; -static const char __pyx_k_Dataset_get_variables_by_attribu[] = "Dataset.get_variables_by_attributes (line 2550)"; +static const char __pyx_k_Dataset_get_variables_by_attribu[] = "Dataset.get_variables_by_attributes (line 2577)"; static const char __pyx_k_Describes_the_power_of_ten_of_th[] = "Describes the power of ten of the \n smallest decimal place in the data the contains a reliable value. Data is\n truncated to this decimal place when it is assigned to the `netCDF4.Variable`\n instance. If `None`, the data is not truncated."; static const char __pyx_k_Dimension_object_no_longer_valid[] = "Dimension object no longer valid"; static const char __pyx_k_If_True_child_Dimension_and_Vari[] = "If `True`, child Dimension and Variables objects only keep weak references to\n the parent Dataset or Group."; @@ -2303,6 +2339,7 @@ static const char __pyx_k_illegal_primitive_data_type_must[] = "illegal primitiv static const char __pyx_k_invalid_scale_factor_or_add_offs[] = "invalid scale_factor or add_offset attribute, no unpacking done..."; static const char __pyx_k_masked_arrays_cannot_be_assigned[] = "masked arrays cannot be assigned by VLEN str slices"; static const char __pyx_k_master_dataset_s_does_not_have_a[] = "master dataset %s does not have a aggregation dimension"; +static const char __pyx_k_memory_mode_only_works_with_r_mo[] = "memory mode only works with 'r' modes and must be `bytes`"; static const char __pyx_k_negative_strides_not_allowed_whe[] = "negative strides not allowed when slicing MFVariable Variable instance"; static const char __pyx_k_numpy_data_type_for_primitive_da[] = "numpy data type (for primitive data types) or\n VLType/CompoundType/EnumType instance (for compound, vlen or enum\n data types)."; static const char __pyx_k_only_endian_native_allowed_for_N[] = "only endian='native' allowed for NETCDF3 files"; @@ -2336,7 +2373,7 @@ static PyObject *__pyx_kp_s_; static PyObject *__pyx_kp_s_0m; static PyObject *__pyx_kp_s_1; static PyObject *__pyx_kp_s_1_10; -static PyObject *__pyx_kp_s_1_2_7; +static PyObject *__pyx_kp_s_1_2_8a0; static PyObject *__pyx_kp_s_4_2_1; static PyObject *__pyx_kp_s_4_4_0; static PyObject *__pyx_kp_s_4_4_1; @@ -2443,7 +2480,7 @@ static PyObject *__pyx_n_s_UNDEFINED; static PyObject *__pyx_n_s_UnicodeDecodeError; static PyObject *__pyx_n_s_UnicodeError; static PyObject *__pyx_kp_s_Unsupported_compound_type_elemen; -static PyObject *__pyx_kp_s_Users_jsw_python_netcdf4_python; +static PyObject *__pyx_kp_s_Users_amohr_dev_thehesiod_netcd; static PyObject *__pyx_n_s_V; static PyObject *__pyx_kp_s_VLType_dtype; static PyObject *__pyx_kp_s_VLType_is_not_picklable; @@ -2485,16 +2522,16 @@ static PyObject *__pyx_kp_s_WARNING_variable_s_has_unsupport_3; static PyObject *__pyx_kp_s_WARNING_variable_s_has_unsupport_4; static PyObject *__pyx_kp_s__13; static PyObject *__pyx_kp_s__14; -static PyObject *__pyx_kp_s__15; -static PyObject *__pyx_kp_s__18; +static PyObject *__pyx_kp_s__17; static PyObject *__pyx_kp_s__2; static PyObject *__pyx_kp_s__20; -static PyObject *__pyx_kp_s__21; +static PyObject *__pyx_kp_s__22; static PyObject *__pyx_kp_s__23; -static PyObject *__pyx_kp_s__24; -static PyObject *__pyx_n_s__28; -static PyObject *__pyx_kp_s__36; -static PyObject *__pyx_kp_s__37; +static PyObject *__pyx_kp_s__25; +static PyObject *__pyx_kp_s__26; +static PyObject *__pyx_n_s__32; +static PyObject *__pyx_kp_s__40; +static PyObject *__pyx_kp_s__41; static PyObject *__pyx_n_s_a; static PyObject *__pyx_n_s_add_offset; static PyObject *__pyx_n_s_aggDimId; @@ -2524,6 +2561,7 @@ static PyObject *__pyx_n_s_big; static PyObject *__pyx_n_s_bool; static PyObject *__pyx_n_s_bs; static PyObject *__pyx_n_s_buffer; +static PyObject *__pyx_n_s_buffer_2; static PyObject *__pyx_n_s_byteorder; static PyObject *__pyx_n_s_bytestr; static PyObject *__pyx_n_s_byteswap; @@ -2553,6 +2591,7 @@ static PyObject *__pyx_n_s_chunksizes; static PyObject *__pyx_kp_s_chunksizes_must_be_a_sequence_wi; static PyObject *__pyx_n_s_clobber; static PyObject *__pyx_n_s_close; +static PyObject *__pyx_n_s_close_2; static PyObject *__pyx_n_s_cmptype; static PyObject *__pyx_n_s_cmptypes; static PyObject *__pyx_n_s_cnt; @@ -2698,6 +2737,7 @@ static PyObject *__pyx_n_s_has_cdf5; static PyObject *__pyx_n_s_has_lsd; static PyObject *__pyx_n_s_has_nc_inq_format_extended; static PyObject *__pyx_n_s_has_nc_inq_path; +static PyObject *__pyx_n_s_has_nc_open_mem; static PyObject *__pyx_n_s_has_rename_grp; static PyObject *__pyx_n_s_hdf5libversion; static PyObject *__pyx_n_s_hour; @@ -2768,6 +2808,8 @@ static PyObject *__pyx_n_s_masterType; static PyObject *__pyx_kp_s_master_dataset_s_does_not_have_a; static PyObject *__pyx_kp_s_master_dataset_s_does_not_have_a_2; static PyObject *__pyx_n_s_mastervar; +static PyObject *__pyx_n_s_memory; +static PyObject *__pyx_kp_s_memory_mode_only_works_with_r_mo; static PyObject *__pyx_n_s_memoryview; static PyObject *__pyx_n_s_metaclass; static PyObject *__pyx_n_s_microsec_units; @@ -2795,6 +2837,7 @@ static PyObject *__pyx_kp_s_name_s_size_s; static PyObject *__pyx_n_s_names; static PyObject *__pyx_n_s_native; static PyObject *__pyx_n_s_nbytes; +static PyObject *__pyx_kp_s_nc_open_mem_method_not_enabled; static PyObject *__pyx_n_s_nc_type; static PyObject *__pyx_n_s_ncattrs; static PyObject *__pyx_n_s_ncdump; @@ -3034,45 +3077,46 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_22genexpr(CYTHON_UNUSED PyObject *_ static PyObject *__pyx_pf_7netCDF4_8_netCDF4__gethdf5libversion(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_2getlibversion(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_4_set_default_format(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_format); /* proto */ -static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_mode, PyObject *__pyx_v_clobber, PyObject *__pyx_v_format, PyObject *__pyx_v_diskless, PyObject *__pyx_v_persist, PyObject *__pyx_v_keepweakref, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */ +static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_mode, PyObject *__pyx_v_clobber, PyObject *__pyx_v_format, PyObject *__pyx_v_diskless, PyObject *__pyx_v_persist, PyObject *__pyx_v_keepweakref, PyObject *__pyx_v_memory, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_2__enter__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_4__exit__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_atype, CYTHON_UNUSED PyObject *__pyx_v_value, CYTHON_UNUSED PyObject *__pyx_v_traceback); /* proto */ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_6__getitem__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_elem); /* proto */ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_8filepath(CYTHON_UNUSED struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_10__repr__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_14close(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_16isopen(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */ -static void __pyx_pf_7netCDF4_8_netCDF4_7Dataset_18__dealloc__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_20__reduce__(CYTHON_UNUSED struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_22sync(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_24_redef(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_26_enddef(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_28set_fill_on(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_30set_fill_off(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_32createDimension(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_dimname, PyObject *__pyx_v_size); /* proto */ -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_34renameDimension(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_oldname, PyObject *__pyx_v_newname); /* proto */ -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_36createCompoundType(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_datatype, PyObject *__pyx_v_datatype_name); /* proto */ -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_38createVLType(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_datatype, PyObject *__pyx_v_datatype_name); /* proto */ -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_40createEnumType(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_datatype, PyObject *__pyx_v_datatype_name, PyObject *__pyx_v_enum_dict); /* proto */ -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42createVariable(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_varname, PyObject *__pyx_v_datatype, PyObject *__pyx_v_dimensions, PyObject *__pyx_v_zlib, PyObject *__pyx_v_complevel, PyObject *__pyx_v_shuffle, PyObject *__pyx_v_fletcher32, PyObject *__pyx_v_contiguous, PyObject *__pyx_v_chunksizes, PyObject *__pyx_v_endian, PyObject *__pyx_v_least_significant_digit, PyObject *__pyx_v_fill_value, PyObject *__pyx_v_chunk_cache); /* proto */ -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_44renameVariable(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_oldname, PyObject *__pyx_v_newname); /* proto */ -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_46createGroup(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_groupname); /* proto */ -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_48ncattrs(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_50setncattr(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /* proto */ -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_52setncattr_string(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /* proto */ -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_54setncatts(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_attdict); /* proto */ -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_56getncattr(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ -static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_58__delattr__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_60delncattr(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ -static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_62__setattr__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /* proto */ -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_64__getattr__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_66renameAttribute(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_oldname, PyObject *__pyx_v_newname); /* proto */ -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_68renameGroup(CYTHON_UNUSED struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_oldname, CYTHON_UNUSED PyObject *__pyx_v_newname); /* proto */ -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_maskandscale(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_mask(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74set_auto_scale(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_76get_variables_by_attributes(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_14_close(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_check_err); /* proto */ +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_16close(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_18isopen(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */ +static void __pyx_pf_7netCDF4_8_netCDF4_7Dataset_20__dealloc__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_22__reduce__(CYTHON_UNUSED struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_24sync(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_26_redef(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_28_enddef(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_30set_fill_on(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_32set_fill_off(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_34createDimension(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_dimname, PyObject *__pyx_v_size); /* proto */ +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_36renameDimension(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_oldname, PyObject *__pyx_v_newname); /* proto */ +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_38createCompoundType(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_datatype, PyObject *__pyx_v_datatype_name); /* proto */ +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_40createVLType(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_datatype, PyObject *__pyx_v_datatype_name); /* proto */ +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42createEnumType(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_datatype, PyObject *__pyx_v_datatype_name, PyObject *__pyx_v_enum_dict); /* proto */ +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_44createVariable(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_varname, PyObject *__pyx_v_datatype, PyObject *__pyx_v_dimensions, PyObject *__pyx_v_zlib, PyObject *__pyx_v_complevel, PyObject *__pyx_v_shuffle, PyObject *__pyx_v_fletcher32, PyObject *__pyx_v_contiguous, PyObject *__pyx_v_chunksizes, PyObject *__pyx_v_endian, PyObject *__pyx_v_least_significant_digit, PyObject *__pyx_v_fill_value, PyObject *__pyx_v_chunk_cache); /* proto */ +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_46renameVariable(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_oldname, PyObject *__pyx_v_newname); /* proto */ +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_48createGroup(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_groupname); /* proto */ +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_50ncattrs(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_52setncattr(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_54setncattr_string(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_56setncatts(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_attdict); /* proto */ +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_58getncattr(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ +static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_60__delattr__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_62delncattr(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ +static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_64__setattr__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_66__getattr__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_68renameAttribute(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_oldname, PyObject *__pyx_v_newname); /* proto */ +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70renameGroup(CYTHON_UNUSED struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_oldname, CYTHON_UNUSED PyObject *__pyx_v_newname); /* proto */ +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_maskandscale(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74set_auto_mask(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_76set_auto_scale(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_78get_variables_by_attributes(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_6_grpid___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_6_grpid_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_7_isopen___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */ @@ -3346,6 +3390,7 @@ static PyObject *__pyx_int_1582; static PyObject *__pyx_int_1900; static PyObject *__pyx_int_3600; static PyObject *__pyx_int_neg_1; +static PyObject *__pyx_k__15; static PyObject *__pyx_slice__8; static PyObject *__pyx_tuple__3; static PyObject *__pyx_tuple__4; @@ -3356,123 +3401,124 @@ static PyObject *__pyx_tuple__9; static PyObject *__pyx_slice__10; static PyObject *__pyx_slice__11; static PyObject *__pyx_slice__12; -static PyObject *__pyx_slice__39; -static PyObject *__pyx_slice__40; -static PyObject *__pyx_slice__46; -static PyObject *__pyx_slice__47; -static PyObject *__pyx_slice__55; -static PyObject *__pyx_slice__56; -static PyObject *__pyx_slice__57; -static PyObject *__pyx_slice__58; +static PyObject *__pyx_slice__43; +static PyObject *__pyx_slice__44; +static PyObject *__pyx_slice__50; +static PyObject *__pyx_slice__51; static PyObject *__pyx_slice__59; static PyObject *__pyx_slice__60; -static PyObject *__pyx_slice__65; -static PyObject *__pyx_slice__68; -static PyObject *__pyx_slice__70; -static PyObject *__pyx_slice__71; +static PyObject *__pyx_slice__61; +static PyObject *__pyx_slice__62; +static PyObject *__pyx_slice__63; +static PyObject *__pyx_slice__64; +static PyObject *__pyx_slice__69; static PyObject *__pyx_slice__72; +static PyObject *__pyx_slice__74; +static PyObject *__pyx_slice__75; static PyObject *__pyx_slice__76; -static PyObject *__pyx_slice__79; static PyObject *__pyx_slice__80; -static PyObject *__pyx_slice__86; -static PyObject *__pyx_slice__88; -static PyObject *__pyx_slice__94; -static PyObject *__pyx_slice__95; +static PyObject *__pyx_slice__83; +static PyObject *__pyx_slice__84; +static PyObject *__pyx_slice__90; +static PyObject *__pyx_slice__92; +static PyObject *__pyx_slice__98; static PyObject *__pyx_slice__99; static PyObject *__pyx_tuple__16; -static PyObject *__pyx_tuple__17; +static PyObject *__pyx_tuple__18; static PyObject *__pyx_tuple__19; -static PyObject *__pyx_tuple__22; -static PyObject *__pyx_tuple__25; -static PyObject *__pyx_tuple__26; +static PyObject *__pyx_tuple__21; +static PyObject *__pyx_tuple__24; static PyObject *__pyx_tuple__27; +static PyObject *__pyx_tuple__28; static PyObject *__pyx_tuple__29; static PyObject *__pyx_tuple__30; static PyObject *__pyx_tuple__31; -static PyObject *__pyx_tuple__32; static PyObject *__pyx_tuple__33; static PyObject *__pyx_tuple__34; static PyObject *__pyx_tuple__35; +static PyObject *__pyx_tuple__36; +static PyObject *__pyx_tuple__37; static PyObject *__pyx_tuple__38; -static PyObject *__pyx_tuple__41; +static PyObject *__pyx_tuple__39; static PyObject *__pyx_tuple__42; -static PyObject *__pyx_tuple__43; -static PyObject *__pyx_tuple__44; static PyObject *__pyx_tuple__45; +static PyObject *__pyx_tuple__46; +static PyObject *__pyx_tuple__47; static PyObject *__pyx_tuple__48; static PyObject *__pyx_tuple__49; -static PyObject *__pyx_tuple__50; -static PyObject *__pyx_tuple__51; static PyObject *__pyx_tuple__52; static PyObject *__pyx_tuple__53; static PyObject *__pyx_tuple__54; -static PyObject *__pyx_tuple__61; -static PyObject *__pyx_tuple__62; -static PyObject *__pyx_tuple__63; -static PyObject *__pyx_tuple__64; +static PyObject *__pyx_tuple__55; +static PyObject *__pyx_tuple__56; +static PyObject *__pyx_tuple__57; +static PyObject *__pyx_tuple__58; +static PyObject *__pyx_tuple__65; static PyObject *__pyx_tuple__66; static PyObject *__pyx_tuple__67; -static PyObject *__pyx_tuple__69; +static PyObject *__pyx_tuple__68; +static PyObject *__pyx_tuple__70; +static PyObject *__pyx_tuple__71; static PyObject *__pyx_tuple__73; -static PyObject *__pyx_tuple__74; -static PyObject *__pyx_tuple__75; static PyObject *__pyx_tuple__77; static PyObject *__pyx_tuple__78; +static PyObject *__pyx_tuple__79; static PyObject *__pyx_tuple__81; static PyObject *__pyx_tuple__82; -static PyObject *__pyx_tuple__83; -static PyObject *__pyx_tuple__84; static PyObject *__pyx_tuple__85; +static PyObject *__pyx_tuple__86; static PyObject *__pyx_tuple__87; +static PyObject *__pyx_tuple__88; static PyObject *__pyx_tuple__89; -static PyObject *__pyx_tuple__90; static PyObject *__pyx_tuple__91; -static PyObject *__pyx_tuple__92; static PyObject *__pyx_tuple__93; +static PyObject *__pyx_tuple__94; +static PyObject *__pyx_tuple__95; static PyObject *__pyx_tuple__96; static PyObject *__pyx_tuple__97; -static PyObject *__pyx_tuple__98; -static PyObject *__pyx_slice__100; -static PyObject *__pyx_slice__109; -static PyObject *__pyx_slice__114; -static PyObject *__pyx_slice__115; -static PyObject *__pyx_slice__116; -static PyObject *__pyx_slice__117; +static PyObject *__pyx_slice__103; +static PyObject *__pyx_slice__104; +static PyObject *__pyx_slice__113; +static PyObject *__pyx_slice__118; +static PyObject *__pyx_slice__119; +static PyObject *__pyx_slice__120; static PyObject *__pyx_slice__121; -static PyObject *__pyx_slice__122; -static PyObject *__pyx_slice__123; static PyObject *__pyx_slice__125; -static PyObject *__pyx_slice__134; +static PyObject *__pyx_slice__126; +static PyObject *__pyx_slice__127; +static PyObject *__pyx_slice__129; +static PyObject *__pyx_slice__138; +static PyObject *__pyx_tuple__100; static PyObject *__pyx_tuple__101; static PyObject *__pyx_tuple__102; -static PyObject *__pyx_tuple__103; -static PyObject *__pyx_tuple__104; static PyObject *__pyx_tuple__105; static PyObject *__pyx_tuple__106; static PyObject *__pyx_tuple__107; static PyObject *__pyx_tuple__108; +static PyObject *__pyx_tuple__109; static PyObject *__pyx_tuple__110; static PyObject *__pyx_tuple__111; static PyObject *__pyx_tuple__112; -static PyObject *__pyx_tuple__113; -static PyObject *__pyx_tuple__118; -static PyObject *__pyx_tuple__119; -static PyObject *__pyx_tuple__120; +static PyObject *__pyx_tuple__114; +static PyObject *__pyx_tuple__115; +static PyObject *__pyx_tuple__116; +static PyObject *__pyx_tuple__117; +static PyObject *__pyx_tuple__122; +static PyObject *__pyx_tuple__123; static PyObject *__pyx_tuple__124; -static PyObject *__pyx_tuple__126; -static PyObject *__pyx_tuple__127; static PyObject *__pyx_tuple__128; -static PyObject *__pyx_tuple__129; static PyObject *__pyx_tuple__130; +static PyObject *__pyx_tuple__131; +static PyObject *__pyx_tuple__132; static PyObject *__pyx_tuple__133; -static PyObject *__pyx_tuple__135; -static PyObject *__pyx_tuple__136; +static PyObject *__pyx_tuple__134; static PyObject *__pyx_tuple__137; -static PyObject *__pyx_tuple__138; +static PyObject *__pyx_tuple__139; static PyObject *__pyx_tuple__140; +static PyObject *__pyx_tuple__141; static PyObject *__pyx_tuple__142; -static PyObject *__pyx_tuple__143; -static PyObject *__pyx_tuple__145; +static PyObject *__pyx_tuple__144; +static PyObject *__pyx_tuple__146; static PyObject *__pyx_tuple__147; static PyObject *__pyx_tuple__149; static PyObject *__pyx_tuple__151; @@ -3502,13 +3548,13 @@ static PyObject *__pyx_tuple__197; static PyObject *__pyx_tuple__199; static PyObject *__pyx_tuple__201; static PyObject *__pyx_tuple__203; -static PyObject *__pyx_tuple__204; -static PyObject *__pyx_codeobj__131; -static PyObject *__pyx_codeobj__132; -static PyObject *__pyx_codeobj__139; -static PyObject *__pyx_codeobj__141; -static PyObject *__pyx_codeobj__144; -static PyObject *__pyx_codeobj__146; +static PyObject *__pyx_tuple__205; +static PyObject *__pyx_tuple__207; +static PyObject *__pyx_tuple__208; +static PyObject *__pyx_codeobj__135; +static PyObject *__pyx_codeobj__136; +static PyObject *__pyx_codeobj__143; +static PyObject *__pyx_codeobj__145; static PyObject *__pyx_codeobj__148; static PyObject *__pyx_codeobj__150; static PyObject *__pyx_codeobj__152; @@ -3537,10 +3583,12 @@ static PyObject *__pyx_codeobj__196; static PyObject *__pyx_codeobj__198; static PyObject *__pyx_codeobj__200; static PyObject *__pyx_codeobj__202; -static PyObject *__pyx_codeobj__205; +static PyObject *__pyx_codeobj__204; +static PyObject *__pyx_codeobj__206; +static PyObject *__pyx_codeobj__209; static PyObject *__pyx_gb_7netCDF4_8_netCDF4_24generator(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "netCDF4/_netCDF4.pyx":1032 +/* "netCDF4/_netCDF4.pyx":1033 * _format_dict['NETCDF3_64BIT'] = NC_FORMAT_64BIT * # invert dictionary mapping * _reverse_format_dict = dict((v, k) for k, v in _format_dict.iteritems()) # <<<<<<<<<<<<<< @@ -3557,12 +3605,12 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_22genexpr(CYTHON_UNUSED PyObject *_ if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_7netCDF4_8_netCDF4___pyx_scope_struct__genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 1032, __pyx_L1_error) + __PYX_ERR(0, 1033, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7netCDF4_8_netCDF4_24generator, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_genexpr, __pyx_n_s_netCDF4__netCDF4); if (unlikely(!gen)) __PYX_ERR(0, 1032, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7netCDF4_8_netCDF4_24generator, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_genexpr, __pyx_n_s_netCDF4__netCDF4); if (unlikely(!gen)) __PYX_ERR(0, 1033, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -3598,17 +3646,17 @@ static PyObject *__pyx_gb_7netCDF4_8_netCDF4_24generator(__pyx_CoroutineObject * return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1032, __pyx_L1_error) - __pyx_r = PyDict_New(); if (unlikely(!__pyx_r)) __PYX_ERR(0, 1032, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1033, __pyx_L1_error) + __pyx_r = PyDict_New(); if (unlikely(!__pyx_r)) __PYX_ERR(0, 1033, __pyx_L1_error) __Pyx_GOTREF(__pyx_r); __pyx_t_2 = 0; - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_format_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1032, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_format_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1033, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (unlikely(__pyx_t_5 == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "iteritems"); - __PYX_ERR(0, 1032, __pyx_L1_error) + __PYX_ERR(0, 1033, __pyx_L1_error) } - __pyx_t_6 = __Pyx_dict_iterator(__pyx_t_5, 0, __pyx_n_s_iteritems, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1032, __pyx_L1_error) + __pyx_t_6 = __Pyx_dict_iterator(__pyx_t_5, 0, __pyx_n_s_iteritems, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1033, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_1); @@ -3617,7 +3665,7 @@ static PyObject *__pyx_gb_7netCDF4_8_netCDF4_24generator(__pyx_CoroutineObject * while (1) { __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_6, &__pyx_t_5, NULL, __pyx_t_4); if (unlikely(__pyx_t_7 == 0)) break; - if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 1032, __pyx_L1_error) + if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 1033, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_k); @@ -3628,10 +3676,10 @@ static PyObject *__pyx_gb_7netCDF4_8_netCDF4_24generator(__pyx_CoroutineObject * __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_v, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(PyDict_SetItem(__pyx_r, (PyObject*)__pyx_cur_scope->__pyx_v_v, (PyObject*)__pyx_cur_scope->__pyx_v_k))) __PYX_ERR(0, 1032, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_r, (PyObject*)__pyx_cur_scope->__pyx_v_v, (PyObject*)__pyx_cur_scope->__pyx_v_k))) __PYX_ERR(0, 1033, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (1); else __pyx_cur_scope = __pyx_cur_scope; + CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); /* function exit code */ goto __pyx_L0; @@ -3902,7 +3950,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_2getlibversion(CYTHON_UNUSED PyObje return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":1080 +/* "netCDF4/_netCDF4.pyx":1082 * # internal C functions. * * cdef _get_att_names(int grpid, int varid): # <<<<<<<<<<<<<< @@ -3931,7 +3979,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att_names(int __pyx_v_grpid, in int __pyx_t_11; __Pyx_RefNannySetupContext("_get_att_names", 0); - /* "netCDF4/_netCDF4.pyx":1084 + /* "netCDF4/_netCDF4.pyx":1086 * cdef int ierr, numatts, n * cdef char namstring[NC_MAX_NAME+1] * if varid == NC_GLOBAL: # <<<<<<<<<<<<<< @@ -3941,7 +3989,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att_names(int __pyx_v_grpid, in __pyx_t_1 = ((__pyx_v_varid == NC_GLOBAL) != 0); if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":1085 + /* "netCDF4/_netCDF4.pyx":1087 * cdef char namstring[NC_MAX_NAME+1] * if varid == NC_GLOBAL: * with nogil: # <<<<<<<<<<<<<< @@ -3955,7 +4003,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att_names(int __pyx_v_grpid, in #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":1086 + /* "netCDF4/_netCDF4.pyx":1088 * if varid == NC_GLOBAL: * with nogil: * ierr = nc_inq_natts(grpid, &numatts) # <<<<<<<<<<<<<< @@ -3965,7 +4013,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att_names(int __pyx_v_grpid, in __pyx_v_ierr = nc_inq_natts(__pyx_v_grpid, (&__pyx_v_numatts)); } - /* "netCDF4/_netCDF4.pyx":1085 + /* "netCDF4/_netCDF4.pyx":1087 * cdef char namstring[NC_MAX_NAME+1] * if varid == NC_GLOBAL: * with nogil: # <<<<<<<<<<<<<< @@ -3983,7 +4031,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att_names(int __pyx_v_grpid, in } } - /* "netCDF4/_netCDF4.pyx":1084 + /* "netCDF4/_netCDF4.pyx":1086 * cdef int ierr, numatts, n * cdef char namstring[NC_MAX_NAME+1] * if varid == NC_GLOBAL: # <<<<<<<<<<<<<< @@ -3993,7 +4041,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att_names(int __pyx_v_grpid, in goto __pyx_L3; } - /* "netCDF4/_netCDF4.pyx":1088 + /* "netCDF4/_netCDF4.pyx":1090 * ierr = nc_inq_natts(grpid, &numatts) * else: * with nogil: # <<<<<<<<<<<<<< @@ -4008,7 +4056,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att_names(int __pyx_v_grpid, in #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":1089 + /* "netCDF4/_netCDF4.pyx":1091 * else: * with nogil: * ierr = nc_inq_varnatts(grpid, varid, &numatts) # <<<<<<<<<<<<<< @@ -4018,7 +4066,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att_names(int __pyx_v_grpid, in __pyx_v_ierr = nc_inq_varnatts(__pyx_v_grpid, __pyx_v_varid, (&__pyx_v_numatts)); } - /* "netCDF4/_netCDF4.pyx":1088 + /* "netCDF4/_netCDF4.pyx":1090 * ierr = nc_inq_natts(grpid, &numatts) * else: * with nogil: # <<<<<<<<<<<<<< @@ -4038,7 +4086,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att_names(int __pyx_v_grpid, in } __pyx_L3:; - /* "netCDF4/_netCDF4.pyx":1090 + /* "netCDF4/_netCDF4.pyx":1092 * with nogil: * ierr = nc_inq_varnatts(grpid, varid, &numatts) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -4048,7 +4096,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att_names(int __pyx_v_grpid, in __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":1091 + /* "netCDF4/_netCDF4.pyx":1093 * ierr = nc_inq_varnatts(grpid, varid, &numatts) * if ierr != NC_NOERR: * raise AttributeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -4056,22 +4104,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att_names(int __pyx_v_grpid, in * for n from 0 <= n < numatts: */ __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1091, __pyx_L1_error) + __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1091, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1091, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1093, __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, 1091, __pyx_L1_error) + __PYX_ERR(0, 1093, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1090 + /* "netCDF4/_netCDF4.pyx":1092 * with nogil: * ierr = nc_inq_varnatts(grpid, varid, &numatts) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -4080,19 +4128,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att_names(int __pyx_v_grpid, in */ } - /* "netCDF4/_netCDF4.pyx":1092 + /* "netCDF4/_netCDF4.pyx":1094 * if ierr != NC_NOERR: * raise AttributeError((nc_strerror(ierr)).decode('ascii')) * attslist = [] # <<<<<<<<<<<<<< * for n from 0 <= n < numatts: * with nogil: */ - __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1092, __pyx_L1_error) + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1094, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_attslist = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":1093 + /* "netCDF4/_netCDF4.pyx":1095 * raise AttributeError((nc_strerror(ierr)).decode('ascii')) * attslist = [] * for n from 0 <= n < numatts: # <<<<<<<<<<<<<< @@ -4102,7 +4150,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att_names(int __pyx_v_grpid, in __pyx_t_5 = __pyx_v_numatts; for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_5; __pyx_v_n++) { - /* "netCDF4/_netCDF4.pyx":1094 + /* "netCDF4/_netCDF4.pyx":1096 * attslist = [] * for n from 0 <= n < numatts: * with nogil: # <<<<<<<<<<<<<< @@ -4116,7 +4164,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att_names(int __pyx_v_grpid, in #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":1095 + /* "netCDF4/_netCDF4.pyx":1097 * for n from 0 <= n < numatts: * with nogil: * ierr = nc_inq_attname(grpid, varid, n, namstring) # <<<<<<<<<<<<<< @@ -4126,7 +4174,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att_names(int __pyx_v_grpid, in __pyx_v_ierr = nc_inq_attname(__pyx_v_grpid, __pyx_v_varid, __pyx_v_n, __pyx_v_namstring); } - /* "netCDF4/_netCDF4.pyx":1094 + /* "netCDF4/_netCDF4.pyx":1096 * attslist = [] * for n from 0 <= n < numatts: * with nogil: # <<<<<<<<<<<<<< @@ -4144,7 +4192,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att_names(int __pyx_v_grpid, in } } - /* "netCDF4/_netCDF4.pyx":1096 + /* "netCDF4/_netCDF4.pyx":1098 * with nogil: * ierr = nc_inq_attname(grpid, varid, n, namstring) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -4154,7 +4202,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att_names(int __pyx_v_grpid, in __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":1097 + /* "netCDF4/_netCDF4.pyx":1099 * ierr = nc_inq_attname(grpid, varid, n, namstring) * if ierr != NC_NOERR: * raise AttributeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -4162,22 +4210,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att_names(int __pyx_v_grpid, in * return attslist */ __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1097, __pyx_L1_error) + __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1099, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1097, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1099, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1097, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1099, __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, 1097, __pyx_L1_error) + __PYX_ERR(0, 1099, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1096 + /* "netCDF4/_netCDF4.pyx":1098 * with nogil: * ierr = nc_inq_attname(grpid, varid, n, namstring) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -4186,21 +4234,21 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att_names(int __pyx_v_grpid, in */ } - /* "netCDF4/_netCDF4.pyx":1098 + /* "netCDF4/_netCDF4.pyx":1100 * if ierr != NC_NOERR: * raise AttributeError((nc_strerror(ierr)).decode('ascii')) * attslist.append(namstring.decode(default_encoding,unicode_error)) # <<<<<<<<<<<<<< * return attslist * */ - __pyx_t_4 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1098, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1098, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __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, 1098, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1098, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; __pyx_t_9 = 0; @@ -4217,7 +4265,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att_names(int __pyx_v_grpid, in #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_4, __pyx_t_7}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1098, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1100, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -4227,7 +4275,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att_names(int __pyx_v_grpid, in #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_4, __pyx_t_7}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1098, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1100, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -4235,7 +4283,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att_names(int __pyx_v_grpid, in } else #endif { - __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1098, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; @@ -4246,16 +4294,16 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att_names(int __pyx_v_grpid, in PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_7); __pyx_t_4 = 0; __pyx_t_7 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1098, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_attslist, __pyx_t_3); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 1098, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_attslist, __pyx_t_3); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 1100, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - /* "netCDF4/_netCDF4.pyx":1099 + /* "netCDF4/_netCDF4.pyx":1101 * raise AttributeError((nc_strerror(ierr)).decode('ascii')) * attslist.append(namstring.decode(default_encoding,unicode_error)) * return attslist # <<<<<<<<<<<<<< @@ -4267,7 +4315,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att_names(int __pyx_v_grpid, in __pyx_r = __pyx_v_attslist; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":1080 + /* "netCDF4/_netCDF4.pyx":1082 * # internal C functions. * * cdef _get_att_names(int grpid, int varid): # <<<<<<<<<<<<<< @@ -4292,7 +4340,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att_names(int __pyx_v_grpid, in return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":1101 +/* "netCDF4/_netCDF4.pyx":1103 * return attslist * * cdef _get_att(grp, int varid, name): # <<<<<<<<<<<<<< @@ -4348,42 +4396,42 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int PyObject *__pyx_t_31 = NULL; __Pyx_RefNannySetupContext("_get_att", 0); - /* "netCDF4/_netCDF4.pyx":1108 + /* "netCDF4/_netCDF4.pyx":1110 * cdef nc_type att_type * cdef ndarray value_arr * bytestr = _strencode(name) # <<<<<<<<<<<<<< * attname = bytestr * _grpid = grp._grpid */ - __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1108, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_bytestr = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1109 + /* "netCDF4/_netCDF4.pyx":1111 * cdef ndarray value_arr * bytestr = _strencode(name) * attname = bytestr # <<<<<<<<<<<<<< * _grpid = grp._grpid * with nogil: */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 1109, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 1111, __pyx_L1_error) __pyx_v_attname = __pyx_t_2; - /* "netCDF4/_netCDF4.pyx":1110 + /* "netCDF4/_netCDF4.pyx":1112 * bytestr = _strencode(name) * attname = bytestr * _grpid = grp._grpid # <<<<<<<<<<<<<< * with nogil: * ierr = nc_inq_att(_grpid, varid, attname, &att_type, &att_len) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1110, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1110, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1112, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v__grpid = __pyx_t_3; - /* "netCDF4/_netCDF4.pyx":1111 + /* "netCDF4/_netCDF4.pyx":1113 * attname = bytestr * _grpid = grp._grpid * with nogil: # <<<<<<<<<<<<<< @@ -4397,7 +4445,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":1112 + /* "netCDF4/_netCDF4.pyx":1114 * _grpid = grp._grpid * with nogil: * ierr = nc_inq_att(_grpid, varid, attname, &att_type, &att_len) # <<<<<<<<<<<<<< @@ -4407,7 +4455,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int __pyx_v_ierr = nc_inq_att(__pyx_v__grpid, __pyx_v_varid, __pyx_v_attname, (&__pyx_v_att_type), (&__pyx_v_att_len)); } - /* "netCDF4/_netCDF4.pyx":1111 + /* "netCDF4/_netCDF4.pyx":1113 * attname = bytestr * _grpid = grp._grpid * with nogil: # <<<<<<<<<<<<<< @@ -4425,7 +4473,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int } } - /* "netCDF4/_netCDF4.pyx":1113 + /* "netCDF4/_netCDF4.pyx":1115 * with nogil: * ierr = nc_inq_att(_grpid, varid, attname, &att_type, &att_len) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -4435,7 +4483,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int __pyx_t_4 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":1114 + /* "netCDF4/_netCDF4.pyx":1116 * ierr = nc_inq_att(_grpid, varid, attname, &att_type, &att_len) * if ierr != NC_NOERR: * raise AttributeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -4443,22 +4491,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int * if att_type == NC_CHAR: */ __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, 1114, __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, 1116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1114, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1116, __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_AttributeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1114, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1116, __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, 1114, __pyx_L1_error) + __PYX_ERR(0, 1116, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1113 + /* "netCDF4/_netCDF4.pyx":1115 * with nogil: * ierr = nc_inq_att(_grpid, varid, attname, &att_type, &att_len) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -4467,7 +4515,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int */ } - /* "netCDF4/_netCDF4.pyx":1116 + /* "netCDF4/_netCDF4.pyx":1118 * raise AttributeError((nc_strerror(ierr)).decode('ascii')) * # attribute is a character or string ... * if att_type == NC_CHAR: # <<<<<<<<<<<<<< @@ -4477,19 +4525,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int switch (__pyx_v_att_type) { case NC_CHAR: - /* "netCDF4/_netCDF4.pyx":1117 + /* "netCDF4/_netCDF4.pyx":1119 * # attribute is a character or string ... * if att_type == NC_CHAR: * value_arr = numpy.empty(att_len,'S1') # <<<<<<<<<<<<<< * with nogil: * ierr = nc_get_att_text(_grpid, varid, attname, value_arr.data) */ - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1117, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1117, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyInt_FromSize_t(__pyx_v_att_len); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1117, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_FromSize_t(__pyx_v_att_len); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = NULL; __pyx_t_3 = 0; @@ -4506,7 +4554,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_5, __pyx_n_s_S1}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1117, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1119, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -4515,14 +4563,14 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_5, __pyx_n_s_S1}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1117, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1119, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { - __pyx_t_8 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1117, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1119, __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; @@ -4533,16 +4581,16 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int __Pyx_GIVEREF(__pyx_n_s_S1); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_3, __pyx_n_s_S1); __pyx_t_5 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1117, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 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, 1117, __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, 1119, __pyx_L1_error) __pyx_v_value_arr = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1118 + /* "netCDF4/_netCDF4.pyx":1120 * if att_type == NC_CHAR: * value_arr = numpy.empty(att_len,'S1') * with nogil: # <<<<<<<<<<<<<< @@ -4556,7 +4604,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":1119 + /* "netCDF4/_netCDF4.pyx":1121 * value_arr = numpy.empty(att_len,'S1') * with nogil: * ierr = nc_get_att_text(_grpid, varid, attname, value_arr.data) # <<<<<<<<<<<<<< @@ -4566,7 +4614,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int __pyx_v_ierr = nc_get_att_text(__pyx_v__grpid, __pyx_v_varid, __pyx_v_attname, ((char *)__pyx_v_value_arr->data)); } - /* "netCDF4/_netCDF4.pyx":1118 + /* "netCDF4/_netCDF4.pyx":1120 * if att_type == NC_CHAR: * value_arr = numpy.empty(att_len,'S1') * with nogil: # <<<<<<<<<<<<<< @@ -4584,7 +4632,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int } } - /* "netCDF4/_netCDF4.pyx":1120 + /* "netCDF4/_netCDF4.pyx":1122 * with nogil: * ierr = nc_get_att_text(_grpid, varid, attname, value_arr.data) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -4594,7 +4642,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int __pyx_t_4 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":1121 + /* "netCDF4/_netCDF4.pyx":1123 * ierr = nc_get_att_text(_grpid, varid, attname, value_arr.data) * if ierr != NC_NOERR: * raise AttributeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -4602,22 +4650,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int * # make sure _FillValue for character arrays is a byte on python 3 */ __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, 1121, __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, 1123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1121, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1123, __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_AttributeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1121, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1123, __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, 1121, __pyx_L1_error) + __PYX_ERR(0, 1123, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1120 + /* "netCDF4/_netCDF4.pyx":1122 * with nogil: * ierr = nc_get_att_text(_grpid, varid, attname, value_arr.data) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -4626,35 +4674,35 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int */ } - /* "netCDF4/_netCDF4.pyx":1122 + /* "netCDF4/_netCDF4.pyx":1124 * if ierr != NC_NOERR: * raise AttributeError((nc_strerror(ierr)).decode('ascii')) * if name == '_FillValue' and python3: # <<<<<<<<<<<<<< * # make sure _FillValue for character arrays is a byte on python 3 * # (issue 271). */ - __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_FillValue, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1122, __pyx_L1_error) + __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_FillValue, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1124, __pyx_L1_error) if (__pyx_t_9) { } else { __pyx_t_4 = __pyx_t_9; goto __pyx_L12_bool_binop_done; } - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1122, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1122, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1124, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __pyx_t_9; __pyx_L12_bool_binop_done:; if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":1125 + /* "netCDF4/_netCDF4.pyx":1127 * # make sure _FillValue for character arrays is a byte on python 3 * # (issue 271). * pstring = value_arr.tostring() # <<<<<<<<<<<<<< * else: * pstring =\ */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_tostring); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1125, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_tostring); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -4667,17 +4715,17 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int } } if (__pyx_t_8) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1125, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1127, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1125, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1127, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_pstring = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1122 + /* "netCDF4/_netCDF4.pyx":1124 * if ierr != NC_NOERR: * raise AttributeError((nc_strerror(ierr)).decode('ascii')) * if name == '_FillValue' and python3: # <<<<<<<<<<<<<< @@ -4687,7 +4735,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int goto __pyx_L11; } - /* "netCDF4/_netCDF4.pyx":1128 + /* "netCDF4/_netCDF4.pyx":1130 * else: * pstring =\ * value_arr.tostring().decode(default_encoding,unicode_error).replace('\x00','') # <<<<<<<<<<<<<< @@ -4695,7 +4743,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int * elif att_type == NC_STRING: */ /*else*/ { - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_tostring); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1128, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_tostring); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { @@ -4708,19 +4756,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int } } if (__pyx_t_5) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1128, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1130, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { - __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1128, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1130, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_decode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1128, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_decode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __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, 1128, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1128, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = NULL; __pyx_t_3 = 0; @@ -4737,7 +4785,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_t_5}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1128, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1130, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -4747,7 +4795,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_t_5}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1128, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1130, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -4755,7 +4803,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int } else #endif { - __pyx_t_10 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1128, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -4766,15 +4814,15 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_3, __pyx_t_5); __pyx_t_6 = 0; __pyx_t_5 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1128, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_replace); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1128, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_replace); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1128, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_pstring = __pyx_t_1; @@ -4782,7 +4830,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int } __pyx_L11:; - /* "netCDF4/_netCDF4.pyx":1129 + /* "netCDF4/_netCDF4.pyx":1131 * pstring =\ * value_arr.tostring().decode(default_encoding,unicode_error).replace('\x00','') * return pstring # <<<<<<<<<<<<<< @@ -4794,7 +4842,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int __pyx_r = __pyx_v_pstring; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":1116 + /* "netCDF4/_netCDF4.pyx":1118 * raise AttributeError((nc_strerror(ierr)).decode('ascii')) * # attribute is a character or string ... * if att_type == NC_CHAR: # <<<<<<<<<<<<<< @@ -4803,7 +4851,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int */ break; - /* "netCDF4/_netCDF4.pyx":1130 + /* "netCDF4/_netCDF4.pyx":1132 * value_arr.tostring().decode(default_encoding,unicode_error).replace('\x00','') * return pstring * elif att_type == NC_STRING: # <<<<<<<<<<<<<< @@ -4812,7 +4860,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int */ case NC_STRING: - /* "netCDF4/_netCDF4.pyx":1131 + /* "netCDF4/_netCDF4.pyx":1133 * return pstring * elif att_type == NC_STRING: * values = PyMem_Malloc(sizeof(char*) * att_len) # <<<<<<<<<<<<<< @@ -4821,7 +4869,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int */ __pyx_v_values = ((char **)PyMem_Malloc(((sizeof(char *)) * __pyx_v_att_len))); - /* "netCDF4/_netCDF4.pyx":1132 + /* "netCDF4/_netCDF4.pyx":1134 * elif att_type == NC_STRING: * values = PyMem_Malloc(sizeof(char*) * att_len) * if not values: # <<<<<<<<<<<<<< @@ -4831,16 +4879,16 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int __pyx_t_4 = ((!(__pyx_v_values != 0)) != 0); if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":1133 + /* "netCDF4/_netCDF4.pyx":1135 * values = PyMem_Malloc(sizeof(char*) * att_len) * if not values: * raise MemoryError() # <<<<<<<<<<<<<< * try: * with nogil: */ - PyErr_NoMemory(); __PYX_ERR(0, 1133, __pyx_L1_error) + PyErr_NoMemory(); __PYX_ERR(0, 1135, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1132 + /* "netCDF4/_netCDF4.pyx":1134 * elif att_type == NC_STRING: * values = PyMem_Malloc(sizeof(char*) * att_len) * if not values: # <<<<<<<<<<<<<< @@ -4849,7 +4897,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int */ } - /* "netCDF4/_netCDF4.pyx":1134 + /* "netCDF4/_netCDF4.pyx":1136 * if not values: * raise MemoryError() * try: # <<<<<<<<<<<<<< @@ -4858,7 +4906,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int */ /*try:*/ { - /* "netCDF4/_netCDF4.pyx":1135 + /* "netCDF4/_netCDF4.pyx":1137 * raise MemoryError() * try: * with nogil: # <<<<<<<<<<<<<< @@ -4872,7 +4920,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":1136 + /* "netCDF4/_netCDF4.pyx":1138 * try: * with nogil: * ierr = nc_get_att_string(_grpid, varid, attname, values) # <<<<<<<<<<<<<< @@ -4882,7 +4930,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int __pyx_v_ierr = nc_get_att_string(__pyx_v__grpid, __pyx_v_varid, __pyx_v_attname, __pyx_v_values); } - /* "netCDF4/_netCDF4.pyx":1135 + /* "netCDF4/_netCDF4.pyx":1137 * raise MemoryError() * try: * with nogil: # <<<<<<<<<<<<<< @@ -4900,7 +4948,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int } } - /* "netCDF4/_netCDF4.pyx":1137 + /* "netCDF4/_netCDF4.pyx":1139 * with nogil: * ierr = nc_get_att_string(_grpid, varid, attname, values) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -4910,7 +4958,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int __pyx_t_4 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":1138 + /* "netCDF4/_netCDF4.pyx":1140 * ierr = nc_get_att_string(_grpid, varid, attname, values) * if ierr != NC_NOERR: * raise AttributeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -4918,22 +4966,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int * result = [values[j].decode(default_encoding,unicode_error).replace('\x00','') */ __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, 1138, __pyx_L16_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, 1140, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1138, __pyx_L16_error) + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1140, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1138, __pyx_L16_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1140, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 1138, __pyx_L16_error) + __PYX_ERR(0, 1140, __pyx_L16_error) - /* "netCDF4/_netCDF4.pyx":1137 + /* "netCDF4/_netCDF4.pyx":1139 * with nogil: * ierr = nc_get_att_string(_grpid, varid, attname, values) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -4942,7 +4990,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int */ } - /* "netCDF4/_netCDF4.pyx":1139 + /* "netCDF4/_netCDF4.pyx":1141 * if ierr != NC_NOERR: * raise AttributeError((nc_strerror(ierr)).decode('ascii')) * try: # <<<<<<<<<<<<<< @@ -4951,17 +4999,17 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int */ /*try:*/ { - /* "netCDF4/_netCDF4.pyx":1140 + /* "netCDF4/_netCDF4.pyx":1142 * raise AttributeError((nc_strerror(ierr)).decode('ascii')) * try: * result = [values[j].decode(default_encoding,unicode_error).replace('\x00','') # <<<<<<<<<<<<<< * for j in range(att_len)] * finally: */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1140, __pyx_L23_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1142, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_1); - /* "netCDF4/_netCDF4.pyx":1141 + /* "netCDF4/_netCDF4.pyx":1143 * try: * result = [values[j].decode(default_encoding,unicode_error).replace('\x00','') * for j in range(att_len)] # <<<<<<<<<<<<<< @@ -4972,21 +5020,21 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { __pyx_v_j = __pyx_t_12; - /* "netCDF4/_netCDF4.pyx":1140 + /* "netCDF4/_netCDF4.pyx":1142 * raise AttributeError((nc_strerror(ierr)).decode('ascii')) * try: * result = [values[j].decode(default_encoding,unicode_error).replace('\x00','') # <<<<<<<<<<<<<< * for j in range(att_len)] * finally: */ - __pyx_t_10 = __Pyx_PyBytes_FromString((__pyx_v_values[__pyx_v_j])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1140, __pyx_L23_error) + __pyx_t_10 = __Pyx_PyBytes_FromString((__pyx_v_values[__pyx_v_j])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1142, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_decode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1140, __pyx_L23_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_decode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1142, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1140, __pyx_L23_error) + __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1142, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1140, __pyx_L23_error) + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1142, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; __pyx_t_3 = 0; @@ -5003,7 +5051,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_10, __pyx_t_6}; - __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1140, __pyx_L23_error) + __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1142, __pyx_L23_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -5013,7 +5061,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_10, __pyx_t_6}; - __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1140, __pyx_L23_error) + __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1142, __pyx_L23_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -5021,7 +5069,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int } else #endif { - __pyx_t_13 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1140, __pyx_L23_error) + __pyx_t_13 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1142, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_13); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -5032,25 +5080,25 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_3, __pyx_t_6); __pyx_t_10 = 0; __pyx_t_6 = 0; - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_13, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1140, __pyx_L23_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_13, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1142, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_replace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1140, __pyx_L23_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_replace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1142, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1140, __pyx_L23_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1142, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 1140, __pyx_L23_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 1142, __pyx_L23_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; } - /* "netCDF4/_netCDF4.pyx":1143 + /* "netCDF4/_netCDF4.pyx":1145 * for j in range(att_len)] * finally: * ierr = nc_free_string(att_len, values) # free memory in netcdf C lib # <<<<<<<<<<<<<< @@ -5105,7 +5153,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int } } - /* "netCDF4/_netCDF4.pyx":1145 + /* "netCDF4/_netCDF4.pyx":1147 * ierr = nc_free_string(att_len, values) # free memory in netcdf C lib * finally: * PyMem_Free(values) # <<<<<<<<<<<<<< @@ -5159,18 +5207,18 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int __pyx_L17:; } - /* "netCDF4/_netCDF4.pyx":1147 + /* "netCDF4/_netCDF4.pyx":1149 * PyMem_Free(values) * * if len(result) == 1: # <<<<<<<<<<<<<< * return result[0] * else: */ - __pyx_t_23 = PyList_GET_SIZE(__pyx_v_result); if (unlikely(__pyx_t_23 == -1)) __PYX_ERR(0, 1147, __pyx_L1_error) + __pyx_t_23 = PyList_GET_SIZE(__pyx_v_result); if (unlikely(__pyx_t_23 == -1)) __PYX_ERR(0, 1149, __pyx_L1_error) __pyx_t_4 = ((__pyx_t_23 == 1) != 0); if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":1148 + /* "netCDF4/_netCDF4.pyx":1150 * * if len(result) == 1: * return result[0] # <<<<<<<<<<<<<< @@ -5178,13 +5226,13 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int * return result */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1148, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":1147 + /* "netCDF4/_netCDF4.pyx":1149 * PyMem_Free(values) * * if len(result) == 1: # <<<<<<<<<<<<<< @@ -5193,7 +5241,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int */ } - /* "netCDF4/_netCDF4.pyx":1150 + /* "netCDF4/_netCDF4.pyx":1152 * return result[0] * else: * return result # <<<<<<<<<<<<<< @@ -5207,7 +5255,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":1130 + /* "netCDF4/_netCDF4.pyx":1132 * value_arr.tostring().decode(default_encoding,unicode_error).replace('\x00','') * return pstring * elif att_type == NC_STRING: # <<<<<<<<<<<<<< @@ -5217,7 +5265,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int break; default: - /* "netCDF4/_netCDF4.pyx":1153 + /* "netCDF4/_netCDF4.pyx":1155 * else: * # a regular numeric or compound type. * if att_type == NC_LONG: # <<<<<<<<<<<<<< @@ -5227,7 +5275,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int __pyx_t_4 = ((__pyx_v_att_type == NC_LONG) != 0); if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":1154 + /* "netCDF4/_netCDF4.pyx":1156 * # a regular numeric or compound type. * if att_type == NC_LONG: * att_type = NC_INT # <<<<<<<<<<<<<< @@ -5236,7 +5284,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int */ __pyx_v_att_type = NC_INT; - /* "netCDF4/_netCDF4.pyx":1153 + /* "netCDF4/_netCDF4.pyx":1155 * else: * # a regular numeric or compound type. * if att_type == NC_LONG: # <<<<<<<<<<<<<< @@ -5245,7 +5293,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int */ } - /* "netCDF4/_netCDF4.pyx":1155 + /* "netCDF4/_netCDF4.pyx":1157 * if att_type == NC_LONG: * att_type = NC_INT * try: # <<<<<<<<<<<<<< @@ -5261,34 +5309,34 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int __Pyx_XGOTREF(__pyx_t_18); /*try:*/ { - /* "netCDF4/_netCDF4.pyx":1156 + /* "netCDF4/_netCDF4.pyx":1158 * att_type = NC_INT * try: * type_att = _nctonptype[att_type] # see if it is a primitive type # <<<<<<<<<<<<<< * value_arr = numpy.empty(att_len,type_att) * except KeyError: */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1156, __pyx_L33_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1158, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_att_type, nc_type, 1, __Pyx_PyInt_From_nc_type, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1156, __pyx_L33_error) + __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_att_type, nc_type, 1, __Pyx_PyInt_From_nc_type, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1158, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_type_att = __pyx_t_8; __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":1157 + /* "netCDF4/_netCDF4.pyx":1159 * try: * type_att = _nctonptype[att_type] # see if it is a primitive type * value_arr = numpy.empty(att_len,type_att) # <<<<<<<<<<<<<< * except KeyError: * # check if it's a compound */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1157, __pyx_L33_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1159, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1157, __pyx_L33_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1159, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_att_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1157, __pyx_L33_error) + __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_att_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1159, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_13 = NULL; __pyx_t_3 = 0; @@ -5305,7 +5353,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_t_1, __pyx_v_type_att}; - __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1157, __pyx_L33_error) + __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1159, __pyx_L33_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -5314,14 +5362,14 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_t_1, __pyx_v_type_att}; - __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1157, __pyx_L33_error) + __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1159, __pyx_L33_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1157, __pyx_L33_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1159, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_13) { __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_13); __pyx_t_13 = NULL; @@ -5332,16 +5380,16 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int __Pyx_GIVEREF(__pyx_v_type_att); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_3, __pyx_v_type_att); __pyx_t_1 = 0; - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1157, __pyx_L33_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1159, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_7netCDF4_8_netCDF4_ndarray))))) __PYX_ERR(0, 1157, __pyx_L33_error) + if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_7netCDF4_8_netCDF4_ndarray))))) __PYX_ERR(0, 1159, __pyx_L33_error) __pyx_v_value_arr = ((PyArrayObject *)__pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":1155 + /* "netCDF4/_netCDF4.pyx":1157 * if att_type == NC_LONG: * att_type = NC_INT * try: # <<<<<<<<<<<<<< @@ -5363,7 +5411,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":1158 + /* "netCDF4/_netCDF4.pyx":1160 * type_att = _nctonptype[att_type] # see if it is a primitive type * value_arr = numpy.empty(att_len,type_att) * except KeyError: # <<<<<<<<<<<<<< @@ -5373,12 +5421,12 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int __pyx_t_3 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_3) { __Pyx_AddTraceback("netCDF4._netCDF4._get_att", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(0, 1158, __pyx_L35_except_error) + if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(0, 1160, __pyx_L35_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); - /* "netCDF4/_netCDF4.pyx":1160 + /* "netCDF4/_netCDF4.pyx":1162 * except KeyError: * # check if it's a compound * try: # <<<<<<<<<<<<<< @@ -5394,31 +5442,31 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int __Pyx_XGOTREF(__pyx_t_21); /*try:*/ { - /* "netCDF4/_netCDF4.pyx":1161 + /* "netCDF4/_netCDF4.pyx":1163 * # check if it's a compound * try: * type_att = _read_compound(grp, att_type) # <<<<<<<<<<<<<< * value_arr = numpy.empty(att_len,type_att) * except: */ - __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__read_compound(__pyx_v_grp, __pyx_v_att_type, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1161, __pyx_L43_error) + __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__read_compound(__pyx_v_grp, __pyx_v_att_type, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1163, __pyx_L43_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_type_att, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1162 + /* "netCDF4/_netCDF4.pyx":1164 * try: * type_att = _read_compound(grp, att_type) * value_arr = numpy.empty(att_len,type_att) # <<<<<<<<<<<<<< * except: * # check if it's an enum */ - __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1162, __pyx_L43_error) + __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1164, __pyx_L43_error) __Pyx_GOTREF(__pyx_t_13); - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_empty); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1162, __pyx_L43_error) + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_empty); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1164, __pyx_L43_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __pyx_t_13 = __Pyx_PyInt_FromSize_t(__pyx_v_att_len); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1162, __pyx_L43_error) + __pyx_t_13 = __Pyx_PyInt_FromSize_t(__pyx_v_att_len); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1164, __pyx_L43_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_7 = NULL; __pyx_t_3 = 0; @@ -5435,7 +5483,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_13, __pyx_v_type_att}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1162, __pyx_L43_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1164, __pyx_L43_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; @@ -5444,14 +5492,14 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_13, __pyx_v_type_att}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1162, __pyx_L43_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1164, __pyx_L43_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } else #endif { - __pyx_t_24 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1162, __pyx_L43_error) + __pyx_t_24 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1164, __pyx_L43_error) __Pyx_GOTREF(__pyx_t_24); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_24, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -5462,16 +5510,16 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int __Pyx_GIVEREF(__pyx_v_type_att); PyTuple_SET_ITEM(__pyx_t_24, 1+__pyx_t_3, __pyx_v_type_att); __pyx_t_13 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_24, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1162, __pyx_L43_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_24, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1164, __pyx_L43_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7netCDF4_8_netCDF4_ndarray))))) __PYX_ERR(0, 1162, __pyx_L43_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7netCDF4_8_netCDF4_ndarray))))) __PYX_ERR(0, 1164, __pyx_L43_error) __Pyx_XDECREF_SET(__pyx_v_value_arr, ((PyArrayObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1160 + /* "netCDF4/_netCDF4.pyx":1162 * except KeyError: * # check if it's a compound * try: # <<<<<<<<<<<<<< @@ -5491,7 +5539,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1163 + /* "netCDF4/_netCDF4.pyx":1165 * type_att = _read_compound(grp, att_type) * value_arr = numpy.empty(att_len,type_att) * except: # <<<<<<<<<<<<<< @@ -5500,12 +5548,12 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int */ /*except:*/ { __Pyx_AddTraceback("netCDF4._netCDF4._get_att", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_10, &__pyx_t_24) < 0) __PYX_ERR(0, 1163, __pyx_L45_except_error) + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_10, &__pyx_t_24) < 0) __PYX_ERR(0, 1165, __pyx_L45_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_10); __Pyx_GOTREF(__pyx_t_24); - /* "netCDF4/_netCDF4.pyx":1165 + /* "netCDF4/_netCDF4.pyx":1167 * except: * # check if it's an enum * try: # <<<<<<<<<<<<<< @@ -5521,33 +5569,33 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int __Pyx_XGOTREF(__pyx_t_27); /*try:*/ { - /* "netCDF4/_netCDF4.pyx":1166 + /* "netCDF4/_netCDF4.pyx":1168 * # check if it's an enum * try: * type_att = _read_enum(grp, att_type) # <<<<<<<<<<<<<< * value_arr = numpy.empty(att_len,type_att.dtype) * except: */ - __pyx_t_13 = __pyx_f_7netCDF4_8_netCDF4__read_enum(__pyx_v_grp, __pyx_v_att_type, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1166, __pyx_L53_error) + __pyx_t_13 = __pyx_f_7netCDF4_8_netCDF4__read_enum(__pyx_v_grp, __pyx_v_att_type, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1168, __pyx_L53_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_XDECREF_SET(__pyx_v_type_att, __pyx_t_13); __pyx_t_13 = 0; - /* "netCDF4/_netCDF4.pyx":1167 + /* "netCDF4/_netCDF4.pyx":1169 * try: * type_att = _read_enum(grp, att_type) * value_arr = numpy.empty(att_len,type_att.dtype) # <<<<<<<<<<<<<< * except: * raise KeyError('attribute %s has unsupported datatype' % attname) */ - __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1167, __pyx_L53_error) + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1169, __pyx_L53_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_28 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_empty); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 1167, __pyx_L53_error) + __pyx_t_28 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_empty); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 1169, __pyx_L53_error) __Pyx_GOTREF(__pyx_t_28); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyInt_FromSize_t(__pyx_v_att_len); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1167, __pyx_L53_error) + __pyx_t_7 = __Pyx_PyInt_FromSize_t(__pyx_v_att_len); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1169, __pyx_L53_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_29 = __Pyx_PyObject_GetAttrStr(__pyx_v_type_att, __pyx_n_s_dtype); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 1167, __pyx_L53_error) + __pyx_t_29 = __Pyx_PyObject_GetAttrStr(__pyx_v_type_att, __pyx_n_s_dtype); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 1169, __pyx_L53_error) __Pyx_GOTREF(__pyx_t_29); __pyx_t_30 = NULL; __pyx_t_3 = 0; @@ -5564,7 +5612,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_28)) { PyObject *__pyx_temp[3] = {__pyx_t_30, __pyx_t_7, __pyx_t_29}; - __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_28, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1167, __pyx_L53_error) + __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_28, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1169, __pyx_L53_error) __Pyx_XDECREF(__pyx_t_30); __pyx_t_30 = 0; __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -5574,7 +5622,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_28)) { PyObject *__pyx_temp[3] = {__pyx_t_30, __pyx_t_7, __pyx_t_29}; - __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_28, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1167, __pyx_L53_error) + __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_28, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1169, __pyx_L53_error) __Pyx_XDECREF(__pyx_t_30); __pyx_t_30 = 0; __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -5582,7 +5630,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int } else #endif { - __pyx_t_31 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1167, __pyx_L53_error) + __pyx_t_31 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1169, __pyx_L53_error) __Pyx_GOTREF(__pyx_t_31); if (__pyx_t_30) { __Pyx_GIVEREF(__pyx_t_30); PyTuple_SET_ITEM(__pyx_t_31, 0, __pyx_t_30); __pyx_t_30 = NULL; @@ -5593,16 +5641,16 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int PyTuple_SET_ITEM(__pyx_t_31, 1+__pyx_t_3, __pyx_t_29); __pyx_t_7 = 0; __pyx_t_29 = 0; - __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_28, __pyx_t_31, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1167, __pyx_L53_error) + __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_28, __pyx_t_31, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1169, __pyx_L53_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0; } __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0; - if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_7netCDF4_8_netCDF4_ndarray))))) __PYX_ERR(0, 1167, __pyx_L53_error) + if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_7netCDF4_8_netCDF4_ndarray))))) __PYX_ERR(0, 1169, __pyx_L53_error) __Pyx_XDECREF_SET(__pyx_v_value_arr, ((PyArrayObject *)__pyx_t_13)); __pyx_t_13 = 0; - /* "netCDF4/_netCDF4.pyx":1165 + /* "netCDF4/_netCDF4.pyx":1167 * except: * # check if it's an enum * try: # <<<<<<<<<<<<<< @@ -5623,7 +5671,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int __Pyx_XDECREF(__pyx_t_28); __pyx_t_28 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; - /* "netCDF4/_netCDF4.pyx":1168 + /* "netCDF4/_netCDF4.pyx":1170 * type_att = _read_enum(grp, att_type) * value_arr = numpy.empty(att_len,type_att.dtype) * except: # <<<<<<<<<<<<<< @@ -5632,38 +5680,38 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int */ /*except:*/ { __Pyx_AddTraceback("netCDF4._netCDF4._get_att", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_13, &__pyx_t_28, &__pyx_t_31) < 0) __PYX_ERR(0, 1168, __pyx_L55_except_error) + if (__Pyx_GetException(&__pyx_t_13, &__pyx_t_28, &__pyx_t_31) < 0) __PYX_ERR(0, 1170, __pyx_L55_except_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_GOTREF(__pyx_t_28); __Pyx_GOTREF(__pyx_t_31); - /* "netCDF4/_netCDF4.pyx":1169 + /* "netCDF4/_netCDF4.pyx":1171 * value_arr = numpy.empty(att_len,type_att.dtype) * except: * raise KeyError('attribute %s has unsupported datatype' % attname) # <<<<<<<<<<<<<< * with nogil: * ierr = nc_get_att(_grpid, varid, attname, value_arr.data) */ - __pyx_t_29 = __Pyx_PyBytes_FromString(__pyx_v_attname); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 1169, __pyx_L55_except_error) + __pyx_t_29 = __Pyx_PyBytes_FromString(__pyx_v_attname); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 1171, __pyx_L55_except_error) __Pyx_GOTREF(__pyx_t_29); - __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_attribute_s_has_unsupported_data, __pyx_t_29); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1169, __pyx_L55_except_error) + __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_attribute_s_has_unsupported_data, __pyx_t_29); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1171, __pyx_L55_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0; - __pyx_t_29 = PyTuple_New(1); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 1169, __pyx_L55_except_error) + __pyx_t_29 = PyTuple_New(1); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 1171, __pyx_L55_except_error) __Pyx_GOTREF(__pyx_t_29); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_29, 0, __pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_29, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1169, __pyx_L55_except_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_29, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1171, __pyx_L55_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0; __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __PYX_ERR(0, 1169, __pyx_L55_except_error) + __PYX_ERR(0, 1171, __pyx_L55_except_error) } __pyx_L55_except_error:; - /* "netCDF4/_netCDF4.pyx":1165 + /* "netCDF4/_netCDF4.pyx":1167 * except: * # check if it's an enum * try: # <<<<<<<<<<<<<< @@ -5685,7 +5733,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int } __pyx_L45_except_error:; - /* "netCDF4/_netCDF4.pyx":1160 + /* "netCDF4/_netCDF4.pyx":1162 * except KeyError: * # check if it's a compound * try: # <<<<<<<<<<<<<< @@ -5714,7 +5762,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int goto __pyx_L35_except_error; __pyx_L35_except_error:; - /* "netCDF4/_netCDF4.pyx":1155 + /* "netCDF4/_netCDF4.pyx":1157 * if att_type == NC_LONG: * att_type = NC_INT * try: # <<<<<<<<<<<<<< @@ -5736,7 +5784,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int __pyx_L40_try_end:; } - /* "netCDF4/_netCDF4.pyx":1170 + /* "netCDF4/_netCDF4.pyx":1172 * except: * raise KeyError('attribute %s has unsupported datatype' % attname) * with nogil: # <<<<<<<<<<<<<< @@ -5750,7 +5798,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":1171 + /* "netCDF4/_netCDF4.pyx":1173 * raise KeyError('attribute %s has unsupported datatype' % attname) * with nogil: * ierr = nc_get_att(_grpid, varid, attname, value_arr.data) # <<<<<<<<<<<<<< @@ -5760,7 +5808,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int __pyx_v_ierr = nc_get_att(__pyx_v__grpid, __pyx_v_varid, __pyx_v_attname, __pyx_v_value_arr->data); } - /* "netCDF4/_netCDF4.pyx":1170 + /* "netCDF4/_netCDF4.pyx":1172 * except: * raise KeyError('attribute %s has unsupported datatype' % attname) * with nogil: # <<<<<<<<<<<<<< @@ -5778,7 +5826,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int } } - /* "netCDF4/_netCDF4.pyx":1172 + /* "netCDF4/_netCDF4.pyx":1174 * with nogil: * ierr = nc_get_att(_grpid, varid, attname, value_arr.data) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -5788,7 +5836,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int __pyx_t_4 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":1173 + /* "netCDF4/_netCDF4.pyx":1175 * ierr = nc_get_att(_grpid, varid, attname, value_arr.data) * if ierr != NC_NOERR: * raise AttributeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -5796,22 +5844,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int * # return a scalar for a scalar array */ __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_6 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1173, __pyx_L1_error) + __pyx_t_6 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1173, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1173, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 1173, __pyx_L1_error) + __PYX_ERR(0, 1175, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1172 + /* "netCDF4/_netCDF4.pyx":1174 * with nogil: * ierr = nc_get_att(_grpid, varid, attname, value_arr.data) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -5820,22 +5868,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int */ } - /* "netCDF4/_netCDF4.pyx":1174 + /* "netCDF4/_netCDF4.pyx":1176 * if ierr != NC_NOERR: * raise AttributeError((nc_strerror(ierr)).decode('ascii')) * if value_arr.shape == (): # <<<<<<<<<<<<<< * # return a scalar for a scalar array * return value_arr.item() */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1174, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = PyObject_RichCompare(__pyx_t_6, __pyx_empty_tuple, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1174, __pyx_L1_error) + __pyx_t_5 = PyObject_RichCompare(__pyx_t_6, __pyx_empty_tuple, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1176, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1174, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1176, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":1176 + /* "netCDF4/_netCDF4.pyx":1178 * if value_arr.shape == (): * # return a scalar for a scalar array * return value_arr.item() # <<<<<<<<<<<<<< @@ -5843,7 +5891,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int * # return a scalar for a single element array */ __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_item); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1176, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_item); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -5856,10 +5904,10 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int } } if (__pyx_t_8) { - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1176, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1178, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else { - __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1176, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1178, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -5867,7 +5915,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int __pyx_t_5 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":1174 + /* "netCDF4/_netCDF4.pyx":1176 * if ierr != NC_NOERR: * raise AttributeError((nc_strerror(ierr)).decode('ascii')) * if value_arr.shape == (): # <<<<<<<<<<<<<< @@ -5876,7 +5924,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int */ } - /* "netCDF4/_netCDF4.pyx":1177 + /* "netCDF4/_netCDF4.pyx":1179 * # return a scalar for a scalar array * return value_arr.item() * elif att_len == 1: # <<<<<<<<<<<<<< @@ -5886,7 +5934,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int __pyx_t_4 = ((__pyx_v_att_len == 1) != 0); if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":1179 + /* "netCDF4/_netCDF4.pyx":1181 * elif att_len == 1: * # return a scalar for a single element array * return value_arr[0] # <<<<<<<<<<<<<< @@ -5894,13 +5942,13 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int * return value_arr */ __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_value_arr), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1179, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_value_arr), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":1177 + /* "netCDF4/_netCDF4.pyx":1179 * # return a scalar for a scalar array * return value_arr.item() * elif att_len == 1: # <<<<<<<<<<<<<< @@ -5909,7 +5957,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int */ } - /* "netCDF4/_netCDF4.pyx":1181 + /* "netCDF4/_netCDF4.pyx":1183 * return value_arr[0] * else: * return value_arr # <<<<<<<<<<<<<< @@ -5925,7 +5973,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int break; } - /* "netCDF4/_netCDF4.pyx":1101 + /* "netCDF4/_netCDF4.pyx":1103 * return attslist * * cdef _get_att(grp, int varid, name): # <<<<<<<<<<<<<< @@ -5960,7 +6008,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":1183 +/* "netCDF4/_netCDF4.pyx":1185 * return value_arr * * def _set_default_format(object format='NETCDF4'): # <<<<<<<<<<<<<< @@ -5997,7 +6045,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_5_set_default_format(PyObject *__py } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_set_default_format") < 0)) __PYX_ERR(0, 1183, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_set_default_format") < 0)) __PYX_ERR(0, 1185, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -6010,7 +6058,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_5_set_default_format(PyObject *__py } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_set_default_format", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1183, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_set_default_format", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1185, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("netCDF4._netCDF4._set_default_format", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -6033,34 +6081,34 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_4_set_default_format(CYTHON_UNUSED int __pyx_t_5; __Pyx_RefNannySetupContext("_set_default_format", 0); - /* "netCDF4/_netCDF4.pyx":1185 + /* "netCDF4/_netCDF4.pyx":1187 * def _set_default_format(object format='NETCDF4'): * # Private function to set the netCDF file format * if format not in _format_dict: # <<<<<<<<<<<<<< * raise ValueError("unrecognized format requested") * nc_set_default_format(_format_dict[format], NULL) */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_format_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1185, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_format_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_format, __pyx_t_1, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1185, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_format, __pyx_t_1, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1187, __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":1186 + /* "netCDF4/_netCDF4.pyx":1188 * # Private function to set the netCDF file format * if format not in _format_dict: * raise ValueError("unrecognized format requested") # <<<<<<<<<<<<<< * nc_set_default_format(_format_dict[format], NULL) * */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1186, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1188, __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, 1186, __pyx_L1_error) + __PYX_ERR(0, 1188, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1185 + /* "netCDF4/_netCDF4.pyx":1187 * def _set_default_format(object format='NETCDF4'): * # Private function to set the netCDF file format * if format not in _format_dict: # <<<<<<<<<<<<<< @@ -6069,23 +6117,23 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_4_set_default_format(CYTHON_UNUSED */ } - /* "netCDF4/_netCDF4.pyx":1187 + /* "netCDF4/_netCDF4.pyx":1189 * if format not in _format_dict: * raise ValueError("unrecognized format requested") * nc_set_default_format(_format_dict[format], NULL) # <<<<<<<<<<<<<< * * cdef _get_format(int grpid): */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_format_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1187, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_format_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyObject_GetItem(__pyx_t_1, __pyx_v_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1187, __pyx_L1_error) + __pyx_t_4 = PyObject_GetItem(__pyx_t_1, __pyx_v_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1187, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1189, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; nc_set_default_format(__pyx_t_5, NULL); - /* "netCDF4/_netCDF4.pyx":1183 + /* "netCDF4/_netCDF4.pyx":1185 * return value_arr * * def _set_default_format(object format='NETCDF4'): # <<<<<<<<<<<<<< @@ -6107,7 +6155,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_4_set_default_format(CYTHON_UNUSED return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":1189 +/* "netCDF4/_netCDF4.pyx":1191 * nc_set_default_format(_format_dict[format], NULL) * * cdef _get_format(int grpid): # <<<<<<<<<<<<<< @@ -6127,7 +6175,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_format(int __pyx_v_grpid) { int __pyx_t_5; __Pyx_RefNannySetupContext("_get_format", 0); - /* "netCDF4/_netCDF4.pyx":1192 + /* "netCDF4/_netCDF4.pyx":1194 * # Private function to get the netCDF file format * cdef int ierr, formatp * with nogil: # <<<<<<<<<<<<<< @@ -6141,7 +6189,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_format(int __pyx_v_grpid) { #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":1193 + /* "netCDF4/_netCDF4.pyx":1195 * cdef int ierr, formatp * with nogil: * ierr = nc_inq_format(grpid, &formatp) # <<<<<<<<<<<<<< @@ -6151,7 +6199,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_format(int __pyx_v_grpid) { __pyx_v_ierr = nc_inq_format(__pyx_v_grpid, (&__pyx_v_formatp)); } - /* "netCDF4/_netCDF4.pyx":1192 + /* "netCDF4/_netCDF4.pyx":1194 * # Private function to get the netCDF file format * cdef int ierr, formatp * with nogil: # <<<<<<<<<<<<<< @@ -6169,7 +6217,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_format(int __pyx_v_grpid) { } } - /* "netCDF4/_netCDF4.pyx":1194 + /* "netCDF4/_netCDF4.pyx":1196 * with nogil: * ierr = nc_inq_format(grpid, &formatp) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -6179,7 +6227,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_format(int __pyx_v_grpid) { __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":1195 + /* "netCDF4/_netCDF4.pyx":1197 * ierr = nc_inq_format(grpid, &formatp) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -6187,22 +6235,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_format(int __pyx_v_grpid) { * raise ValueError('format not supported by python interface') */ __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1195, __pyx_L1_error) + __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1195, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1195, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1197, __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, 1195, __pyx_L1_error) + __PYX_ERR(0, 1197, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1194 + /* "netCDF4/_netCDF4.pyx":1196 * with nogil: * ierr = nc_inq_format(grpid, &formatp) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -6211,37 +6259,37 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_format(int __pyx_v_grpid) { */ } - /* "netCDF4/_netCDF4.pyx":1196 + /* "netCDF4/_netCDF4.pyx":1198 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * if formatp not in _reverse_format_dict: # <<<<<<<<<<<<<< * raise ValueError('format not supported by python interface') * return _reverse_format_dict[formatp] */ - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_formatp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1196, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_formatp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_reverse_format_dict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1196, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_reverse_format_dict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_t_4, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1196, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_t_4, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1198, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = (__pyx_t_1 != 0); if (__pyx_t_5) { - /* "netCDF4/_netCDF4.pyx":1197 + /* "netCDF4/_netCDF4.pyx":1199 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * if formatp not in _reverse_format_dict: * raise ValueError('format not supported by python interface') # <<<<<<<<<<<<<< * return _reverse_format_dict[formatp] * */ - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1197, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1199, __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, 1197, __pyx_L1_error) + __PYX_ERR(0, 1199, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1196 + /* "netCDF4/_netCDF4.pyx":1198 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * if formatp not in _reverse_format_dict: # <<<<<<<<<<<<<< @@ -6250,7 +6298,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_format(int __pyx_v_grpid) { */ } - /* "netCDF4/_netCDF4.pyx":1198 + /* "netCDF4/_netCDF4.pyx":1200 * if formatp not in _reverse_format_dict: * raise ValueError('format not supported by python interface') * return _reverse_format_dict[formatp] # <<<<<<<<<<<<<< @@ -6258,16 +6306,16 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_format(int __pyx_v_grpid) { * cdef _get_full_format(int grpid): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_reverse_format_dict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1198, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_reverse_format_dict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, __pyx_v_formatp, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1198, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, __pyx_v_formatp, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":1189 + /* "netCDF4/_netCDF4.pyx":1191 * nc_set_default_format(_format_dict[format], NULL) * * cdef _get_format(int grpid): # <<<<<<<<<<<<<< @@ -6287,7 +6335,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_format(int __pyx_v_grpid) { return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":1200 +/* "netCDF4/_netCDF4.pyx":1202 * return _reverse_format_dict[formatp] * * cdef _get_full_format(int grpid): # <<<<<<<<<<<<<< @@ -6300,7 +6348,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_full_format(CYTHON_UNUSED int _ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_full_format", 0); - /* "netCDF4/_netCDF4.pyx":1223 + /* "netCDF4/_netCDF4.pyx":1225 * return 'UNDEFINED' * ELSE: * return 'UNDEFINED' # <<<<<<<<<<<<<< @@ -6312,7 +6360,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_full_format(CYTHON_UNUSED int _ __pyx_r = __pyx_n_s_UNDEFINED; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":1200 + /* "netCDF4/_netCDF4.pyx":1202 * return _reverse_format_dict[formatp] * * cdef _get_full_format(int grpid): # <<<<<<<<<<<<<< @@ -6327,7 +6375,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_full_format(CYTHON_UNUSED int _ return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":1225 +/* "netCDF4/_netCDF4.pyx":1227 * return 'UNDEFINED' * * cdef issue485_workaround(int grpid, int varid, char* attname): # <<<<<<<<<<<<<< @@ -6348,21 +6396,21 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4_issue485_workaround(int __pyx_v_grpi PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("issue485_workaround", 0); - /* "netCDF4/_netCDF4.pyx":1234 + /* "netCDF4/_netCDF4.pyx":1236 * cdef size_t att_len * * if not _needsworkaround_issue485: # <<<<<<<<<<<<<< * return * ierr = nc_inq_att(grpid, varid, attname, &att_type, &att_len) */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_needsworkaround_issue485); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1234, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_needsworkaround_issue485); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1236, __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, 1234, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1236, __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":1235 + /* "netCDF4/_netCDF4.pyx":1237 * * if not _needsworkaround_issue485: * return # <<<<<<<<<<<<<< @@ -6373,7 +6421,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4_issue485_workaround(int __pyx_v_grpi __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":1234 + /* "netCDF4/_netCDF4.pyx":1236 * cdef size_t att_len * * if not _needsworkaround_issue485: # <<<<<<<<<<<<<< @@ -6382,7 +6430,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4_issue485_workaround(int __pyx_v_grpi */ } - /* "netCDF4/_netCDF4.pyx":1236 + /* "netCDF4/_netCDF4.pyx":1238 * if not _needsworkaround_issue485: * return * ierr = nc_inq_att(grpid, varid, attname, &att_type, &att_len) # <<<<<<<<<<<<<< @@ -6391,7 +6439,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4_issue485_workaround(int __pyx_v_grpi */ __pyx_v_ierr = nc_inq_att(__pyx_v_grpid, __pyx_v_varid, __pyx_v_attname, (&__pyx_v_att_type), (&__pyx_v_att_len)); - /* "netCDF4/_netCDF4.pyx":1237 + /* "netCDF4/_netCDF4.pyx":1239 * return * ierr = nc_inq_att(grpid, varid, attname, &att_type, &att_len) * if ierr == NC_NOERR and att_type == NC_CHAR: # <<<<<<<<<<<<<< @@ -6409,7 +6457,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4_issue485_workaround(int __pyx_v_grpi __pyx_L5_bool_binop_done:; if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":1238 + /* "netCDF4/_netCDF4.pyx":1240 * ierr = nc_inq_att(grpid, varid, attname, &att_type, &att_len) * if ierr == NC_NOERR and att_type == NC_CHAR: * ierr = nc_del_att(grpid, varid, attname) # <<<<<<<<<<<<<< @@ -6418,7 +6466,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4_issue485_workaround(int __pyx_v_grpi */ __pyx_v_ierr = nc_del_att(__pyx_v_grpid, __pyx_v_varid, __pyx_v_attname); - /* "netCDF4/_netCDF4.pyx":1239 + /* "netCDF4/_netCDF4.pyx":1241 * if ierr == NC_NOERR and att_type == NC_CHAR: * ierr = nc_del_att(grpid, varid, attname) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -6428,7 +6476,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4_issue485_workaround(int __pyx_v_grpi __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":1240 + /* "netCDF4/_netCDF4.pyx":1242 * ierr = nc_del_att(grpid, varid, attname) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -6436,22 +6484,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4_issue485_workaround(int __pyx_v_grpi * cdef _set_att(grp, int varid, name, value,\ */ __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, 1240, __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, 1242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1240, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1242, __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, 1240, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1242, __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, 1240, __pyx_L1_error) + __PYX_ERR(0, 1242, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1239 + /* "netCDF4/_netCDF4.pyx":1241 * if ierr == NC_NOERR and att_type == NC_CHAR: * ierr = nc_del_att(grpid, varid, attname) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -6460,7 +6508,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4_issue485_workaround(int __pyx_v_grpi */ } - /* "netCDF4/_netCDF4.pyx":1237 + /* "netCDF4/_netCDF4.pyx":1239 * return * ierr = nc_inq_att(grpid, varid, attname, &att_type, &att_len) * if ierr == NC_NOERR and att_type == NC_CHAR: # <<<<<<<<<<<<<< @@ -6469,7 +6517,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4_issue485_workaround(int __pyx_v_grpi */ } - /* "netCDF4/_netCDF4.pyx":1225 + /* "netCDF4/_netCDF4.pyx":1227 * return 'UNDEFINED' * * cdef issue485_workaround(int grpid, int varid, char* attname): # <<<<<<<<<<<<<< @@ -6491,7 +6539,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4_issue485_workaround(int __pyx_v_grpi return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":1242 +/* "netCDF4/_netCDF4.pyx":1244 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * * cdef _set_att(grp, int varid, name, value,\ # <<<<<<<<<<<<<< @@ -6502,7 +6550,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4_issue485_workaround(int __pyx_v_grpi static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int __pyx_v_varid, PyObject *__pyx_v_name, PyObject *__pyx_v_value, struct __pyx_opt_args_7netCDF4_8_netCDF4__set_att *__pyx_optional_args) { nc_type __pyx_v_xtype = ((nc_type)-99); - /* "netCDF4/_netCDF4.pyx":1243 + /* "netCDF4/_netCDF4.pyx":1245 * * cdef _set_att(grp, int varid, name, value,\ * nc_type xtype=-99, force_ncstring=False): # <<<<<<<<<<<<<< @@ -6560,38 +6608,38 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int } } - /* "netCDF4/_netCDF4.pyx":1250 + /* "netCDF4/_netCDF4.pyx":1252 * cdef char **string_ptrs * cdef ndarray value_arr * bytestr = _strencode(name) # <<<<<<<<<<<<<< * attname = bytestr * # put attribute value into a numpy array. */ - __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1250, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_bytestr = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1251 + /* "netCDF4/_netCDF4.pyx":1253 * cdef ndarray value_arr * bytestr = _strencode(name) * attname = bytestr # <<<<<<<<<<<<<< * # put attribute value into a numpy array. * value_arr = numpy.array(value) */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 1251, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 1253, __pyx_L1_error) __pyx_v_attname = __pyx_t_2; - /* "netCDF4/_netCDF4.pyx":1253 + /* "netCDF4/_netCDF4.pyx":1255 * attname = bytestr * # put attribute value into a numpy array. * value_arr = numpy.array(value) # <<<<<<<<<<<<<< * # if array is 64 bit integers or * # if 64-bit datatype not supported, cast to 32 bit integers. */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1253, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1253, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -6605,13 +6653,13 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int } } if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1253, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1255, __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_value}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1253, __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, 1255, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -6619,57 +6667,57 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_value}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1253, __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, 1255, __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, 1253, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1255, __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_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_value); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1253, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __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, 1253, __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, 1255, __pyx_L1_error) __pyx_v_value_arr = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1256 + /* "netCDF4/_netCDF4.pyx":1258 * # if array is 64 bit integers or * # if 64-bit datatype not supported, cast to 32 bit integers. * fmt = _get_format(grp._grpid) # <<<<<<<<<<<<<< * is_netcdf3 = fmt.startswith('NETCDF3') or fmt == 'NETCDF4_CLASSIC' * if value_arr.dtype.str[1:] == 'i8' and ('i8' not in _supportedtypes or\ */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1256, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1256, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1258, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__get_format(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1256, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__get_format(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_fmt = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1257 + /* "netCDF4/_netCDF4.pyx":1259 * # if 64-bit datatype not supported, cast to 32 bit integers. * fmt = _get_format(grp._grpid) * is_netcdf3 = fmt.startswith('NETCDF3') or fmt == 'NETCDF4_CLASSIC' # <<<<<<<<<<<<<< * if value_arr.dtype.str[1:] == 'i8' and ('i8' not in _supportedtypes or\ * is_netcdf3): */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_startswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1257, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_startswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1257, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1257, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1259, __pyx_L1_error) if (!__pyx_t_7) { __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { @@ -6678,7 +6726,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L3_bool_binop_done; } - __pyx_t_5 = PyObject_RichCompare(__pyx_v_fmt, __pyx_n_s_NETCDF4_CLASSIC, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1257, __pyx_L1_error) + __pyx_t_5 = PyObject_RichCompare(__pyx_v_fmt, __pyx_n_s_NETCDF4_CLASSIC, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1259, __pyx_L1_error) __Pyx_INCREF(__pyx_t_5); __pyx_t_1 = __pyx_t_5; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -6686,31 +6734,31 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int __pyx_v_is_netcdf3 = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1258 + /* "netCDF4/_netCDF4.pyx":1260 * fmt = _get_format(grp._grpid) * is_netcdf3 = fmt.startswith('NETCDF3') or fmt == 'NETCDF4_CLASSIC' * if value_arr.dtype.str[1:] == 'i8' and ('i8' not in _supportedtypes or\ # <<<<<<<<<<<<<< * is_netcdf3): * value_arr = value_arr.astype('i4') */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1258, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1260, __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, 1258, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_str); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1260, __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__8, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1258, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_5, 1, 0, NULL, NULL, &__pyx_slice__8, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_i8, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1258, __pyx_L1_error) + __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_i8, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1260, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_8) { } else { __pyx_t_7 = __pyx_t_8; goto __pyx_L6_bool_binop_done; } - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_supportedtypes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1258, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_supportedtypes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_i8, __pyx_t_1, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1258, __pyx_L1_error) + __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_i8, __pyx_t_1, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1260, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = (__pyx_t_8 != 0); if (!__pyx_t_9) { @@ -6719,18 +6767,18 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int goto __pyx_L6_bool_binop_done; } - /* "netCDF4/_netCDF4.pyx":1259 + /* "netCDF4/_netCDF4.pyx":1261 * is_netcdf3 = fmt.startswith('NETCDF3') or fmt == 'NETCDF4_CLASSIC' * if value_arr.dtype.str[1:] == 'i8' and ('i8' not in _supportedtypes or\ * is_netcdf3): # <<<<<<<<<<<<<< * value_arr = value_arr.astype('i4') * # if array contains ascii strings, write a text attribute (stored as bytes). */ - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_is_netcdf3); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1259, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_is_netcdf3); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1261, __pyx_L1_error) __pyx_t_7 = __pyx_t_9; __pyx_L6_bool_binop_done:; - /* "netCDF4/_netCDF4.pyx":1258 + /* "netCDF4/_netCDF4.pyx":1260 * fmt = _get_format(grp._grpid) * is_netcdf3 = fmt.startswith('NETCDF3') or fmt == 'NETCDF4_CLASSIC' * if value_arr.dtype.str[1:] == 'i8' and ('i8' not in _supportedtypes or\ # <<<<<<<<<<<<<< @@ -6739,23 +6787,23 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int */ if (__pyx_t_7) { - /* "netCDF4/_netCDF4.pyx":1260 + /* "netCDF4/_netCDF4.pyx":1262 * if value_arr.dtype.str[1:] == 'i8' and ('i8' not in _supportedtypes or\ * is_netcdf3): * value_arr = value_arr.astype('i4') # <<<<<<<<<<<<<< * # if array contains ascii strings, write a text attribute (stored as bytes). * # if array contains unicode strings, and data model is NETCDF4, */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_astype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1260, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_astype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1260, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1262, __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, 1260, __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, 1262, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_value_arr, ((PyArrayObject *)__pyx_t_5)); __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":1258 + /* "netCDF4/_netCDF4.pyx":1260 * fmt = _get_format(grp._grpid) * is_netcdf3 = fmt.startswith('NETCDF3') or fmt == 'NETCDF4_CLASSIC' * if value_arr.dtype.str[1:] == 'i8' and ('i8' not in _supportedtypes or\ # <<<<<<<<<<<<<< @@ -6764,90 +6812,90 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int */ } - /* "netCDF4/_netCDF4.pyx":1264 + /* "netCDF4/_netCDF4.pyx":1266 * # if array contains unicode strings, and data model is NETCDF4, * # write as a string. * if value_arr.dtype.char in ['S','U']: # <<<<<<<<<<<<<< * if not is_netcdf3 and force_ncstring and value_arr.size > 1: * N = value_arr.size */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1264, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_char); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1264, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_char); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_S, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1264, __pyx_L1_error) + __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_S, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1266, __pyx_L1_error) if (!__pyx_t_9) { } else { __pyx_t_7 = __pyx_t_9; goto __pyx_L10_bool_binop_done; } - __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_U, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1264, __pyx_L1_error) + __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_U, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1266, __pyx_L1_error) __pyx_t_7 = __pyx_t_9; __pyx_L10_bool_binop_done:; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = (__pyx_t_7 != 0); if (__pyx_t_9) { - /* "netCDF4/_netCDF4.pyx":1265 + /* "netCDF4/_netCDF4.pyx":1267 * # write as a string. * if value_arr.dtype.char in ['S','U']: * if not is_netcdf3 and force_ncstring and value_arr.size > 1: # <<<<<<<<<<<<<< * N = value_arr.size * string_ptrs = PyMem_Malloc(N * sizeof(char*)) */ - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_is_netcdf3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1265, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_is_netcdf3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1267, __pyx_L1_error) __pyx_t_8 = ((!__pyx_t_7) != 0); if (__pyx_t_8) { } else { __pyx_t_9 = __pyx_t_8; goto __pyx_L13_bool_binop_done; } - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_force_ncstring); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1265, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_force_ncstring); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1267, __pyx_L1_error) if (__pyx_t_8) { } else { __pyx_t_9 = __pyx_t_8; goto __pyx_L13_bool_binop_done; } - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1265, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1265, __pyx_L1_error) + __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1267, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1265, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1267, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = __pyx_t_8; __pyx_L13_bool_binop_done:; if (__pyx_t_9) { - /* "netCDF4/_netCDF4.pyx":1266 + /* "netCDF4/_netCDF4.pyx":1268 * if value_arr.dtype.char in ['S','U']: * if not is_netcdf3 and force_ncstring and value_arr.size > 1: * N = value_arr.size # <<<<<<<<<<<<<< * string_ptrs = PyMem_Malloc(N * sizeof(char*)) * if not string_ptrs: */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1266, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_N = __pyx_t_5; __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":1267 + /* "netCDF4/_netCDF4.pyx":1269 * if not is_netcdf3 and force_ncstring and value_arr.size > 1: * N = value_arr.size * string_ptrs = PyMem_Malloc(N * sizeof(char*)) # <<<<<<<<<<<<<< * if not string_ptrs: * raise MemoryError() */ - __pyx_t_5 = __Pyx_PyInt_FromSize_t((sizeof(char *))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1267, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_FromSize_t((sizeof(char *))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = PyNumber_Multiply(__pyx_v_N, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1267, __pyx_L1_error) + __pyx_t_1 = PyNumber_Multiply(__pyx_v_N, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_10 = __Pyx_PyInt_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_10 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1267, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_10 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1269, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_string_ptrs = ((char **)PyMem_Malloc(__pyx_t_10)); - /* "netCDF4/_netCDF4.pyx":1268 + /* "netCDF4/_netCDF4.pyx":1270 * N = value_arr.size * string_ptrs = PyMem_Malloc(N * sizeof(char*)) * if not string_ptrs: # <<<<<<<<<<<<<< @@ -6857,16 +6905,16 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int __pyx_t_9 = ((!(__pyx_v_string_ptrs != 0)) != 0); if (__pyx_t_9) { - /* "netCDF4/_netCDF4.pyx":1269 + /* "netCDF4/_netCDF4.pyx":1271 * string_ptrs = PyMem_Malloc(N * sizeof(char*)) * if not string_ptrs: * raise MemoryError() # <<<<<<<<<<<<<< * try: * strings = [_strencode(s) for s in value_arr.flat] */ - PyErr_NoMemory(); __PYX_ERR(0, 1269, __pyx_L1_error) + PyErr_NoMemory(); __PYX_ERR(0, 1271, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1268 + /* "netCDF4/_netCDF4.pyx":1270 * N = value_arr.size * string_ptrs = PyMem_Malloc(N * sizeof(char*)) * if not string_ptrs: # <<<<<<<<<<<<<< @@ -6875,7 +6923,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int */ } - /* "netCDF4/_netCDF4.pyx":1270 + /* "netCDF4/_netCDF4.pyx":1272 * if not string_ptrs: * raise MemoryError() * try: # <<<<<<<<<<<<<< @@ -6884,24 +6932,24 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int */ /*try:*/ { - /* "netCDF4/_netCDF4.pyx":1271 + /* "netCDF4/_netCDF4.pyx":1273 * raise MemoryError() * try: * strings = [_strencode(s) for s in value_arr.flat] # <<<<<<<<<<<<<< * for j in range(N): * if len(strings[j]) == 0: */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1271, __pyx_L18_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1273, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_flat); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1271, __pyx_L18_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_flat); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1273, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_5); if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_11 = 0; __pyx_t_12 = NULL; } else { - __pyx_t_11 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1271, __pyx_L18_error) + __pyx_t_11 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1273, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_12 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1271, __pyx_L18_error) + __pyx_t_12 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1273, __pyx_L18_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { @@ -6909,17 +6957,17 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_5); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 1271, __pyx_L18_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_5); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 1273, __pyx_L18_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1271, __pyx_L18_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1273, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_5); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 1271, __pyx_L18_error) + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_5); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 1273, __pyx_L18_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1271, __pyx_L18_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1273, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_5); #endif } @@ -6929,7 +6977,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int 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, 1271, __pyx_L18_error) + else __PYX_ERR(0, 1273, __pyx_L18_error) } break; } @@ -6937,37 +6985,37 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int } __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_s, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1271, __pyx_L18_error) + __pyx_t_5 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_s, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1273, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_5); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 1271, __pyx_L18_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 1273, __pyx_L18_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_strings = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1272 + /* "netCDF4/_netCDF4.pyx":1274 * try: * strings = [_strencode(s) for s in value_arr.flat] * for j in range(N): # <<<<<<<<<<<<<< * if len(strings[j]) == 0: * strings[j] = _strencode('\x00') */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1272, __pyx_L18_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1274, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_N); __Pyx_GIVEREF(__pyx_v_N); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_N); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1272, __pyx_L18_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1274, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_11 = 0; __pyx_t_12 = NULL; } else { - __pyx_t_11 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1272, __pyx_L18_error) + __pyx_t_11 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1274, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_12 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1272, __pyx_L18_error) + __pyx_t_12 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1274, __pyx_L18_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -6975,17 +7023,17 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_11 >= 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_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 1272, __pyx_L18_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 1274, __pyx_L18_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1272, __pyx_L18_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1274, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_11 >= 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_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 1272, __pyx_L18_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 1274, __pyx_L18_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1272, __pyx_L18_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1274, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -6995,7 +7043,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int 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, 1272, __pyx_L18_error) + else __PYX_ERR(0, 1274, __pyx_L18_error) } break; } @@ -7004,33 +7052,33 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":1273 + /* "netCDF4/_netCDF4.pyx":1275 * strings = [_strencode(s) for s in value_arr.flat] * for j in range(N): * if len(strings[j]) == 0: # <<<<<<<<<<<<<< * strings[j] = _strencode('\x00') * string_ptrs[j] = strings[j] */ - __pyx_t_4 = PyObject_GetItem(__pyx_v_strings, __pyx_v_j); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1273, __pyx_L18_error) + __pyx_t_4 = PyObject_GetItem(__pyx_v_strings, __pyx_v_j); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1275, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_13 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 1273, __pyx_L18_error) + __pyx_t_13 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 1275, __pyx_L18_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_9 = ((__pyx_t_13 == 0) != 0); if (__pyx_t_9) { - /* "netCDF4/_netCDF4.pyx":1274 + /* "netCDF4/_netCDF4.pyx":1276 * for j in range(N): * if len(strings[j]) == 0: * strings[j] = _strencode('\x00') # <<<<<<<<<<<<<< * string_ptrs[j] = strings[j] * issue485_workaround(grp._grpid, varid, attname) */ - __pyx_t_4 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_kp_s_, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1274, __pyx_L18_error) + __pyx_t_4 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_kp_s_, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1276, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_4); - if (unlikely(PyObject_SetItem(__pyx_v_strings, __pyx_v_j, __pyx_t_4) < 0)) __PYX_ERR(0, 1274, __pyx_L18_error) + if (unlikely(PyObject_SetItem(__pyx_v_strings, __pyx_v_j, __pyx_t_4) < 0)) __PYX_ERR(0, 1276, __pyx_L18_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":1273 + /* "netCDF4/_netCDF4.pyx":1275 * strings = [_strencode(s) for s in value_arr.flat] * for j in range(N): * if len(strings[j]) == 0: # <<<<<<<<<<<<<< @@ -7039,21 +7087,21 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int */ } - /* "netCDF4/_netCDF4.pyx":1275 + /* "netCDF4/_netCDF4.pyx":1277 * if len(strings[j]) == 0: * strings[j] = _strencode('\x00') * string_ptrs[j] = strings[j] # <<<<<<<<<<<<<< * issue485_workaround(grp._grpid, varid, attname) * ierr = nc_put_att_string(grp._grpid, varid, attname, N, string_ptrs) */ - __pyx_t_4 = PyObject_GetItem(__pyx_v_strings, __pyx_v_j); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1275, __pyx_L18_error) + __pyx_t_4 = PyObject_GetItem(__pyx_v_strings, __pyx_v_j); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1277, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_t_4); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 1275, __pyx_L18_error) - __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_j); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1275, __pyx_L18_error) + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_t_4); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 1277, __pyx_L18_error) + __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_j); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1277, __pyx_L18_error) (__pyx_v_string_ptrs[__pyx_t_13]) = __pyx_t_2; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":1272 + /* "netCDF4/_netCDF4.pyx":1274 * try: * strings = [_strencode(s) for s in value_arr.flat] * for j in range(N): # <<<<<<<<<<<<<< @@ -7063,37 +7111,37 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1276 + /* "netCDF4/_netCDF4.pyx":1278 * strings[j] = _strencode('\x00') * string_ptrs[j] = strings[j] * issue485_workaround(grp._grpid, varid, attname) # <<<<<<<<<<<<<< * ierr = nc_put_att_string(grp._grpid, varid, attname, N, string_ptrs) * finally: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1276, __pyx_L18_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1278, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1276, __pyx_L18_error) + __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1278, __pyx_L18_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4_issue485_workaround(__pyx_t_6, __pyx_v_varid, __pyx_v_attname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1276, __pyx_L18_error) + __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4_issue485_workaround(__pyx_t_6, __pyx_v_varid, __pyx_v_attname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1278, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1277 + /* "netCDF4/_netCDF4.pyx":1279 * string_ptrs[j] = strings[j] * issue485_workaround(grp._grpid, varid, attname) * ierr = nc_put_att_string(grp._grpid, varid, attname, N, string_ptrs) # <<<<<<<<<<<<<< * finally: * PyMem_Free(string_ptrs) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1277, __pyx_L18_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1279, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1277, __pyx_L18_error) + __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1279, __pyx_L18_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_10 = __Pyx_PyInt_As_size_t(__pyx_v_N); if (unlikely((__pyx_t_10 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1277, __pyx_L18_error) + __pyx_t_10 = __Pyx_PyInt_As_size_t(__pyx_v_N); if (unlikely((__pyx_t_10 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1279, __pyx_L18_error) __pyx_v_ierr = nc_put_att_string(__pyx_t_6, __pyx_v_varid, __pyx_v_attname, __pyx_t_10, __pyx_v_string_ptrs); } - /* "netCDF4/_netCDF4.pyx":1279 + /* "netCDF4/_netCDF4.pyx":1281 * ierr = nc_put_att_string(grp._grpid, varid, attname, N, string_ptrs) * finally: * PyMem_Free(string_ptrs) # <<<<<<<<<<<<<< @@ -7144,7 +7192,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int __pyx_L19:; } - /* "netCDF4/_netCDF4.pyx":1265 + /* "netCDF4/_netCDF4.pyx":1267 * # write as a string. * if value_arr.dtype.char in ['S','U']: * if not is_netcdf3 and force_ncstring and value_arr.size > 1: # <<<<<<<<<<<<<< @@ -7154,7 +7202,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int goto __pyx_L12; } - /* "netCDF4/_netCDF4.pyx":1281 + /* "netCDF4/_netCDF4.pyx":1283 * PyMem_Free(string_ptrs) * else: * if not value_arr.shape: # <<<<<<<<<<<<<< @@ -7162,21 +7210,21 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int * else: */ /*else*/ { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1281, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1281, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1283, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = ((!__pyx_t_9) != 0); if (__pyx_t_8) { - /* "netCDF4/_netCDF4.pyx":1282 + /* "netCDF4/_netCDF4.pyx":1284 * else: * if not value_arr.shape: * dats = _strencode(value_arr.item()) # <<<<<<<<<<<<<< * else: * value_arr1 = value_arr.ravel() */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_item); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1282, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_item); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -7189,20 +7237,20 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int } } if (__pyx_t_5) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1282, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1284, __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, 1282, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1284, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1282, __pyx_L1_error) + __pyx_t_4 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dats = __pyx_t_4; __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":1281 + /* "netCDF4/_netCDF4.pyx":1283 * PyMem_Free(string_ptrs) * else: * if not value_arr.shape: # <<<<<<<<<<<<<< @@ -7212,7 +7260,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int goto __pyx_L27; } - /* "netCDF4/_netCDF4.pyx":1284 + /* "netCDF4/_netCDF4.pyx":1286 * dats = _strencode(value_arr.item()) * else: * value_arr1 = value_arr.ravel() # <<<<<<<<<<<<<< @@ -7220,7 +7268,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int * lenarr = len(dats) */ /*else*/ { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_ravel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1284, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_ravel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -7233,24 +7281,24 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int } } if (__pyx_t_5) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1284, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1286, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1284, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1286, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_value_arr1 = __pyx_t_4; __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":1285 + /* "netCDF4/_netCDF4.pyx":1287 * else: * value_arr1 = value_arr.ravel() * dats = _strencode(''.join(value_arr1.tolist())) # <<<<<<<<<<<<<< * lenarr = len(dats) * datstring = dats */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value_arr1, __pyx_n_s_tolist); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1285, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value_arr1, __pyx_n_s_tolist); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -7263,17 +7311,17 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int } } if (__pyx_t_5) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1285, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1287, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1285, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1287, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1285, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1285, __pyx_L1_error) + __pyx_t_4 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dats = __pyx_t_4; @@ -7281,27 +7329,27 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int } __pyx_L27:; - /* "netCDF4/_netCDF4.pyx":1286 + /* "netCDF4/_netCDF4.pyx":1288 * value_arr1 = value_arr.ravel() * dats = _strencode(''.join(value_arr1.tolist())) * lenarr = len(dats) # <<<<<<<<<<<<<< * datstring = dats * if lenarr == 0: */ - __pyx_t_11 = PyObject_Length(__pyx_v_dats); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 1286, __pyx_L1_error) + __pyx_t_11 = PyObject_Length(__pyx_v_dats); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 1288, __pyx_L1_error) __pyx_v_lenarr = __pyx_t_11; - /* "netCDF4/_netCDF4.pyx":1287 + /* "netCDF4/_netCDF4.pyx":1289 * dats = _strencode(''.join(value_arr1.tolist())) * lenarr = len(dats) * datstring = dats # <<<<<<<<<<<<<< * if lenarr == 0: * # write null byte */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_dats); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 1287, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_dats); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 1289, __pyx_L1_error) __pyx_v_datstring = __pyx_t_2; - /* "netCDF4/_netCDF4.pyx":1288 + /* "netCDF4/_netCDF4.pyx":1290 * lenarr = len(dats) * datstring = dats * if lenarr == 0: # <<<<<<<<<<<<<< @@ -7311,7 +7359,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int __pyx_t_8 = ((__pyx_v_lenarr == 0) != 0); if (__pyx_t_8) { - /* "netCDF4/_netCDF4.pyx":1290 + /* "netCDF4/_netCDF4.pyx":1292 * if lenarr == 0: * # write null byte * lenarr=1; datstring = '\x00' # <<<<<<<<<<<<<< @@ -7321,7 +7369,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int __pyx_v_lenarr = 1; __pyx_v_datstring = ((char *)"\000"); - /* "netCDF4/_netCDF4.pyx":1288 + /* "netCDF4/_netCDF4.pyx":1290 * lenarr = len(dats) * datstring = dats * if lenarr == 0: # <<<<<<<<<<<<<< @@ -7330,24 +7378,24 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int */ } - /* "netCDF4/_netCDF4.pyx":1291 + /* "netCDF4/_netCDF4.pyx":1293 * # write null byte * lenarr=1; datstring = '\x00' * if (force_ncstring or value_arr.dtype.char == 'U') and not is_netcdf3: # <<<<<<<<<<<<<< * # try to convert to ascii string, write as NC_CHAR * # else it's a unicode string, write as NC_STRING (if NETCDF4) */ - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_force_ncstring); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1291, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_force_ncstring); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1293, __pyx_L1_error) if (!__pyx_t_9) { } else { goto __pyx_L31_next_and; } - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1291, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_char); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1291, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_char); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_U, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1291, __pyx_L1_error) + __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_U, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1293, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_9) { } else { @@ -7355,13 +7403,13 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int goto __pyx_L30_bool_binop_done; } __pyx_L31_next_and:; - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_is_netcdf3); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1291, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_is_netcdf3); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1293, __pyx_L1_error) __pyx_t_7 = ((!__pyx_t_9) != 0); __pyx_t_8 = __pyx_t_7; __pyx_L30_bool_binop_done:; if (__pyx_t_8) { - /* "netCDF4/_netCDF4.pyx":1294 + /* "netCDF4/_netCDF4.pyx":1296 * # try to convert to ascii string, write as NC_CHAR * # else it's a unicode string, write as NC_STRING (if NETCDF4) * try: # <<<<<<<<<<<<<< @@ -7377,27 +7425,27 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int __Pyx_XGOTREF(__pyx_t_19); /*try:*/ { - /* "netCDF4/_netCDF4.pyx":1295 + /* "netCDF4/_netCDF4.pyx":1297 * # else it's a unicode string, write as NC_STRING (if NETCDF4) * try: * if force_ncstring: raise UnicodeError # <<<<<<<<<<<<<< * dats_ascii = _to_ascii(dats) # try to encode bytes as ascii string * ierr = nc_put_att_text(grp._grpid, varid, attname, lenarr, datstring) */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_force_ncstring); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1295, __pyx_L33_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_force_ncstring); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1297, __pyx_L33_error) if (__pyx_t_8) { __Pyx_Raise(__pyx_builtin_UnicodeError, 0, 0, 0); - __PYX_ERR(0, 1295, __pyx_L33_error) + __PYX_ERR(0, 1297, __pyx_L33_error) } - /* "netCDF4/_netCDF4.pyx":1296 + /* "netCDF4/_netCDF4.pyx":1298 * try: * if force_ncstring: raise UnicodeError * dats_ascii = _to_ascii(dats) # try to encode bytes as ascii string # <<<<<<<<<<<<<< * ierr = nc_put_att_text(grp._grpid, varid, attname, lenarr, datstring) * except UnicodeError: */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_to_ascii); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1296, __pyx_L33_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_to_ascii); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1298, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -7410,13 +7458,13 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int } } if (!__pyx_t_5) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_dats); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1296, __pyx_L33_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_dats); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1298, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_dats}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1296, __pyx_L33_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1298, __pyx_L33_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -7424,19 +7472,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_dats}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1296, __pyx_L33_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1298, __pyx_L33_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1296, __pyx_L33_error) + __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1298, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_INCREF(__pyx_v_dats); __Pyx_GIVEREF(__pyx_v_dats); PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_dats); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1296, __pyx_L33_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1298, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -7445,20 +7493,20 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int __pyx_v_dats_ascii = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1297 + /* "netCDF4/_netCDF4.pyx":1299 * if force_ncstring: raise UnicodeError * dats_ascii = _to_ascii(dats) # try to encode bytes as ascii string * ierr = nc_put_att_text(grp._grpid, varid, attname, lenarr, datstring) # <<<<<<<<<<<<<< * except UnicodeError: * issue485_workaround(grp._grpid, varid, attname) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1297, __pyx_L33_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1299, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_14 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1297, __pyx_L33_error) + __pyx_t_14 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1299, __pyx_L33_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_ierr = nc_put_att_text(__pyx_t_14, __pyx_v_varid, __pyx_v_attname, __pyx_v_lenarr, __pyx_v_datstring); - /* "netCDF4/_netCDF4.pyx":1294 + /* "netCDF4/_netCDF4.pyx":1296 * # try to convert to ascii string, write as NC_CHAR * # else it's a unicode string, write as NC_STRING (if NETCDF4) * try: # <<<<<<<<<<<<<< @@ -7477,7 +7525,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1298 + /* "netCDF4/_netCDF4.pyx":1300 * dats_ascii = _to_ascii(dats) # try to encode bytes as ascii string * ierr = nc_put_att_text(grp._grpid, varid, attname, lenarr, datstring) * except UnicodeError: # <<<<<<<<<<<<<< @@ -7487,36 +7535,36 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeError); if (__pyx_t_14) { __Pyx_AddTraceback("netCDF4._netCDF4._set_att", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_3) < 0) __PYX_ERR(0, 1298, __pyx_L35_except_error) + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_3) < 0) __PYX_ERR(0, 1300, __pyx_L35_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_3); - /* "netCDF4/_netCDF4.pyx":1299 + /* "netCDF4/_netCDF4.pyx":1301 * ierr = nc_put_att_text(grp._grpid, varid, attname, lenarr, datstring) * except UnicodeError: * issue485_workaround(grp._grpid, varid, attname) # <<<<<<<<<<<<<< * ierr = nc_put_att_string(grp._grpid, varid, attname, 1, &datstring) * else: */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1299, __pyx_L35_except_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1301, __pyx_L35_except_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_14 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1299, __pyx_L35_except_error) + __pyx_t_14 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1301, __pyx_L35_except_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __pyx_f_7netCDF4_8_netCDF4_issue485_workaround(__pyx_t_14, __pyx_v_varid, __pyx_v_attname); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1299, __pyx_L35_except_error) + __pyx_t_5 = __pyx_f_7netCDF4_8_netCDF4_issue485_workaround(__pyx_t_14, __pyx_v_varid, __pyx_v_attname); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1301, __pyx_L35_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":1300 + /* "netCDF4/_netCDF4.pyx":1302 * except UnicodeError: * issue485_workaround(grp._grpid, varid, attname) * ierr = nc_put_att_string(grp._grpid, varid, attname, 1, &datstring) # <<<<<<<<<<<<<< * else: * ierr = nc_put_att_text(grp._grpid, varid, attname, lenarr, datstring) */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1300, __pyx_L35_except_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1302, __pyx_L35_except_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_14 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1300, __pyx_L35_except_error) + __pyx_t_14 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1302, __pyx_L35_except_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_ierr = nc_put_att_string(__pyx_t_14, __pyx_v_varid, __pyx_v_attname, 1, (&__pyx_v_datstring)); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -7527,7 +7575,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int goto __pyx_L35_except_error; __pyx_L35_except_error:; - /* "netCDF4/_netCDF4.pyx":1294 + /* "netCDF4/_netCDF4.pyx":1296 * # try to convert to ascii string, write as NC_CHAR * # else it's a unicode string, write as NC_STRING (if NETCDF4) * try: # <<<<<<<<<<<<<< @@ -7549,7 +7597,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int __pyx_L40_try_end:; } - /* "netCDF4/_netCDF4.pyx":1291 + /* "netCDF4/_netCDF4.pyx":1293 * # write null byte * lenarr=1; datstring = '\x00' * if (force_ncstring or value_arr.dtype.char == 'U') and not is_netcdf3: # <<<<<<<<<<<<<< @@ -7559,7 +7607,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int goto __pyx_L29; } - /* "netCDF4/_netCDF4.pyx":1302 + /* "netCDF4/_netCDF4.pyx":1304 * ierr = nc_put_att_string(grp._grpid, varid, attname, 1, &datstring) * else: * ierr = nc_put_att_text(grp._grpid, varid, attname, lenarr, datstring) # <<<<<<<<<<<<<< @@ -7567,9 +7615,9 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int * raise AttributeError((nc_strerror(ierr)).decode('ascii')) */ /*else*/ { - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1302, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_14 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1302, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1304, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_ierr = nc_put_att_text(__pyx_t_14, __pyx_v_varid, __pyx_v_attname, __pyx_v_lenarr, __pyx_v_datstring); } @@ -7577,7 +7625,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int } __pyx_L12:; - /* "netCDF4/_netCDF4.pyx":1303 + /* "netCDF4/_netCDF4.pyx":1305 * else: * ierr = nc_put_att_text(grp._grpid, varid, attname, lenarr, datstring) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -7587,7 +7635,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int __pyx_t_8 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_8) { - /* "netCDF4/_netCDF4.pyx":1304 + /* "netCDF4/_netCDF4.pyx":1306 * ierr = nc_put_att_text(grp._grpid, varid, attname, lenarr, datstring) * if ierr != NC_NOERR: * raise AttributeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -7595,22 +7643,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int * else: */ __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1304, __pyx_L1_error) + __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1304, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1304, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1306, __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, 1304, __pyx_L1_error) + __PYX_ERR(0, 1306, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1303 + /* "netCDF4/_netCDF4.pyx":1305 * else: * ierr = nc_put_att_text(grp._grpid, varid, attname, lenarr, datstring) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -7619,7 +7667,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int */ } - /* "netCDF4/_netCDF4.pyx":1264 + /* "netCDF4/_netCDF4.pyx":1266 * # if array contains unicode strings, and data model is NETCDF4, * # write as a string. * if value_arr.dtype.char in ['S','U']: # <<<<<<<<<<<<<< @@ -7629,7 +7677,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int goto __pyx_L9; } - /* "netCDF4/_netCDF4.pyx":1307 + /* "netCDF4/_netCDF4.pyx":1309 * # a 'regular' array type ('f4','i4','f8' etc) * else: * if value_arr.dtype.kind == 'V': # compound attribute. # <<<<<<<<<<<<<< @@ -7637,32 +7685,32 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int * elif value_arr.dtype.str[1:] not in _supportedtypes: */ /*else*/ { - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1307, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_kind); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1307, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_kind); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_V, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1307, __pyx_L1_error) + __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_V, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1309, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_8) { - /* "netCDF4/_netCDF4.pyx":1308 + /* "netCDF4/_netCDF4.pyx":1310 * else: * if value_arr.dtype.kind == 'V': # compound attribute. * xtype = _find_cmptype(grp,value_arr.dtype) # <<<<<<<<<<<<<< * elif value_arr.dtype.str[1:] not in _supportedtypes: * raise TypeError, 'illegal data type for attribute, must be one of %s, got %s' % (_supportedtypes, value_arr.dtype.str[1:]) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1308, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __pyx_f_7netCDF4_8_netCDF4__find_cmptype(__pyx_v_grp, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1308, __pyx_L1_error) + __pyx_t_3 = __pyx_f_7netCDF4_8_netCDF4__find_cmptype(__pyx_v_grp, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_22 = __Pyx_PyInt_As_nc_type(__pyx_t_3); if (unlikely((__pyx_t_22 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1308, __pyx_L1_error) + __pyx_t_22 = __Pyx_PyInt_As_nc_type(__pyx_t_3); if (unlikely((__pyx_t_22 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1310, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_xtype = __pyx_t_22; - /* "netCDF4/_netCDF4.pyx":1307 + /* "netCDF4/_netCDF4.pyx":1309 * # a 'regular' array type ('f4','i4','f8' etc) * else: * if value_arr.dtype.kind == 'V': # compound attribute. # <<<<<<<<<<<<<< @@ -7672,47 +7720,47 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int goto __pyx_L45; } - /* "netCDF4/_netCDF4.pyx":1309 + /* "netCDF4/_netCDF4.pyx":1311 * if value_arr.dtype.kind == 'V': # compound attribute. * xtype = _find_cmptype(grp,value_arr.dtype) * elif value_arr.dtype.str[1:] not in _supportedtypes: # <<<<<<<<<<<<<< * raise TypeError, 'illegal data type for attribute, must be one of %s, got %s' % (_supportedtypes, value_arr.dtype.str[1:]) * elif xtype == -99: # if xtype is not passed in as kwarg. */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1309, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_str); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1309, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_str); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_4, 1, 0, NULL, NULL, &__pyx_slice__10, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1309, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_4, 1, 0, NULL, NULL, &__pyx_slice__10, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1311, __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_supportedtypes); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1309, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_supportedtypes); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_t_4, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1309, __pyx_L1_error) + __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_t_4, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1311, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_7 = (__pyx_t_8 != 0); if (__pyx_t_7) { - /* "netCDF4/_netCDF4.pyx":1310 + /* "netCDF4/_netCDF4.pyx":1312 * xtype = _find_cmptype(grp,value_arr.dtype) * elif value_arr.dtype.str[1:] not in _supportedtypes: * raise TypeError, 'illegal data type for attribute, must be one of %s, got %s' % (_supportedtypes, value_arr.dtype.str[1:]) # <<<<<<<<<<<<<< * elif xtype == -99: # if xtype is not passed in as kwarg. * xtype = _nptonctype[value_arr.dtype.str[1:]] */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_supportedtypes); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1310, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_supportedtypes); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1310, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_str); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1310, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_str); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_1, 1, 0, NULL, NULL, &__pyx_slice__11, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1310, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_1, 1, 0, NULL, NULL, &__pyx_slice__11, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1310, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); @@ -7720,14 +7768,14 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3); __pyx_t_4 = 0; __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_illegal_data_type_for_attribute, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1310, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_illegal_data_type_for_attribute, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_builtin_TypeError, __pyx_t_3, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 1310, __pyx_L1_error) + __PYX_ERR(0, 1312, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1309 + /* "netCDF4/_netCDF4.pyx":1311 * if value_arr.dtype.kind == 'V': # compound attribute. * xtype = _find_cmptype(grp,value_arr.dtype) * elif value_arr.dtype.str[1:] not in _supportedtypes: # <<<<<<<<<<<<<< @@ -7736,7 +7784,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int */ } - /* "netCDF4/_netCDF4.pyx":1311 + /* "netCDF4/_netCDF4.pyx":1313 * elif value_arr.dtype.str[1:] not in _supportedtypes: * raise TypeError, 'illegal data type for attribute, must be one of %s, got %s' % (_supportedtypes, value_arr.dtype.str[1:]) * elif xtype == -99: # if xtype is not passed in as kwarg. # <<<<<<<<<<<<<< @@ -7746,32 +7794,32 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int __pyx_t_7 = ((__pyx_v_xtype == -99L) != 0); if (__pyx_t_7) { - /* "netCDF4/_netCDF4.pyx":1312 + /* "netCDF4/_netCDF4.pyx":1314 * raise TypeError, 'illegal data type for attribute, must be one of %s, got %s' % (_supportedtypes, value_arr.dtype.str[1:]) * elif xtype == -99: # if xtype is not passed in as kwarg. * xtype = _nptonctype[value_arr.dtype.str[1:]] # <<<<<<<<<<<<<< * lenarr = PyArray_SIZE(value_arr) * ierr = nc_put_att(grp._grpid, varid, attname, xtype, lenarr, value_arr.data) */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1312, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1312, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_str); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1312, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_str); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_4, 1, 0, NULL, NULL, &__pyx_slice__12, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1312, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_4, 1, 0, NULL, NULL, &__pyx_slice__12, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyObject_GetItem(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1312, __pyx_L1_error) + __pyx_t_4 = PyObject_GetItem(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_22 = __Pyx_PyInt_As_nc_type(__pyx_t_4); if (unlikely((__pyx_t_22 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1312, __pyx_L1_error) + __pyx_t_22 = __Pyx_PyInt_As_nc_type(__pyx_t_4); if (unlikely((__pyx_t_22 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1314, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_xtype = __pyx_t_22; - /* "netCDF4/_netCDF4.pyx":1311 + /* "netCDF4/_netCDF4.pyx":1313 * elif value_arr.dtype.str[1:] not in _supportedtypes: * raise TypeError, 'illegal data type for attribute, must be one of %s, got %s' % (_supportedtypes, value_arr.dtype.str[1:]) * elif xtype == -99: # if xtype is not passed in as kwarg. # <<<<<<<<<<<<<< @@ -7781,7 +7829,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int } __pyx_L45:; - /* "netCDF4/_netCDF4.pyx":1313 + /* "netCDF4/_netCDF4.pyx":1315 * elif xtype == -99: # if xtype is not passed in as kwarg. * xtype = _nptonctype[value_arr.dtype.str[1:]] * lenarr = PyArray_SIZE(value_arr) # <<<<<<<<<<<<<< @@ -7790,20 +7838,20 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int */ __pyx_v_lenarr = PyArray_SIZE(__pyx_v_value_arr); - /* "netCDF4/_netCDF4.pyx":1314 + /* "netCDF4/_netCDF4.pyx":1316 * xtype = _nptonctype[value_arr.dtype.str[1:]] * lenarr = PyArray_SIZE(value_arr) * ierr = nc_put_att(grp._grpid, varid, attname, xtype, lenarr, value_arr.data) # <<<<<<<<<<<<<< * if ierr != NC_NOERR: * raise AttributeError((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, 1314, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_14 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1314, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1316, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_ierr = nc_put_att(__pyx_t_14, __pyx_v_varid, __pyx_v_attname, __pyx_v_xtype, __pyx_v_lenarr, __pyx_v_value_arr->data); - /* "netCDF4/_netCDF4.pyx":1315 + /* "netCDF4/_netCDF4.pyx":1317 * lenarr = PyArray_SIZE(value_arr) * ierr = nc_put_att(grp._grpid, varid, attname, xtype, lenarr, value_arr.data) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -7813,7 +7861,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int __pyx_t_7 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_7) { - /* "netCDF4/_netCDF4.pyx":1316 + /* "netCDF4/_netCDF4.pyx":1318 * ierr = nc_put_att(grp._grpid, varid, attname, xtype, lenarr, value_arr.data) * if ierr != NC_NOERR: * raise AttributeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -7821,22 +7869,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int * cdef _get_types(group): */ __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, 1316, __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, 1318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1316, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1316, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(0, 1316, __pyx_L1_error) + __PYX_ERR(0, 1318, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1315 + /* "netCDF4/_netCDF4.pyx":1317 * lenarr = PyArray_SIZE(value_arr) * ierr = nc_put_att(grp._grpid, varid, attname, xtype, lenarr, value_arr.data) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -7847,7 +7895,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int } __pyx_L9:; - /* "netCDF4/_netCDF4.pyx":1242 + /* "netCDF4/_netCDF4.pyx":1244 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * * cdef _set_att(grp, int varid, name, value,\ # <<<<<<<<<<<<<< @@ -7882,7 +7930,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":1318 +/* "netCDF4/_netCDF4.pyx":1320 * raise AttributeError((nc_strerror(ierr)).decode('ascii')) * * cdef _get_types(group): # <<<<<<<<<<<<<< @@ -7925,20 +7973,20 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) PyObject *__pyx_t_14 = NULL; __Pyx_RefNannySetupContext("_get_types", 0); - /* "netCDF4/_netCDF4.pyx":1326 + /* "netCDF4/_netCDF4.pyx":1328 * cdef nc_type *typeids * cdef char namstring[NC_MAX_NAME+1] * _grpid = group._grpid # <<<<<<<<<<<<<< * # get the number of user defined types in this group. * with nogil: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1326, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1328, __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, 1326, __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, 1328, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v__grpid = __pyx_t_2; - /* "netCDF4/_netCDF4.pyx":1328 + /* "netCDF4/_netCDF4.pyx":1330 * _grpid = group._grpid * # get the number of user defined types in this group. * with nogil: # <<<<<<<<<<<<<< @@ -7952,7 +8000,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":1329 + /* "netCDF4/_netCDF4.pyx":1331 * # get the number of user defined types in this group. * with nogil: * ierr = nc_inq_typeids(_grpid, &ntypes, NULL) # <<<<<<<<<<<<<< @@ -7962,7 +8010,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) __pyx_v_ierr = nc_inq_typeids(__pyx_v__grpid, (&__pyx_v_ntypes), NULL); } - /* "netCDF4/_netCDF4.pyx":1328 + /* "netCDF4/_netCDF4.pyx":1330 * _grpid = group._grpid * # get the number of user defined types in this group. * with nogil: # <<<<<<<<<<<<<< @@ -7980,7 +8028,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) } } - /* "netCDF4/_netCDF4.pyx":1330 + /* "netCDF4/_netCDF4.pyx":1332 * with nogil: * ierr = nc_inq_typeids(_grpid, &ntypes, NULL) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -7990,7 +8038,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":1331 + /* "netCDF4/_netCDF4.pyx":1333 * ierr = nc_inq_typeids(_grpid, &ntypes, NULL) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -7998,22 +8046,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) * typeids = malloc(sizeof(nc_type) * ntypes) */ __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, 1331, __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, 1333, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1331, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1333, __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, 1331, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1333, __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, 1331, __pyx_L1_error) + __PYX_ERR(0, 1333, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1330 + /* "netCDF4/_netCDF4.pyx":1332 * with nogil: * ierr = nc_inq_typeids(_grpid, &ntypes, NULL) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -8022,7 +8070,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) */ } - /* "netCDF4/_netCDF4.pyx":1332 + /* "netCDF4/_netCDF4.pyx":1334 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * if ntypes > 0: # <<<<<<<<<<<<<< @@ -8032,7 +8080,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) __pyx_t_3 = ((__pyx_v_ntypes > 0) != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":1333 + /* "netCDF4/_netCDF4.pyx":1335 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * if ntypes > 0: * typeids = malloc(sizeof(nc_type) * ntypes) # <<<<<<<<<<<<<< @@ -8041,7 +8089,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) */ __pyx_v_typeids = ((nc_type *)malloc(((sizeof(nc_type)) * __pyx_v_ntypes))); - /* "netCDF4/_netCDF4.pyx":1334 + /* "netCDF4/_netCDF4.pyx":1336 * if ntypes > 0: * typeids = malloc(sizeof(nc_type) * ntypes) * with nogil: # <<<<<<<<<<<<<< @@ -8055,7 +8103,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":1335 + /* "netCDF4/_netCDF4.pyx":1337 * typeids = malloc(sizeof(nc_type) * ntypes) * with nogil: * ierr = nc_inq_typeids(_grpid, &ntypes, typeids) # <<<<<<<<<<<<<< @@ -8065,7 +8113,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) __pyx_v_ierr = nc_inq_typeids(__pyx_v__grpid, (&__pyx_v_ntypes), __pyx_v_typeids); } - /* "netCDF4/_netCDF4.pyx":1334 + /* "netCDF4/_netCDF4.pyx":1336 * if ntypes > 0: * typeids = malloc(sizeof(nc_type) * ntypes) * with nogil: # <<<<<<<<<<<<<< @@ -8083,7 +8131,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) } } - /* "netCDF4/_netCDF4.pyx":1336 + /* "netCDF4/_netCDF4.pyx":1338 * with nogil: * ierr = nc_inq_typeids(_grpid, &ntypes, typeids) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -8093,7 +8141,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":1337 + /* "netCDF4/_netCDF4.pyx":1339 * ierr = nc_inq_typeids(_grpid, &ntypes, typeids) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -8101,22 +8149,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) * cmptypes = OrderedDict() */ __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, 1337, __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, 1339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1337, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1339, __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, 1337, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1339, __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, 1337, __pyx_L1_error) + __PYX_ERR(0, 1339, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1336 + /* "netCDF4/_netCDF4.pyx":1338 * with nogil: * ierr = nc_inq_typeids(_grpid, &ntypes, typeids) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -8125,7 +8173,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) */ } - /* "netCDF4/_netCDF4.pyx":1332 + /* "netCDF4/_netCDF4.pyx":1334 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * if ntypes > 0: # <<<<<<<<<<<<<< @@ -8134,14 +8182,14 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) */ } - /* "netCDF4/_netCDF4.pyx":1339 + /* "netCDF4/_netCDF4.pyx":1341 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * # create empty dictionary for CompoundType instances. * cmptypes = OrderedDict() # <<<<<<<<<<<<<< * vltypes = OrderedDict() * enumtypes = OrderedDict() */ - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1339, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { @@ -8154,24 +8202,24 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) } } if (__pyx_t_6) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1339, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1341, __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, 1339, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1341, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_cmptypes = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1340 + /* "netCDF4/_netCDF4.pyx":1342 * # create empty dictionary for CompoundType instances. * cmptypes = OrderedDict() * vltypes = OrderedDict() # <<<<<<<<<<<<<< * enumtypes = OrderedDict() * if ntypes > 0: */ - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1340, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { @@ -8184,24 +8232,24 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) } } if (__pyx_t_6) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1340, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1342, __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, 1340, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1342, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_vltypes = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1341 + /* "netCDF4/_netCDF4.pyx":1343 * cmptypes = OrderedDict() * vltypes = OrderedDict() * enumtypes = OrderedDict() # <<<<<<<<<<<<<< * if ntypes > 0: * for n from 0 <= n < ntypes: */ - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1341, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { @@ -8214,17 +8262,17 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) } } if (__pyx_t_6) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1341, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1343, __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, 1341, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1343, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_enumtypes = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1342 + /* "netCDF4/_netCDF4.pyx":1344 * vltypes = OrderedDict() * enumtypes = OrderedDict() * if ntypes > 0: # <<<<<<<<<<<<<< @@ -8234,7 +8282,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) __pyx_t_3 = ((__pyx_v_ntypes > 0) != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":1343 + /* "netCDF4/_netCDF4.pyx":1345 * enumtypes = OrderedDict() * if ntypes > 0: * for n from 0 <= n < ntypes: # <<<<<<<<<<<<<< @@ -8244,7 +8292,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) __pyx_t_2 = __pyx_v_ntypes; for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_2; __pyx_v_n++) { - /* "netCDF4/_netCDF4.pyx":1344 + /* "netCDF4/_netCDF4.pyx":1346 * if ntypes > 0: * for n from 0 <= n < ntypes: * xtype = typeids[n] # <<<<<<<<<<<<<< @@ -8253,7 +8301,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) */ __pyx_v_xtype = (__pyx_v_typeids[__pyx_v_n]); - /* "netCDF4/_netCDF4.pyx":1345 + /* "netCDF4/_netCDF4.pyx":1347 * for n from 0 <= n < ntypes: * xtype = typeids[n] * with nogil: # <<<<<<<<<<<<<< @@ -8267,7 +8315,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":1346 + /* "netCDF4/_netCDF4.pyx":1348 * xtype = typeids[n] * with nogil: * ierr = nc_inq_user_type(_grpid, xtype, namstring, # <<<<<<<<<<<<<< @@ -8277,7 +8325,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) __pyx_v_ierr = nc_inq_user_type(__pyx_v__grpid, __pyx_v_xtype, __pyx_v_namstring, NULL, NULL, NULL, (&__pyx_v_classp)); } - /* "netCDF4/_netCDF4.pyx":1345 + /* "netCDF4/_netCDF4.pyx":1347 * for n from 0 <= n < ntypes: * xtype = typeids[n] * with nogil: # <<<<<<<<<<<<<< @@ -8295,7 +8343,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) } } - /* "netCDF4/_netCDF4.pyx":1348 + /* "netCDF4/_netCDF4.pyx":1350 * ierr = nc_inq_user_type(_grpid, xtype, namstring, * NULL,NULL,NULL,&classp) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -8305,7 +8353,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":1349 + /* "netCDF4/_netCDF4.pyx":1351 * NULL,NULL,NULL,&classp) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -8313,22 +8361,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) * name = namstring.decode(default_encoding,unicode_error) */ __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, 1349, __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, 1351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1349, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1351, __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, 1349, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1351, __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, 1349, __pyx_L1_error) + __PYX_ERR(0, 1351, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1348 + /* "netCDF4/_netCDF4.pyx":1350 * ierr = nc_inq_user_type(_grpid, xtype, namstring, * NULL,NULL,NULL,&classp) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -8337,7 +8385,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) */ } - /* "netCDF4/_netCDF4.pyx":1350 + /* "netCDF4/_netCDF4.pyx":1352 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * if classp == NC_COMPOUND: # a compound # <<<<<<<<<<<<<< @@ -8347,21 +8395,21 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) switch (__pyx_v_classp) { case NC_COMPOUND: - /* "netCDF4/_netCDF4.pyx":1351 + /* "netCDF4/_netCDF4.pyx":1353 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * if classp == NC_COMPOUND: # a compound * name = namstring.decode(default_encoding,unicode_error) # <<<<<<<<<<<<<< * # read the compound type info from the file, * # create a CompoundType instance from it. */ - __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1351, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1353, __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, 1351, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1353, __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, 1351, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1353, __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, 1351, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; __pyx_t_9 = 0; @@ -8378,7 +8426,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(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_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1351, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __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; @@ -8388,7 +8436,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(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_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1351, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __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; @@ -8396,7 +8444,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) } else #endif { - __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1351, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; @@ -8407,7 +8455,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_7); __pyx_t_5 = 0; __pyx_t_7 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1351, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -8415,7 +8463,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1354 + /* "netCDF4/_netCDF4.pyx":1356 * # read the compound type info from the file, * # create a CompoundType instance from it. * try: # <<<<<<<<<<<<<< @@ -8431,19 +8479,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) __Pyx_XGOTREF(__pyx_t_13); /*try:*/ { - /* "netCDF4/_netCDF4.pyx":1355 + /* "netCDF4/_netCDF4.pyx":1357 * # create a CompoundType instance from it. * try: * cmptype = _read_compound(group, xtype) # <<<<<<<<<<<<<< * except KeyError: * msg='WARNING: unsupported Compound type, skipping...' */ - __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__read_compound(__pyx_v_group, __pyx_v_xtype, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1355, __pyx_L21_error) + __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__read_compound(__pyx_v_group, __pyx_v_xtype, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1357, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_cmptype, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1354 + /* "netCDF4/_netCDF4.pyx":1356 * # read the compound type info from the file, * # create a CompoundType instance from it. * try: # <<<<<<<<<<<<<< @@ -8464,7 +8512,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1356 + /* "netCDF4/_netCDF4.pyx":1358 * try: * cmptype = _read_compound(group, xtype) * except KeyError: # <<<<<<<<<<<<<< @@ -8474,12 +8522,12 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_9) { __Pyx_AddTraceback("netCDF4._netCDF4._get_types", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_10) < 0) __PYX_ERR(0, 1356, __pyx_L23_except_error) + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_10) < 0) __PYX_ERR(0, 1358, __pyx_L23_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_10); - /* "netCDF4/_netCDF4.pyx":1357 + /* "netCDF4/_netCDF4.pyx":1359 * cmptype = _read_compound(group, xtype) * except KeyError: * msg='WARNING: unsupported Compound type, skipping...' # <<<<<<<<<<<<<< @@ -8489,16 +8537,16 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) __Pyx_INCREF(__pyx_kp_s_WARNING_unsupported_Compound_typ); __Pyx_XDECREF_SET(__pyx_v_msg, __pyx_kp_s_WARNING_unsupported_Compound_typ); - /* "netCDF4/_netCDF4.pyx":1358 + /* "netCDF4/_netCDF4.pyx":1360 * except KeyError: * msg='WARNING: unsupported Compound type, skipping...' * warnings.warn(msg) # <<<<<<<<<<<<<< * continue * cmptypes[name] = cmptype */ - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1358, __pyx_L23_except_error) + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1360, __pyx_L23_except_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_warn); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1358, __pyx_L23_except_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_warn); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1360, __pyx_L23_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -8512,13 +8560,13 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) } } if (!__pyx_t_5) { - __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_msg); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1358, __pyx_L23_except_error) + __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_msg); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1360, __pyx_L23_except_error) __Pyx_GOTREF(__pyx_t_7); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_msg}; - __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1358, __pyx_L23_except_error) + __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1360, __pyx_L23_except_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_7); } else @@ -8526,19 +8574,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_msg}; - __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1358, __pyx_L23_except_error) + __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1360, __pyx_L23_except_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_7); } else #endif { - __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1358, __pyx_L23_except_error) + __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1360, __pyx_L23_except_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_INCREF(__pyx_v_msg); __Pyx_GIVEREF(__pyx_v_msg); PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_v_msg); - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_14, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1358, __pyx_L23_except_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_14, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1360, __pyx_L23_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } @@ -8546,7 +8594,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":1359 + /* "netCDF4/_netCDF4.pyx":1361 * msg='WARNING: unsupported Compound type, skipping...' * warnings.warn(msg) * continue # <<<<<<<<<<<<<< @@ -8563,7 +8611,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) goto __pyx_L23_except_error; __pyx_L23_except_error:; - /* "netCDF4/_netCDF4.pyx":1354 + /* "netCDF4/_netCDF4.pyx":1356 * # read the compound type info from the file, * # create a CompoundType instance from it. * try: # <<<<<<<<<<<<<< @@ -8586,16 +8634,16 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) __pyx_L28_try_end:; } - /* "netCDF4/_netCDF4.pyx":1360 + /* "netCDF4/_netCDF4.pyx":1362 * warnings.warn(msg) * continue * cmptypes[name] = cmptype # <<<<<<<<<<<<<< * elif classp == NC_VLEN: # a vlen * name = namstring.decode(default_encoding,unicode_error) */ - if (unlikely(PyObject_SetItem(__pyx_v_cmptypes, __pyx_v_name, __pyx_v_cmptype) < 0)) __PYX_ERR(0, 1360, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v_cmptypes, __pyx_v_name, __pyx_v_cmptype) < 0)) __PYX_ERR(0, 1362, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1350 + /* "netCDF4/_netCDF4.pyx":1352 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * if classp == NC_COMPOUND: # a compound # <<<<<<<<<<<<<< @@ -8604,7 +8652,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) */ break; - /* "netCDF4/_netCDF4.pyx":1361 + /* "netCDF4/_netCDF4.pyx":1363 * continue * cmptypes[name] = cmptype * elif classp == NC_VLEN: # a vlen # <<<<<<<<<<<<<< @@ -8613,21 +8661,21 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) */ case NC_VLEN: - /* "netCDF4/_netCDF4.pyx":1362 + /* "netCDF4/_netCDF4.pyx":1364 * cmptypes[name] = cmptype * elif classp == NC_VLEN: # a vlen * name = namstring.decode(default_encoding,unicode_error) # <<<<<<<<<<<<<< * # read the VLEN type info from the file, * # create a VLType instance from it. */ - __pyx_t_6 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1362, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_decode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1362, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_decode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __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, 1362, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1364, __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, 1362, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; __pyx_t_9 = 0; @@ -8644,7 +8692,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, __pyx_t_7}; - __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1362, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1364, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -8654,7 +8702,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, __pyx_t_7}; - __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1362, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1364, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -8662,7 +8710,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) } else #endif { - __pyx_t_14 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1362, __pyx_L1_error) + __pyx_t_14 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_8); __pyx_t_8 = NULL; @@ -8673,7 +8721,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_9, __pyx_t_7); __pyx_t_6 = 0; __pyx_t_7 = 0; - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_14, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1362, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_14, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } @@ -8681,7 +8729,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_10); __pyx_t_10 = 0; - /* "netCDF4/_netCDF4.pyx":1365 + /* "netCDF4/_netCDF4.pyx":1367 * # read the VLEN type info from the file, * # create a VLType instance from it. * try: # <<<<<<<<<<<<<< @@ -8697,19 +8745,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) __Pyx_XGOTREF(__pyx_t_11); /*try:*/ { - /* "netCDF4/_netCDF4.pyx":1366 + /* "netCDF4/_netCDF4.pyx":1368 * # create a VLType instance from it. * try: * vltype = _read_vlen(group, xtype) # <<<<<<<<<<<<<< * except KeyError: * msg='WARNING: unsupported VLEN type, skipping...' */ - __pyx_t_10 = __pyx_f_7netCDF4_8_netCDF4__read_vlen(__pyx_v_group, __pyx_v_xtype, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1366, __pyx_L31_error) + __pyx_t_10 = __pyx_f_7netCDF4_8_netCDF4__read_vlen(__pyx_v_group, __pyx_v_xtype, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1368, __pyx_L31_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_XDECREF_SET(__pyx_v_vltype, __pyx_t_10); __pyx_t_10 = 0; - /* "netCDF4/_netCDF4.pyx":1365 + /* "netCDF4/_netCDF4.pyx":1367 * # read the VLEN type info from the file, * # create a VLType instance from it. * try: # <<<<<<<<<<<<<< @@ -8731,7 +8779,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "netCDF4/_netCDF4.pyx":1367 + /* "netCDF4/_netCDF4.pyx":1369 * try: * vltype = _read_vlen(group, xtype) * except KeyError: # <<<<<<<<<<<<<< @@ -8741,12 +8789,12 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_9) { __Pyx_AddTraceback("netCDF4._netCDF4._get_types", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_1, &__pyx_t_14) < 0) __PYX_ERR(0, 1367, __pyx_L33_except_error) + if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_1, &__pyx_t_14) < 0) __PYX_ERR(0, 1369, __pyx_L33_except_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_14); - /* "netCDF4/_netCDF4.pyx":1368 + /* "netCDF4/_netCDF4.pyx":1370 * vltype = _read_vlen(group, xtype) * except KeyError: * msg='WARNING: unsupported VLEN type, skipping...' # <<<<<<<<<<<<<< @@ -8756,16 +8804,16 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) __Pyx_INCREF(__pyx_kp_s_WARNING_unsupported_VLEN_type_sk); __Pyx_XDECREF_SET(__pyx_v_msg, __pyx_kp_s_WARNING_unsupported_VLEN_type_sk); - /* "netCDF4/_netCDF4.pyx":1369 + /* "netCDF4/_netCDF4.pyx":1371 * except KeyError: * msg='WARNING: unsupported VLEN type, skipping...' * warnings.warn(msg) # <<<<<<<<<<<<<< * continue * vltypes[name] = vltype */ - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1369, __pyx_L33_except_error) + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1371, __pyx_L33_except_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_warn); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1369, __pyx_L33_except_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_warn); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1371, __pyx_L33_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -8779,13 +8827,13 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) } } if (!__pyx_t_6) { - __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_msg); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1369, __pyx_L33_except_error) + __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_msg); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1371, __pyx_L33_except_error) __Pyx_GOTREF(__pyx_t_7); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_msg}; - __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1369, __pyx_L33_except_error) + __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1371, __pyx_L33_except_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_7); } else @@ -8793,19 +8841,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_msg}; - __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1369, __pyx_L33_except_error) + __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1371, __pyx_L33_except_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_7); } else #endif { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1369, __pyx_L33_except_error) + __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1371, __pyx_L33_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_INCREF(__pyx_v_msg); __Pyx_GIVEREF(__pyx_v_msg); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_msg); - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1369, __pyx_L33_except_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1371, __pyx_L33_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -8813,7 +8861,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":1370 + /* "netCDF4/_netCDF4.pyx":1372 * msg='WARNING: unsupported VLEN type, skipping...' * warnings.warn(msg) * continue # <<<<<<<<<<<<<< @@ -8830,7 +8878,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) goto __pyx_L33_except_error; __pyx_L33_except_error:; - /* "netCDF4/_netCDF4.pyx":1365 + /* "netCDF4/_netCDF4.pyx":1367 * # read the VLEN type info from the file, * # create a VLType instance from it. * try: # <<<<<<<<<<<<<< @@ -8853,16 +8901,16 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) __pyx_L38_try_end:; } - /* "netCDF4/_netCDF4.pyx":1371 + /* "netCDF4/_netCDF4.pyx":1373 * warnings.warn(msg) * continue * vltypes[name] = vltype # <<<<<<<<<<<<<< * elif classp == NC_ENUM: # an enum type * name = namstring.decode(default_encoding,unicode_error) */ - if (unlikely(PyObject_SetItem(__pyx_v_vltypes, __pyx_v_name, __pyx_v_vltype) < 0)) __PYX_ERR(0, 1371, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v_vltypes, __pyx_v_name, __pyx_v_vltype) < 0)) __PYX_ERR(0, 1373, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1361 + /* "netCDF4/_netCDF4.pyx":1363 * continue * cmptypes[name] = cmptype * elif classp == NC_VLEN: # a vlen # <<<<<<<<<<<<<< @@ -8871,7 +8919,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) */ break; - /* "netCDF4/_netCDF4.pyx":1372 + /* "netCDF4/_netCDF4.pyx":1374 * continue * vltypes[name] = vltype * elif classp == NC_ENUM: # an enum type # <<<<<<<<<<<<<< @@ -8880,21 +8928,21 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) */ case NC_ENUM: - /* "netCDF4/_netCDF4.pyx":1373 + /* "netCDF4/_netCDF4.pyx":1375 * vltypes[name] = vltype * elif classp == NC_ENUM: # an enum type * name = namstring.decode(default_encoding,unicode_error) # <<<<<<<<<<<<<< * # read the Enum type info from the file, * # create a EnumType instance from it. */ - __pyx_t_1 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1373, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1375, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_decode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1373, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_decode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1375, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __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, 1373, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1375, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1373, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1375, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; __pyx_t_9 = 0; @@ -8911,7 +8959,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_1, __pyx_t_7}; - __pyx_t_14 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1373, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1375, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -8921,7 +8969,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_1, __pyx_t_7}; - __pyx_t_14 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1373, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1375, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -8929,7 +8977,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) } else #endif { - __pyx_t_5 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1373, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1375, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8); __pyx_t_8 = NULL; @@ -8940,7 +8988,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_9, __pyx_t_7); __pyx_t_1 = 0; __pyx_t_7 = 0; - __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_5, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1373, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_5, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1375, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -8948,7 +8996,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_14); __pyx_t_14 = 0; - /* "netCDF4/_netCDF4.pyx":1376 + /* "netCDF4/_netCDF4.pyx":1378 * # read the Enum type info from the file, * # create a EnumType instance from it. * try: # <<<<<<<<<<<<<< @@ -8964,19 +9012,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) __Pyx_XGOTREF(__pyx_t_13); /*try:*/ { - /* "netCDF4/_netCDF4.pyx":1377 + /* "netCDF4/_netCDF4.pyx":1379 * # create a EnumType instance from it. * try: * enumtype = _read_enum(group, xtype) # <<<<<<<<<<<<<< * except KeyError: * msg='WARNING: unsupported Enum type, skipping...' */ - __pyx_t_14 = __pyx_f_7netCDF4_8_netCDF4__read_enum(__pyx_v_group, __pyx_v_xtype, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1377, __pyx_L41_error) + __pyx_t_14 = __pyx_f_7netCDF4_8_netCDF4__read_enum(__pyx_v_group, __pyx_v_xtype, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1379, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_XDECREF_SET(__pyx_v_enumtype, __pyx_t_14); __pyx_t_14 = 0; - /* "netCDF4/_netCDF4.pyx":1376 + /* "netCDF4/_netCDF4.pyx":1378 * # read the Enum type info from the file, * # create a EnumType instance from it. * try: # <<<<<<<<<<<<<< @@ -8998,7 +9046,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - /* "netCDF4/_netCDF4.pyx":1378 + /* "netCDF4/_netCDF4.pyx":1380 * try: * enumtype = _read_enum(group, xtype) * except KeyError: # <<<<<<<<<<<<<< @@ -9008,12 +9056,12 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_9) { __Pyx_AddTraceback("netCDF4._netCDF4._get_types", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_14, &__pyx_t_10, &__pyx_t_5) < 0) __PYX_ERR(0, 1378, __pyx_L43_except_error) + if (__Pyx_GetException(&__pyx_t_14, &__pyx_t_10, &__pyx_t_5) < 0) __PYX_ERR(0, 1380, __pyx_L43_except_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_GOTREF(__pyx_t_10); __Pyx_GOTREF(__pyx_t_5); - /* "netCDF4/_netCDF4.pyx":1379 + /* "netCDF4/_netCDF4.pyx":1381 * enumtype = _read_enum(group, xtype) * except KeyError: * msg='WARNING: unsupported Enum type, skipping...' # <<<<<<<<<<<<<< @@ -9023,16 +9071,16 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) __Pyx_INCREF(__pyx_kp_s_WARNING_unsupported_Enum_type_sk); __Pyx_XDECREF_SET(__pyx_v_msg, __pyx_kp_s_WARNING_unsupported_Enum_type_sk); - /* "netCDF4/_netCDF4.pyx":1380 + /* "netCDF4/_netCDF4.pyx":1382 * except KeyError: * msg='WARNING: unsupported Enum type, skipping...' * warnings.warn(msg) # <<<<<<<<<<<<<< * continue * enumtypes[name] = enumtype */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1380, __pyx_L43_except_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1382, __pyx_L43_except_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_warn); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1380, __pyx_L43_except_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_warn); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1382, __pyx_L43_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -9046,13 +9094,13 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) } } if (!__pyx_t_1) { - __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_msg); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1380, __pyx_L43_except_error) + __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_msg); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1382, __pyx_L43_except_error) __Pyx_GOTREF(__pyx_t_7); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_msg}; - __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1380, __pyx_L43_except_error) + __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1382, __pyx_L43_except_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_7); } else @@ -9060,19 +9108,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_msg}; - __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1380, __pyx_L43_except_error) + __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1382, __pyx_L43_except_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_7); } else #endif { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1380, __pyx_L43_except_error) + __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1382, __pyx_L43_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __pyx_t_1 = NULL; __Pyx_INCREF(__pyx_v_msg); __Pyx_GIVEREF(__pyx_v_msg); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_msg); - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1380, __pyx_L43_except_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1382, __pyx_L43_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -9080,7 +9128,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":1381 + /* "netCDF4/_netCDF4.pyx":1383 * msg='WARNING: unsupported Enum type, skipping...' * warnings.warn(msg) * continue # <<<<<<<<<<<<<< @@ -9097,7 +9145,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) goto __pyx_L43_except_error; __pyx_L43_except_error:; - /* "netCDF4/_netCDF4.pyx":1376 + /* "netCDF4/_netCDF4.pyx":1378 * # read the Enum type info from the file, * # create a EnumType instance from it. * try: # <<<<<<<<<<<<<< @@ -9120,16 +9168,16 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) __pyx_L48_try_end:; } - /* "netCDF4/_netCDF4.pyx":1382 + /* "netCDF4/_netCDF4.pyx":1384 * warnings.warn(msg) * continue * enumtypes[name] = enumtype # <<<<<<<<<<<<<< * free(typeids) * return cmptypes, vltypes, enumtypes */ - if (unlikely(PyObject_SetItem(__pyx_v_enumtypes, __pyx_v_name, __pyx_v_enumtype) < 0)) __PYX_ERR(0, 1382, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v_enumtypes, __pyx_v_name, __pyx_v_enumtype) < 0)) __PYX_ERR(0, 1384, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1372 + /* "netCDF4/_netCDF4.pyx":1374 * continue * vltypes[name] = vltype * elif classp == NC_ENUM: # an enum type # <<<<<<<<<<<<<< @@ -9142,7 +9190,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) __pyx_L13_continue:; } - /* "netCDF4/_netCDF4.pyx":1383 + /* "netCDF4/_netCDF4.pyx":1385 * continue * enumtypes[name] = enumtype * free(typeids) # <<<<<<<<<<<<<< @@ -9151,7 +9199,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) */ free(__pyx_v_typeids); - /* "netCDF4/_netCDF4.pyx":1342 + /* "netCDF4/_netCDF4.pyx":1344 * vltypes = OrderedDict() * enumtypes = OrderedDict() * if ntypes > 0: # <<<<<<<<<<<<<< @@ -9160,7 +9208,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) */ } - /* "netCDF4/_netCDF4.pyx":1384 + /* "netCDF4/_netCDF4.pyx":1386 * enumtypes[name] = enumtype * free(typeids) * return cmptypes, vltypes, enumtypes # <<<<<<<<<<<<<< @@ -9168,7 +9216,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) * cdef _get_dims(group): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1384, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1386, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_cmptypes); __Pyx_GIVEREF(__pyx_v_cmptypes); @@ -9183,7 +9231,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) __pyx_t_5 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":1318 + /* "netCDF4/_netCDF4.pyx":1320 * raise AttributeError((nc_strerror(ierr)).decode('ascii')) * * cdef _get_types(group): # <<<<<<<<<<<<<< @@ -9216,7 +9264,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":1386 +/* "netCDF4/_netCDF4.pyx":1388 * return cmptypes, vltypes, enumtypes * * cdef _get_dims(group): # <<<<<<<<<<<<<< @@ -9247,20 +9295,20 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) { PyObject *__pyx_t_10 = NULL; __Pyx_RefNannySetupContext("_get_dims", 0); - /* "netCDF4/_netCDF4.pyx":1393 + /* "netCDF4/_netCDF4.pyx":1395 * cdef char namstring[NC_MAX_NAME+1] * # get number of dimensions in this Group. * _grpid = group._grpid # <<<<<<<<<<<<<< * with nogil: * ierr = nc_inq_ndims(_grpid, &numdims) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1393, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1395, __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, 1393, __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, 1395, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v__grpid = __pyx_t_2; - /* "netCDF4/_netCDF4.pyx":1394 + /* "netCDF4/_netCDF4.pyx":1396 * # get number of dimensions in this Group. * _grpid = group._grpid * with nogil: # <<<<<<<<<<<<<< @@ -9274,7 +9322,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) { #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":1395 + /* "netCDF4/_netCDF4.pyx":1397 * _grpid = group._grpid * with nogil: * ierr = nc_inq_ndims(_grpid, &numdims) # <<<<<<<<<<<<<< @@ -9284,7 +9332,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) { __pyx_v_ierr = nc_inq_ndims(__pyx_v__grpid, (&__pyx_v_numdims)); } - /* "netCDF4/_netCDF4.pyx":1394 + /* "netCDF4/_netCDF4.pyx":1396 * # get number of dimensions in this Group. * _grpid = group._grpid * with nogil: # <<<<<<<<<<<<<< @@ -9302,7 +9350,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) { } } - /* "netCDF4/_netCDF4.pyx":1396 + /* "netCDF4/_netCDF4.pyx":1398 * with nogil: * ierr = nc_inq_ndims(_grpid, &numdims) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -9312,7 +9360,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) { __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":1397 + /* "netCDF4/_netCDF4.pyx":1399 * ierr = nc_inq_ndims(_grpid, &numdims) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -9320,22 +9368,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) { * dimensions = OrderedDict() */ __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, 1397, __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, 1399, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1397, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1399, __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, 1397, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1399, __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, 1397, __pyx_L1_error) + __PYX_ERR(0, 1399, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1396 + /* "netCDF4/_netCDF4.pyx":1398 * with nogil: * ierr = nc_inq_ndims(_grpid, &numdims) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -9344,14 +9392,14 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) { */ } - /* "netCDF4/_netCDF4.pyx":1399 + /* "netCDF4/_netCDF4.pyx":1401 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * # create empty dictionary for dimensions. * dimensions = OrderedDict() # <<<<<<<<<<<<<< * if numdims > 0: * dimids = malloc(sizeof(int) * numdims) */ - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1399, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { @@ -9364,17 +9412,17 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) { } } if (__pyx_t_6) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1399, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1401, __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, 1399, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1401, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_dimensions = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1400 + /* "netCDF4/_netCDF4.pyx":1402 * # create empty dictionary for dimensions. * dimensions = OrderedDict() * if numdims > 0: # <<<<<<<<<<<<<< @@ -9384,7 +9432,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) { __pyx_t_3 = ((__pyx_v_numdims > 0) != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":1401 + /* "netCDF4/_netCDF4.pyx":1403 * dimensions = OrderedDict() * if numdims > 0: * dimids = malloc(sizeof(int) * numdims) # <<<<<<<<<<<<<< @@ -9393,20 +9441,20 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) { */ __pyx_v_dimids = ((int *)malloc(((sizeof(int)) * __pyx_v_numdims))); - /* "netCDF4/_netCDF4.pyx":1402 + /* "netCDF4/_netCDF4.pyx":1404 * if numdims > 0: * dimids = malloc(sizeof(int) * numdims) * if group.data_model == 'NETCDF4': # <<<<<<<<<<<<<< * with nogil: * ierr = nc_inq_dimids(_grpid, &numdims, dimids, 0) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_data_model); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1402, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_data_model); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1402, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1404, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":1403 + /* "netCDF4/_netCDF4.pyx":1405 * dimids = malloc(sizeof(int) * numdims) * if group.data_model == 'NETCDF4': * with nogil: # <<<<<<<<<<<<<< @@ -9420,7 +9468,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) { #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":1404 + /* "netCDF4/_netCDF4.pyx":1406 * if group.data_model == 'NETCDF4': * with nogil: * ierr = nc_inq_dimids(_grpid, &numdims, dimids, 0) # <<<<<<<<<<<<<< @@ -9430,7 +9478,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) { __pyx_v_ierr = nc_inq_dimids(__pyx_v__grpid, (&__pyx_v_numdims), __pyx_v_dimids, 0); } - /* "netCDF4/_netCDF4.pyx":1403 + /* "netCDF4/_netCDF4.pyx":1405 * dimids = malloc(sizeof(int) * numdims) * if group.data_model == 'NETCDF4': * with nogil: # <<<<<<<<<<<<<< @@ -9448,7 +9496,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) { } } - /* "netCDF4/_netCDF4.pyx":1405 + /* "netCDF4/_netCDF4.pyx":1407 * with nogil: * ierr = nc_inq_dimids(_grpid, &numdims, dimids, 0) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -9458,7 +9506,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) { __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":1406 + /* "netCDF4/_netCDF4.pyx":1408 * ierr = nc_inq_dimids(_grpid, &numdims, dimids, 0) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -9466,22 +9514,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) { * for n from 0 <= n < numdims: */ __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, 1406, __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, 1408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1406, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1408, __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, 1406, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1408, __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, 1406, __pyx_L1_error) + __PYX_ERR(0, 1408, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1405 + /* "netCDF4/_netCDF4.pyx":1407 * with nogil: * ierr = nc_inq_dimids(_grpid, &numdims, dimids, 0) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -9490,7 +9538,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) { */ } - /* "netCDF4/_netCDF4.pyx":1402 + /* "netCDF4/_netCDF4.pyx":1404 * if numdims > 0: * dimids = malloc(sizeof(int) * numdims) * if group.data_model == 'NETCDF4': # <<<<<<<<<<<<<< @@ -9500,7 +9548,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) { goto __pyx_L8; } - /* "netCDF4/_netCDF4.pyx":1408 + /* "netCDF4/_netCDF4.pyx":1410 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * else: * for n from 0 <= n < numdims: # <<<<<<<<<<<<<< @@ -9511,7 +9559,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) { __pyx_t_2 = __pyx_v_numdims; for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_2; __pyx_v_n++) { - /* "netCDF4/_netCDF4.pyx":1409 + /* "netCDF4/_netCDF4.pyx":1411 * else: * for n from 0 <= n < numdims: * dimids[n] = n # <<<<<<<<<<<<<< @@ -9523,7 +9571,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) { } __pyx_L8:; - /* "netCDF4/_netCDF4.pyx":1410 + /* "netCDF4/_netCDF4.pyx":1412 * for n from 0 <= n < numdims: * dimids[n] = n * for n from 0 <= n < numdims: # <<<<<<<<<<<<<< @@ -9533,7 +9581,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) { __pyx_t_2 = __pyx_v_numdims; for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_2; __pyx_v_n++) { - /* "netCDF4/_netCDF4.pyx":1411 + /* "netCDF4/_netCDF4.pyx":1413 * dimids[n] = n * for n from 0 <= n < numdims: * with nogil: # <<<<<<<<<<<<<< @@ -9547,7 +9595,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) { #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":1412 + /* "netCDF4/_netCDF4.pyx":1414 * for n from 0 <= n < numdims: * with nogil: * ierr = nc_inq_dimname(_grpid, dimids[n], namstring) # <<<<<<<<<<<<<< @@ -9557,7 +9605,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) { __pyx_v_ierr = nc_inq_dimname(__pyx_v__grpid, (__pyx_v_dimids[__pyx_v_n]), __pyx_v_namstring); } - /* "netCDF4/_netCDF4.pyx":1411 + /* "netCDF4/_netCDF4.pyx":1413 * dimids[n] = n * for n from 0 <= n < numdims: * with nogil: # <<<<<<<<<<<<<< @@ -9575,7 +9623,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) { } } - /* "netCDF4/_netCDF4.pyx":1413 + /* "netCDF4/_netCDF4.pyx":1415 * with nogil: * ierr = nc_inq_dimname(_grpid, dimids[n], namstring) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -9585,7 +9633,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) { __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":1414 + /* "netCDF4/_netCDF4.pyx":1416 * ierr = nc_inq_dimname(_grpid, dimids[n], namstring) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -9593,22 +9641,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) { * dimensions[name] = Dimension(group, name, id=dimids[n]) */ __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, 1414, __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, 1416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1414, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1416, __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, 1414, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1416, __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, 1414, __pyx_L1_error) + __PYX_ERR(0, 1416, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1413 + /* "netCDF4/_netCDF4.pyx":1415 * with nogil: * ierr = nc_inq_dimname(_grpid, dimids[n], namstring) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -9617,21 +9665,21 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) { */ } - /* "netCDF4/_netCDF4.pyx":1415 + /* "netCDF4/_netCDF4.pyx":1417 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * name = namstring.decode(default_encoding,unicode_error) # <<<<<<<<<<<<<< * dimensions[name] = Dimension(group, name, id=dimids[n]) * free(dimids) */ - __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1415, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1417, __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, 1415, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1417, __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, 1415, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1417, __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, 1415, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; __pyx_t_9 = 0; @@ -9648,7 +9696,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(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_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1415, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1417, __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; @@ -9658,7 +9706,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(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_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1415, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1417, __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; @@ -9666,7 +9714,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) { } else #endif { - __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1415, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; @@ -9677,7 +9725,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) { PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_7); __pyx_t_5 = 0; __pyx_t_7 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1415, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -9685,14 +9733,14 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) { __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1416 + /* "netCDF4/_netCDF4.pyx":1418 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * name = namstring.decode(default_encoding,unicode_error) * dimensions[name] = Dimension(group, name, id=dimids[n]) # <<<<<<<<<<<<<< * free(dimids) * return dimensions */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1416, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_group); __Pyx_GIVEREF(__pyx_v_group); @@ -9700,21 +9748,21 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) { __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_name); - __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1416, __pyx_L1_error) + __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_10 = __Pyx_PyInt_From_int((__pyx_v_dimids[__pyx_v_n])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1416, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_From_int((__pyx_v_dimids[__pyx_v_n])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_id, __pyx_t_10) < 0) __PYX_ERR(0, 1416, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_id, __pyx_t_10) < 0) __PYX_ERR(0, 1418, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7netCDF4_8_netCDF4_Dimension), __pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1416, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7netCDF4_8_netCDF4_Dimension), __pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(PyObject_SetItem(__pyx_v_dimensions, __pyx_v_name, __pyx_t_10) < 0)) __PYX_ERR(0, 1416, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v_dimensions, __pyx_v_name, __pyx_t_10) < 0)) __PYX_ERR(0, 1418, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } - /* "netCDF4/_netCDF4.pyx":1417 + /* "netCDF4/_netCDF4.pyx":1419 * name = namstring.decode(default_encoding,unicode_error) * dimensions[name] = Dimension(group, name, id=dimids[n]) * free(dimids) # <<<<<<<<<<<<<< @@ -9723,7 +9771,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) { */ free(__pyx_v_dimids); - /* "netCDF4/_netCDF4.pyx":1400 + /* "netCDF4/_netCDF4.pyx":1402 * # create empty dictionary for dimensions. * dimensions = OrderedDict() * if numdims > 0: # <<<<<<<<<<<<<< @@ -9732,7 +9780,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) { */ } - /* "netCDF4/_netCDF4.pyx":1418 + /* "netCDF4/_netCDF4.pyx":1420 * dimensions[name] = Dimension(group, name, id=dimids[n]) * free(dimids) * return dimensions # <<<<<<<<<<<<<< @@ -9744,7 +9792,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) { __pyx_r = __pyx_v_dimensions; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":1386 + /* "netCDF4/_netCDF4.pyx":1388 * return cmptypes, vltypes, enumtypes * * cdef _get_dims(group): # <<<<<<<<<<<<<< @@ -9770,7 +9818,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) { return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":1420 +/* "netCDF4/_netCDF4.pyx":1422 * return dimensions * * cdef _get_grps(group): # <<<<<<<<<<<<<< @@ -9801,20 +9849,20 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) { PyObject *__pyx_t_10 = NULL; __Pyx_RefNannySetupContext("_get_grps", 0); - /* "netCDF4/_netCDF4.pyx":1427 + /* "netCDF4/_netCDF4.pyx":1429 * cdef char namstring[NC_MAX_NAME+1] * # get number of groups in this Group. * _grpid = group._grpid # <<<<<<<<<<<<<< * with nogil: * ierr = nc_inq_grps(_grpid, &numgrps, NULL) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1427, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1429, __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, 1427, __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, 1429, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v__grpid = __pyx_t_2; - /* "netCDF4/_netCDF4.pyx":1428 + /* "netCDF4/_netCDF4.pyx":1430 * # get number of groups in this Group. * _grpid = group._grpid * with nogil: # <<<<<<<<<<<<<< @@ -9828,7 +9876,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) { #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":1429 + /* "netCDF4/_netCDF4.pyx":1431 * _grpid = group._grpid * with nogil: * ierr = nc_inq_grps(_grpid, &numgrps, NULL) # <<<<<<<<<<<<<< @@ -9838,7 +9886,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) { __pyx_v_ierr = nc_inq_grps(__pyx_v__grpid, (&__pyx_v_numgrps), NULL); } - /* "netCDF4/_netCDF4.pyx":1428 + /* "netCDF4/_netCDF4.pyx":1430 * # get number of groups in this Group. * _grpid = group._grpid * with nogil: # <<<<<<<<<<<<<< @@ -9856,7 +9904,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) { } } - /* "netCDF4/_netCDF4.pyx":1430 + /* "netCDF4/_netCDF4.pyx":1432 * with nogil: * ierr = nc_inq_grps(_grpid, &numgrps, NULL) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -9866,7 +9914,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) { __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":1431 + /* "netCDF4/_netCDF4.pyx":1433 * ierr = nc_inq_grps(_grpid, &numgrps, NULL) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -9874,22 +9922,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) { * groups = OrderedDict() */ __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, 1431, __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, 1433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1431, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1433, __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, 1431, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1433, __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, 1431, __pyx_L1_error) + __PYX_ERR(0, 1433, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1430 + /* "netCDF4/_netCDF4.pyx":1432 * with nogil: * ierr = nc_inq_grps(_grpid, &numgrps, NULL) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -9898,14 +9946,14 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) { */ } - /* "netCDF4/_netCDF4.pyx":1433 + /* "netCDF4/_netCDF4.pyx":1435 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * # create dictionary containing `netCDF4.Group` instances for groups in this group * groups = OrderedDict() # <<<<<<<<<<<<<< * if numgrps > 0: * grpids = malloc(sizeof(int) * numgrps) */ - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1433, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { @@ -9918,17 +9966,17 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) { } } if (__pyx_t_6) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1433, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1435, __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, 1433, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1435, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_groups = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1434 + /* "netCDF4/_netCDF4.pyx":1436 * # create dictionary containing `netCDF4.Group` instances for groups in this group * groups = OrderedDict() * if numgrps > 0: # <<<<<<<<<<<<<< @@ -9938,7 +9986,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) { __pyx_t_3 = ((__pyx_v_numgrps > 0) != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":1435 + /* "netCDF4/_netCDF4.pyx":1437 * groups = OrderedDict() * if numgrps > 0: * grpids = malloc(sizeof(int) * numgrps) # <<<<<<<<<<<<<< @@ -9947,7 +9995,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) { */ __pyx_v_grpids = ((int *)malloc(((sizeof(int)) * __pyx_v_numgrps))); - /* "netCDF4/_netCDF4.pyx":1436 + /* "netCDF4/_netCDF4.pyx":1438 * if numgrps > 0: * grpids = malloc(sizeof(int) * numgrps) * with nogil: # <<<<<<<<<<<<<< @@ -9961,7 +10009,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) { #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":1437 + /* "netCDF4/_netCDF4.pyx":1439 * grpids = malloc(sizeof(int) * numgrps) * with nogil: * ierr = nc_inq_grps(_grpid, NULL, grpids) # <<<<<<<<<<<<<< @@ -9971,7 +10019,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) { __pyx_v_ierr = nc_inq_grps(__pyx_v__grpid, NULL, __pyx_v_grpids); } - /* "netCDF4/_netCDF4.pyx":1436 + /* "netCDF4/_netCDF4.pyx":1438 * if numgrps > 0: * grpids = malloc(sizeof(int) * numgrps) * with nogil: # <<<<<<<<<<<<<< @@ -9989,7 +10037,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) { } } - /* "netCDF4/_netCDF4.pyx":1438 + /* "netCDF4/_netCDF4.pyx":1440 * with nogil: * ierr = nc_inq_grps(_grpid, NULL, grpids) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -9999,7 +10047,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) { __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":1439 + /* "netCDF4/_netCDF4.pyx":1441 * ierr = nc_inq_grps(_grpid, NULL, grpids) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -10007,22 +10055,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) { * 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, 1439, __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, 1441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1439, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1441, __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, 1439, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1441, __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, 1439, __pyx_L1_error) + __PYX_ERR(0, 1441, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1438 + /* "netCDF4/_netCDF4.pyx":1440 * with nogil: * ierr = nc_inq_grps(_grpid, NULL, grpids) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -10031,7 +10079,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) { */ } - /* "netCDF4/_netCDF4.pyx":1440 + /* "netCDF4/_netCDF4.pyx":1442 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * for n from 0 <= n < numgrps: # <<<<<<<<<<<<<< @@ -10041,7 +10089,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) { __pyx_t_2 = __pyx_v_numgrps; for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_2; __pyx_v_n++) { - /* "netCDF4/_netCDF4.pyx":1441 + /* "netCDF4/_netCDF4.pyx":1443 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * for n from 0 <= n < numgrps: * with nogil: # <<<<<<<<<<<<<< @@ -10055,7 +10103,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) { #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":1442 + /* "netCDF4/_netCDF4.pyx":1444 * for n from 0 <= n < numgrps: * with nogil: * ierr = nc_inq_grpname(grpids[n], namstring) # <<<<<<<<<<<<<< @@ -10065,7 +10113,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) { __pyx_v_ierr = nc_inq_grpname((__pyx_v_grpids[__pyx_v_n]), __pyx_v_namstring); } - /* "netCDF4/_netCDF4.pyx":1441 + /* "netCDF4/_netCDF4.pyx":1443 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * for n from 0 <= n < numgrps: * with nogil: # <<<<<<<<<<<<<< @@ -10083,7 +10131,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) { } } - /* "netCDF4/_netCDF4.pyx":1443 + /* "netCDF4/_netCDF4.pyx":1445 * with nogil: * ierr = nc_inq_grpname(grpids[n], namstring) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -10093,7 +10141,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) { __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":1444 + /* "netCDF4/_netCDF4.pyx":1446 * ierr = nc_inq_grpname(grpids[n], namstring) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -10101,22 +10149,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) { * groups[name] = Group(group, name, id=grpids[n]) */ __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, 1444, __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, 1446, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1444, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1446, __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, 1444, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1446, __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, 1444, __pyx_L1_error) + __PYX_ERR(0, 1446, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1443 + /* "netCDF4/_netCDF4.pyx":1445 * with nogil: * ierr = nc_inq_grpname(grpids[n], namstring) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -10125,21 +10173,21 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) { */ } - /* "netCDF4/_netCDF4.pyx":1445 + /* "netCDF4/_netCDF4.pyx":1447 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * name = namstring.decode(default_encoding,unicode_error) # <<<<<<<<<<<<<< * groups[name] = Group(group, name, id=grpids[n]) * free(grpids) */ - __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1445, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1447, __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, 1445, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1447, __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, 1445, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1447, __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, 1445, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; __pyx_t_9 = 0; @@ -10156,7 +10204,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(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_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1445, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1447, __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; @@ -10166,7 +10214,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(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_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1445, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1447, __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; @@ -10174,7 +10222,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) { } else #endif { - __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1445, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; @@ -10185,7 +10233,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) { PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_7); __pyx_t_5 = 0; __pyx_t_7 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1445, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -10193,14 +10241,14 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) { __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1446 + /* "netCDF4/_netCDF4.pyx":1448 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * name = namstring.decode(default_encoding,unicode_error) * groups[name] = Group(group, name, id=grpids[n]) # <<<<<<<<<<<<<< * free(grpids) * return groups */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1446, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_group); __Pyx_GIVEREF(__pyx_v_group); @@ -10208,21 +10256,21 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) { __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_name); - __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1446, __pyx_L1_error) + __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_10 = __Pyx_PyInt_From_int((__pyx_v_grpids[__pyx_v_n])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1446, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_From_int((__pyx_v_grpids[__pyx_v_n])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_id, __pyx_t_10) < 0) __PYX_ERR(0, 1446, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_id, __pyx_t_10) < 0) __PYX_ERR(0, 1448, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7netCDF4_8_netCDF4_Group), __pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1446, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7netCDF4_8_netCDF4_Group), __pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(PyObject_SetItem(__pyx_v_groups, __pyx_v_name, __pyx_t_10) < 0)) __PYX_ERR(0, 1446, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v_groups, __pyx_v_name, __pyx_t_10) < 0)) __PYX_ERR(0, 1448, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } - /* "netCDF4/_netCDF4.pyx":1447 + /* "netCDF4/_netCDF4.pyx":1449 * name = namstring.decode(default_encoding,unicode_error) * groups[name] = Group(group, name, id=grpids[n]) * free(grpids) # <<<<<<<<<<<<<< @@ -10231,7 +10279,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) { */ free(__pyx_v_grpids); - /* "netCDF4/_netCDF4.pyx":1434 + /* "netCDF4/_netCDF4.pyx":1436 * # create dictionary containing `netCDF4.Group` instances for groups in this group * groups = OrderedDict() * if numgrps > 0: # <<<<<<<<<<<<<< @@ -10240,7 +10288,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) { */ } - /* "netCDF4/_netCDF4.pyx":1448 + /* "netCDF4/_netCDF4.pyx":1450 * groups[name] = Group(group, name, id=grpids[n]) * free(grpids) * return groups # <<<<<<<<<<<<<< @@ -10252,7 +10300,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) { __pyx_r = __pyx_v_groups; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":1420 + /* "netCDF4/_netCDF4.pyx":1422 * return dimensions * * cdef _get_grps(group): # <<<<<<<<<<<<<< @@ -10278,7 +10326,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) { return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":1450 +/* "netCDF4/_netCDF4.pyx":1452 * return groups * * cdef _get_vars(group): # <<<<<<<<<<<<<< @@ -10343,20 +10391,20 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { int __pyx_t_28; __Pyx_RefNannySetupContext("_get_vars", 0); - /* "netCDF4/_netCDF4.pyx":1460 + /* "netCDF4/_netCDF4.pyx":1462 * cdef char namstring_cmp[NC_MAX_NAME+1] * # get number of variables in this Group. * _grpid = group._grpid # <<<<<<<<<<<<<< * with nogil: * ierr = nc_inq_nvars(_grpid, &numvars) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1460, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1462, __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, 1460, __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, 1462, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v__grpid = __pyx_t_2; - /* "netCDF4/_netCDF4.pyx":1461 + /* "netCDF4/_netCDF4.pyx":1463 * # get number of variables in this Group. * _grpid = group._grpid * with nogil: # <<<<<<<<<<<<<< @@ -10370,7 +10418,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":1462 + /* "netCDF4/_netCDF4.pyx":1464 * _grpid = group._grpid * with nogil: * ierr = nc_inq_nvars(_grpid, &numvars) # <<<<<<<<<<<<<< @@ -10380,7 +10428,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __pyx_v_ierr = nc_inq_nvars(__pyx_v__grpid, (&__pyx_v_numvars)); } - /* "netCDF4/_netCDF4.pyx":1461 + /* "netCDF4/_netCDF4.pyx":1463 * # get number of variables in this Group. * _grpid = group._grpid * with nogil: # <<<<<<<<<<<<<< @@ -10398,7 +10446,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { } } - /* "netCDF4/_netCDF4.pyx":1463 + /* "netCDF4/_netCDF4.pyx":1465 * with nogil: * ierr = nc_inq_nvars(_grpid, &numvars) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -10408,7 +10456,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":1464 + /* "netCDF4/_netCDF4.pyx":1466 * ierr = nc_inq_nvars(_grpid, &numvars) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -10416,22 +10464,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { * variables = OrderedDict() */ __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, 1464, __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, 1466, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1464, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1466, __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, 1464, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1466, __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, 1464, __pyx_L1_error) + __PYX_ERR(0, 1466, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1463 + /* "netCDF4/_netCDF4.pyx":1465 * with nogil: * ierr = nc_inq_nvars(_grpid, &numvars) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -10440,14 +10488,14 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { */ } - /* "netCDF4/_netCDF4.pyx":1466 + /* "netCDF4/_netCDF4.pyx":1468 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * # create empty dictionary for variables. * variables = OrderedDict() # <<<<<<<<<<<<<< * if numvars > 0: * # get variable ids. */ - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1466, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1468, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { @@ -10460,17 +10508,17 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { } } if (__pyx_t_6) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1466, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1468, __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, 1466, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1468, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_variables = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1467 + /* "netCDF4/_netCDF4.pyx":1469 * # create empty dictionary for variables. * variables = OrderedDict() * if numvars > 0: # <<<<<<<<<<<<<< @@ -10480,7 +10528,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __pyx_t_3 = ((__pyx_v_numvars > 0) != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":1469 + /* "netCDF4/_netCDF4.pyx":1471 * if numvars > 0: * # get variable ids. * varids = malloc(sizeof(int) * numvars) # <<<<<<<<<<<<<< @@ -10489,20 +10537,20 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { */ __pyx_v_varids = ((int *)malloc(((sizeof(int)) * __pyx_v_numvars))); - /* "netCDF4/_netCDF4.pyx":1470 + /* "netCDF4/_netCDF4.pyx":1472 * # get variable ids. * varids = malloc(sizeof(int) * numvars) * if group.data_model == 'NETCDF4': # <<<<<<<<<<<<<< * with nogil: * ierr = nc_inq_varids(_grpid, &numvars, varids) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_data_model); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1470, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_data_model); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1472, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1470, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1472, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":1471 + /* "netCDF4/_netCDF4.pyx":1473 * varids = malloc(sizeof(int) * numvars) * if group.data_model == 'NETCDF4': * with nogil: # <<<<<<<<<<<<<< @@ -10516,7 +10564,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":1472 + /* "netCDF4/_netCDF4.pyx":1474 * if group.data_model == 'NETCDF4': * with nogil: * ierr = nc_inq_varids(_grpid, &numvars, varids) # <<<<<<<<<<<<<< @@ -10526,7 +10574,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __pyx_v_ierr = nc_inq_varids(__pyx_v__grpid, (&__pyx_v_numvars), __pyx_v_varids); } - /* "netCDF4/_netCDF4.pyx":1471 + /* "netCDF4/_netCDF4.pyx":1473 * varids = malloc(sizeof(int) * numvars) * if group.data_model == 'NETCDF4': * with nogil: # <<<<<<<<<<<<<< @@ -10544,7 +10592,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { } } - /* "netCDF4/_netCDF4.pyx":1473 + /* "netCDF4/_netCDF4.pyx":1475 * with nogil: * ierr = nc_inq_varids(_grpid, &numvars, varids) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -10554,7 +10602,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":1474 + /* "netCDF4/_netCDF4.pyx":1476 * ierr = nc_inq_varids(_grpid, &numvars, varids) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -10562,22 +10610,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { * for n from 0 <= n < numvars: */ __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, 1474, __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, 1476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1474, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1476, __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, 1474, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1476, __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, 1474, __pyx_L1_error) + __PYX_ERR(0, 1476, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1473 + /* "netCDF4/_netCDF4.pyx":1475 * with nogil: * ierr = nc_inq_varids(_grpid, &numvars, varids) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -10586,7 +10634,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { */ } - /* "netCDF4/_netCDF4.pyx":1470 + /* "netCDF4/_netCDF4.pyx":1472 * # get variable ids. * varids = malloc(sizeof(int) * numvars) * if group.data_model == 'NETCDF4': # <<<<<<<<<<<<<< @@ -10596,7 +10644,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { goto __pyx_L8; } - /* "netCDF4/_netCDF4.pyx":1476 + /* "netCDF4/_netCDF4.pyx":1478 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * else: * for n from 0 <= n < numvars: # <<<<<<<<<<<<<< @@ -10607,7 +10655,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __pyx_t_2 = __pyx_v_numvars; for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_2; __pyx_v_n++) { - /* "netCDF4/_netCDF4.pyx":1477 + /* "netCDF4/_netCDF4.pyx":1479 * else: * for n from 0 <= n < numvars: * varids[n] = n # <<<<<<<<<<<<<< @@ -10619,7 +10667,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { } __pyx_L8:; - /* "netCDF4/_netCDF4.pyx":1479 + /* "netCDF4/_netCDF4.pyx":1481 * varids[n] = n * # loop over variables. * for n from 0 <= n < numvars: # <<<<<<<<<<<<<< @@ -10629,7 +10677,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __pyx_t_2 = __pyx_v_numvars; for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_2; __pyx_v_n++) { - /* "netCDF4/_netCDF4.pyx":1480 + /* "netCDF4/_netCDF4.pyx":1482 * # loop over variables. * for n from 0 <= n < numvars: * varid = varids[n] # <<<<<<<<<<<<<< @@ -10638,7 +10686,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { */ __pyx_v_varid = (__pyx_v_varids[__pyx_v_n]); - /* "netCDF4/_netCDF4.pyx":1482 + /* "netCDF4/_netCDF4.pyx":1484 * varid = varids[n] * # get variable name. * with nogil: # <<<<<<<<<<<<<< @@ -10652,7 +10700,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":1483 + /* "netCDF4/_netCDF4.pyx":1485 * # get variable name. * with nogil: * ierr = nc_inq_varname(_grpid, varid, namstring) # <<<<<<<<<<<<<< @@ -10662,7 +10710,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __pyx_v_ierr = nc_inq_varname(__pyx_v__grpid, __pyx_v_varid, __pyx_v_namstring); } - /* "netCDF4/_netCDF4.pyx":1482 + /* "netCDF4/_netCDF4.pyx":1484 * varid = varids[n] * # get variable name. * with nogil: # <<<<<<<<<<<<<< @@ -10680,7 +10728,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { } } - /* "netCDF4/_netCDF4.pyx":1484 + /* "netCDF4/_netCDF4.pyx":1486 * with nogil: * ierr = nc_inq_varname(_grpid, varid, namstring) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -10690,7 +10738,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":1485 + /* "netCDF4/_netCDF4.pyx":1487 * ierr = nc_inq_varname(_grpid, varid, namstring) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -10698,22 +10746,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { * if ierr != NC_NOERR: */ __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, 1485, __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, 1487, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1485, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1487, __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, 1485, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1487, __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, 1485, __pyx_L1_error) + __PYX_ERR(0, 1487, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1484 + /* "netCDF4/_netCDF4.pyx":1486 * with nogil: * ierr = nc_inq_varname(_grpid, varid, namstring) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -10722,21 +10770,21 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { */ } - /* "netCDF4/_netCDF4.pyx":1486 + /* "netCDF4/_netCDF4.pyx":1488 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * name = namstring.decode(default_encoding,unicode_error) # <<<<<<<<<<<<<< * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) */ - __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1486, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1488, __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, 1486, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1488, __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, 1486, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1488, __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, 1486, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; __pyx_t_9 = 0; @@ -10753,7 +10801,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(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_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1486, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1488, __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; @@ -10763,7 +10811,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(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_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1486, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1488, __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; @@ -10771,7 +10819,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { } else #endif { - __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1486, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; @@ -10782,7 +10830,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_7); __pyx_t_5 = 0; __pyx_t_7 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1486, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -10790,7 +10838,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1487 + /* "netCDF4/_netCDF4.pyx":1489 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * name = namstring.decode(default_encoding,unicode_error) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -10800,7 +10848,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":1488 + /* "netCDF4/_netCDF4.pyx":1490 * name = namstring.decode(default_encoding,unicode_error) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -10808,22 +10856,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { * 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, 1488, __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, 1490, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1488, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1490, __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, 1488, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1490, __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, 1488, __pyx_L1_error) + __PYX_ERR(0, 1490, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1487 + /* "netCDF4/_netCDF4.pyx":1489 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * name = namstring.decode(default_encoding,unicode_error) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -10832,7 +10880,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { */ } - /* "netCDF4/_netCDF4.pyx":1490 + /* "netCDF4/_netCDF4.pyx":1492 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * # get variable type. * with nogil: # <<<<<<<<<<<<<< @@ -10846,7 +10894,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":1491 + /* "netCDF4/_netCDF4.pyx":1493 * # get variable type. * with nogil: * ierr = nc_inq_vartype(_grpid, varid, &xtype) # <<<<<<<<<<<<<< @@ -10856,7 +10904,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __pyx_v_ierr = nc_inq_vartype(__pyx_v__grpid, __pyx_v_varid, (&__pyx_v_xtype)); } - /* "netCDF4/_netCDF4.pyx":1490 + /* "netCDF4/_netCDF4.pyx":1492 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * # get variable type. * with nogil: # <<<<<<<<<<<<<< @@ -10874,7 +10922,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { } } - /* "netCDF4/_netCDF4.pyx":1492 + /* "netCDF4/_netCDF4.pyx":1494 * with nogil: * ierr = nc_inq_vartype(_grpid, varid, &xtype) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -10884,7 +10932,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":1493 + /* "netCDF4/_netCDF4.pyx":1495 * ierr = nc_inq_vartype(_grpid, varid, &xtype) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -10892,22 +10940,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { * endianness = None */ __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, 1493, __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, 1495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1493, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1495, __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, 1493, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1495, __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, 1493, __pyx_L1_error) + __PYX_ERR(0, 1495, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1492 + /* "netCDF4/_netCDF4.pyx":1494 * with nogil: * ierr = nc_inq_vartype(_grpid, varid, &xtype) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -10916,7 +10964,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { */ } - /* "netCDF4/_netCDF4.pyx":1495 + /* "netCDF4/_netCDF4.pyx":1497 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * # get endian-ness of variable. * endianness = None # <<<<<<<<<<<<<< @@ -10926,7 +10974,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __Pyx_INCREF(Py_None); __Pyx_XDECREF_SET(__pyx_v_endianness, Py_None); - /* "netCDF4/_netCDF4.pyx":1496 + /* "netCDF4/_netCDF4.pyx":1498 * # get endian-ness of variable. * endianness = None * with nogil: # <<<<<<<<<<<<<< @@ -10940,7 +10988,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":1497 + /* "netCDF4/_netCDF4.pyx":1499 * endianness = None * with nogil: * ierr = nc_inq_var_endian(_grpid, varid, &iendian) # <<<<<<<<<<<<<< @@ -10950,7 +10998,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __pyx_v_ierr = nc_inq_var_endian(__pyx_v__grpid, __pyx_v_varid, (&__pyx_v_iendian)); } - /* "netCDF4/_netCDF4.pyx":1496 + /* "netCDF4/_netCDF4.pyx":1498 * # get endian-ness of variable. * endianness = None * with nogil: # <<<<<<<<<<<<<< @@ -10968,7 +11016,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { } } - /* "netCDF4/_netCDF4.pyx":1498 + /* "netCDF4/_netCDF4.pyx":1500 * with nogil: * ierr = nc_inq_var_endian(_grpid, varid, &iendian) * if ierr == NC_NOERR: # <<<<<<<<<<<<<< @@ -10978,7 +11026,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __pyx_t_3 = ((__pyx_v_ierr == NC_NOERR) != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":1499 + /* "netCDF4/_netCDF4.pyx":1501 * ierr = nc_inq_var_endian(_grpid, varid, &iendian) * if ierr == NC_NOERR: * if iendian == NC_ENDIAN_LITTLE: # <<<<<<<<<<<<<< @@ -10988,7 +11036,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { switch (__pyx_v_iendian) { case NC_ENDIAN_LITTLE: - /* "netCDF4/_netCDF4.pyx":1500 + /* "netCDF4/_netCDF4.pyx":1502 * if ierr == NC_NOERR: * if iendian == NC_ENDIAN_LITTLE: * endianness = '<' # <<<<<<<<<<<<<< @@ -10998,7 +11046,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __Pyx_INCREF(__pyx_kp_s__13); __Pyx_DECREF_SET(__pyx_v_endianness, __pyx_kp_s__13); - /* "netCDF4/_netCDF4.pyx":1499 + /* "netCDF4/_netCDF4.pyx":1501 * ierr = nc_inq_var_endian(_grpid, varid, &iendian) * if ierr == NC_NOERR: * if iendian == NC_ENDIAN_LITTLE: # <<<<<<<<<<<<<< @@ -11007,7 +11055,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { */ break; - /* "netCDF4/_netCDF4.pyx":1501 + /* "netCDF4/_netCDF4.pyx":1503 * if iendian == NC_ENDIAN_LITTLE: * endianness = '<' * elif iendian == NC_ENDIAN_BIG: # <<<<<<<<<<<<<< @@ -11016,7 +11064,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { */ case NC_ENDIAN_BIG: - /* "netCDF4/_netCDF4.pyx":1502 + /* "netCDF4/_netCDF4.pyx":1504 * endianness = '<' * elif iendian == NC_ENDIAN_BIG: * endianness = '>' # <<<<<<<<<<<<<< @@ -11026,7 +11074,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __Pyx_INCREF(__pyx_kp_s__14); __Pyx_DECREF_SET(__pyx_v_endianness, __pyx_kp_s__14); - /* "netCDF4/_netCDF4.pyx":1501 + /* "netCDF4/_netCDF4.pyx":1503 * if iendian == NC_ENDIAN_LITTLE: * endianness = '<' * elif iendian == NC_ENDIAN_BIG: # <<<<<<<<<<<<<< @@ -11037,7 +11085,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { default: break; } - /* "netCDF4/_netCDF4.pyx":1498 + /* "netCDF4/_netCDF4.pyx":1500 * with nogil: * ierr = nc_inq_var_endian(_grpid, varid, &iendian) * if ierr == NC_NOERR: # <<<<<<<<<<<<<< @@ -11046,7 +11094,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { */ } - /* "netCDF4/_netCDF4.pyx":1504 + /* "netCDF4/_netCDF4.pyx":1506 * endianness = '>' * # check to see if it is a supported user-defined type. * try: # <<<<<<<<<<<<<< @@ -11062,22 +11110,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __Pyx_XGOTREF(__pyx_t_13); /*try:*/ { - /* "netCDF4/_netCDF4.pyx":1505 + /* "netCDF4/_netCDF4.pyx":1507 * # check to see if it is a supported user-defined type. * try: * datatype = _nctonptype[xtype] # <<<<<<<<<<<<<< * if endianness is not None: * datatype = endianness + datatype */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1505, __pyx_L36_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1507, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_xtype, nc_type, 1, __Pyx_PyInt_From_nc_type, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1505, __pyx_L36_error) + __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_xtype, nc_type, 1, __Pyx_PyInt_From_nc_type, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1507, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_datatype, __pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":1506 + /* "netCDF4/_netCDF4.pyx":1508 * try: * datatype = _nctonptype[xtype] * if endianness is not None: # <<<<<<<<<<<<<< @@ -11088,19 +11136,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __pyx_t_14 = (__pyx_t_3 != 0); if (__pyx_t_14) { - /* "netCDF4/_netCDF4.pyx":1507 + /* "netCDF4/_netCDF4.pyx":1509 * datatype = _nctonptype[xtype] * if endianness is not None: * datatype = endianness + datatype # <<<<<<<<<<<<<< * except KeyError: * if xtype == NC_STRING: */ - __pyx_t_6 = PyNumber_Add(__pyx_v_endianness, __pyx_v_datatype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1507, __pyx_L36_error) + __pyx_t_6 = PyNumber_Add(__pyx_v_endianness, __pyx_v_datatype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1509, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_datatype, __pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":1506 + /* "netCDF4/_netCDF4.pyx":1508 * try: * datatype = _nctonptype[xtype] * if endianness is not None: # <<<<<<<<<<<<<< @@ -11109,7 +11157,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { */ } - /* "netCDF4/_netCDF4.pyx":1504 + /* "netCDF4/_netCDF4.pyx":1506 * endianness = '>' * # check to see if it is a supported user-defined type. * try: # <<<<<<<<<<<<<< @@ -11130,7 +11178,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":1508 + /* "netCDF4/_netCDF4.pyx":1510 * if endianness is not None: * datatype = endianness + datatype * except KeyError: # <<<<<<<<<<<<<< @@ -11140,12 +11188,12 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_9) { __Pyx_AddTraceback("netCDF4._netCDF4._get_vars", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_10) < 0) __PYX_ERR(0, 1508, __pyx_L38_except_error) + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_10) < 0) __PYX_ERR(0, 1510, __pyx_L38_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_10); - /* "netCDF4/_netCDF4.pyx":1509 + /* "netCDF4/_netCDF4.pyx":1511 * datatype = endianness + datatype * except KeyError: * if xtype == NC_STRING: # <<<<<<<<<<<<<< @@ -11155,7 +11203,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __pyx_t_14 = ((__pyx_v_xtype == NC_STRING) != 0); if (__pyx_t_14) { - /* "netCDF4/_netCDF4.pyx":1510 + /* "netCDF4/_netCDF4.pyx":1512 * except KeyError: * if xtype == NC_STRING: * datatype = str # <<<<<<<<<<<<<< @@ -11165,7 +11213,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __Pyx_INCREF(((PyObject *)(&PyString_Type))); __Pyx_XDECREF_SET(__pyx_v_datatype, ((PyObject *)(&PyString_Type))); - /* "netCDF4/_netCDF4.pyx":1509 + /* "netCDF4/_netCDF4.pyx":1511 * datatype = endianness + datatype * except KeyError: * if xtype == NC_STRING: # <<<<<<<<<<<<<< @@ -11175,7 +11223,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { goto __pyx_L47; } - /* "netCDF4/_netCDF4.pyx":1512 + /* "netCDF4/_netCDF4.pyx":1514 * datatype = str * else: * with nogil: # <<<<<<<<<<<<<< @@ -11190,7 +11238,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":1513 + /* "netCDF4/_netCDF4.pyx":1515 * else: * with nogil: * ierr = nc_inq_user_type(_grpid, xtype, namstring_cmp, # <<<<<<<<<<<<<< @@ -11200,7 +11248,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __pyx_v_ierr = nc_inq_user_type(__pyx_v__grpid, __pyx_v_xtype, __pyx_v_namstring_cmp, NULL, NULL, NULL, (&__pyx_v_classp)); } - /* "netCDF4/_netCDF4.pyx":1512 + /* "netCDF4/_netCDF4.pyx":1514 * datatype = str * else: * with nogil: # <<<<<<<<<<<<<< @@ -11218,7 +11266,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { } } - /* "netCDF4/_netCDF4.pyx":1515 + /* "netCDF4/_netCDF4.pyx":1517 * ierr = nc_inq_user_type(_grpid, xtype, namstring_cmp, * NULL, NULL, NULL, &classp) * if classp == NC_COMPOUND: # a compound type # <<<<<<<<<<<<<< @@ -11228,7 +11276,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { switch (__pyx_v_classp) { case NC_COMPOUND: - /* "netCDF4/_netCDF4.pyx":1517 + /* "netCDF4/_netCDF4.pyx":1519 * if classp == NC_COMPOUND: # a compound type * # create CompoundType instance describing this compound type. * try: # <<<<<<<<<<<<<< @@ -11244,7 +11292,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __Pyx_XGOTREF(__pyx_t_17); /*try:*/ { - /* "netCDF4/_netCDF4.pyx":1518 + /* "netCDF4/_netCDF4.pyx":1520 * # create CompoundType instance describing this compound type. * try: * datatype = _read_compound(group, xtype, endian=endianness) # <<<<<<<<<<<<<< @@ -11253,12 +11301,12 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { */ __pyx_t_18.__pyx_n = 1; __pyx_t_18.endian = __pyx_v_endianness; - __pyx_t_7 = __pyx_f_7netCDF4_8_netCDF4__read_compound(__pyx_v_group, __pyx_v_xtype, &__pyx_t_18); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1518, __pyx_L53_error) + __pyx_t_7 = __pyx_f_7netCDF4_8_netCDF4__read_compound(__pyx_v_group, __pyx_v_xtype, &__pyx_t_18); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1520, __pyx_L53_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_XDECREF_SET(__pyx_v_datatype, __pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":1517 + /* "netCDF4/_netCDF4.pyx":1519 * if classp == NC_COMPOUND: # a compound type * # create CompoundType instance describing this compound type. * try: # <<<<<<<<<<<<<< @@ -11276,7 +11324,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":1519 + /* "netCDF4/_netCDF4.pyx":1521 * try: * datatype = _read_compound(group, xtype, endian=endianness) * except KeyError: # <<<<<<<<<<<<<< @@ -11286,33 +11334,33 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_9) { __Pyx_AddTraceback("netCDF4._netCDF4._get_vars", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_5, &__pyx_t_8) < 0) __PYX_ERR(0, 1519, __pyx_L55_except_error) + if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_5, &__pyx_t_8) < 0) __PYX_ERR(0, 1521, __pyx_L55_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_8); - /* "netCDF4/_netCDF4.pyx":1520 + /* "netCDF4/_netCDF4.pyx":1522 * datatype = _read_compound(group, xtype, endian=endianness) * except KeyError: * msg="WARNING: variable '%s' has unsupported compound datatype, skipping .." % name # <<<<<<<<<<<<<< * warnings.warn(msg) * continue */ - __pyx_t_19 = __Pyx_PyString_Format(__pyx_kp_s_WARNING_variable_s_has_unsupport, __pyx_v_name); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1520, __pyx_L55_except_error) + __pyx_t_19 = __Pyx_PyString_Format(__pyx_kp_s_WARNING_variable_s_has_unsupport, __pyx_v_name); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1522, __pyx_L55_except_error) __Pyx_GOTREF(__pyx_t_19); __Pyx_XDECREF_SET(__pyx_v_msg, ((PyObject*)__pyx_t_19)); __pyx_t_19 = 0; - /* "netCDF4/_netCDF4.pyx":1521 + /* "netCDF4/_netCDF4.pyx":1523 * except KeyError: * msg="WARNING: variable '%s' has unsupported compound datatype, skipping .." % name * warnings.warn(msg) # <<<<<<<<<<<<<< * continue * elif classp == NC_VLEN: # a compound type */ - __pyx_t_20 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1521, __pyx_L55_except_error) + __pyx_t_20 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1523, __pyx_L55_except_error) __Pyx_GOTREF(__pyx_t_20); - __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_warn); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1521, __pyx_L55_except_error) + __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_warn); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1523, __pyx_L55_except_error) __Pyx_GOTREF(__pyx_t_21); __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __pyx_t_20 = NULL; @@ -11326,13 +11374,13 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { } } if (!__pyx_t_20) { - __pyx_t_19 = __Pyx_PyObject_CallOneArg(__pyx_t_21, __pyx_v_msg); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1521, __pyx_L55_except_error) + __pyx_t_19 = __Pyx_PyObject_CallOneArg(__pyx_t_21, __pyx_v_msg); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1523, __pyx_L55_except_error) __Pyx_GOTREF(__pyx_t_19); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_21)) { PyObject *__pyx_temp[2] = {__pyx_t_20, __pyx_v_msg}; - __pyx_t_19 = __Pyx_PyFunction_FastCall(__pyx_t_21, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1521, __pyx_L55_except_error) + __pyx_t_19 = __Pyx_PyFunction_FastCall(__pyx_t_21, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1523, __pyx_L55_except_error) __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_GOTREF(__pyx_t_19); } else @@ -11340,19 +11388,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_21)) { PyObject *__pyx_temp[2] = {__pyx_t_20, __pyx_v_msg}; - __pyx_t_19 = __Pyx_PyCFunction_FastCall(__pyx_t_21, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1521, __pyx_L55_except_error) + __pyx_t_19 = __Pyx_PyCFunction_FastCall(__pyx_t_21, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1523, __pyx_L55_except_error) __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_GOTREF(__pyx_t_19); } else #endif { - __pyx_t_22 = PyTuple_New(1+1); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1521, __pyx_L55_except_error) + __pyx_t_22 = PyTuple_New(1+1); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1523, __pyx_L55_except_error) __Pyx_GOTREF(__pyx_t_22); __Pyx_GIVEREF(__pyx_t_20); PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_t_20); __pyx_t_20 = NULL; __Pyx_INCREF(__pyx_v_msg); __Pyx_GIVEREF(__pyx_v_msg); PyTuple_SET_ITEM(__pyx_t_22, 0+1, __pyx_v_msg); - __pyx_t_19 = __Pyx_PyObject_Call(__pyx_t_21, __pyx_t_22, NULL); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1521, __pyx_L55_except_error) + __pyx_t_19 = __Pyx_PyObject_Call(__pyx_t_21, __pyx_t_22, NULL); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1523, __pyx_L55_except_error) __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; } @@ -11360,7 +11408,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; - /* "netCDF4/_netCDF4.pyx":1522 + /* "netCDF4/_netCDF4.pyx":1524 * msg="WARNING: variable '%s' has unsupported compound datatype, skipping .." % name * warnings.warn(msg) * continue # <<<<<<<<<<<<<< @@ -11377,7 +11425,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { goto __pyx_L55_except_error; __pyx_L55_except_error:; - /* "netCDF4/_netCDF4.pyx":1517 + /* "netCDF4/_netCDF4.pyx":1519 * if classp == NC_COMPOUND: # a compound type * # create CompoundType instance describing this compound type. * try: # <<<<<<<<<<<<<< @@ -11400,7 +11448,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __pyx_L60_try_end:; } - /* "netCDF4/_netCDF4.pyx":1515 + /* "netCDF4/_netCDF4.pyx":1517 * ierr = nc_inq_user_type(_grpid, xtype, namstring_cmp, * NULL, NULL, NULL, &classp) * if classp == NC_COMPOUND: # a compound type # <<<<<<<<<<<<<< @@ -11409,7 +11457,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { */ break; - /* "netCDF4/_netCDF4.pyx":1523 + /* "netCDF4/_netCDF4.pyx":1525 * warnings.warn(msg) * continue * elif classp == NC_VLEN: # a compound type # <<<<<<<<<<<<<< @@ -11418,7 +11466,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { */ case NC_VLEN: - /* "netCDF4/_netCDF4.pyx":1525 + /* "netCDF4/_netCDF4.pyx":1527 * elif classp == NC_VLEN: # a compound type * # create VLType instance describing this compound type. * try: # <<<<<<<<<<<<<< @@ -11434,7 +11482,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __Pyx_XGOTREF(__pyx_t_15); /*try:*/ { - /* "netCDF4/_netCDF4.pyx":1526 + /* "netCDF4/_netCDF4.pyx":1528 * # create VLType instance describing this compound type. * try: * datatype = _read_vlen(group, xtype, endian=endianness) # <<<<<<<<<<<<<< @@ -11443,12 +11491,12 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { */ __pyx_t_23.__pyx_n = 1; __pyx_t_23.endian = __pyx_v_endianness; - __pyx_t_8 = __pyx_f_7netCDF4_8_netCDF4__read_vlen(__pyx_v_group, __pyx_v_xtype, &__pyx_t_23); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1526, __pyx_L63_error) + __pyx_t_8 = __pyx_f_7netCDF4_8_netCDF4__read_vlen(__pyx_v_group, __pyx_v_xtype, &__pyx_t_23); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1528, __pyx_L63_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_XDECREF_SET(__pyx_v_datatype, __pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":1525 + /* "netCDF4/_netCDF4.pyx":1527 * elif classp == NC_VLEN: # a compound type * # create VLType instance describing this compound type. * try: # <<<<<<<<<<<<<< @@ -11470,7 +11518,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":1527 + /* "netCDF4/_netCDF4.pyx":1529 * try: * datatype = _read_vlen(group, xtype, endian=endianness) * except KeyError: # <<<<<<<<<<<<<< @@ -11480,33 +11528,33 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_9) { __Pyx_AddTraceback("netCDF4._netCDF4._get_vars", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_5, &__pyx_t_7) < 0) __PYX_ERR(0, 1527, __pyx_L65_except_error) + if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_5, &__pyx_t_7) < 0) __PYX_ERR(0, 1529, __pyx_L65_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_7); - /* "netCDF4/_netCDF4.pyx":1528 + /* "netCDF4/_netCDF4.pyx":1530 * datatype = _read_vlen(group, xtype, endian=endianness) * except KeyError: * msg="WARNING: variable '%s' has unsupported VLEN datatype, skipping .." % name # <<<<<<<<<<<<<< * warnings.warn(msg) * continue */ - __pyx_t_19 = __Pyx_PyString_Format(__pyx_kp_s_WARNING_variable_s_has_unsupport_2, __pyx_v_name); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1528, __pyx_L65_except_error) + __pyx_t_19 = __Pyx_PyString_Format(__pyx_kp_s_WARNING_variable_s_has_unsupport_2, __pyx_v_name); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1530, __pyx_L65_except_error) __Pyx_GOTREF(__pyx_t_19); __Pyx_XDECREF_SET(__pyx_v_msg, ((PyObject*)__pyx_t_19)); __pyx_t_19 = 0; - /* "netCDF4/_netCDF4.pyx":1529 + /* "netCDF4/_netCDF4.pyx":1531 * except KeyError: * msg="WARNING: variable '%s' has unsupported VLEN datatype, skipping .." % name * warnings.warn(msg) # <<<<<<<<<<<<<< * continue * elif classp == NC_ENUM: */ - __pyx_t_21 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1529, __pyx_L65_except_error) + __pyx_t_21 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1531, __pyx_L65_except_error) __Pyx_GOTREF(__pyx_t_21); - __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_n_s_warn); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1529, __pyx_L65_except_error) + __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_n_s_warn); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1531, __pyx_L65_except_error) __Pyx_GOTREF(__pyx_t_22); __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; __pyx_t_21 = NULL; @@ -11520,13 +11568,13 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { } } if (!__pyx_t_21) { - __pyx_t_19 = __Pyx_PyObject_CallOneArg(__pyx_t_22, __pyx_v_msg); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1529, __pyx_L65_except_error) + __pyx_t_19 = __Pyx_PyObject_CallOneArg(__pyx_t_22, __pyx_v_msg); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1531, __pyx_L65_except_error) __Pyx_GOTREF(__pyx_t_19); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_22)) { PyObject *__pyx_temp[2] = {__pyx_t_21, __pyx_v_msg}; - __pyx_t_19 = __Pyx_PyFunction_FastCall(__pyx_t_22, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1529, __pyx_L65_except_error) + __pyx_t_19 = __Pyx_PyFunction_FastCall(__pyx_t_22, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1531, __pyx_L65_except_error) __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; __Pyx_GOTREF(__pyx_t_19); } else @@ -11534,19 +11582,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_22)) { PyObject *__pyx_temp[2] = {__pyx_t_21, __pyx_v_msg}; - __pyx_t_19 = __Pyx_PyCFunction_FastCall(__pyx_t_22, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1529, __pyx_L65_except_error) + __pyx_t_19 = __Pyx_PyCFunction_FastCall(__pyx_t_22, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1531, __pyx_L65_except_error) __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; __Pyx_GOTREF(__pyx_t_19); } else #endif { - __pyx_t_20 = PyTuple_New(1+1); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1529, __pyx_L65_except_error) + __pyx_t_20 = PyTuple_New(1+1); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1531, __pyx_L65_except_error) __Pyx_GOTREF(__pyx_t_20); __Pyx_GIVEREF(__pyx_t_21); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_21); __pyx_t_21 = NULL; __Pyx_INCREF(__pyx_v_msg); __Pyx_GIVEREF(__pyx_v_msg); PyTuple_SET_ITEM(__pyx_t_20, 0+1, __pyx_v_msg); - __pyx_t_19 = __Pyx_PyObject_Call(__pyx_t_22, __pyx_t_20, NULL); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1529, __pyx_L65_except_error) + __pyx_t_19 = __Pyx_PyObject_Call(__pyx_t_22, __pyx_t_20, NULL); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1531, __pyx_L65_except_error) __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; } @@ -11554,7 +11602,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; - /* "netCDF4/_netCDF4.pyx":1530 + /* "netCDF4/_netCDF4.pyx":1532 * msg="WARNING: variable '%s' has unsupported VLEN datatype, skipping .." % name * warnings.warn(msg) * continue # <<<<<<<<<<<<<< @@ -11571,7 +11619,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { goto __pyx_L65_except_error; __pyx_L65_except_error:; - /* "netCDF4/_netCDF4.pyx":1525 + /* "netCDF4/_netCDF4.pyx":1527 * elif classp == NC_VLEN: # a compound type * # create VLType instance describing this compound type. * try: # <<<<<<<<<<<<<< @@ -11594,7 +11642,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __pyx_L70_try_end:; } - /* "netCDF4/_netCDF4.pyx":1523 + /* "netCDF4/_netCDF4.pyx":1525 * warnings.warn(msg) * continue * elif classp == NC_VLEN: # a compound type # <<<<<<<<<<<<<< @@ -11603,7 +11651,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { */ break; - /* "netCDF4/_netCDF4.pyx":1531 + /* "netCDF4/_netCDF4.pyx":1533 * warnings.warn(msg) * continue * elif classp == NC_ENUM: # <<<<<<<<<<<<<< @@ -11612,7 +11660,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { */ case NC_ENUM: - /* "netCDF4/_netCDF4.pyx":1533 + /* "netCDF4/_netCDF4.pyx":1535 * elif classp == NC_ENUM: * # create EnumType instance describing this compound type. * try: # <<<<<<<<<<<<<< @@ -11628,7 +11676,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __Pyx_XGOTREF(__pyx_t_17); /*try:*/ { - /* "netCDF4/_netCDF4.pyx":1534 + /* "netCDF4/_netCDF4.pyx":1536 * # create EnumType instance describing this compound type. * try: * datatype = _read_enum(group, xtype, endian=endianness) # <<<<<<<<<<<<<< @@ -11637,12 +11685,12 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { */ __pyx_t_24.__pyx_n = 1; __pyx_t_24.endian = __pyx_v_endianness; - __pyx_t_7 = __pyx_f_7netCDF4_8_netCDF4__read_enum(__pyx_v_group, __pyx_v_xtype, &__pyx_t_24); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1534, __pyx_L73_error) + __pyx_t_7 = __pyx_f_7netCDF4_8_netCDF4__read_enum(__pyx_v_group, __pyx_v_xtype, &__pyx_t_24); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1536, __pyx_L73_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_XDECREF_SET(__pyx_v_datatype, __pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":1533 + /* "netCDF4/_netCDF4.pyx":1535 * elif classp == NC_ENUM: * # create EnumType instance describing this compound type. * try: # <<<<<<<<<<<<<< @@ -11664,7 +11712,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":1535 + /* "netCDF4/_netCDF4.pyx":1537 * try: * datatype = _read_enum(group, xtype, endian=endianness) * except KeyError: # <<<<<<<<<<<<<< @@ -11674,33 +11722,33 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_9) { __Pyx_AddTraceback("netCDF4._netCDF4._get_vars", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_5, &__pyx_t_8) < 0) __PYX_ERR(0, 1535, __pyx_L75_except_error) + if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_5, &__pyx_t_8) < 0) __PYX_ERR(0, 1537, __pyx_L75_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_8); - /* "netCDF4/_netCDF4.pyx":1536 + /* "netCDF4/_netCDF4.pyx":1538 * datatype = _read_enum(group, xtype, endian=endianness) * except KeyError: * msg="WARNING: variable '%s' has unsupported Enum datatype, skipping .." % name # <<<<<<<<<<<<<< * warnings.warn(msg) * continue */ - __pyx_t_19 = __Pyx_PyString_Format(__pyx_kp_s_WARNING_variable_s_has_unsupport_3, __pyx_v_name); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1536, __pyx_L75_except_error) + __pyx_t_19 = __Pyx_PyString_Format(__pyx_kp_s_WARNING_variable_s_has_unsupport_3, __pyx_v_name); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1538, __pyx_L75_except_error) __Pyx_GOTREF(__pyx_t_19); __Pyx_XDECREF_SET(__pyx_v_msg, ((PyObject*)__pyx_t_19)); __pyx_t_19 = 0; - /* "netCDF4/_netCDF4.pyx":1537 + /* "netCDF4/_netCDF4.pyx":1539 * except KeyError: * msg="WARNING: variable '%s' has unsupported Enum datatype, skipping .." % name * warnings.warn(msg) # <<<<<<<<<<<<<< * continue * else: */ - __pyx_t_22 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1537, __pyx_L75_except_error) + __pyx_t_22 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1539, __pyx_L75_except_error) __Pyx_GOTREF(__pyx_t_22); - __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_22, __pyx_n_s_warn); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1537, __pyx_L75_except_error) + __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_22, __pyx_n_s_warn); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1539, __pyx_L75_except_error) __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __pyx_t_22 = NULL; @@ -11714,13 +11762,13 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { } } if (!__pyx_t_22) { - __pyx_t_19 = __Pyx_PyObject_CallOneArg(__pyx_t_20, __pyx_v_msg); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1537, __pyx_L75_except_error) + __pyx_t_19 = __Pyx_PyObject_CallOneArg(__pyx_t_20, __pyx_v_msg); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1539, __pyx_L75_except_error) __Pyx_GOTREF(__pyx_t_19); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_20)) { PyObject *__pyx_temp[2] = {__pyx_t_22, __pyx_v_msg}; - __pyx_t_19 = __Pyx_PyFunction_FastCall(__pyx_t_20, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1537, __pyx_L75_except_error) + __pyx_t_19 = __Pyx_PyFunction_FastCall(__pyx_t_20, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1539, __pyx_L75_except_error) __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0; __Pyx_GOTREF(__pyx_t_19); } else @@ -11728,19 +11776,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_20)) { PyObject *__pyx_temp[2] = {__pyx_t_22, __pyx_v_msg}; - __pyx_t_19 = __Pyx_PyCFunction_FastCall(__pyx_t_20, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1537, __pyx_L75_except_error) + __pyx_t_19 = __Pyx_PyCFunction_FastCall(__pyx_t_20, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1539, __pyx_L75_except_error) __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0; __Pyx_GOTREF(__pyx_t_19); } else #endif { - __pyx_t_21 = PyTuple_New(1+1); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1537, __pyx_L75_except_error) + __pyx_t_21 = PyTuple_New(1+1); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1539, __pyx_L75_except_error) __Pyx_GOTREF(__pyx_t_21); __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_22); __pyx_t_22 = NULL; __Pyx_INCREF(__pyx_v_msg); __Pyx_GIVEREF(__pyx_v_msg); PyTuple_SET_ITEM(__pyx_t_21, 0+1, __pyx_v_msg); - __pyx_t_19 = __Pyx_PyObject_Call(__pyx_t_20, __pyx_t_21, NULL); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1537, __pyx_L75_except_error) + __pyx_t_19 = __Pyx_PyObject_Call(__pyx_t_20, __pyx_t_21, NULL); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1539, __pyx_L75_except_error) __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; } @@ -11748,7 +11796,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; - /* "netCDF4/_netCDF4.pyx":1538 + /* "netCDF4/_netCDF4.pyx":1540 * msg="WARNING: variable '%s' has unsupported Enum datatype, skipping .." % name * warnings.warn(msg) * continue # <<<<<<<<<<<<<< @@ -11765,7 +11813,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { goto __pyx_L75_except_error; __pyx_L75_except_error:; - /* "netCDF4/_netCDF4.pyx":1533 + /* "netCDF4/_netCDF4.pyx":1535 * elif classp == NC_ENUM: * # create EnumType instance describing this compound type. * try: # <<<<<<<<<<<<<< @@ -11788,7 +11836,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __pyx_L80_try_end:; } - /* "netCDF4/_netCDF4.pyx":1531 + /* "netCDF4/_netCDF4.pyx":1533 * warnings.warn(msg) * continue * elif classp == NC_ENUM: # <<<<<<<<<<<<<< @@ -11798,28 +11846,28 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { break; default: - /* "netCDF4/_netCDF4.pyx":1540 + /* "netCDF4/_netCDF4.pyx":1542 * continue * else: * msg="WARNING: variable '%s' has unsupported datatype, skipping .." % name # <<<<<<<<<<<<<< * warnings.warn(msg) * continue */ - __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_WARNING_variable_s_has_unsupport_4, __pyx_v_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1540, __pyx_L38_except_error) + __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_WARNING_variable_s_has_unsupport_4, __pyx_v_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1542, __pyx_L38_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_XDECREF_SET(__pyx_v_msg, ((PyObject*)__pyx_t_8)); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":1541 + /* "netCDF4/_netCDF4.pyx":1543 * else: * msg="WARNING: variable '%s' has unsupported datatype, skipping .." % name * warnings.warn(msg) # <<<<<<<<<<<<<< * continue * # get number of dimensions. */ - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1541, __pyx_L38_except_error) + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1543, __pyx_L38_except_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_warn); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1541, __pyx_L38_except_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_warn); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1543, __pyx_L38_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -11833,13 +11881,13 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { } } if (!__pyx_t_5) { - __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_msg); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1541, __pyx_L38_except_error) + __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_msg); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1543, __pyx_L38_except_error) __Pyx_GOTREF(__pyx_t_8); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_msg}; - __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1541, __pyx_L38_except_error) + __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1543, __pyx_L38_except_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_8); } else @@ -11847,19 +11895,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_msg}; - __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1541, __pyx_L38_except_error) + __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1543, __pyx_L38_except_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_8); } else #endif { - __pyx_t_19 = PyTuple_New(1+1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1541, __pyx_L38_except_error) + __pyx_t_19 = PyTuple_New(1+1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1543, __pyx_L38_except_error) __Pyx_GOTREF(__pyx_t_19); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_INCREF(__pyx_v_msg); __Pyx_GIVEREF(__pyx_v_msg); PyTuple_SET_ITEM(__pyx_t_19, 0+1, __pyx_v_msg); - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_19, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1541, __pyx_L38_except_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_19, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1543, __pyx_L38_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; } @@ -11867,7 +11915,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":1542 + /* "netCDF4/_netCDF4.pyx":1544 * msg="WARNING: variable '%s' has unsupported datatype, skipping .." % name * warnings.warn(msg) * continue # <<<<<<<<<<<<<< @@ -11892,7 +11940,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { goto __pyx_L38_except_error; __pyx_L38_except_error:; - /* "netCDF4/_netCDF4.pyx":1504 + /* "netCDF4/_netCDF4.pyx":1506 * endianness = '>' * # check to see if it is a supported user-defined type. * try: # <<<<<<<<<<<<<< @@ -11921,7 +11969,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __pyx_L43_try_end:; } - /* "netCDF4/_netCDF4.pyx":1544 + /* "netCDF4/_netCDF4.pyx":1546 * continue * # get number of dimensions. * with nogil: # <<<<<<<<<<<<<< @@ -11935,7 +11983,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":1545 + /* "netCDF4/_netCDF4.pyx":1547 * # get number of dimensions. * with nogil: * ierr = nc_inq_varndims(_grpid, varid, &numdims) # <<<<<<<<<<<<<< @@ -11945,7 +11993,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __pyx_v_ierr = nc_inq_varndims(__pyx_v__grpid, __pyx_v_varid, (&__pyx_v_numdims)); } - /* "netCDF4/_netCDF4.pyx":1544 + /* "netCDF4/_netCDF4.pyx":1546 * continue * # get number of dimensions. * with nogil: # <<<<<<<<<<<<<< @@ -11963,7 +12011,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { } } - /* "netCDF4/_netCDF4.pyx":1546 + /* "netCDF4/_netCDF4.pyx":1548 * with nogil: * ierr = nc_inq_varndims(_grpid, varid, &numdims) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -11973,7 +12021,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __pyx_t_14 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_14) { - /* "netCDF4/_netCDF4.pyx":1547 + /* "netCDF4/_netCDF4.pyx":1549 * ierr = nc_inq_varndims(_grpid, varid, &numdims) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -11981,22 +12029,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { * # get dimension ids. */ __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_10 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1547, __pyx_L1_error) + __pyx_t_10 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1547, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1547, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_10, 0, 0, 0); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __PYX_ERR(0, 1547, __pyx_L1_error) + __PYX_ERR(0, 1549, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1546 + /* "netCDF4/_netCDF4.pyx":1548 * with nogil: * ierr = nc_inq_varndims(_grpid, varid, &numdims) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -12005,7 +12053,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { */ } - /* "netCDF4/_netCDF4.pyx":1548 + /* "netCDF4/_netCDF4.pyx":1550 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * dimids = malloc(sizeof(int) * numdims) # <<<<<<<<<<<<<< @@ -12014,7 +12062,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { */ __pyx_v_dimids = ((int *)malloc(((sizeof(int)) * __pyx_v_numdims))); - /* "netCDF4/_netCDF4.pyx":1550 + /* "netCDF4/_netCDF4.pyx":1552 * dimids = malloc(sizeof(int) * numdims) * # get dimension ids. * with nogil: # <<<<<<<<<<<<<< @@ -12028,7 +12076,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":1551 + /* "netCDF4/_netCDF4.pyx":1553 * # get dimension ids. * with nogil: * ierr = nc_inq_vardimid(_grpid, varid, dimids) # <<<<<<<<<<<<<< @@ -12038,7 +12086,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __pyx_v_ierr = nc_inq_vardimid(__pyx_v__grpid, __pyx_v_varid, __pyx_v_dimids); } - /* "netCDF4/_netCDF4.pyx":1550 + /* "netCDF4/_netCDF4.pyx":1552 * dimids = malloc(sizeof(int) * numdims) * # get dimension ids. * with nogil: # <<<<<<<<<<<<<< @@ -12056,7 +12104,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { } } - /* "netCDF4/_netCDF4.pyx":1552 + /* "netCDF4/_netCDF4.pyx":1554 * with nogil: * ierr = nc_inq_vardimid(_grpid, varid, dimids) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -12066,7 +12114,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __pyx_t_14 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_14) { - /* "netCDF4/_netCDF4.pyx":1553 + /* "netCDF4/_netCDF4.pyx":1555 * ierr = nc_inq_vardimid(_grpid, varid, dimids) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -12074,22 +12122,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { * # if not found in current group, look in parents. */ __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_10 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1553, __pyx_L1_error) + __pyx_t_10 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1553, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1553, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_10, 0, 0, 0); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __PYX_ERR(0, 1553, __pyx_L1_error) + __PYX_ERR(0, 1555, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1552 + /* "netCDF4/_netCDF4.pyx":1554 * with nogil: * ierr = nc_inq_vardimid(_grpid, varid, dimids) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -12098,19 +12146,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { */ } - /* "netCDF4/_netCDF4.pyx":1559 + /* "netCDF4/_netCDF4.pyx":1561 * # and so does it's parent - can a variable in grp1 * # use the 'foo' dimension from the parent? * dimensions = [] # <<<<<<<<<<<<<< * for nn from 0 <= nn < numdims: * grp = group */ - __pyx_t_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1559, __pyx_L1_error) + __pyx_t_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_XDECREF_SET(__pyx_v_dimensions, ((PyObject*)__pyx_t_10)); __pyx_t_10 = 0; - /* "netCDF4/_netCDF4.pyx":1560 + /* "netCDF4/_netCDF4.pyx":1562 * # use the 'foo' dimension from the parent? * dimensions = [] * for nn from 0 <= nn < numdims: # <<<<<<<<<<<<<< @@ -12120,7 +12168,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __pyx_t_9 = __pyx_v_numdims; for (__pyx_v_nn = 0; __pyx_v_nn < __pyx_t_9; __pyx_v_nn++) { - /* "netCDF4/_netCDF4.pyx":1561 + /* "netCDF4/_netCDF4.pyx":1563 * dimensions = [] * for nn from 0 <= nn < numdims: * grp = group # <<<<<<<<<<<<<< @@ -12130,7 +12178,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __Pyx_INCREF(__pyx_v_group); __Pyx_XDECREF_SET(__pyx_v_grp, __pyx_v_group); - /* "netCDF4/_netCDF4.pyx":1562 + /* "netCDF4/_netCDF4.pyx":1564 * for nn from 0 <= nn < numdims: * grp = group * found = False # <<<<<<<<<<<<<< @@ -12139,7 +12187,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { */ __pyx_v_found = 0; - /* "netCDF4/_netCDF4.pyx":1563 + /* "netCDF4/_netCDF4.pyx":1565 * grp = group * found = False * while not found: # <<<<<<<<<<<<<< @@ -12150,16 +12198,16 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __pyx_t_14 = ((!(__pyx_v_found != 0)) != 0); if (!__pyx_t_14) break; - /* "netCDF4/_netCDF4.pyx":1564 + /* "netCDF4/_netCDF4.pyx":1566 * found = False * while not found: * for key, value in grp.dimensions.items(): # <<<<<<<<<<<<<< * if value._dimid == dimids[nn]: * dimensions.append(key) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1564, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_items); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1564, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_items); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -12173,10 +12221,10 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { } } if (__pyx_t_1) { - __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1564, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1566, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { - __pyx_t_10 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1564, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1566, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -12184,9 +12232,9 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __pyx_t_6 = __pyx_t_10; __Pyx_INCREF(__pyx_t_6); __pyx_t_25 = 0; __pyx_t_26 = NULL; } else { - __pyx_t_25 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1564, __pyx_L1_error) + __pyx_t_25 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_26 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1564, __pyx_L1_error) + __pyx_t_26 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1566, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; for (;;) { @@ -12194,17 +12242,17 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { if (likely(PyList_CheckExact(__pyx_t_6))) { if (__pyx_t_25 >= PyList_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_10 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_25); __Pyx_INCREF(__pyx_t_10); __pyx_t_25++; if (unlikely(0 < 0)) __PYX_ERR(0, 1564, __pyx_L1_error) + __pyx_t_10 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_25); __Pyx_INCREF(__pyx_t_10); __pyx_t_25++; if (unlikely(0 < 0)) __PYX_ERR(0, 1566, __pyx_L1_error) #else - __pyx_t_10 = PySequence_ITEM(__pyx_t_6, __pyx_t_25); __pyx_t_25++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1564, __pyx_L1_error) + __pyx_t_10 = PySequence_ITEM(__pyx_t_6, __pyx_t_25); __pyx_t_25++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); #endif } else { if (__pyx_t_25 >= PyTuple_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_25); __Pyx_INCREF(__pyx_t_10); __pyx_t_25++; if (unlikely(0 < 0)) __PYX_ERR(0, 1564, __pyx_L1_error) + __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_25); __Pyx_INCREF(__pyx_t_10); __pyx_t_25++; if (unlikely(0 < 0)) __PYX_ERR(0, 1566, __pyx_L1_error) #else - __pyx_t_10 = PySequence_ITEM(__pyx_t_6, __pyx_t_25); __pyx_t_25++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1564, __pyx_L1_error) + __pyx_t_10 = PySequence_ITEM(__pyx_t_6, __pyx_t_25); __pyx_t_25++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); #endif } @@ -12214,7 +12262,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { 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, 1564, __pyx_L1_error) + else __PYX_ERR(0, 1566, __pyx_L1_error) } break; } @@ -12230,7 +12278,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1564, __pyx_L1_error) + __PYX_ERR(0, 1566, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -12243,15 +12291,15 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_8); #else - __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1564, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1564, __pyx_L1_error) + __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } else { Py_ssize_t index = -1; - __pyx_t_7 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1564, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_27 = Py_TYPE(__pyx_t_7)->tp_iternext; @@ -12259,7 +12307,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __Pyx_GOTREF(__pyx_t_1); index = 1; __pyx_t_8 = __pyx_t_27(__pyx_t_7); if (unlikely(!__pyx_t_8)) goto __pyx_L101_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_27(__pyx_t_7), 2) < 0) __PYX_ERR(0, 1564, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_27(__pyx_t_7), 2) < 0) __PYX_ERR(0, 1566, __pyx_L1_error) __pyx_t_27 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L102_unpacking_done; @@ -12267,7 +12315,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_27 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1564, __pyx_L1_error) + __PYX_ERR(0, 1566, __pyx_L1_error) __pyx_L102_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1); @@ -12275,34 +12323,34 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":1565 + /* "netCDF4/_netCDF4.pyx":1567 * while not found: * for key, value in grp.dimensions.items(): * if value._dimid == dimids[nn]: # <<<<<<<<<<<<<< * dimensions.append(key) * found = True */ - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_dimid); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1565, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_dimid); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_8 = __Pyx_PyInt_From_int((__pyx_v_dimids[__pyx_v_nn])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1565, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_From_int((__pyx_v_dimids[__pyx_v_nn])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_1 = PyObject_RichCompare(__pyx_t_10, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1565, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_t_10, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1567, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 1565, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 1567, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_14) { - /* "netCDF4/_netCDF4.pyx":1566 + /* "netCDF4/_netCDF4.pyx":1568 * for key, value in grp.dimensions.items(): * if value._dimid == dimids[nn]: * dimensions.append(key) # <<<<<<<<<<<<<< * found = True * break */ - __pyx_t_28 = __Pyx_PyList_Append(__pyx_v_dimensions, __pyx_v_key); if (unlikely(__pyx_t_28 == -1)) __PYX_ERR(0, 1566, __pyx_L1_error) + __pyx_t_28 = __Pyx_PyList_Append(__pyx_v_dimensions, __pyx_v_key); if (unlikely(__pyx_t_28 == -1)) __PYX_ERR(0, 1568, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1567 + /* "netCDF4/_netCDF4.pyx":1569 * if value._dimid == dimids[nn]: * dimensions.append(key) * found = True # <<<<<<<<<<<<<< @@ -12311,7 +12359,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { */ __pyx_v_found = 1; - /* "netCDF4/_netCDF4.pyx":1568 + /* "netCDF4/_netCDF4.pyx":1570 * dimensions.append(key) * found = True * break # <<<<<<<<<<<<<< @@ -12320,7 +12368,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { */ goto __pyx_L100_break; - /* "netCDF4/_netCDF4.pyx":1565 + /* "netCDF4/_netCDF4.pyx":1567 * while not found: * for key, value in grp.dimensions.items(): * if value._dimid == dimids[nn]: # <<<<<<<<<<<<<< @@ -12329,7 +12377,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { */ } - /* "netCDF4/_netCDF4.pyx":1564 + /* "netCDF4/_netCDF4.pyx":1566 * found = False * while not found: * for key, value in grp.dimensions.items(): # <<<<<<<<<<<<<< @@ -12340,21 +12388,21 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __pyx_L100_break:; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":1569 + /* "netCDF4/_netCDF4.pyx":1571 * found = True * break * grp = grp.parent # <<<<<<<<<<<<<< * free(dimids) * # create new variable instance. */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_parent); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1569, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_parent); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_grp, __pyx_t_6); __pyx_t_6 = 0; } } - /* "netCDF4/_netCDF4.pyx":1570 + /* "netCDF4/_netCDF4.pyx":1572 * break * grp = grp.parent * free(dimids) # <<<<<<<<<<<<<< @@ -12363,24 +12411,24 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { */ free(__pyx_v_dimids); - /* "netCDF4/_netCDF4.pyx":1572 + /* "netCDF4/_netCDF4.pyx":1574 * free(dimids) * # create new variable instance. * if endianness == '>': # <<<<<<<<<<<<<< * variables[name] = Variable(group, name, datatype, dimensions, id=varid, endian='big') * elif endianness == '<': */ - __pyx_t_14 = (__Pyx_PyString_Equals(__pyx_v_endianness, __pyx_kp_s__14, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 1572, __pyx_L1_error) + __pyx_t_14 = (__Pyx_PyString_Equals(__pyx_v_endianness, __pyx_kp_s__14, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 1574, __pyx_L1_error) if (__pyx_t_14) { - /* "netCDF4/_netCDF4.pyx":1573 + /* "netCDF4/_netCDF4.pyx":1575 * # create new variable instance. * if endianness == '>': * variables[name] = Variable(group, name, datatype, dimensions, id=varid, endian='big') # <<<<<<<<<<<<<< * elif endianness == '<': * variables[name] = Variable(group, name, datatype, dimensions, id=varid, endian='little') */ - __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1573, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_group); __Pyx_GIVEREF(__pyx_v_group); @@ -12394,21 +12442,21 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __Pyx_INCREF(__pyx_v_dimensions); __Pyx_GIVEREF(__pyx_v_dimensions); PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_v_dimensions); - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1573, __pyx_L1_error) + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_varid); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1573, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_varid); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_id, __pyx_t_8) < 0) __PYX_ERR(0, 1573, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_id, __pyx_t_8) < 0) __PYX_ERR(0, 1575, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_endian, __pyx_n_s_big) < 0) __PYX_ERR(0, 1573, __pyx_L1_error) - __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7netCDF4_8_netCDF4_Variable), __pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1573, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_endian, __pyx_n_s_big) < 0) __PYX_ERR(0, 1575, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7netCDF4_8_netCDF4_Variable), __pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(PyObject_SetItem(__pyx_v_variables, __pyx_v_name, __pyx_t_8) < 0)) __PYX_ERR(0, 1573, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v_variables, __pyx_v_name, __pyx_t_8) < 0)) __PYX_ERR(0, 1575, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":1572 + /* "netCDF4/_netCDF4.pyx":1574 * free(dimids) * # create new variable instance. * if endianness == '>': # <<<<<<<<<<<<<< @@ -12418,24 +12466,24 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { goto __pyx_L104; } - /* "netCDF4/_netCDF4.pyx":1574 + /* "netCDF4/_netCDF4.pyx":1576 * if endianness == '>': * variables[name] = Variable(group, name, datatype, dimensions, id=varid, endian='big') * elif endianness == '<': # <<<<<<<<<<<<<< * variables[name] = Variable(group, name, datatype, dimensions, id=varid, endian='little') * else: */ - __pyx_t_14 = (__Pyx_PyString_Equals(__pyx_v_endianness, __pyx_kp_s__13, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 1574, __pyx_L1_error) + __pyx_t_14 = (__Pyx_PyString_Equals(__pyx_v_endianness, __pyx_kp_s__13, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 1576, __pyx_L1_error) if (__pyx_t_14) { - /* "netCDF4/_netCDF4.pyx":1575 + /* "netCDF4/_netCDF4.pyx":1577 * variables[name] = Variable(group, name, datatype, dimensions, id=varid, endian='big') * elif endianness == '<': * variables[name] = Variable(group, name, datatype, dimensions, id=varid, endian='little') # <<<<<<<<<<<<<< * else: * variables[name] = Variable(group, name, datatype, dimensions, id=varid) */ - __pyx_t_8 = PyTuple_New(4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1575, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_group); __Pyx_GIVEREF(__pyx_v_group); @@ -12449,21 +12497,21 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __Pyx_INCREF(__pyx_v_dimensions); __Pyx_GIVEREF(__pyx_v_dimensions); PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_v_dimensions); - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1575, __pyx_L1_error) + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_varid); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1575, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_varid); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_id, __pyx_t_6) < 0) __PYX_ERR(0, 1575, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_id, __pyx_t_6) < 0) __PYX_ERR(0, 1577, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_endian, __pyx_n_s_little) < 0) __PYX_ERR(0, 1575, __pyx_L1_error) - __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7netCDF4_8_netCDF4_Variable), __pyx_t_8, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1575, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_endian, __pyx_n_s_little) < 0) __PYX_ERR(0, 1577, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7netCDF4_8_netCDF4_Variable), __pyx_t_8, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(PyObject_SetItem(__pyx_v_variables, __pyx_v_name, __pyx_t_6) < 0)) __PYX_ERR(0, 1575, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v_variables, __pyx_v_name, __pyx_t_6) < 0)) __PYX_ERR(0, 1577, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":1574 + /* "netCDF4/_netCDF4.pyx":1576 * if endianness == '>': * variables[name] = Variable(group, name, datatype, dimensions, id=varid, endian='big') * elif endianness == '<': # <<<<<<<<<<<<<< @@ -12473,7 +12521,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { goto __pyx_L104; } - /* "netCDF4/_netCDF4.pyx":1577 + /* "netCDF4/_netCDF4.pyx":1579 * variables[name] = Variable(group, name, datatype, dimensions, id=varid, endian='little') * else: * variables[name] = Variable(group, name, datatype, dimensions, id=varid) # <<<<<<<<<<<<<< @@ -12481,7 +12529,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { * return variables */ /*else*/ { - __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1577, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_group); __Pyx_GIVEREF(__pyx_v_group); @@ -12495,24 +12543,24 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { __Pyx_INCREF(__pyx_v_dimensions); __Pyx_GIVEREF(__pyx_v_dimensions); PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_v_dimensions); - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1577, __pyx_L1_error) + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_varid); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1577, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_varid); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_id, __pyx_t_8) < 0) __PYX_ERR(0, 1577, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_id, __pyx_t_8) < 0) __PYX_ERR(0, 1579, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7netCDF4_8_netCDF4_Variable), __pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1577, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7netCDF4_8_netCDF4_Variable), __pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(PyObject_SetItem(__pyx_v_variables, __pyx_v_name, __pyx_t_8) < 0)) __PYX_ERR(0, 1577, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v_variables, __pyx_v_name, __pyx_t_8) < 0)) __PYX_ERR(0, 1579, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __pyx_L104:; __pyx_L15_continue:; } - /* "netCDF4/_netCDF4.pyx":1578 + /* "netCDF4/_netCDF4.pyx":1580 * else: * variables[name] = Variable(group, name, datatype, dimensions, id=varid) * free(varids) # free pointer holding variable ids. # <<<<<<<<<<<<<< @@ -12521,7 +12569,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { */ free(__pyx_v_varids); - /* "netCDF4/_netCDF4.pyx":1467 + /* "netCDF4/_netCDF4.pyx":1469 * # create empty dictionary for variables. * variables = OrderedDict() * if numvars > 0: # <<<<<<<<<<<<<< @@ -12530,19 +12578,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { */ } - /* "netCDF4/_netCDF4.pyx":1579 + /* "netCDF4/_netCDF4.pyx":1581 * variables[name] = Variable(group, name, datatype, dimensions, id=varid) * free(varids) # free pointer holding variable ids. * return variables # <<<<<<<<<<<<<< * - * # these are class attributes that + * cdef _ensure_nc_success(ierr, err_cls=RuntimeError): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_variables); __pyx_r = __pyx_v_variables; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":1450 + /* "netCDF4/_netCDF4.pyx":1452 * return groups * * cdef _get_vars(group): # <<<<<<<<<<<<<< @@ -12579,17 +12627,156 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) { return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":1714 +/* "netCDF4/_netCDF4.pyx":1583 + * return variables + * + * cdef _ensure_nc_success(ierr, err_cls=RuntimeError): # <<<<<<<<<<<<<< + * if ierr != NC_NOERR: + * raise err_cls((nc_strerror(ierr)).decode('ascii')) + */ + +static PyObject *__pyx_f_7netCDF4_8_netCDF4__ensure_nc_success(PyObject *__pyx_v_ierr, struct __pyx_opt_args_7netCDF4_8_netCDF4__ensure_nc_success *__pyx_optional_args) { + PyObject *__pyx_v_err_cls = __pyx_k__15; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + char *__pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + __Pyx_RefNannySetupContext("_ensure_nc_success", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_err_cls = __pyx_optional_args->err_cls; + } + } + + /* "netCDF4/_netCDF4.pyx":1584 + * + * cdef _ensure_nc_success(ierr, err_cls=RuntimeError): + * if ierr != NC_NOERR: # <<<<<<<<<<<<<< + * raise err_cls((nc_strerror(ierr)).decode('ascii')) + * + */ + __pyx_t_1 = __Pyx_PyInt_From_int(NC_NOERR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1584, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_RichCompare(__pyx_v_ierr, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1584, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1584, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_3) { + + /* "netCDF4/_netCDF4.pyx":1585 + * cdef _ensure_nc_success(ierr, err_cls=RuntimeError): + * if ierr != NC_NOERR: + * raise err_cls((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< + * + * # these are class attributes that + */ + __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_ierr); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1585, __pyx_L1_error) + __pyx_t_5 = ((char *)nc_strerror(__pyx_t_4)); + __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_5, 0, strlen(__pyx_t_5), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1585, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_err_cls); + __pyx_t_6 = __pyx_v_err_cls; __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + if (!__pyx_t_7) { + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1585, __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_6)) { + PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_1}; + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1585, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_1}; + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1585, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else + #endif + { + __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1585, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1585, __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_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 1585, __pyx_L1_error) + + /* "netCDF4/_netCDF4.pyx":1584 + * + * cdef _ensure_nc_success(ierr, err_cls=RuntimeError): + * if ierr != NC_NOERR: # <<<<<<<<<<<<<< + * raise err_cls((nc_strerror(ierr)).decode('ascii')) + * + */ + } + + /* "netCDF4/_netCDF4.pyx":1583 + * return variables + * + * cdef _ensure_nc_success(ierr, err_cls=RuntimeError): # <<<<<<<<<<<<<< + * if ierr != NC_NOERR: + * raise err_cls((nc_strerror(ierr)).decode('ascii')) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("netCDF4._netCDF4._ensure_nc_success", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "netCDF4/_netCDF4.pyx":1721 * the parent Dataset or Group.""" * * def __init__(self, filename, mode='r', clobber=True, format='NETCDF4', # <<<<<<<<<<<<<< - * diskless=False, persist=False, keepweakref=False, **kwargs): + * diskless=False, persist=False, keepweakref=False, memory=None, **kwargs): * """ */ /* Python wrapper */ static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset___init__[] = "\n **`__init__(self, filename, mode=\"r\", clobber=True, diskless=False,\n persist=False, keepweakref=False, format='NETCDF4')`**\n\n `netCDF4.Dataset` constructor.\n\n **`filename`**: Name of netCDF file to hold dataset. Can also\n\tbe a python 3 pathlib instance or the URL of an OpenDAP dataset.\n \n **`mode`**: access mode. `r` means read-only; no data can be\n modified. `w` means write; a new file is created, an existing file with\n the same name is deleted. `a` and `r+` mean append (in analogy with\n serial files); an existing file is opened for reading and writing.\n Appending `s` to modes `w`, `r+` or `a` will enable unbuffered shared\n access to `NETCDF3_CLASSIC`, `NETCDF3_64BIT_OFFSET` or\n `NETCDF3_64BIT_DATA` formatted files.\n Unbuffered access may be useful even if you don't need shared\n access, since it may be faster for programs that don't access data\n sequentially. This option is ignored for `NETCDF4` and `NETCDF4_CLASSIC`\n formatted files.\n \n **`clobber`**: if `True` (default), opening a file with `mode='w'`\n will clobber an existing file with the same name. if `False`, an\n exception will be raised if a file with the same name already exists.\n \n **`format`**: underlying file format (one of `'NETCDF4',\n 'NETCDF4_CLASSIC', 'NETCDF3_CLASSIC'`, `'NETCDF3_64BIT_OFFSET'` or\n `'NETCDF3_64BIT_DATA'`.\n Only relevant if `mode = 'w'` (if `mode = 'r','a'` or `'r+'` the file format\n is automatically detected). Default `'NETCDF4'`, which means the data is\n stored in an HDF5 file, using netCDF 4 API features. Setting\n `format='NETCDF4_CLASSIC'` will create an HDF5 file, using only netCDF 3\n compatible API features. netCDF 3 clients must be recompiled and linked\n against the netCDF 4 library to read files in `NETCDF4_CLASSIC` format.\n "" `'NETCDF3_CLASSIC'` is the classic netCDF 3 file format that does not\n handle 2+ Gb files. `'NETCDF3_64BIT_OFFSET'` is the 64-bit offset\n version of the netCDF 3 file format, which fully supports 2+ GB files, but\n is only compatible with clients linked against netCDF version 3.6.0 or\n later. `'NETCDF3_64BIT_DATA'` is the 64-bit data version of the netCDF 3\n file format, which supports 64-bit dimension sizes plus unsigned and\n 64 bit integer data types, but is only compatible with clients linked against\n netCDF version 4.4.0 or later.\n \n **`diskless`**: If `True`, create diskless (in memory) file. \n This is an experimental feature added to the C library after the\n netcdf-4.2 release.\n \n **`persist`**: if `diskless=True`, persist file to disk when closed\n (default `False`).\n\n **`keepweakref`**: if `True`, child Dimension and Variable instances will keep weak\n references to the parent Dataset or Group object. Default is `False`, which\n means strong references will be kept. Having Dimension and Variable instances\n keep a strong reference to the parent Dataset instance, which in turn keeps a\n reference to child Dimension and Variable instances, creates circular references.\n Circular references complicate garbage collection, which may mean increased\n memory usage for programs that create may Dataset instances with lots of\n Variables. It also will result in the Dataset object never being deleted, which\n means it may keep open files alive as well. Setting `keepweakref=True` allows\n Dataset instances to be garbage collected as soon as they go out of scope, potentially\n reducing memory usage and open file handles. However, in many cases this is not\n desirable, since the associated Variable instances may still be needed, but are\n rendered unusable when the ""parent Dataset instance is garbage collected.\n "; +static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset___init__[] = "\n **`__init__(self, filename, mode=\"r\", clobber=True, diskless=False,\n persist=False, keepweakref=False, format='NETCDF4')`**\n\n `netCDF4.Dataset` constructor.\n\n **`filename`**: Name of netCDF file to hold dataset. Can also\n\tbe a python 3 pathlib instance or the URL of an OpenDAP dataset. When memory is\n\tset this is just used to set the `filepath()`.\n \n **`mode`**: access mode. `r` means read-only; no data can be\n modified. `w` means write; a new file is created, an existing file with\n the same name is deleted. `a` and `r+` mean append (in analogy with\n serial files); an existing file is opened for reading and writing.\n Appending `s` to modes `w`, `r+` or `a` will enable unbuffered shared\n access to `NETCDF3_CLASSIC`, `NETCDF3_64BIT_OFFSET` or\n `NETCDF3_64BIT_DATA` formatted files.\n Unbuffered access may be useful even if you don't need shared\n access, since it may be faster for programs that don't access data\n sequentially. This option is ignored for `NETCDF4` and `NETCDF4_CLASSIC`\n formatted files.\n \n **`clobber`**: if `True` (default), opening a file with `mode='w'`\n will clobber an existing file with the same name. if `False`, an\n exception will be raised if a file with the same name already exists.\n \n **`format`**: underlying file format (one of `'NETCDF4',\n 'NETCDF4_CLASSIC', 'NETCDF3_CLASSIC'`, `'NETCDF3_64BIT_OFFSET'` or\n `'NETCDF3_64BIT_DATA'`.\n Only relevant if `mode = 'w'` (if `mode = 'r','a'` or `'r+'` the file format\n is automatically detected). Default `'NETCDF4'`, which means the data is\n stored in an HDF5 file, using netCDF 4 API features. Setting\n `format='NETCDF4_CLASSIC'` will create an HDF5 file, using only netCDF 3\n compatible API features. netCDF 3 clients must be recompiled and linked\n against the ""netCDF 4 library to read files in `NETCDF4_CLASSIC` format.\n `'NETCDF3_CLASSIC'` is the classic netCDF 3 file format that does not\n handle 2+ Gb files. `'NETCDF3_64BIT_OFFSET'` is the 64-bit offset\n version of the netCDF 3 file format, which fully supports 2+ GB files, but\n is only compatible with clients linked against netCDF version 3.6.0 or\n later. `'NETCDF3_64BIT_DATA'` is the 64-bit data version of the netCDF 3\n file format, which supports 64-bit dimension sizes plus unsigned and\n 64 bit integer data types, but is only compatible with clients linked against\n netCDF version 4.4.0 or later.\n \n **`diskless`**: If `True`, create diskless (in memory) file. \n This is an experimental feature added to the C library after the\n netcdf-4.2 release.\n \n **`persist`**: if `diskless=True`, persist file to disk when closed\n (default `False`).\n\n **`keepweakref`**: if `True`, child Dimension and Variable instances will keep weak\n references to the parent Dataset or Group object. Default is `False`, which\n means strong references will be kept. Having Dimension and Variable instances\n keep a strong reference to the parent Dataset instance, which in turn keeps a\n reference to child Dimension and Variable instances, creates circular references.\n Circular references complicate garbage collection, which may mean increased\n memory usage for programs that create may Dataset instances with lots of\n Variables. It also will result in the Dataset object never being deleted, which\n means it may keep open files alive as well. Setting `keepweakref=True` allows\n Dataset instances to be garbage collected as soon as they go out of scope, potentially\n reducing memory usage and open file handles. However, in many cases this is not\n desirable, since the associated Variable instances"" may still be needed, but are\n rendered unusable when the parent Dataset instance is garbage collected.\n \n **`memory`**: if not `None`, open file with contents taken from this block of memory.\n Must be a sequence of bytes. Note this only works with \"r\" mode.\n "; #if CYTHON_COMPILING_IN_CPYTHON struct wrapperbase __pyx_wrapperbase_7netCDF4_8_netCDF4_7Dataset___init__; #endif @@ -12601,6 +12788,7 @@ static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_1__init__(PyObject *__pyx_v_self PyObject *__pyx_v_diskless = 0; PyObject *__pyx_v_persist = 0; PyObject *__pyx_v_keepweakref = 0; + PyObject *__pyx_v_memory = 0; CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0; int __pyx_r; __Pyx_RefNannyDeclarations @@ -12608,26 +12796,28 @@ static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_1__init__(PyObject *__pyx_v_self __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1; __Pyx_GOTREF(__pyx_v_kwargs); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename,&__pyx_n_s_mode,&__pyx_n_s_clobber,&__pyx_n_s_format,&__pyx_n_s_diskless,&__pyx_n_s_persist,&__pyx_n_s_keepweakref,0}; - PyObject* values[7] = {0,0,0,0,0,0,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename,&__pyx_n_s_mode,&__pyx_n_s_clobber,&__pyx_n_s_format,&__pyx_n_s_diskless,&__pyx_n_s_persist,&__pyx_n_s_keepweakref,&__pyx_n_s_memory,0}; + PyObject* values[8] = {0,0,0,0,0,0,0,0}; values[1] = ((PyObject *)__pyx_n_s_r); values[2] = ((PyObject *)Py_True); values[3] = ((PyObject *)__pyx_n_s_NETCDF4); - /* "netCDF4/_netCDF4.pyx":1715 + /* "netCDF4/_netCDF4.pyx":1722 * * def __init__(self, filename, mode='r', clobber=True, format='NETCDF4', - * diskless=False, persist=False, keepweakref=False, **kwargs): # <<<<<<<<<<<<<< + * diskless=False, persist=False, keepweakref=False, memory=None, **kwargs): # <<<<<<<<<<<<<< * """ * **`__init__(self, filename, mode="r", clobber=True, diskless=False, */ values[4] = ((PyObject *)Py_False); values[5] = ((PyObject *)Py_False); values[6] = ((PyObject *)Py_False); + values[7] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { + case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); @@ -12673,12 +12863,18 @@ static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_1__init__(PyObject *__pyx_v_self PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_keepweakref); if (value) { values[6] = value; kw_args--; } } + case 7: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_memory); + if (value) { values[7] = value; kw_args--; } + } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1714, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1721, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { + case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); @@ -12697,23 +12893,24 @@ static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_1__init__(PyObject *__pyx_v_self __pyx_v_diskless = values[4]; __pyx_v_persist = values[5]; __pyx_v_keepweakref = values[6]; + __pyx_v_memory = values[7]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1714, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1721, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), __pyx_v_filename, __pyx_v_mode, __pyx_v_clobber, __pyx_v_format, __pyx_v_diskless, __pyx_v_persist, __pyx_v_keepweakref, __pyx_v_kwargs); + __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), __pyx_v_filename, __pyx_v_mode, __pyx_v_clobber, __pyx_v_format, __pyx_v_diskless, __pyx_v_persist, __pyx_v_keepweakref, __pyx_v_memory, __pyx_v_kwargs); - /* "netCDF4/_netCDF4.pyx":1714 + /* "netCDF4/_netCDF4.pyx":1721 * the parent Dataset or Group.""" * * def __init__(self, filename, mode='r', clobber=True, format='NETCDF4', # <<<<<<<<<<<<<< - * diskless=False, persist=False, keepweakref=False, **kwargs): + * diskless=False, persist=False, keepweakref=False, memory=None, **kwargs): * """ */ @@ -12723,11 +12920,12 @@ static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_1__init__(PyObject *__pyx_v_self return __pyx_r; } -static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_mode, PyObject *__pyx_v_clobber, PyObject *__pyx_v_format, PyObject *__pyx_v_diskless, PyObject *__pyx_v_persist, PyObject *__pyx_v_keepweakref, CYTHON_UNUSED PyObject *__pyx_v_kwargs) { +static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_mode, PyObject *__pyx_v_clobber, PyObject *__pyx_v_format, PyObject *__pyx_v_diskless, PyObject *__pyx_v_persist, PyObject *__pyx_v_keepweakref, PyObject *__pyx_v_memory, CYTHON_UNUSED PyObject *__pyx_v_kwargs) { int __pyx_v_grpid; int __pyx_v_ierr; char *__pyx_v_path; PyObject *__pyx_v_bytestr = NULL; + PyObject *__pyx_v_msg = NULL; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; @@ -12735,15 +12933,26 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; char *__pyx_t_5; - PyObject *__pyx_t_6 = NULL; - int __pyx_t_7; - PyObject *__pyx_t_8 = NULL; - PyObject *__pyx_t_9 = NULL; - PyObject *(*__pyx_t_10)(PyObject *); + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + struct __pyx_opt_args_7netCDF4_8_netCDF4__ensure_nc_success __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *(*__pyx_t_12)(PyObject *); __Pyx_RefNannySetupContext("__init__", 0); - /* "netCDF4/_netCDF4.pyx":1784 + /* "netCDF4/_netCDF4.pyx":1795 * cdef char namstring[NC_MAX_NAME+1] + * + * memset(&self._buffer, 0, sizeof(self._buffer)) # <<<<<<<<<<<<<< + * + * # flag to indicate that Variables in this Dataset support orthogonal indexing. + */ + memset((&__pyx_v_self->_buffer), 0, (sizeof(__pyx_v_self->_buffer))); + + /* "netCDF4/_netCDF4.pyx":1798 + * * # flag to indicate that Variables in this Dataset support orthogonal indexing. * self.__orthogonal_indexing__ = True # <<<<<<<<<<<<<< * if diskless and __netcdf4libversion__ < '4.2.1': @@ -12755,54 +12964,54 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD __Pyx_DECREF(__pyx_v_self->__orthogonal_indexing__); __pyx_v_self->__orthogonal_indexing__ = Py_True; - /* "netCDF4/_netCDF4.pyx":1785 + /* "netCDF4/_netCDF4.pyx":1799 * # flag to indicate that Variables in this Dataset support orthogonal indexing. * self.__orthogonal_indexing__ = True * if diskless and __netcdf4libversion__ < '4.2.1': # <<<<<<<<<<<<<< * #diskless = False # don't raise error, instead silently ignore * raise ValueError('diskless mode requires netcdf lib >= 4.2.1, you have %s' % __netcdf4libversion__) */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1785, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1799, __pyx_L1_error) if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdf4libversion); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1785, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdf4libversion); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1799, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_kp_s_4_2_1, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1785, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_kp_s_4_2_1, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1799, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1785, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1799, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __pyx_t_2; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":1787 + /* "netCDF4/_netCDF4.pyx":1801 * if diskless and __netcdf4libversion__ < '4.2.1': * #diskless = False # don't raise error, instead silently ignore * raise ValueError('diskless mode requires netcdf lib >= 4.2.1, you have %s' % __netcdf4libversion__) # <<<<<<<<<<<<<< * bytestr = _strencode(str(filename)) * path = bytestr */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdf4libversion); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1787, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdf4libversion); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1801, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_diskless_mode_requires_netcdf_li, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1787, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_diskless_mode_requires_netcdf_li, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1801, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1787, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1801, __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 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1787, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1801, __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, 1787, __pyx_L1_error) + __PYX_ERR(0, 1801, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1785 + /* "netCDF4/_netCDF4.pyx":1799 * # flag to indicate that Variables in this Dataset support orthogonal indexing. * self.__orthogonal_indexing__ = True * if diskless and __netcdf4libversion__ < '4.2.1': # <<<<<<<<<<<<<< @@ -12811,125 +13020,174 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD */ } - /* "netCDF4/_netCDF4.pyx":1788 + /* "netCDF4/_netCDF4.pyx":1802 * #diskless = False # don't raise error, instead silently ignore * raise ValueError('diskless mode requires netcdf lib >= 4.2.1, you have %s' % __netcdf4libversion__) * bytestr = _strencode(str(filename)) # <<<<<<<<<<<<<< * path = bytestr - * if mode == 'w': + * */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1788, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1802, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_filename); __Pyx_GIVEREF(__pyx_v_filename); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_filename); - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1788, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1802, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1788, __pyx_L1_error) + __pyx_t_3 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1802, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_bytestr = __pyx_t_3; __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":1789 + /* "netCDF4/_netCDF4.pyx":1803 * raise ValueError('diskless mode requires netcdf lib >= 4.2.1, you have %s' % __netcdf4libversion__) * bytestr = _strencode(str(filename)) * path = bytestr # <<<<<<<<<<<<<< - * if mode == 'w': - * _set_default_format(format=format) + * + * if memory is not None and (mode != 'r' or type(memory) != bytes): */ - __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 1789, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 1803, __pyx_L1_error) __pyx_v_path = __pyx_t_5; - /* "netCDF4/_netCDF4.pyx":1790 - * bytestr = _strencode(str(filename)) + /* "netCDF4/_netCDF4.pyx":1805 * path = bytestr + * + * if memory is not None and (mode != 'r' or type(memory) != bytes): # <<<<<<<<<<<<<< + * raise ValueError('memory mode only works with \'r\' modes and must be `bytes`') + * + */ + __pyx_t_2 = (__pyx_v_memory != Py_None); + __pyx_t_6 = (__pyx_t_2 != 0); + if (__pyx_t_6) { + } else { + __pyx_t_1 = __pyx_t_6; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_r, Py_NE)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1805, __pyx_L1_error) + if (!__pyx_t_6) { + } else { + __pyx_t_1 = __pyx_t_6; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_3 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_memory)), ((PyObject *)(&PyBytes_Type)), Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1805, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1805, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = __pyx_t_6; + __pyx_L7_bool_binop_done:; + if (__pyx_t_1) { + + /* "netCDF4/_netCDF4.pyx":1806 + * + * if memory is not None and (mode != 'r' or type(memory) != bytes): + * raise ValueError('memory mode only works with \'r\' modes and must be `bytes`') # <<<<<<<<<<<<<< + * + * if mode == 'w': + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1806, __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, 1806, __pyx_L1_error) + + /* "netCDF4/_netCDF4.pyx":1805 + * path = bytestr + * + * if memory is not None and (mode != 'r' or type(memory) != bytes): # <<<<<<<<<<<<<< + * raise ValueError('memory mode only works with \'r\' modes and must be `bytes`') + * + */ + } + + /* "netCDF4/_netCDF4.pyx":1808 + * raise ValueError('memory mode only works with \'r\' modes and must be `bytes`') + * * if mode == 'w': # <<<<<<<<<<<<<< * _set_default_format(format=format) * if clobber: */ - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_w, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1790, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_w, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1808, __pyx_L1_error) if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":1791 - * path = bytestr + /* "netCDF4/_netCDF4.pyx":1809 + * * if mode == 'w': * _set_default_format(format=format) # <<<<<<<<<<<<<< * if clobber: * if diskless: */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_set_default_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1791, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_set_default_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1809, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1791, __pyx_L1_error) + __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1809, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_format, __pyx_v_format) < 0) __PYX_ERR(0, 1791, __pyx_L1_error) - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1791, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_format, __pyx_v_format) < 0) __PYX_ERR(0, 1809, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1809, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":1792 + /* "netCDF4/_netCDF4.pyx":1810 * if mode == 'w': * _set_default_format(format=format) * if clobber: # <<<<<<<<<<<<<< * if diskless: * if persist: */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_clobber); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1792, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_clobber); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1810, __pyx_L1_error) if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":1793 + /* "netCDF4/_netCDF4.pyx":1811 * _set_default_format(format=format) * if clobber: * if diskless: # <<<<<<<<<<<<<< * if persist: * ierr = nc_create(path, NC_WRITE | NC_CLOBBER | NC_DISKLESS , &grpid) */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1793, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1811, __pyx_L1_error) if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":1794 + /* "netCDF4/_netCDF4.pyx":1812 * if clobber: * if diskless: * if persist: # <<<<<<<<<<<<<< * ierr = nc_create(path, NC_WRITE | NC_CLOBBER | NC_DISKLESS , &grpid) * else: */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_persist); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1794, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_persist); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1812, __pyx_L1_error) if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":1795 + /* "netCDF4/_netCDF4.pyx":1813 * if diskless: * if persist: * ierr = nc_create(path, NC_WRITE | NC_CLOBBER | NC_DISKLESS , &grpid) # <<<<<<<<<<<<<< * else: * ierr = nc_create(path, NC_CLOBBER | NC_DISKLESS , &grpid) */ - __pyx_t_6 = __Pyx_PyInt_From_int((NC_WRITE | NC_CLOBBER)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1795, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1795, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_From_int((NC_WRITE | NC_CLOBBER)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1813, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1813, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyNumber_Or(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1795, __pyx_L1_error) + __pyx_t_3 = PyNumber_Or(__pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1813, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1795, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1813, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_v_ierr = nc_create(__pyx_v_path, __pyx_t_7, (&__pyx_v_grpid)); + __pyx_v_ierr = nc_create(__pyx_v_path, __pyx_t_8, (&__pyx_v_grpid)); - /* "netCDF4/_netCDF4.pyx":1794 + /* "netCDF4/_netCDF4.pyx":1812 * if clobber: * if diskless: * if persist: # <<<<<<<<<<<<<< * ierr = nc_create(path, NC_WRITE | NC_CLOBBER | NC_DISKLESS , &grpid) * else: */ - goto __pyx_L9; + goto __pyx_L13; } - /* "netCDF4/_netCDF4.pyx":1797 + /* "netCDF4/_netCDF4.pyx":1815 * ierr = nc_create(path, NC_WRITE | NC_CLOBBER | NC_DISKLESS , &grpid) * else: * ierr = nc_create(path, NC_CLOBBER | NC_DISKLESS , &grpid) # <<<<<<<<<<<<<< @@ -12937,31 +13195,31 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD * ierr = nc_create(path, NC_CLOBBER, &grpid) */ /*else*/ { - __pyx_t_3 = __Pyx_PyInt_From_int(NC_CLOBBER); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1797, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(NC_CLOBBER); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1815, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1797, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1815, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = PyNumber_Or(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1797, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PyNumber_Or(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1815, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1797, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_v_ierr = nc_create(__pyx_v_path, __pyx_t_7, (&__pyx_v_grpid)); + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1815, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_ierr = nc_create(__pyx_v_path, __pyx_t_8, (&__pyx_v_grpid)); } - __pyx_L9:; + __pyx_L13:; - /* "netCDF4/_netCDF4.pyx":1793 + /* "netCDF4/_netCDF4.pyx":1811 * _set_default_format(format=format) * if clobber: * if diskless: # <<<<<<<<<<<<<< * if persist: * ierr = nc_create(path, NC_WRITE | NC_CLOBBER | NC_DISKLESS , &grpid) */ - goto __pyx_L8; + goto __pyx_L12; } - /* "netCDF4/_netCDF4.pyx":1799 + /* "netCDF4/_netCDF4.pyx":1817 * ierr = nc_create(path, NC_CLOBBER | NC_DISKLESS , &grpid) * else: * ierr = nc_create(path, NC_CLOBBER, &grpid) # <<<<<<<<<<<<<< @@ -12971,19 +13229,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD /*else*/ { __pyx_v_ierr = nc_create(__pyx_v_path, NC_CLOBBER, (&__pyx_v_grpid)); } - __pyx_L8:; + __pyx_L12:; - /* "netCDF4/_netCDF4.pyx":1792 + /* "netCDF4/_netCDF4.pyx":1810 * if mode == 'w': * _set_default_format(format=format) * if clobber: # <<<<<<<<<<<<<< * if diskless: * if persist: */ - goto __pyx_L7; + goto __pyx_L11; } - /* "netCDF4/_netCDF4.pyx":1801 + /* "netCDF4/_netCDF4.pyx":1819 * ierr = nc_create(path, NC_CLOBBER, &grpid) * else: * if diskless: # <<<<<<<<<<<<<< @@ -12991,49 +13249,49 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD * ierr = nc_create(path, NC_WRITE | NC_NOCLOBBER | NC_DISKLESS , &grpid) */ /*else*/ { - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1801, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1819, __pyx_L1_error) if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":1802 + /* "netCDF4/_netCDF4.pyx":1820 * else: * if diskless: * if persist: # <<<<<<<<<<<<<< * ierr = nc_create(path, NC_WRITE | NC_NOCLOBBER | NC_DISKLESS , &grpid) * else: */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_persist); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1802, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_persist); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1820, __pyx_L1_error) if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":1803 + /* "netCDF4/_netCDF4.pyx":1821 * if diskless: * if persist: * ierr = nc_create(path, NC_WRITE | NC_NOCLOBBER | NC_DISKLESS , &grpid) # <<<<<<<<<<<<<< * else: * ierr = nc_create(path, NC_NOCLOBBER | NC_DISKLESS , &grpid) */ - __pyx_t_6 = __Pyx_PyInt_From_int((NC_WRITE | NC_NOCLOBBER)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1803, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1803, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_From_int((NC_WRITE | NC_NOCLOBBER)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1821, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1821, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyNumber_Or(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1803, __pyx_L1_error) + __pyx_t_3 = PyNumber_Or(__pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1821, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1803, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1821, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_v_ierr = nc_create(__pyx_v_path, __pyx_t_7, (&__pyx_v_grpid)); + __pyx_v_ierr = nc_create(__pyx_v_path, __pyx_t_8, (&__pyx_v_grpid)); - /* "netCDF4/_netCDF4.pyx":1802 + /* "netCDF4/_netCDF4.pyx":1820 * else: * if diskless: * if persist: # <<<<<<<<<<<<<< * ierr = nc_create(path, NC_WRITE | NC_NOCLOBBER | NC_DISKLESS , &grpid) * else: */ - goto __pyx_L11; + goto __pyx_L15; } - /* "netCDF4/_netCDF4.pyx":1805 + /* "netCDF4/_netCDF4.pyx":1823 * ierr = nc_create(path, NC_WRITE | NC_NOCLOBBER | NC_DISKLESS , &grpid) * else: * ierr = nc_create(path, NC_NOCLOBBER | NC_DISKLESS , &grpid) # <<<<<<<<<<<<<< @@ -13041,31 +13299,31 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD * ierr = nc_create(path, NC_NOCLOBBER, &grpid) */ /*else*/ { - __pyx_t_3 = __Pyx_PyInt_From_int(NC_NOCLOBBER); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1805, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(NC_NOCLOBBER); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1823, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1805, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1823, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = PyNumber_Or(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1805, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PyNumber_Or(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1823, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1805, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_v_ierr = nc_create(__pyx_v_path, __pyx_t_7, (&__pyx_v_grpid)); + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1823, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_ierr = nc_create(__pyx_v_path, __pyx_t_8, (&__pyx_v_grpid)); } - __pyx_L11:; + __pyx_L15:; - /* "netCDF4/_netCDF4.pyx":1801 + /* "netCDF4/_netCDF4.pyx":1819 * ierr = nc_create(path, NC_CLOBBER, &grpid) * else: * if diskless: # <<<<<<<<<<<<<< * if persist: * ierr = nc_create(path, NC_WRITE | NC_NOCLOBBER | NC_DISKLESS , &grpid) */ - goto __pyx_L10; + goto __pyx_L14; } - /* "netCDF4/_netCDF4.pyx":1807 + /* "netCDF4/_netCDF4.pyx":1825 * ierr = nc_create(path, NC_NOCLOBBER | NC_DISKLESS , &grpid) * else: * ierr = nc_create(path, NC_NOCLOBBER, &grpid) # <<<<<<<<<<<<<< @@ -13075,88 +13333,137 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD /*else*/ { __pyx_v_ierr = nc_create(__pyx_v_path, NC_NOCLOBBER, (&__pyx_v_grpid)); } - __pyx_L10:; + __pyx_L14:; } - __pyx_L7:; + __pyx_L11:; - /* "netCDF4/_netCDF4.pyx":1812 + /* "netCDF4/_netCDF4.pyx":1830 * # format to NETCDF4). This bug should be fixed in version * # 4.3.0 of the netcdf library (add a version check here?). * _set_default_format(format='NETCDF3_64BIT_OFFSET') # <<<<<<<<<<<<<< * elif mode == 'r': - * if diskless: + * if memory is not None: */ - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_set_default_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1812, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1812, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_set_default_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1830, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1830, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_format, __pyx_n_s_NETCDF3_64BIT_OFFSET) < 0) __PYX_ERR(0, 1812, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1812, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_format, __pyx_n_s_NETCDF3_64BIT_OFFSET) < 0) __PYX_ERR(0, 1830, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1830, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":1790 - * bytestr = _strencode(str(filename)) - * path = bytestr + /* "netCDF4/_netCDF4.pyx":1808 + * raise ValueError('memory mode only works with \'r\' modes and must be `bytes`') + * * if mode == 'w': # <<<<<<<<<<<<<< * _set_default_format(format=format) * if clobber: */ - goto __pyx_L6; + goto __pyx_L10; } - /* "netCDF4/_netCDF4.pyx":1813 + /* "netCDF4/_netCDF4.pyx":1831 * # 4.3.0 of the netcdf library (add a version check here?). * _set_default_format(format='NETCDF3_64BIT_OFFSET') * elif mode == 'r': # <<<<<<<<<<<<<< - * if diskless: - * ierr = nc_open(path, NC_NOWRITE | NC_DISKLESS, &grpid) + * if memory is not None: + * IF HAS_NC_OPEN_MEM: */ - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_r, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1813, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_r, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1831, __pyx_L1_error) if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":1814 + /* "netCDF4/_netCDF4.pyx":1832 * _set_default_format(format='NETCDF3_64BIT_OFFSET') * elif mode == 'r': - * if diskless: # <<<<<<<<<<<<<< + * if memory is not None: # <<<<<<<<<<<<<< + * IF HAS_NC_OPEN_MEM: + * # Store reference to memory + */ + __pyx_t_1 = (__pyx_v_memory != Py_None); + __pyx_t_6 = (__pyx_t_1 != 0); + if (__pyx_t_6) { + + /* "netCDF4/_netCDF4.pyx":1841 + * ierr = nc_open_mem(path, 0, self._buffer.len, self._buffer.buf, &grpid) + * ELSE: + * msg = """ # <<<<<<<<<<<<<< + * nc_open_mem method not enabled. To enable, install Cython, make sure you have + * version 4.4.1 or higher of the netcdf C lib, and rebuild netcdf4-python.""" + */ + __Pyx_INCREF(__pyx_kp_s_nc_open_mem_method_not_enabled); + __pyx_v_msg = __pyx_kp_s_nc_open_mem_method_not_enabled; + + /* "netCDF4/_netCDF4.pyx":1844 + * nc_open_mem method not enabled. To enable, install Cython, make sure you have + * version 4.4.1 or higher of the netcdf C lib, and rebuild netcdf4-python.""" + * raise ValueError(msg) # <<<<<<<<<<<<<< + * elif diskless: * ierr = nc_open(path, NC_NOWRITE | NC_DISKLESS, &grpid) - * else: */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1814, __pyx_L1_error) - if (__pyx_t_1) { + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1844, __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_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1844, __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, 1844, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1815 + /* "netCDF4/_netCDF4.pyx":1832 + * _set_default_format(format='NETCDF3_64BIT_OFFSET') * elif mode == 'r': - * if diskless: + * if memory is not None: # <<<<<<<<<<<<<< + * IF HAS_NC_OPEN_MEM: + * # Store reference to memory + */ + } + + /* "netCDF4/_netCDF4.pyx":1845 + * version 4.4.1 or higher of the netcdf C lib, and rebuild netcdf4-python.""" + * raise ValueError(msg) + * elif diskless: # <<<<<<<<<<<<<< + * ierr = nc_open(path, NC_NOWRITE | NC_DISKLESS, &grpid) + * else: + */ + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1845, __pyx_L1_error) + if (__pyx_t_6) { + + /* "netCDF4/_netCDF4.pyx":1846 + * raise ValueError(msg) + * elif diskless: * ierr = nc_open(path, NC_NOWRITE | NC_DISKLESS, &grpid) # <<<<<<<<<<<<<< * else: * ierr = nc_open(path, NC_NOWRITE, &grpid) */ - __pyx_t_3 = __Pyx_PyInt_From_int(NC_NOWRITE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1815, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1815, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(NC_NOWRITE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1846, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = PyNumber_Or(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1815, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1846, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = PyNumber_Or(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1846, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1815, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_v_ierr = nc_open(__pyx_v_path, __pyx_t_7, (&__pyx_v_grpid)); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1846, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_ierr = nc_open(__pyx_v_path, __pyx_t_8, (&__pyx_v_grpid)); - /* "netCDF4/_netCDF4.pyx":1814 - * _set_default_format(format='NETCDF3_64BIT_OFFSET') - * elif mode == 'r': - * if diskless: # <<<<<<<<<<<<<< + /* "netCDF4/_netCDF4.pyx":1845 + * version 4.4.1 or higher of the netcdf C lib, and rebuild netcdf4-python.""" + * raise ValueError(msg) + * elif diskless: # <<<<<<<<<<<<<< * ierr = nc_open(path, NC_NOWRITE | NC_DISKLESS, &grpid) * else: */ - goto __pyx_L12; + goto __pyx_L16; } - /* "netCDF4/_netCDF4.pyx":1817 + /* "netCDF4/_netCDF4.pyx":1848 * ierr = nc_open(path, NC_NOWRITE | NC_DISKLESS, &grpid) * else: * ierr = nc_open(path, NC_NOWRITE, &grpid) # <<<<<<<<<<<<<< @@ -13166,76 +13473,76 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD /*else*/ { __pyx_v_ierr = nc_open(__pyx_v_path, NC_NOWRITE, (&__pyx_v_grpid)); } - __pyx_L12:; + __pyx_L16:; - /* "netCDF4/_netCDF4.pyx":1813 + /* "netCDF4/_netCDF4.pyx":1831 * # 4.3.0 of the netcdf library (add a version check here?). * _set_default_format(format='NETCDF3_64BIT_OFFSET') * elif mode == 'r': # <<<<<<<<<<<<<< - * if diskless: - * ierr = nc_open(path, NC_NOWRITE | NC_DISKLESS, &grpid) + * if memory is not None: + * IF HAS_NC_OPEN_MEM: */ - goto __pyx_L6; + goto __pyx_L10; } - /* "netCDF4/_netCDF4.pyx":1818 + /* "netCDF4/_netCDF4.pyx":1849 * else: * ierr = nc_open(path, NC_NOWRITE, &grpid) * elif mode == 'r+' or mode == 'a': # <<<<<<<<<<<<<< * if diskless: * ierr = nc_open(path, NC_WRITE | NC_DISKLESS, &grpid) */ - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_kp_s_r_2, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1818, __pyx_L1_error) - if (!__pyx_t_2) { + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_kp_s_r_2, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1849, __pyx_L1_error) + if (!__pyx_t_1) { } else { - __pyx_t_1 = __pyx_t_2; - goto __pyx_L13_bool_binop_done; + __pyx_t_6 = __pyx_t_1; + goto __pyx_L17_bool_binop_done; } - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_a, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1818, __pyx_L1_error) - __pyx_t_1 = __pyx_t_2; - __pyx_L13_bool_binop_done:; - if (__pyx_t_1) { + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_a, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1849, __pyx_L1_error) + __pyx_t_6 = __pyx_t_1; + __pyx_L17_bool_binop_done:; + if (__pyx_t_6) { - /* "netCDF4/_netCDF4.pyx":1819 + /* "netCDF4/_netCDF4.pyx":1850 * ierr = nc_open(path, NC_NOWRITE, &grpid) * elif mode == 'r+' or mode == 'a': * if diskless: # <<<<<<<<<<<<<< * ierr = nc_open(path, NC_WRITE | NC_DISKLESS, &grpid) * else: */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1819, __pyx_L1_error) - if (__pyx_t_1) { + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1850, __pyx_L1_error) + if (__pyx_t_6) { - /* "netCDF4/_netCDF4.pyx":1820 + /* "netCDF4/_netCDF4.pyx":1851 * elif mode == 'r+' or mode == 'a': * if diskless: * ierr = nc_open(path, NC_WRITE | NC_DISKLESS, &grpid) # <<<<<<<<<<<<<< * else: * ierr = nc_open(path, NC_WRITE, &grpid) */ - __pyx_t_6 = __Pyx_PyInt_From_int(NC_WRITE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1820, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1820, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyNumber_Or(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1820, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_From_int(NC_WRITE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1851, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1851, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1820, __pyx_L1_error) + __pyx_t_4 = PyNumber_Or(__pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1851, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_v_ierr = nc_open(__pyx_v_path, __pyx_t_7, (&__pyx_v_grpid)); + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1851, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_ierr = nc_open(__pyx_v_path, __pyx_t_8, (&__pyx_v_grpid)); - /* "netCDF4/_netCDF4.pyx":1819 + /* "netCDF4/_netCDF4.pyx":1850 * ierr = nc_open(path, NC_NOWRITE, &grpid) * elif mode == 'r+' or mode == 'a': * if diskless: # <<<<<<<<<<<<<< * ierr = nc_open(path, NC_WRITE | NC_DISKLESS, &grpid) * else: */ - goto __pyx_L15; + goto __pyx_L19; } - /* "netCDF4/_netCDF4.pyx":1822 + /* "netCDF4/_netCDF4.pyx":1853 * ierr = nc_open(path, NC_WRITE | NC_DISKLESS, &grpid) * else: * ierr = nc_open(path, NC_WRITE, &grpid) # <<<<<<<<<<<<<< @@ -13245,76 +13552,76 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD /*else*/ { __pyx_v_ierr = nc_open(__pyx_v_path, NC_WRITE, (&__pyx_v_grpid)); } - __pyx_L15:; + __pyx_L19:; - /* "netCDF4/_netCDF4.pyx":1818 + /* "netCDF4/_netCDF4.pyx":1849 * else: * ierr = nc_open(path, NC_NOWRITE, &grpid) * elif mode == 'r+' or mode == 'a': # <<<<<<<<<<<<<< * if diskless: * ierr = nc_open(path, NC_WRITE | NC_DISKLESS, &grpid) */ - goto __pyx_L6; + goto __pyx_L10; } - /* "netCDF4/_netCDF4.pyx":1823 + /* "netCDF4/_netCDF4.pyx":1854 * else: * ierr = nc_open(path, NC_WRITE, &grpid) * elif mode == 'as' or mode == 'r+s': # <<<<<<<<<<<<<< * if diskless: * ierr = nc_open(path, NC_SHARE | NC_DISKLESS, &grpid) */ - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_as, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1823, __pyx_L1_error) - if (!__pyx_t_2) { + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_as, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1854, __pyx_L1_error) + if (!__pyx_t_1) { } else { - __pyx_t_1 = __pyx_t_2; - goto __pyx_L16_bool_binop_done; + __pyx_t_6 = __pyx_t_1; + goto __pyx_L20_bool_binop_done; } - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_kp_s_r_s, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1823, __pyx_L1_error) - __pyx_t_1 = __pyx_t_2; - __pyx_L16_bool_binop_done:; - if (__pyx_t_1) { + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_kp_s_r_s, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1854, __pyx_L1_error) + __pyx_t_6 = __pyx_t_1; + __pyx_L20_bool_binop_done:; + if (__pyx_t_6) { - /* "netCDF4/_netCDF4.pyx":1824 + /* "netCDF4/_netCDF4.pyx":1855 * ierr = nc_open(path, NC_WRITE, &grpid) * elif mode == 'as' or mode == 'r+s': * if diskless: # <<<<<<<<<<<<<< * ierr = nc_open(path, NC_SHARE | NC_DISKLESS, &grpid) * else: */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1824, __pyx_L1_error) - if (__pyx_t_1) { + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1855, __pyx_L1_error) + if (__pyx_t_6) { - /* "netCDF4/_netCDF4.pyx":1825 + /* "netCDF4/_netCDF4.pyx":1856 * elif mode == 'as' or mode == 'r+s': * if diskless: * ierr = nc_open(path, NC_SHARE | NC_DISKLESS, &grpid) # <<<<<<<<<<<<<< * else: * ierr = nc_open(path, NC_SHARE, &grpid) */ - __pyx_t_3 = __Pyx_PyInt_From_int(NC_SHARE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1825, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1825, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(NC_SHARE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = PyNumber_Or(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1825, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1856, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = PyNumber_Or(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1856, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1825, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_v_ierr = nc_open(__pyx_v_path, __pyx_t_7, (&__pyx_v_grpid)); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1856, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_ierr = nc_open(__pyx_v_path, __pyx_t_8, (&__pyx_v_grpid)); - /* "netCDF4/_netCDF4.pyx":1824 + /* "netCDF4/_netCDF4.pyx":1855 * ierr = nc_open(path, NC_WRITE, &grpid) * elif mode == 'as' or mode == 'r+s': * if diskless: # <<<<<<<<<<<<<< * ierr = nc_open(path, NC_SHARE | NC_DISKLESS, &grpid) * else: */ - goto __pyx_L18; + goto __pyx_L22; } - /* "netCDF4/_netCDF4.pyx":1827 + /* "netCDF4/_netCDF4.pyx":1858 * ierr = nc_open(path, NC_SHARE | NC_DISKLESS, &grpid) * else: * ierr = nc_open(path, NC_SHARE, &grpid) # <<<<<<<<<<<<<< @@ -13324,88 +13631,88 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD /*else*/ { __pyx_v_ierr = nc_open(__pyx_v_path, NC_SHARE, (&__pyx_v_grpid)); } - __pyx_L18:; + __pyx_L22:; - /* "netCDF4/_netCDF4.pyx":1823 + /* "netCDF4/_netCDF4.pyx":1854 * else: * ierr = nc_open(path, NC_WRITE, &grpid) * elif mode == 'as' or mode == 'r+s': # <<<<<<<<<<<<<< * if diskless: * ierr = nc_open(path, NC_SHARE | NC_DISKLESS, &grpid) */ - goto __pyx_L6; + goto __pyx_L10; } - /* "netCDF4/_netCDF4.pyx":1828 + /* "netCDF4/_netCDF4.pyx":1859 * else: * ierr = nc_open(path, NC_SHARE, &grpid) * elif mode == 'ws': # <<<<<<<<<<<<<< * if clobber: * if diskless: */ - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_ws, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1828, __pyx_L1_error) - if (__pyx_t_1) { + __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_ws, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1859, __pyx_L1_error) + if (__pyx_t_6) { - /* "netCDF4/_netCDF4.pyx":1829 + /* "netCDF4/_netCDF4.pyx":1860 * ierr = nc_open(path, NC_SHARE, &grpid) * elif mode == 'ws': * if clobber: # <<<<<<<<<<<<<< * if diskless: * if persist: */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_clobber); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1829, __pyx_L1_error) - if (__pyx_t_1) { + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_clobber); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1860, __pyx_L1_error) + if (__pyx_t_6) { - /* "netCDF4/_netCDF4.pyx":1830 + /* "netCDF4/_netCDF4.pyx":1861 * elif mode == 'ws': * if clobber: * if diskless: # <<<<<<<<<<<<<< * if persist: * ierr = nc_create(path, NC_WRITE | NC_SHARE | NC_CLOBBER | NC_DISKLESS , &grpid) */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1830, __pyx_L1_error) - if (__pyx_t_1) { + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1861, __pyx_L1_error) + if (__pyx_t_6) { - /* "netCDF4/_netCDF4.pyx":1831 + /* "netCDF4/_netCDF4.pyx":1862 * if clobber: * if diskless: * if persist: # <<<<<<<<<<<<<< * ierr = nc_create(path, NC_WRITE | NC_SHARE | NC_CLOBBER | NC_DISKLESS , &grpid) * else: */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_persist); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1831, __pyx_L1_error) - if (__pyx_t_1) { + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_persist); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1862, __pyx_L1_error) + if (__pyx_t_6) { - /* "netCDF4/_netCDF4.pyx":1832 + /* "netCDF4/_netCDF4.pyx":1863 * if diskless: * if persist: * ierr = nc_create(path, NC_WRITE | NC_SHARE | NC_CLOBBER | NC_DISKLESS , &grpid) # <<<<<<<<<<<<<< * else: * ierr = nc_create(path, NC_SHARE | NC_CLOBBER | NC_DISKLESS , &grpid) */ - __pyx_t_6 = __Pyx_PyInt_From_int(((NC_WRITE | NC_SHARE) | NC_CLOBBER)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1832, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1832, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyNumber_Or(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1832, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_From_int(((NC_WRITE | NC_SHARE) | NC_CLOBBER)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1863, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1863, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1832, __pyx_L1_error) + __pyx_t_4 = PyNumber_Or(__pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1863, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_v_ierr = nc_create(__pyx_v_path, __pyx_t_7, (&__pyx_v_grpid)); + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1863, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_ierr = nc_create(__pyx_v_path, __pyx_t_8, (&__pyx_v_grpid)); - /* "netCDF4/_netCDF4.pyx":1831 + /* "netCDF4/_netCDF4.pyx":1862 * if clobber: * if diskless: * if persist: # <<<<<<<<<<<<<< * ierr = nc_create(path, NC_WRITE | NC_SHARE | NC_CLOBBER | NC_DISKLESS , &grpid) * else: */ - goto __pyx_L21; + goto __pyx_L25; } - /* "netCDF4/_netCDF4.pyx":1834 + /* "netCDF4/_netCDF4.pyx":1865 * ierr = nc_create(path, NC_WRITE | NC_SHARE | NC_CLOBBER | NC_DISKLESS , &grpid) * else: * ierr = nc_create(path, NC_SHARE | NC_CLOBBER | NC_DISKLESS , &grpid) # <<<<<<<<<<<<<< @@ -13413,31 +13720,31 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD * ierr = nc_create(path, NC_SHARE | NC_CLOBBER, &grpid) */ /*else*/ { - __pyx_t_3 = __Pyx_PyInt_From_int((NC_SHARE | NC_CLOBBER)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1834, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1834, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int((NC_SHARE | NC_CLOBBER)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1865, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = PyNumber_Or(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1834, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1865, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = PyNumber_Or(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1865, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1834, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_v_ierr = nc_create(__pyx_v_path, __pyx_t_7, (&__pyx_v_grpid)); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1865, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_ierr = nc_create(__pyx_v_path, __pyx_t_8, (&__pyx_v_grpid)); } - __pyx_L21:; + __pyx_L25:; - /* "netCDF4/_netCDF4.pyx":1830 + /* "netCDF4/_netCDF4.pyx":1861 * elif mode == 'ws': * if clobber: * if diskless: # <<<<<<<<<<<<<< * if persist: * ierr = nc_create(path, NC_WRITE | NC_SHARE | NC_CLOBBER | NC_DISKLESS , &grpid) */ - goto __pyx_L20; + goto __pyx_L24; } - /* "netCDF4/_netCDF4.pyx":1836 + /* "netCDF4/_netCDF4.pyx":1867 * ierr = nc_create(path, NC_SHARE | NC_CLOBBER | NC_DISKLESS , &grpid) * else: * ierr = nc_create(path, NC_SHARE | NC_CLOBBER, &grpid) # <<<<<<<<<<<<<< @@ -13447,19 +13754,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD /*else*/ { __pyx_v_ierr = nc_create(__pyx_v_path, (NC_SHARE | NC_CLOBBER), (&__pyx_v_grpid)); } - __pyx_L20:; + __pyx_L24:; - /* "netCDF4/_netCDF4.pyx":1829 + /* "netCDF4/_netCDF4.pyx":1860 * ierr = nc_open(path, NC_SHARE, &grpid) * elif mode == 'ws': * if clobber: # <<<<<<<<<<<<<< * if diskless: * if persist: */ - goto __pyx_L19; + goto __pyx_L23; } - /* "netCDF4/_netCDF4.pyx":1838 + /* "netCDF4/_netCDF4.pyx":1869 * ierr = nc_create(path, NC_SHARE | NC_CLOBBER, &grpid) * else: * if diskless: # <<<<<<<<<<<<<< @@ -13467,49 +13774,49 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD * ierr = nc_create(path, NC_WRITE | NC_SHARE | NC_NOCLOBBER | NC_DISKLESS , &grpid) */ /*else*/ { - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1838, __pyx_L1_error) - if (__pyx_t_1) { + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1869, __pyx_L1_error) + if (__pyx_t_6) { - /* "netCDF4/_netCDF4.pyx":1839 + /* "netCDF4/_netCDF4.pyx":1870 * else: * if diskless: * if persist: # <<<<<<<<<<<<<< * ierr = nc_create(path, NC_WRITE | NC_SHARE | NC_NOCLOBBER | NC_DISKLESS , &grpid) * else: */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_persist); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1839, __pyx_L1_error) - if (__pyx_t_1) { + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_persist); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1870, __pyx_L1_error) + if (__pyx_t_6) { - /* "netCDF4/_netCDF4.pyx":1840 + /* "netCDF4/_netCDF4.pyx":1871 * if diskless: * if persist: * ierr = nc_create(path, NC_WRITE | NC_SHARE | NC_NOCLOBBER | NC_DISKLESS , &grpid) # <<<<<<<<<<<<<< * else: * ierr = nc_create(path, NC_SHARE | NC_NOCLOBBER | NC_DISKLESS , &grpid) */ - __pyx_t_6 = __Pyx_PyInt_From_int(((NC_WRITE | NC_SHARE) | NC_NOCLOBBER)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1840, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1840, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyNumber_Or(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1840, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_From_int(((NC_WRITE | NC_SHARE) | NC_NOCLOBBER)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1871, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1871, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1840, __pyx_L1_error) + __pyx_t_4 = PyNumber_Or(__pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1871, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_v_ierr = nc_create(__pyx_v_path, __pyx_t_7, (&__pyx_v_grpid)); + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1871, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_ierr = nc_create(__pyx_v_path, __pyx_t_8, (&__pyx_v_grpid)); - /* "netCDF4/_netCDF4.pyx":1839 + /* "netCDF4/_netCDF4.pyx":1870 * else: * if diskless: * if persist: # <<<<<<<<<<<<<< * ierr = nc_create(path, NC_WRITE | NC_SHARE | NC_NOCLOBBER | NC_DISKLESS , &grpid) * else: */ - goto __pyx_L23; + goto __pyx_L27; } - /* "netCDF4/_netCDF4.pyx":1842 + /* "netCDF4/_netCDF4.pyx":1873 * ierr = nc_create(path, NC_WRITE | NC_SHARE | NC_NOCLOBBER | NC_DISKLESS , &grpid) * else: * ierr = nc_create(path, NC_SHARE | NC_NOCLOBBER | NC_DISKLESS , &grpid) # <<<<<<<<<<<<<< @@ -13517,31 +13824,31 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD * ierr = nc_create(path, NC_SHARE | NC_NOCLOBBER, &grpid) */ /*else*/ { - __pyx_t_3 = __Pyx_PyInt_From_int((NC_SHARE | NC_NOCLOBBER)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1842, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1842, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int((NC_SHARE | NC_NOCLOBBER)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1873, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = PyNumber_Or(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1842, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1873, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = PyNumber_Or(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1873, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1842, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_v_ierr = nc_create(__pyx_v_path, __pyx_t_7, (&__pyx_v_grpid)); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1873, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_ierr = nc_create(__pyx_v_path, __pyx_t_8, (&__pyx_v_grpid)); } - __pyx_L23:; + __pyx_L27:; - /* "netCDF4/_netCDF4.pyx":1838 + /* "netCDF4/_netCDF4.pyx":1869 * ierr = nc_create(path, NC_SHARE | NC_CLOBBER, &grpid) * else: * if diskless: # <<<<<<<<<<<<<< * if persist: * ierr = nc_create(path, NC_WRITE | NC_SHARE | NC_NOCLOBBER | NC_DISKLESS , &grpid) */ - goto __pyx_L22; + goto __pyx_L26; } - /* "netCDF4/_netCDF4.pyx":1844 + /* "netCDF4/_netCDF4.pyx":1875 * ierr = nc_create(path, NC_SHARE | NC_NOCLOBBER | NC_DISKLESS , &grpid) * else: * ierr = nc_create(path, NC_SHARE | NC_NOCLOBBER, &grpid) # <<<<<<<<<<<<<< @@ -13551,132 +13858,106 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD /*else*/ { __pyx_v_ierr = nc_create(__pyx_v_path, (NC_SHARE | NC_NOCLOBBER), (&__pyx_v_grpid)); } - __pyx_L22:; + __pyx_L26:; } - __pyx_L19:; + __pyx_L23:; - /* "netCDF4/_netCDF4.pyx":1828 + /* "netCDF4/_netCDF4.pyx":1859 * else: * ierr = nc_open(path, NC_SHARE, &grpid) * elif mode == 'ws': # <<<<<<<<<<<<<< * if clobber: * if diskless: */ - goto __pyx_L6; + goto __pyx_L10; } - /* "netCDF4/_netCDF4.pyx":1846 + /* "netCDF4/_netCDF4.pyx":1877 * ierr = nc_create(path, NC_SHARE | NC_NOCLOBBER, &grpid) * else: * raise ValueError("mode must be 'w', 'r', 'a' or 'r+', got '%s'" % mode) # <<<<<<<<<<<<<< - * if ierr != NC_NOERR: - * raise IOError((nc_strerror(ierr)).decode('ascii')) + * + * _ensure_nc_success(ierr, IOError) */ /*else*/ { - __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_mode_must_be_w_r_a_or_r_got_s, __pyx_v_mode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1846, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1846, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); - __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1846, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_Raise(__pyx_t_6, 0, 0, 0); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 1846, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_mode_must_be_w_r_a_or_r_got_s, __pyx_v_mode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1877, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1877, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7); + __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1877, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_7, 0, 0, 0); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __PYX_ERR(0, 1877, __pyx_L1_error) } - __pyx_L6:; + __pyx_L10:; - /* "netCDF4/_netCDF4.pyx":1847 - * else: - * raise ValueError("mode must be 'w', 'r', 'a' or 'r+', got '%s'" % mode) - * if ierr != NC_NOERR: # <<<<<<<<<<<<<< - * raise IOError((nc_strerror(ierr)).decode('ascii')) - * # data model and file format attributes - */ - __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0); - if (__pyx_t_1) { - - /* "netCDF4/_netCDF4.pyx":1848 - * raise ValueError("mode must be 'w', 'r', 'a' or 'r+', got '%s'" % mode) - * if ierr != NC_NOERR: - * raise IOError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< - * # data model and file format attributes - * self.data_model = _get_format(grpid) - */ - __pyx_t_5 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_6 = __Pyx_decode_c_string(__pyx_t_5, 0, strlen(__pyx_t_5), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1848, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1848, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_INCREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1848, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_Raise(__pyx_t_6, 0, 0, 0); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 1848, __pyx_L1_error) - - /* "netCDF4/_netCDF4.pyx":1847 - * else: + /* "netCDF4/_netCDF4.pyx":1879 * raise ValueError("mode must be 'w', 'r', 'a' or 'r+', got '%s'" % mode) - * if ierr != NC_NOERR: # <<<<<<<<<<<<<< - * raise IOError((nc_strerror(ierr)).decode('ascii')) + * + * _ensure_nc_success(ierr, IOError) # <<<<<<<<<<<<<< + * * # data model and file format attributes */ - } + __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_ierr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1879, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_9.__pyx_n = 1; + __pyx_t_9.err_cls = __pyx_builtin_IOError; + __pyx_t_3 = __pyx_f_7netCDF4_8_netCDF4__ensure_nc_success(__pyx_t_7, &__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1879, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":1850 - * raise IOError((nc_strerror(ierr)).decode('ascii')) + /* "netCDF4/_netCDF4.pyx":1882 + * * # data model and file format attributes * self.data_model = _get_format(grpid) # <<<<<<<<<<<<<< * # data_model attribute used to be file_format (versions < 1.0.8), retain * # file_format for backwards compatibility. */ - __pyx_t_6 = __pyx_f_7netCDF4_8_netCDF4__get_format(__pyx_v_grpid); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1850, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_6); + __pyx_t_3 = __pyx_f_7netCDF4_8_netCDF4__get_format(__pyx_v_grpid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1882, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->data_model); __Pyx_DECREF(__pyx_v_self->data_model); - __pyx_v_self->data_model = __pyx_t_6; - __pyx_t_6 = 0; + __pyx_v_self->data_model = __pyx_t_3; + __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":1853 + /* "netCDF4/_netCDF4.pyx":1885 * # data_model attribute used to be file_format (versions < 1.0.8), retain * # file_format for backwards compatibility. * self.file_format = self.data_model # <<<<<<<<<<<<<< * self.disk_format = _get_full_format(grpid) * # diskless read access only works with NETCDF_CLASSIC (for now) */ - __pyx_t_6 = __pyx_v_self->data_model; - __Pyx_INCREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_6); + __pyx_t_3 = __pyx_v_self->data_model; + __Pyx_INCREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->file_format); __Pyx_DECREF(__pyx_v_self->file_format); - __pyx_v_self->file_format = __pyx_t_6; - __pyx_t_6 = 0; + __pyx_v_self->file_format = __pyx_t_3; + __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":1854 + /* "netCDF4/_netCDF4.pyx":1886 * # file_format for backwards compatibility. * self.file_format = self.data_model * self.disk_format = _get_full_format(grpid) # <<<<<<<<<<<<<< * # diskless read access only works with NETCDF_CLASSIC (for now) * #ncopen = mode.startswith('a') or mode.startswith('r') */ - __pyx_t_6 = __pyx_f_7netCDF4_8_netCDF4__get_full_format(__pyx_v_grpid); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1854, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_6); + __pyx_t_3 = __pyx_f_7netCDF4_8_netCDF4__get_full_format(__pyx_v_grpid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1886, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->disk_format); __Pyx_DECREF(__pyx_v_self->disk_format); - __pyx_v_self->disk_format = __pyx_t_6; - __pyx_t_6 = 0; + __pyx_v_self->disk_format = __pyx_t_3; + __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":1859 + /* "netCDF4/_netCDF4.pyx":1891 * #if diskless and self.data_model != 'NETCDF3_CLASSIC' and ncopen: * # raise ValueError("diskless access only supported for NETCDF3_CLASSIC format") * self._grpid = grpid # <<<<<<<<<<<<<< @@ -13685,7 +13966,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD */ __pyx_v_self->_grpid = __pyx_v_grpid; - /* "netCDF4/_netCDF4.pyx":1860 + /* "netCDF4/_netCDF4.pyx":1892 * # raise ValueError("diskless access only supported for NETCDF3_CLASSIC format") * self._grpid = grpid * self._isopen = 1 # <<<<<<<<<<<<<< @@ -13694,20 +13975,20 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD */ __pyx_v_self->_isopen = 1; - /* "netCDF4/_netCDF4.pyx":1861 + /* "netCDF4/_netCDF4.pyx":1893 * self._grpid = grpid * self._isopen = 1 * self.path = '/' # <<<<<<<<<<<<<< * self.parent = None * self.keepweakref = keepweakref */ - __Pyx_INCREF(__pyx_kp_s__15); - __Pyx_GIVEREF(__pyx_kp_s__15); + __Pyx_INCREF(__pyx_kp_s__17); + __Pyx_GIVEREF(__pyx_kp_s__17); __Pyx_GOTREF(__pyx_v_self->path); __Pyx_DECREF(__pyx_v_self->path); - __pyx_v_self->path = __pyx_kp_s__15; + __pyx_v_self->path = __pyx_kp_s__17; - /* "netCDF4/_netCDF4.pyx":1862 + /* "netCDF4/_netCDF4.pyx":1894 * self._isopen = 1 * self.path = '/' * self.parent = None # <<<<<<<<<<<<<< @@ -13720,7 +14001,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD __Pyx_DECREF(__pyx_v_self->parent); __pyx_v_self->parent = Py_None; - /* "netCDF4/_netCDF4.pyx":1863 + /* "netCDF4/_netCDF4.pyx":1895 * self.path = '/' * self.parent = None * self.keepweakref = keepweakref # <<<<<<<<<<<<<< @@ -13733,17 +14014,17 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD __Pyx_DECREF(__pyx_v_self->keepweakref); __pyx_v_self->keepweakref = __pyx_v_keepweakref; - /* "netCDF4/_netCDF4.pyx":1865 + /* "netCDF4/_netCDF4.pyx":1897 * self.keepweakref = keepweakref * # get compound, vlen and enum types in the root Group. * self.cmptypes, self.vltypes, self.enumtypes = _get_types(self) # <<<<<<<<<<<<<< * # get dimensions in the root group. * self.dimensions = _get_dims(self) */ - __pyx_t_6 = __pyx_f_7netCDF4_8_netCDF4__get_types(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1865, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { - PyObject* sequence = __pyx_t_6; + __pyx_t_3 = __pyx_f_7netCDF4_8_netCDF4__get_types(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1897, __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; #if !CYTHON_COMPILING_IN_PYPY Py_ssize_t size = Py_SIZE(sequence); #else @@ -13752,135 +14033,135 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1865, __pyx_L1_error) + __PYX_ERR(0, 1897, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { - __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); - __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); - __pyx_t_8 = PyTuple_GET_ITEM(sequence, 2); + __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_10 = PyTuple_GET_ITEM(sequence, 2); } else { - __pyx_t_4 = PyList_GET_ITEM(sequence, 0); - __pyx_t_3 = PyList_GET_ITEM(sequence, 1); - __pyx_t_8 = PyList_GET_ITEM(sequence, 2); + __pyx_t_7 = PyList_GET_ITEM(sequence, 0); + __pyx_t_4 = PyList_GET_ITEM(sequence, 1); + __pyx_t_10 = PyList_GET_ITEM(sequence, 2); } + __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(__pyx_t_3); - __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(__pyx_t_10); #else - __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1865, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1897, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1897, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1865, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1865, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1897, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); #endif - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_9 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1865, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext; - index = 0; __pyx_t_4 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_4)) goto __pyx_L25_unpacking_failed; + __pyx_t_11 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1897, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext; + index = 0; __pyx_t_7 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_7)) goto __pyx_L28_unpacking_failed; + __Pyx_GOTREF(__pyx_t_7); + index = 1; __pyx_t_4 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_4)) goto __pyx_L28_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); - index = 1; __pyx_t_3 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_3)) goto __pyx_L25_unpacking_failed; - __Pyx_GOTREF(__pyx_t_3); - index = 2; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L25_unpacking_failed; - __Pyx_GOTREF(__pyx_t_8); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 3) < 0) __PYX_ERR(0, 1865, __pyx_L1_error) - __pyx_t_10 = NULL; - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - goto __pyx_L26_unpacking_done; - __pyx_L25_unpacking_failed:; - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_10 = NULL; + index = 2; __pyx_t_10 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L28_unpacking_failed; + __Pyx_GOTREF(__pyx_t_10); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 3) < 0) __PYX_ERR(0, 1897, __pyx_L1_error) + __pyx_t_12 = NULL; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + goto __pyx_L29_unpacking_done; + __pyx_L28_unpacking_failed:; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1865, __pyx_L1_error) - __pyx_L26_unpacking_done:; + __PYX_ERR(0, 1897, __pyx_L1_error) + __pyx_L29_unpacking_done:; } - __Pyx_GIVEREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_7); __Pyx_GOTREF(__pyx_v_self->cmptypes); __Pyx_DECREF(__pyx_v_self->cmptypes); - __pyx_v_self->cmptypes = __pyx_t_4; - __pyx_t_4 = 0; - __Pyx_GIVEREF(__pyx_t_3); + __pyx_v_self->cmptypes = __pyx_t_7; + __pyx_t_7 = 0; + __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->vltypes); __Pyx_DECREF(__pyx_v_self->vltypes); - __pyx_v_self->vltypes = __pyx_t_3; - __pyx_t_3 = 0; - __Pyx_GIVEREF(__pyx_t_8); + __pyx_v_self->vltypes = __pyx_t_4; + __pyx_t_4 = 0; + __Pyx_GIVEREF(__pyx_t_10); __Pyx_GOTREF(__pyx_v_self->enumtypes); __Pyx_DECREF(__pyx_v_self->enumtypes); - __pyx_v_self->enumtypes = __pyx_t_8; - __pyx_t_8 = 0; + __pyx_v_self->enumtypes = __pyx_t_10; + __pyx_t_10 = 0; - /* "netCDF4/_netCDF4.pyx":1867 + /* "netCDF4/_netCDF4.pyx":1899 * self.cmptypes, self.vltypes, self.enumtypes = _get_types(self) * # get dimensions in the root group. * self.dimensions = _get_dims(self) # <<<<<<<<<<<<<< * # get variables in the root Group. * self.variables = _get_vars(self) */ - __pyx_t_6 = __pyx_f_7netCDF4_8_netCDF4__get_dims(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1867, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_6); + __pyx_t_3 = __pyx_f_7netCDF4_8_netCDF4__get_dims(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1899, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->dimensions); __Pyx_DECREF(__pyx_v_self->dimensions); - __pyx_v_self->dimensions = __pyx_t_6; - __pyx_t_6 = 0; + __pyx_v_self->dimensions = __pyx_t_3; + __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":1869 + /* "netCDF4/_netCDF4.pyx":1901 * self.dimensions = _get_dims(self) * # get variables in the root Group. * self.variables = _get_vars(self) # <<<<<<<<<<<<<< * # get groups in the root Group. * if self.data_model == 'NETCDF4': */ - __pyx_t_6 = __pyx_f_7netCDF4_8_netCDF4__get_vars(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1869, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_6); + __pyx_t_3 = __pyx_f_7netCDF4_8_netCDF4__get_vars(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1901, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->variables); __Pyx_DECREF(__pyx_v_self->variables); - __pyx_v_self->variables = __pyx_t_6; - __pyx_t_6 = 0; + __pyx_v_self->variables = __pyx_t_3; + __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":1871 + /* "netCDF4/_netCDF4.pyx":1903 * self.variables = _get_vars(self) * # get groups in the root Group. * if self.data_model == 'NETCDF4': # <<<<<<<<<<<<<< * self.groups = _get_grps(self) * else: */ - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->data_model, __pyx_n_s_NETCDF4, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1871, __pyx_L1_error) - if (__pyx_t_1) { + __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_self->data_model, __pyx_n_s_NETCDF4, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1903, __pyx_L1_error) + if (__pyx_t_6) { - /* "netCDF4/_netCDF4.pyx":1872 + /* "netCDF4/_netCDF4.pyx":1904 * # get groups in the root Group. * if self.data_model == 'NETCDF4': * self.groups = _get_grps(self) # <<<<<<<<<<<<<< * else: * self.groups = OrderedDict() */ - __pyx_t_6 = __pyx_f_7netCDF4_8_netCDF4__get_grps(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1872, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_6); + __pyx_t_3 = __pyx_f_7netCDF4_8_netCDF4__get_grps(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1904, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->groups); __Pyx_DECREF(__pyx_v_self->groups); - __pyx_v_self->groups = __pyx_t_6; - __pyx_t_6 = 0; + __pyx_v_self->groups = __pyx_t_3; + __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":1871 + /* "netCDF4/_netCDF4.pyx":1903 * self.variables = _get_vars(self) * # get groups in the root Group. * if self.data_model == 'NETCDF4': # <<<<<<<<<<<<<< * self.groups = _get_grps(self) * else: */ - goto __pyx_L27; + goto __pyx_L30; } - /* "netCDF4/_netCDF4.pyx":1874 + /* "netCDF4/_netCDF4.pyx":1906 * self.groups = _get_grps(self) * else: * self.groups = OrderedDict() # <<<<<<<<<<<<<< @@ -13888,39 +14169,39 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD * # these allow Dataset objects to be used via a "with" statement. */ /*else*/ { - __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1874, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_3 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { - __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8); - if (likely(__pyx_t_3)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); - __Pyx_INCREF(__pyx_t_3); + __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1906, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_10); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_8, function); + __Pyx_DECREF_SET(__pyx_t_10, function); } } - if (__pyx_t_3) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1874, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_4) { + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1906, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { - __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1874, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1906, __pyx_L1_error) } - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_GIVEREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->groups); __Pyx_DECREF(__pyx_v_self->groups); - __pyx_v_self->groups = __pyx_t_6; - __pyx_t_6 = 0; + __pyx_v_self->groups = __pyx_t_3; + __pyx_t_3 = 0; } - __pyx_L27:; + __pyx_L30:; - /* "netCDF4/_netCDF4.pyx":1714 + /* "netCDF4/_netCDF4.pyx":1721 * the parent Dataset or Group.""" * * def __init__(self, filename, mode='r', clobber=True, format='NETCDF4', # <<<<<<<<<<<<<< - * diskless=False, persist=False, keepweakref=False, **kwargs): + * diskless=False, persist=False, keepweakref=False, memory=None, **kwargs): * """ */ @@ -13930,18 +14211,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_8); - __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_bytestr); + __Pyx_XDECREF(__pyx_v_msg); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":1877 +/* "netCDF4/_netCDF4.pyx":1909 * * # these allow Dataset objects to be used via a "with" statement. * def __enter__(self): # <<<<<<<<<<<<<< @@ -13967,7 +14249,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_2__enter__(struct __pyx_ob __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__enter__", 0); - /* "netCDF4/_netCDF4.pyx":1878 + /* "netCDF4/_netCDF4.pyx":1910 * # these allow Dataset objects to be used via a "with" statement. * def __enter__(self): * return self # <<<<<<<<<<<<<< @@ -13979,7 +14261,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_2__enter__(struct __pyx_ob __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":1877 + /* "netCDF4/_netCDF4.pyx":1909 * * # these allow Dataset objects to be used via a "with" statement. * def __enter__(self): # <<<<<<<<<<<<<< @@ -13994,7 +14276,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_2__enter__(struct __pyx_ob return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":1879 +/* "netCDF4/_netCDF4.pyx":1911 * def __enter__(self): * return self * def __exit__(self,atype,value,traceback): # <<<<<<<<<<<<<< @@ -14032,16 +14314,16 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_5__exit__(PyObject *__pyx_ case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); __PYX_ERR(0, 1879, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); __PYX_ERR(0, 1911, __pyx_L3_error) } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_traceback)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); __PYX_ERR(0, 1879, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); __PYX_ERR(0, 1911, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__exit__") < 0)) __PYX_ERR(0, 1879, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__exit__") < 0)) __PYX_ERR(0, 1911, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -14056,7 +14338,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_5__exit__(PyObject *__pyx_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1879, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1911, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -14077,14 +14359,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_4__exit__(struct __pyx_obj PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__exit__", 0); - /* "netCDF4/_netCDF4.pyx":1880 + /* "netCDF4/_netCDF4.pyx":1912 * return self * def __exit__(self,atype,value,traceback): * self.close() # <<<<<<<<<<<<<< * * def __getitem__(self, elem): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1880, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1912, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -14097,16 +14379,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_4__exit__(struct __pyx_obj } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1880, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1912, __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, 1880, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1912, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1879 + /* "netCDF4/_netCDF4.pyx":1911 * def __enter__(self): * return self * def __exit__(self,atype,value,traceback): # <<<<<<<<<<<<<< @@ -14129,7 +14411,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_4__exit__(struct __pyx_obj return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":1882 +/* "netCDF4/_netCDF4.pyx":1914 * self.close() * * def __getitem__(self, elem): # <<<<<<<<<<<<<< @@ -14170,16 +14452,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_6__getitem__(struct __pyx_ __Pyx_RefNannySetupContext("__getitem__", 0); __Pyx_INCREF(__pyx_v_elem); - /* "netCDF4/_netCDF4.pyx":1885 + /* "netCDF4/_netCDF4.pyx":1917 * # return variable or group defined in relative path. * # split out group names in unix path. * elem = posixpath.normpath(elem) # <<<<<<<<<<<<<< * # last name in path, could be a variable or group * dirname, lastname = posixpath.split(elem) */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_posixpath); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1885, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_posixpath); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1917, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_normpath); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1885, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_normpath); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1917, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -14193,13 +14475,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_6__getitem__(struct __pyx_ } } if (!__pyx_t_2) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_elem); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1885, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_elem); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1917, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_elem}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1885, __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, 1917, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -14207,19 +14489,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_6__getitem__(struct __pyx_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_elem}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1885, __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, 1917, __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, 1885, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1917, __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_elem); __Pyx_GIVEREF(__pyx_v_elem); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_elem); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1885, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1917, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -14228,16 +14510,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_6__getitem__(struct __pyx_ __Pyx_DECREF_SET(__pyx_v_elem, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1887 + /* "netCDF4/_netCDF4.pyx":1919 * elem = posixpath.normpath(elem) * # last name in path, could be a variable or group * dirname, lastname = posixpath.split(elem) # <<<<<<<<<<<<<< * nestedgroups = dirname.split('/') * group = self */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_posixpath); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1887, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_posixpath); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1919, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1887, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1919, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -14251,13 +14533,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_6__getitem__(struct __pyx_ } } if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_elem); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1887, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_elem); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1919, __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_elem}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1887, __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, 1919, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -14265,19 +14547,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_6__getitem__(struct __pyx_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_elem}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1887, __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, 1919, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1887, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1919, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_INCREF(__pyx_v_elem); __Pyx_GIVEREF(__pyx_v_elem); PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_elem); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1887, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1919, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -14293,7 +14575,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_6__getitem__(struct __pyx_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1887, __pyx_L1_error) + __PYX_ERR(0, 1919, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -14306,15 +14588,15 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_6__getitem__(struct __pyx_ __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_2); #else - __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1887, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1919, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1887, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1919, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1887, __pyx_L1_error) + __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1919, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; @@ -14322,7 +14604,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_6__getitem__(struct __pyx_ __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_2 = __pyx_t_5(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_3), 2) < 0) __PYX_ERR(0, 1887, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_3), 2) < 0) __PYX_ERR(0, 1919, __pyx_L1_error) __pyx_t_5 = NULL; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L4_unpacking_done; @@ -14330,7 +14612,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_6__getitem__(struct __pyx_ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1887, __pyx_L1_error) + __PYX_ERR(0, 1919, __pyx_L1_error) __pyx_L4_unpacking_done:; } __pyx_v_dirname = __pyx_t_4; @@ -14338,22 +14620,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_6__getitem__(struct __pyx_ __pyx_v_lastname = __pyx_t_2; __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":1888 + /* "netCDF4/_netCDF4.pyx":1920 * # last name in path, could be a variable or group * dirname, lastname = posixpath.split(elem) * nestedgroups = dirname.split('/') # <<<<<<<<<<<<<< * group = self * # iterate over groups in path. */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dirname, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1888, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dirname, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1920, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1888, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1920, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_nestedgroups = __pyx_t_2; __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":1889 + /* "netCDF4/_netCDF4.pyx":1921 * dirname, lastname = posixpath.split(elem) * nestedgroups = dirname.split('/') * group = self # <<<<<<<<<<<<<< @@ -14363,7 +14645,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_6__getitem__(struct __pyx_ __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_v_group = ((PyObject *)__pyx_v_self); - /* "netCDF4/_netCDF4.pyx":1891 + /* "netCDF4/_netCDF4.pyx":1923 * group = self * # iterate over groups in path. * for g in nestedgroups: # <<<<<<<<<<<<<< @@ -14374,26 +14656,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_6__getitem__(struct __pyx_ __pyx_t_2 = __pyx_v_nestedgroups; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_nestedgroups); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1891, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_nestedgroups); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1923, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1891, __pyx_L1_error) + __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1923, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1891, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1923, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1891, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1923, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1891, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1923, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1891, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1923, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -14403,7 +14685,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_6__getitem__(struct __pyx_ 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, 1891, __pyx_L1_error) + else __PYX_ERR(0, 1923, __pyx_L1_error) } break; } @@ -14412,25 +14694,25 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_6__getitem__(struct __pyx_ __Pyx_XDECREF_SET(__pyx_v_g, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1892 + /* "netCDF4/_netCDF4.pyx":1924 * # iterate over groups in path. * for g in nestedgroups: * if g: group = group.groups[g] # <<<<<<<<<<<<<< * # return last one, either a group or a variable. * if lastname in group.groups: */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_g); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1892, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_g); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1924, __pyx_L1_error) if (__pyx_t_8) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_groups); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1892, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_groups); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1924, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyObject_GetItem(__pyx_t_1, __pyx_v_g); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1892, __pyx_L1_error) + __pyx_t_4 = PyObject_GetItem(__pyx_t_1, __pyx_v_g); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1924, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_group, __pyx_t_4); __pyx_t_4 = 0; } - /* "netCDF4/_netCDF4.pyx":1891 + /* "netCDF4/_netCDF4.pyx":1923 * group = self * # iterate over groups in path. * for g in nestedgroups: # <<<<<<<<<<<<<< @@ -14440,21 +14722,21 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_6__getitem__(struct __pyx_ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":1894 + /* "netCDF4/_netCDF4.pyx":1926 * if g: group = group.groups[g] * # return last one, either a group or a variable. * if lastname in group.groups: # <<<<<<<<<<<<<< * return group.groups[lastname] * elif lastname in group.variables: */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_groups); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1894, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_groups); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1926, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_lastname, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1894, __pyx_L1_error) + __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_lastname, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1926, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { - /* "netCDF4/_netCDF4.pyx":1895 + /* "netCDF4/_netCDF4.pyx":1927 * # return last one, either a group or a variable. * if lastname in group.groups: * return group.groups[lastname] # <<<<<<<<<<<<<< @@ -14462,16 +14744,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_6__getitem__(struct __pyx_ * return group.variables[lastname] */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_groups); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1895, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_groups); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1927, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyObject_GetItem(__pyx_t_2, __pyx_v_lastname); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1895, __pyx_L1_error) + __pyx_t_4 = PyObject_GetItem(__pyx_t_2, __pyx_v_lastname); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1927, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":1894 + /* "netCDF4/_netCDF4.pyx":1926 * if g: group = group.groups[g] * # return last one, either a group or a variable. * if lastname in group.groups: # <<<<<<<<<<<<<< @@ -14480,21 +14762,21 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_6__getitem__(struct __pyx_ */ } - /* "netCDF4/_netCDF4.pyx":1896 + /* "netCDF4/_netCDF4.pyx":1928 * if lastname in group.groups: * return group.groups[lastname] * elif lastname in group.variables: # <<<<<<<<<<<<<< * return group.variables[lastname] * else: */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_variables); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1896, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_variables); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1928, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_v_lastname, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1896, __pyx_L1_error) + __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_v_lastname, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1928, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_8 = (__pyx_t_9 != 0); if (__pyx_t_8) { - /* "netCDF4/_netCDF4.pyx":1897 + /* "netCDF4/_netCDF4.pyx":1929 * return group.groups[lastname] * elif lastname in group.variables: * return group.variables[lastname] # <<<<<<<<<<<<<< @@ -14502,16 +14784,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_6__getitem__(struct __pyx_ * raise IndexError('%s not found in %s' % (lastname,group.path)) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_variables); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1897, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_variables); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1929, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = PyObject_GetItem(__pyx_t_4, __pyx_v_lastname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1897, __pyx_L1_error) + __pyx_t_2 = PyObject_GetItem(__pyx_t_4, __pyx_v_lastname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1929, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":1896 + /* "netCDF4/_netCDF4.pyx":1928 * if lastname in group.groups: * return group.groups[lastname] * elif lastname in group.variables: # <<<<<<<<<<<<<< @@ -14520,7 +14802,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_6__getitem__(struct __pyx_ */ } - /* "netCDF4/_netCDF4.pyx":1899 + /* "netCDF4/_netCDF4.pyx":1931 * return group.variables[lastname] * else: * raise IndexError('%s not found in %s' % (lastname,group.path)) # <<<<<<<<<<<<<< @@ -14528,9 +14810,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_6__getitem__(struct __pyx_ * def filepath(self): */ /*else*/ { - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1899, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1931, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1899, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1931, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_lastname); __Pyx_GIVEREF(__pyx_v_lastname); @@ -14538,23 +14820,23 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_6__getitem__(struct __pyx_ __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_s_not_found_in_s, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1899, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_s_not_found_in_s, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1931, __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, 1899, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1931, __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 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1899, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1931, __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, 1899, __pyx_L1_error) + __PYX_ERR(0, 1931, __pyx_L1_error) } - /* "netCDF4/_netCDF4.pyx":1882 + /* "netCDF4/_netCDF4.pyx":1914 * self.close() * * def __getitem__(self, elem): # <<<<<<<<<<<<<< @@ -14582,7 +14864,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_6__getitem__(struct __pyx_ return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":1901 +/* "netCDF4/_netCDF4.pyx":1933 * raise IndexError('%s not found in %s' % (lastname,group.path)) * * def filepath(self): # <<<<<<<<<<<<<< @@ -14612,7 +14894,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_8filepath(CYTHON_UNUSED st PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("filepath", 0); - /* "netCDF4/_netCDF4.pyx":1928 + /* "netCDF4/_netCDF4.pyx":1960 * return py_path.decode('ascii') * ELSE: * msg = """ # <<<<<<<<<<<<<< @@ -14622,26 +14904,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_8filepath(CYTHON_UNUSED st __Pyx_INCREF(__pyx_kp_s_filepath_method_not_enabled_To); __pyx_v_msg = __pyx_kp_s_filepath_method_not_enabled_To; - /* "netCDF4/_netCDF4.pyx":1931 + /* "netCDF4/_netCDF4.pyx":1963 * filepath method not enabled. To enable, install Cython, make sure you have * version 4.1.2 or higher of the netcdf C lib, and rebuild netcdf4-python.""" * raise ValueError(msg) # <<<<<<<<<<<<<< * * def __repr__(self): */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1931, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1963, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_msg); __Pyx_GIVEREF(__pyx_v_msg); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_msg); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1931, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1963, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 1931, __pyx_L1_error) + __PYX_ERR(0, 1963, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1901 + /* "netCDF4/_netCDF4.pyx":1933 * raise IndexError('%s not found in %s' % (lastname,group.path)) * * def filepath(self): # <<<<<<<<<<<<<< @@ -14661,7 +14943,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_8filepath(CYTHON_UNUSED st return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":1933 +/* "netCDF4/_netCDF4.pyx":1965 * raise ValueError(msg) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -14693,20 +14975,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_10__repr__(struct __pyx_ob PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - /* "netCDF4/_netCDF4.pyx":1934 + /* "netCDF4/_netCDF4.pyx":1966 * * 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, 1934, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1966, __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, 1934, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1966, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":1935 + /* "netCDF4/_netCDF4.pyx":1967 * def __repr__(self): * if python3: * return self.__unicode__() # <<<<<<<<<<<<<< @@ -14714,7 +14996,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_10__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, 1935, __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, 1967, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -14727,10 +15009,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_10__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, 1935, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1967, __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, 1935, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1967, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -14738,7 +15020,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_10__repr__(struct __pyx_ob __pyx_t_1 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":1934 + /* "netCDF4/_netCDF4.pyx":1966 * * def __repr__(self): * if python3: # <<<<<<<<<<<<<< @@ -14747,7 +15029,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_10__repr__(struct __pyx_ob */ } - /* "netCDF4/_netCDF4.pyx":1937 + /* "netCDF4/_netCDF4.pyx":1969 * return self.__unicode__() * else: * return unicode(self).encode(default_encoding) # <<<<<<<<<<<<<< @@ -14756,18 +15038,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_10__repr__(struct __pyx_ob */ /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1937, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1969, __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, 1937, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1969, __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, 1937, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1969, __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, 1937, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1969, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -14780,14 +15062,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_10__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, 1937, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1969, __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, 1937, __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, 1969, __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; @@ -14796,20 +15078,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_10__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, 1937, __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, 1969, __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, 1937, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1969, __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, 1937, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1969, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -14820,7 +15102,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_10__repr__(struct __pyx_ob goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":1933 + /* "netCDF4/_netCDF4.pyx":1965 * raise ValueError(msg) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -14843,7 +15125,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_10__repr__(struct __pyx_ob return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":1939 +/* "netCDF4/_netCDF4.pyx":1971 * return unicode(self).encode(default_encoding) * * def __unicode__(self): # <<<<<<<<<<<<<< @@ -14891,16 +15173,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx int __pyx_t_13; __Pyx_RefNannySetupContext("__unicode__", 0); - /* "netCDF4/_netCDF4.pyx":1940 + /* "netCDF4/_netCDF4.pyx":1972 * * def __unicode__(self): * ncdump = ['%r\n' % type(self)] # <<<<<<<<<<<<<< * dimnames = tuple([_tostr(dimname)+'(%s)'%len(self.dimensions[dimname])\ * for dimname in self.dimensions.keys()]) */ - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_r_3, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1940, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_r_3, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1972, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1940, __pyx_L1_error) + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1972, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); @@ -14908,24 +15190,24 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx __pyx_v_ncdump = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":1941 + /* "netCDF4/_netCDF4.pyx":1973 * def __unicode__(self): * ncdump = ['%r\n' % type(self)] * dimnames = tuple([_tostr(dimname)+'(%s)'%len(self.dimensions[dimname])\ # <<<<<<<<<<<<<< * for dimname in self.dimensions.keys()]) * varnames = tuple(\ */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1941, __pyx_L1_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1973, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "netCDF4/_netCDF4.pyx":1942 + /* "netCDF4/_netCDF4.pyx":1974 * ncdump = ['%r\n' % type(self)] * dimnames = tuple([_tostr(dimname)+'(%s)'%len(self.dimensions[dimname])\ * for dimname in self.dimensions.keys()]) # <<<<<<<<<<<<<< * varnames = tuple(\ * [_tostr(self.variables[varname].dtype)+' \033[4m'+_tostr(varname)+'\033[0m'+ */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dimensions, __pyx_n_s_keys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1942, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dimensions, __pyx_n_s_keys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1974, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -14938,10 +15220,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx } } if (__pyx_t_4) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1942, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1974, __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, 1942, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1974, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -14949,9 +15231,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1942, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1974, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1942, __pyx_L1_error) + __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1974, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -14959,17 +15241,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_5 >= 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_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1942, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1974, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1942, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1974, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_5 >= 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_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1942, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1974, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1942, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1974, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -14979,7 +15261,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx 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, 1942, __pyx_L1_error) + else __PYX_ERR(0, 1974, __pyx_L1_error) } break; } @@ -14988,14 +15270,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx __Pyx_XDECREF_SET(__pyx_v_dimname, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1941 + /* "netCDF4/_netCDF4.pyx":1973 * def __unicode__(self): * ncdump = ['%r\n' % type(self)] * dimnames = tuple([_tostr(dimname)+'(%s)'%len(self.dimensions[dimname])\ # <<<<<<<<<<<<<< * for dimname in self.dimensions.keys()]) * varnames = tuple(\ */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_tostr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1941, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_tostr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1973, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -15008,13 +15290,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx } } if (!__pyx_t_7) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_dimname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1941, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_dimname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1973, __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_7, __pyx_v_dimname}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1941, __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, 1973, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -15022,41 +15304,41 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_dimname}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1941, __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, 1973, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1941, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1973, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL; __Pyx_INCREF(__pyx_v_dimname); __Pyx_GIVEREF(__pyx_v_dimname); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_dimname); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1941, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1973, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyObject_GetItem(__pyx_v_self->dimensions, __pyx_v_dimname); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1941, __pyx_L1_error) + __pyx_t_4 = PyObject_GetItem(__pyx_v_self->dimensions, __pyx_v_dimname); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1973, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_9 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 1941, __pyx_L1_error) + __pyx_t_9 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 1973, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1941, __pyx_L1_error) + __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1973, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_s, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1941, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_s, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1973, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1941, __pyx_L1_error) + __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1973, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 1941, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 1973, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":1942 + /* "netCDF4/_netCDF4.pyx":1974 * ncdump = ['%r\n' % type(self)] * dimnames = tuple([_tostr(dimname)+'(%s)'%len(self.dimensions[dimname])\ * for dimname in self.dimensions.keys()]) # <<<<<<<<<<<<<< @@ -15066,37 +15348,37 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":1941 + /* "netCDF4/_netCDF4.pyx":1973 * def __unicode__(self): * ncdump = ['%r\n' % type(self)] * dimnames = tuple([_tostr(dimname)+'(%s)'%len(self.dimensions[dimname])\ # <<<<<<<<<<<<<< * for dimname in self.dimensions.keys()]) * varnames = tuple(\ */ - __pyx_t_3 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1941, __pyx_L1_error) + __pyx_t_3 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1973, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_dimnames = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":1944 + /* "netCDF4/_netCDF4.pyx":1976 * for dimname in self.dimensions.keys()]) * varnames = tuple(\ * [_tostr(self.variables[varname].dtype)+' \033[4m'+_tostr(varname)+'\033[0m'+ # <<<<<<<<<<<<<< * (((_tostr(self.variables[varname].dimensions) * .replace("u'",""))\ */ - __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1944, __pyx_L1_error) + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1976, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - /* "netCDF4/_netCDF4.pyx":1949 + /* "netCDF4/_netCDF4.pyx":1981 * .replace("'",""))\ * .replace(", ",","))\ * .replace(",)",")") for varname in self.variables.keys()]) # <<<<<<<<<<<<<< * grpnames = tuple([_tostr(grpname) for grpname in self.groups.keys()]) * if self.path == '/': */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->variables, __pyx_n_s_keys); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1949, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->variables, __pyx_n_s_keys); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1981, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -15109,10 +15391,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx } } if (__pyx_t_8) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1949, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1981, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1949, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1981, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -15120,9 +15402,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1949, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1981, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1949, __pyx_L1_error) + __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1981, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { @@ -15130,17 +15412,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1949, __pyx_L1_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1981, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1949, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1981, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1949, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1981, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1949, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1981, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } @@ -15150,7 +15432,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx 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, 1949, __pyx_L1_error) + else __PYX_ERR(0, 1981, __pyx_L1_error) } break; } @@ -15159,18 +15441,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx __Pyx_XDECREF_SET(__pyx_v_varname, __pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":1944 + /* "netCDF4/_netCDF4.pyx":1976 * for dimname in self.dimensions.keys()]) * varnames = tuple(\ * [_tostr(self.variables[varname].dtype)+' \033[4m'+_tostr(varname)+'\033[0m'+ # <<<<<<<<<<<<<< * (((_tostr(self.variables[varname].dimensions) * .replace("u'",""))\ */ - __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_tostr); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1944, __pyx_L1_error) + __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_tostr); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1976, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_1 = PyObject_GetItem(__pyx_v_self->variables, __pyx_v_varname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1944, __pyx_L1_error) + __pyx_t_1 = PyObject_GetItem(__pyx_v_self->variables, __pyx_v_varname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1976, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dtype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1944, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dtype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1976, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -15184,14 +15466,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx } } if (!__pyx_t_1) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1944, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1976, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_7}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1944, __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, 1976, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -15200,29 +15482,29 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_7}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1944, __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, 1976, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { - __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1944, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1976, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1); __pyx_t_1 = NULL; __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_7); __pyx_t_7 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1944, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1976, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = PyNumber_Add(__pyx_t_2, __pyx_kp_s_4m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1944, __pyx_L1_error) + __pyx_t_8 = PyNumber_Add(__pyx_t_2, __pyx_kp_s_4m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1976, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_tostr); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1944, __pyx_L1_error) + __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_tostr); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1976, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) { @@ -15235,13 +15517,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx } } if (!__pyx_t_7) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_varname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1944, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_varname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1976, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_varname}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1944, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1976, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -15249,44 +15531,44 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_varname}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1944, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1976, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1944, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1976, __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_varname); __Pyx_GIVEREF(__pyx_v_varname); PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_varname); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1944, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1976, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __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_8, __pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1944, __pyx_L1_error) + __pyx_t_10 = PyNumber_Add(__pyx_t_8, __pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1976, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyNumber_Add(__pyx_t_10, __pyx_kp_s_0m); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1944, __pyx_L1_error) + __pyx_t_2 = PyNumber_Add(__pyx_t_10, __pyx_kp_s_0m); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1976, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "netCDF4/_netCDF4.pyx":1945 + /* "netCDF4/_netCDF4.pyx":1977 * varnames = tuple(\ * [_tostr(self.variables[varname].dtype)+' \033[4m'+_tostr(varname)+'\033[0m'+ * (((_tostr(self.variables[varname].dimensions) # <<<<<<<<<<<<<< * .replace("u'",""))\ * .replace("'",""))\ */ - __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_tostr); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1945, __pyx_L1_error) + __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_tostr); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1977, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_1 = PyObject_GetItem(__pyx_v_self->variables, __pyx_v_varname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1945, __pyx_L1_error) + __pyx_t_1 = PyObject_GetItem(__pyx_v_self->variables, __pyx_v_varname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1977, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1945, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1977, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -15300,14 +15582,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx } } if (!__pyx_t_1) { - __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1945, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1977, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_10); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_7}; - __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1945, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1977, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -15316,97 +15598,97 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_7}; - __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1945, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1977, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { - __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1945, __pyx_L1_error) + __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1977, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1); __pyx_t_1 = NULL; __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_7); __pyx_t_7 = 0; - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_11, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1945, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_11, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1977, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":1946 + /* "netCDF4/_netCDF4.pyx":1978 * [_tostr(self.variables[varname].dtype)+' \033[4m'+_tostr(varname)+'\033[0m'+ * (((_tostr(self.variables[varname].dimensions) * .replace("u'",""))\ # <<<<<<<<<<<<<< * .replace("'",""))\ * .replace(", ",","))\ */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_replace); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1946, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_replace); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1978, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1946, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1978, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":1947 + /* "netCDF4/_netCDF4.pyx":1979 * (((_tostr(self.variables[varname].dimensions) * .replace("u'",""))\ * .replace("'",""))\ # <<<<<<<<<<<<<< * .replace(", ",","))\ * .replace(",)",")") for varname in self.variables.keys()]) */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_replace); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1947, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_replace); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1979, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1947, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1979, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":1948 + /* "netCDF4/_netCDF4.pyx":1980 * .replace("u'",""))\ * .replace("'",""))\ * .replace(", ",","))\ # <<<<<<<<<<<<<< * .replace(",)",")") for varname in self.variables.keys()]) * grpnames = tuple([_tostr(grpname) for grpname in self.groups.keys()]) */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_replace); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1948, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_replace); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1980, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1948, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1980, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":1949 + /* "netCDF4/_netCDF4.pyx":1981 * .replace("'",""))\ * .replace(", ",","))\ * .replace(",)",")") for varname in self.variables.keys()]) # <<<<<<<<<<<<<< * grpnames = tuple([_tostr(grpname) for grpname in self.groups.keys()]) * if self.path == '/': */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_replace); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1949, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_replace); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1981, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1949, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1981, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":1944 + /* "netCDF4/_netCDF4.pyx":1976 * for dimname in self.dimensions.keys()]) * varnames = tuple(\ * [_tostr(self.variables[varname].dtype)+' \033[4m'+_tostr(varname)+'\033[0m'+ # <<<<<<<<<<<<<< * (((_tostr(self.variables[varname].dimensions) * .replace("u'",""))\ */ - __pyx_t_8 = PyNumber_Add(__pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1944, __pyx_L1_error) + __pyx_t_8 = PyNumber_Add(__pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1976, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 1944, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 1976, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":1949 + /* "netCDF4/_netCDF4.pyx":1981 * .replace("'",""))\ * .replace(", ",","))\ * .replace(",)",")") for varname in self.variables.keys()]) # <<<<<<<<<<<<<< @@ -15416,29 +15698,29 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":1943 + /* "netCDF4/_netCDF4.pyx":1975 * dimnames = tuple([_tostr(dimname)+'(%s)'%len(self.dimensions[dimname])\ * for dimname in self.dimensions.keys()]) * varnames = tuple(\ # <<<<<<<<<<<<<< * [_tostr(self.variables[varname].dtype)+' \033[4m'+_tostr(varname)+'\033[0m'+ * (((_tostr(self.variables[varname].dimensions) */ - __pyx_t_4 = PyList_AsTuple(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1943, __pyx_L1_error) + __pyx_t_4 = PyList_AsTuple(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1975, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_varnames = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":1950 + /* "netCDF4/_netCDF4.pyx":1982 * .replace(", ",","))\ * .replace(",)",")") for varname in self.variables.keys()]) * grpnames = tuple([_tostr(grpname) for grpname in self.groups.keys()]) # <<<<<<<<<<<<<< * if self.path == '/': * ncdump.append('root group (%s data model, file format %s):\n' % */ - __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1950, __pyx_L1_error) + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1982, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->groups, __pyx_n_s_keys); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1950, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->groups, __pyx_n_s_keys); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1982, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { @@ -15451,10 +15733,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx } } if (__pyx_t_10) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1950, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1982, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1950, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1982, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -15462,9 +15744,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx __pyx_t_8 = __pyx_t_3; __Pyx_INCREF(__pyx_t_8); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1950, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1982, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_6 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1950, __pyx_L1_error) + __pyx_t_6 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1982, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -15472,17 +15754,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx if (likely(PyList_CheckExact(__pyx_t_8))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_8)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1950, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1982, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_8, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1950, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_8, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1982, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_8)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1950, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1982, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_8, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1950, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_8, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1982, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } @@ -15492,7 +15774,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx 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, 1950, __pyx_L1_error) + else __PYX_ERR(0, 1982, __pyx_L1_error) } break; } @@ -15500,7 +15782,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx } __Pyx_XDECREF_SET(__pyx_v_grpname, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_tostr); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1950, __pyx_L1_error) + __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_tostr); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1982, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) { @@ -15513,13 +15795,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx } } if (!__pyx_t_2) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_grpname); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1950, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_grpname); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1982, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_grpname}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1950, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1982, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -15527,52 +15809,52 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_grpname}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1950, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1982, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1950, __pyx_L1_error) + __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1982, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_2); __pyx_t_2 = NULL; __Pyx_INCREF(__pyx_v_grpname); __Pyx_GIVEREF(__pyx_v_grpname); PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_v_grpname); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1950, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1982, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 1950, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 1982, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = PyList_AsTuple(((PyObject*)__pyx_t_4)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1950, __pyx_L1_error) + __pyx_t_8 = PyList_AsTuple(((PyObject*)__pyx_t_4)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1982, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_grpnames = ((PyObject*)__pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":1951 + /* "netCDF4/_netCDF4.pyx":1983 * .replace(",)",")") for varname in self.variables.keys()]) * grpnames = tuple([_tostr(grpname) for grpname in self.groups.keys()]) * if self.path == '/': # <<<<<<<<<<<<<< * ncdump.append('root group (%s data model, file format %s):\n' % * (self.data_model, self.disk_format)) */ - __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_v_self->path, __pyx_kp_s__15, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1951, __pyx_L1_error) + __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_v_self->path, __pyx_kp_s__17, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1983, __pyx_L1_error) if (__pyx_t_12) { - /* "netCDF4/_netCDF4.pyx":1953 + /* "netCDF4/_netCDF4.pyx":1985 * if self.path == '/': * ncdump.append('root group (%s data model, file format %s):\n' % * (self.data_model, self.disk_format)) # <<<<<<<<<<<<<< * else: * ncdump.append('group %s:\n' % self.path) */ - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1953, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1985, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_self->data_model); __Pyx_GIVEREF(__pyx_v_self->data_model); @@ -15581,20 +15863,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx __Pyx_GIVEREF(__pyx_v_self->disk_format); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_self->disk_format); - /* "netCDF4/_netCDF4.pyx":1952 + /* "netCDF4/_netCDF4.pyx":1984 * grpnames = tuple([_tostr(grpname) for grpname in self.groups.keys()]) * if self.path == '/': * ncdump.append('root group (%s data model, file format %s):\n' % # <<<<<<<<<<<<<< * (self.data_model, self.disk_format)) * else: */ - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_root_group_s_data_model_file_for, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1952, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_root_group_s_data_model_file_for, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1984, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_4); if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 1952, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_4); if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 1984, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":1951 + /* "netCDF4/_netCDF4.pyx":1983 * .replace(",)",")") for varname in self.variables.keys()]) * grpnames = tuple([_tostr(grpname) for grpname in self.groups.keys()]) * if self.path == '/': # <<<<<<<<<<<<<< @@ -15604,7 +15886,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx goto __pyx_L9; } - /* "netCDF4/_netCDF4.pyx":1955 + /* "netCDF4/_netCDF4.pyx":1987 * (self.data_model, self.disk_format)) * else: * ncdump.append('group %s:\n' % self.path) # <<<<<<<<<<<<<< @@ -15612,31 +15894,31 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx * self.ncattrs()] */ /*else*/ { - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_group_s, __pyx_v_self->path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1955, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_group_s, __pyx_v_self->path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1987, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_4); if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 1955, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_4); if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 1987, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __pyx_L9:; - /* "netCDF4/_netCDF4.pyx":1956 + /* "netCDF4/_netCDF4.pyx":1988 * else: * ncdump.append('group %s:\n' % self.path) * attrs = [' %s: %s\n' % (name,self.getncattr(name)) for name in\ # <<<<<<<<<<<<<< * self.ncattrs()] * ncdump = ncdump + attrs */ - __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1956, __pyx_L1_error) + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1988, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - /* "netCDF4/_netCDF4.pyx":1957 + /* "netCDF4/_netCDF4.pyx":1989 * ncdump.append('group %s:\n' % self.path) * attrs = [' %s: %s\n' % (name,self.getncattr(name)) for name in\ * self.ncattrs()] # <<<<<<<<<<<<<< * ncdump = ncdump + attrs * ncdump.append(' dimensions(sizes): %s\n' % ', '.join(dimnames)) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ncattrs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1957, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ncattrs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1989, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -15649,10 +15931,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx } } if (__pyx_t_10) { - __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1957, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1989, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } else { - __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1957, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1989, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -15660,9 +15942,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx __pyx_t_3 = __pyx_t_8; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1957, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1989, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1957, __pyx_L1_error) + __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1989, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; for (;;) { @@ -15670,17 +15952,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_8 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_8); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1957, __pyx_L1_error) + __pyx_t_8 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_8); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1989, __pyx_L1_error) #else - __pyx_t_8 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1957, __pyx_L1_error) + __pyx_t_8 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1989, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_8); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1957, __pyx_L1_error) + __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_8); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1989, __pyx_L1_error) #else - __pyx_t_8 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1957, __pyx_L1_error) + __pyx_t_8 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1989, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif } @@ -15690,7 +15972,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx 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, 1957, __pyx_L1_error) + else __PYX_ERR(0, 1989, __pyx_L1_error) } break; } @@ -15699,14 +15981,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":1956 + /* "netCDF4/_netCDF4.pyx":1988 * else: * ncdump.append('group %s:\n' % self.path) * attrs = [' %s: %s\n' % (name,self.getncattr(name)) for name in\ # <<<<<<<<<<<<<< * self.ncattrs()] * ncdump = ncdump + attrs */ - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getncattr); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1956, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getncattr); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1988, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) { @@ -15719,13 +16001,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx } } if (!__pyx_t_11) { - __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1956, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1988, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_v_name}; - __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1956, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1988, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_8); } else @@ -15733,25 +16015,25 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_v_name}; - __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1956, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1988, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_8); } else #endif { - __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1956, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1988, __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_name); __Pyx_GIVEREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_name); - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_2, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1956, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_2, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1988, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1956, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1988, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); @@ -15759,88 +16041,88 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1956, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1988, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 1956, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 1988, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_attrs = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":1958 + /* "netCDF4/_netCDF4.pyx":1990 * attrs = [' %s: %s\n' % (name,self.getncattr(name)) for name in\ * self.ncattrs()] * ncdump = ncdump + attrs # <<<<<<<<<<<<<< * ncdump.append(' dimensions(sizes): %s\n' % ', '.join(dimnames)) * ncdump.append(' variables(dimensions): %s\n' % ', '.join(varnames)) */ - __pyx_t_4 = PyNumber_Add(__pyx_v_ncdump, __pyx_v_attrs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1958, __pyx_L1_error) + __pyx_t_4 = PyNumber_Add(__pyx_v_ncdump, __pyx_v_attrs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1990, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_ncdump, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":1959 + /* "netCDF4/_netCDF4.pyx":1991 * self.ncattrs()] * ncdump = ncdump + attrs * ncdump.append(' dimensions(sizes): %s\n' % ', '.join(dimnames)) # <<<<<<<<<<<<<< * ncdump.append(' variables(dimensions): %s\n' % ', '.join(varnames)) * ncdump.append(' groups: %s\n' % ', '.join(grpnames)) */ - __pyx_t_4 = __Pyx_PyString_Join(__pyx_kp_s__20, __pyx_v_dimnames); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1959, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyString_Join(__pyx_kp_s__22, __pyx_v_dimnames); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1991, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_dimensions_sizes_s, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1959, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_dimensions_sizes_s, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1991, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_3); if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 1959, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_3); if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 1991, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":1960 + /* "netCDF4/_netCDF4.pyx":1992 * ncdump = ncdump + attrs * ncdump.append(' dimensions(sizes): %s\n' % ', '.join(dimnames)) * ncdump.append(' variables(dimensions): %s\n' % ', '.join(varnames)) # <<<<<<<<<<<<<< * ncdump.append(' groups: %s\n' % ', '.join(grpnames)) * return ''.join(ncdump) */ - __pyx_t_3 = __Pyx_PyString_Join(__pyx_kp_s__20, __pyx_v_varnames); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1960, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyString_Join(__pyx_kp_s__22, __pyx_v_varnames); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1992, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_variables_dimensions_s, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1960, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_variables_dimensions_s, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1992, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_4); if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 1960, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_4); if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 1992, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":1961 + /* "netCDF4/_netCDF4.pyx":1993 * ncdump.append(' dimensions(sizes): %s\n' % ', '.join(dimnames)) * ncdump.append(' variables(dimensions): %s\n' % ', '.join(varnames)) * ncdump.append(' groups: %s\n' % ', '.join(grpnames)) # <<<<<<<<<<<<<< * return ''.join(ncdump) * */ - __pyx_t_4 = __Pyx_PyString_Join(__pyx_kp_s__20, __pyx_v_grpnames); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1961, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyString_Join(__pyx_kp_s__22, __pyx_v_grpnames); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1993, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_groups_s, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1961, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_groups_s, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1993, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_3); if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 1961, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_3); if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 1993, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":1962 + /* "netCDF4/_netCDF4.pyx":1994 * ncdump.append(' variables(dimensions): %s\n' % ', '.join(varnames)) * ncdump.append(' groups: %s\n' % ', '.join(grpnames)) * return ''.join(ncdump) # <<<<<<<<<<<<<< * - * def close(self): + * def _close(self, check_err): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyString_Join(__pyx_kp_s__2, __pyx_v_ncdump); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1962, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyString_Join(__pyx_kp_s__2, __pyx_v_ncdump); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1994, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":1939 + /* "netCDF4/_netCDF4.pyx":1971 * return unicode(self).encode(default_encoding) * * def __unicode__(self): # <<<<<<<<<<<<<< @@ -15875,101 +16157,164 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":1964 +/* "netCDF4/_netCDF4.pyx":1996 * return ''.join(ncdump) * - * def close(self): # <<<<<<<<<<<<<< - * """ - * **`close(self)`** + * def _close(self, check_err): # <<<<<<<<<<<<<< + * cdef int ierr = nc_close(self._grpid) + * */ /* Python wrapper */ -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_15close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_14close[] = "\n**`close(self)`**\n\nClose the Dataset.\n "; -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_15close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_15_close(PyObject *__pyx_v_self, PyObject *__pyx_v_check_err); /*proto*/ +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_15_close(PyObject *__pyx_v_self, PyObject *__pyx_v_check_err) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("close (wrapper)", 0); - __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_14close(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self)); + __Pyx_RefNannySetupContext("_close (wrapper)", 0); + __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_14_close(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_check_err)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_14close(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self) { +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_14_close(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_check_err) { int __pyx_v_ierr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; - char *__pyx_t_2; + PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - __Pyx_RefNannySetupContext("close", 0); + __Pyx_RefNannySetupContext("_close", 0); - /* "netCDF4/_netCDF4.pyx":1971 - * """ - * cdef int ierr - * ierr = nc_close(self._grpid) # <<<<<<<<<<<<<< - * if ierr != NC_NOERR: - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) + /* "netCDF4/_netCDF4.pyx":1997 + * + * def _close(self, check_err): + * cdef int ierr = nc_close(self._grpid) # <<<<<<<<<<<<<< + * + * if check_err: */ __pyx_v_ierr = nc_close(__pyx_v_self->_grpid); - /* "netCDF4/_netCDF4.pyx":1972 - * cdef int ierr - * ierr = nc_close(self._grpid) - * if ierr != NC_NOERR: # <<<<<<<<<<<<<< - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) - * self._isopen = 0 # indicates file already closed, checked by __dealloc__ + /* "netCDF4/_netCDF4.pyx":1999 + * cdef int ierr = nc_close(self._grpid) + * + * if check_err: # <<<<<<<<<<<<<< + * _ensure_nc_success(ierr) + * */ - __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_check_err); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1999, __pyx_L1_error) if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":1973 - * ierr = nc_close(self._grpid) - * if ierr != NC_NOERR: - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< - * self._isopen = 0 # indicates file already closed, checked by __dealloc__ + /* "netCDF4/_netCDF4.pyx":2000 + * + * if check_err: + * _ensure_nc_success(ierr) # <<<<<<<<<<<<<< * + * self._isopen = 0 # indicates file already closed, checked by __dealloc__ */ - __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1973, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1973, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_INCREF(__pyx_t_3); - __Pyx_GIVEREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1973, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ierr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2000, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __pyx_f_7netCDF4_8_netCDF4__ensure_nc_success(__pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2000, __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_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 1973, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1972 - * cdef int ierr - * ierr = nc_close(self._grpid) - * if ierr != NC_NOERR: # <<<<<<<<<<<<<< - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) - * self._isopen = 0 # indicates file already closed, checked by __dealloc__ + /* "netCDF4/_netCDF4.pyx":1999 + * cdef int ierr = nc_close(self._grpid) + * + * if check_err: # <<<<<<<<<<<<<< + * _ensure_nc_success(ierr) + * */ } - /* "netCDF4/_netCDF4.pyx":1974 - * if ierr != NC_NOERR: - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) + /* "netCDF4/_netCDF4.pyx":2002 + * _ensure_nc_success(ierr) + * * self._isopen = 0 # indicates file already closed, checked by __dealloc__ # <<<<<<<<<<<<<< * - * def isopen(self): + * # Only release buffer if close succeeded */ __pyx_v_self->_isopen = 0; - /* "netCDF4/_netCDF4.pyx":1964 + /* "netCDF4/_netCDF4.pyx":2007 + * # per impl of PyBuffer_Release: https://github.com/python/cpython/blob/master/Objects/abstract.c#L667 + * # view.obj is checked, ref on obj is decremented and obj will be null'd out + * PyBuffer_Release(&self._buffer) # <<<<<<<<<<<<<< + * + * + */ + PyBuffer_Release((&__pyx_v_self->_buffer)); + + /* "netCDF4/_netCDF4.pyx":1996 * return ''.join(ncdump) * + * def _close(self, check_err): # <<<<<<<<<<<<<< + * cdef int ierr = nc_close(self._grpid) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("netCDF4._netCDF4.Dataset._close", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "netCDF4/_netCDF4.pyx":2010 + * + * + * def close(self): # <<<<<<<<<<<<<< + * """ + * **`close(self)`** + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_17close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_16close[] = "\n**`close(self)`**\n\nClose the Dataset.\n "; +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_17close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("close (wrapper)", 0); + __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_16close(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_16close(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("close", 0); + + /* "netCDF4/_netCDF4.pyx":2016 + * Close the Dataset. + * """ + * self._close(True) # <<<<<<<<<<<<<< + * + * def isopen(self): + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2016, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2016, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "netCDF4/_netCDF4.pyx":2010 + * + * * def close(self): # <<<<<<<<<<<<<< * """ * **`close(self)`** @@ -15979,8 +16324,8 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_14close(struct __pyx_obj_7 __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.close", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -15989,8 +16334,8 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_14close(struct __pyx_obj_7 return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":1976 - * self._isopen = 0 # indicates file already closed, checked by __dealloc__ +/* "netCDF4/_netCDF4.pyx":2018 + * self._close(True) * * def isopen(self): # <<<<<<<<<<<<<< * """ @@ -15998,27 +16343,27 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_14close(struct __pyx_obj_7 */ /* Python wrapper */ -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_17isopen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_16isopen[] = "\n**`close(self)`**\n\nis the Dataset open or closed?\n "; -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_17isopen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_19isopen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_18isopen[] = "\n**`close(self)`**\n\nis the Dataset open or closed?\n "; +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_19isopen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isopen (wrapper)", 0); - __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_16isopen(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self)); + __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_18isopen(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_16isopen(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self) { +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_18isopen(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("isopen", 0); - /* "netCDF4/_netCDF4.pyx":1982 + /* "netCDF4/_netCDF4.pyx":2024 * is the Dataset open or closed? * """ * return bool(self._isopen) # <<<<<<<<<<<<<< @@ -16026,18 +16371,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_16isopen(struct __pyx_obj_ * def __dealloc__(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_isopen); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1982, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_isopen); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2024, __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, 1982, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2024, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1982, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2024, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":1976 - * self._isopen = 0 # indicates file already closed, checked by __dealloc__ + /* "netCDF4/_netCDF4.pyx":2018 + * self._close(True) * * def isopen(self): # <<<<<<<<<<<<<< * """ @@ -16055,73 +16400,85 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_16isopen(struct __pyx_obj_ return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":1984 +/* "netCDF4/_netCDF4.pyx":2026 * return bool(self._isopen) * * def __dealloc__(self): # <<<<<<<<<<<<<< * # close file when there are no references to object left - * cdef int ierr + * if self._isopen: */ /* Python wrapper */ -static void __pyx_pw_7netCDF4_8_netCDF4_7Dataset_19__dealloc__(PyObject *__pyx_v_self); /*proto*/ -static void __pyx_pw_7netCDF4_8_netCDF4_7Dataset_19__dealloc__(PyObject *__pyx_v_self) { +static void __pyx_pw_7netCDF4_8_netCDF4_7Dataset_21__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_7netCDF4_8_netCDF4_7Dataset_21__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); - __pyx_pf_7netCDF4_8_netCDF4_7Dataset_18__dealloc__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self)); + __pyx_pf_7netCDF4_8_netCDF4_7Dataset_20__dealloc__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } -static void __pyx_pf_7netCDF4_8_netCDF4_7Dataset_18__dealloc__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self) { - CYTHON_UNUSED int __pyx_v_ierr; +static void __pyx_pf_7netCDF4_8_netCDF4_7Dataset_20__dealloc__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self) { __Pyx_RefNannyDeclarations int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "netCDF4/_netCDF4.pyx":1987 + /* "netCDF4/_netCDF4.pyx":2028 + * def __dealloc__(self): * # close file when there are no references to object left - * cdef int ierr * if self._isopen: # <<<<<<<<<<<<<< - * ierr = nc_close(self._grpid) + * self._close(False) * */ __pyx_t_1 = (__pyx_v_self->_isopen != 0); if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":1988 - * cdef int ierr + /* "netCDF4/_netCDF4.pyx":2029 + * # close file when there are no references to object left * if self._isopen: - * ierr = nc_close(self._grpid) # <<<<<<<<<<<<<< + * self._close(False) # <<<<<<<<<<<<<< * * def __reduce__(self): */ - __pyx_v_ierr = nc_close(__pyx_v_self->_grpid); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2029, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2029, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":1987 + /* "netCDF4/_netCDF4.pyx":2028 + * def __dealloc__(self): * # close file when there are no references to object left - * cdef int ierr * if self._isopen: # <<<<<<<<<<<<<< - * ierr = nc_close(self._grpid) + * self._close(False) * */ } - /* "netCDF4/_netCDF4.pyx":1984 + /* "netCDF4/_netCDF4.pyx":2026 * return bool(self._isopen) * * def __dealloc__(self): # <<<<<<<<<<<<<< * # close file when there are no references to object left - * cdef int ierr + * if self._isopen: */ /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_WriteUnraisable("netCDF4._netCDF4.Dataset.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); + __pyx_L0:; __Pyx_RefNannyFinishContext(); } -/* "netCDF4/_netCDF4.pyx":1990 - * ierr = nc_close(self._grpid) +/* "netCDF4/_netCDF4.pyx":2031 + * self._close(False) * * def __reduce__(self): # <<<<<<<<<<<<<< * # raise error is user tries to pickle a Dataset object. @@ -16129,39 +16486,39 @@ static void __pyx_pf_7netCDF4_8_netCDF4_7Dataset_18__dealloc__(struct __pyx_obj_ */ /* Python wrapper */ -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_21__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_21__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_23__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_23__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0); - __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_20__reduce__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self)); + __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_22__reduce__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_20__reduce__(CYTHON_UNUSED struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self) { +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_22__reduce__(CYTHON_UNUSED struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__reduce__", 0); - /* "netCDF4/_netCDF4.pyx":1992 + /* "netCDF4/_netCDF4.pyx":2033 * def __reduce__(self): * # raise error is user tries to pickle a Dataset object. * raise NotImplementedError('Dataset is not picklable') # <<<<<<<<<<<<<< * * def sync(self): */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1992, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2033, __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, 1992, __pyx_L1_error) + __PYX_ERR(0, 2033, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1990 - * ierr = nc_close(self._grpid) + /* "netCDF4/_netCDF4.pyx":2031 + * self._close(False) * * def __reduce__(self): # <<<<<<<<<<<<<< * # raise error is user tries to pickle a Dataset object. @@ -16178,7 +16535,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_20__reduce__(CYTHON_UNUSED return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":1994 +/* "netCDF4/_netCDF4.pyx":2035 * raise NotImplementedError('Dataset is not picklable') * * def sync(self): # <<<<<<<<<<<<<< @@ -16187,81 +16544,41 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_20__reduce__(CYTHON_UNUSED */ /* Python wrapper */ -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_23sync(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_22sync[] = "\n**`sync(self)`**\n\nWrites all buffered data in the `netCDF4.Dataset` to the disk file."; -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_23sync(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_25sync(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_24sync[] = "\n**`sync(self)`**\n\nWrites all buffered data in the `netCDF4.Dataset` to the disk file."; +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_25sync(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sync (wrapper)", 0); - __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_22sync(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self)); + __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_24sync(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_22sync(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self) { - int __pyx_v_ierr; +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_24sync(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations - int __pyx_t_1; - char *__pyx_t_2; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("sync", 0); - /* "netCDF4/_netCDF4.pyx":2000 - * Writes all buffered data in the `netCDF4.Dataset` to the disk file.""" - * cdef int ierr - * ierr = nc_sync(self._grpid) # <<<<<<<<<<<<<< - * if ierr != NC_NOERR: - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) - */ - __pyx_v_ierr = nc_sync(__pyx_v_self->_grpid); - - /* "netCDF4/_netCDF4.pyx":2001 - * cdef int ierr - * ierr = nc_sync(self._grpid) - * if ierr != NC_NOERR: # <<<<<<<<<<<<<< - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) + /* "netCDF4/_netCDF4.pyx":2040 * - */ - __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0); - if (__pyx_t_1) { - - /* "netCDF4/_netCDF4.pyx":2002 - * ierr = nc_sync(self._grpid) - * if ierr != NC_NOERR: - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< + * Writes all buffered data in the `netCDF4.Dataset` to the disk file.""" + * _ensure_nc_success(nc_sync(self._grpid)) # <<<<<<<<<<<<<< * * def _redef(self): */ - __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2002, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2002, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_INCREF(__pyx_t_3); - __Pyx_GIVEREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2002, __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, 2002, __pyx_L1_error) - - /* "netCDF4/_netCDF4.pyx":2001 - * cdef int ierr - * ierr = nc_sync(self._grpid) - * if ierr != NC_NOERR: # <<<<<<<<<<<<<< - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) - * - */ - } + __pyx_t_1 = __Pyx_PyInt_From_int(nc_sync(__pyx_v_self->_grpid)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2040, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_f_7netCDF4_8_netCDF4__ensure_nc_success(__pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2040, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":1994 + /* "netCDF4/_netCDF4.pyx":2035 * raise NotImplementedError('Dataset is not picklable') * * def sync(self): # <<<<<<<<<<<<<< @@ -16273,8 +16590,8 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_22sync(struct __pyx_obj_7n __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.sync", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -16283,8 +16600,8 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_22sync(struct __pyx_obj_7n return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2004 - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) +/* "netCDF4/_netCDF4.pyx":2042 + * _ensure_nc_success(nc_sync(self._grpid)) * * def _redef(self): # <<<<<<<<<<<<<< * cdef int ierr @@ -16292,25 +16609,25 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_22sync(struct __pyx_obj_7n */ /* Python wrapper */ -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_25_redef(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_25_redef(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_27_redef(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_27_redef(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_redef (wrapper)", 0); - __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_24_redef(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self)); + __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_26_redef(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_24_redef(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self) { +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_26_redef(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self) { CYTHON_UNUSED int __pyx_v_ierr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_redef", 0); - /* "netCDF4/_netCDF4.pyx":2006 + /* "netCDF4/_netCDF4.pyx":2044 * def _redef(self): * cdef int ierr * ierr = nc_redef(self._grpid) # <<<<<<<<<<<<<< @@ -16319,8 +16636,8 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_24_redef(struct __pyx_obj_ */ __pyx_v_ierr = nc_redef(__pyx_v_self->_grpid); - /* "netCDF4/_netCDF4.pyx":2004 - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) + /* "netCDF4/_netCDF4.pyx":2042 + * _ensure_nc_success(nc_sync(self._grpid)) * * def _redef(self): # <<<<<<<<<<<<<< * cdef int ierr @@ -16334,7 +16651,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_24_redef(struct __pyx_obj_ return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2008 +/* "netCDF4/_netCDF4.pyx":2046 * ierr = nc_redef(self._grpid) * * def _enddef(self): # <<<<<<<<<<<<<< @@ -16343,25 +16660,25 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_24_redef(struct __pyx_obj_ */ /* Python wrapper */ -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_27_enddef(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_27_enddef(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_29_enddef(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_29_enddef(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_enddef (wrapper)", 0); - __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_26_enddef(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self)); + __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_28_enddef(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_26_enddef(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self) { +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_28_enddef(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self) { CYTHON_UNUSED int __pyx_v_ierr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_enddef", 0); - /* "netCDF4/_netCDF4.pyx":2010 + /* "netCDF4/_netCDF4.pyx":2048 * def _enddef(self): * cdef int ierr * ierr = nc_enddef(self._grpid) # <<<<<<<<<<<<<< @@ -16370,7 +16687,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_26_enddef(struct __pyx_obj */ __pyx_v_ierr = nc_enddef(__pyx_v_self->_grpid); - /* "netCDF4/_netCDF4.pyx":2008 + /* "netCDF4/_netCDF4.pyx":2046 * ierr = nc_redef(self._grpid) * * def _enddef(self): # <<<<<<<<<<<<<< @@ -16385,7 +16702,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_26_enddef(struct __pyx_obj return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2012 +/* "netCDF4/_netCDF4.pyx":2050 * ierr = nc_enddef(self._grpid) * * def set_fill_on(self): # <<<<<<<<<<<<<< @@ -16394,82 +16711,42 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_26_enddef(struct __pyx_obj */ /* Python wrapper */ -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_29set_fill_on(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_28set_fill_on[] = "\n**`set_fill_on(self)`**\n\nSets the fill mode for a `netCDF4.Dataset` open for writing to `on`.\n\nThis causes data to be pre-filled with fill values. The fill values can be\ncontrolled by the variable's `_Fill_Value` attribute, but is usually\nsufficient to the use the netCDF default `_Fill_Value` (defined\nseparately for each variable type). The default behavior of the netCDF\nlibrary corresponds to `set_fill_on`. Data which are equal to the\n`_Fill_Value` indicate that the variable was created, but never written\nto."; -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_29set_fill_on(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_31set_fill_on(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_30set_fill_on[] = "\n**`set_fill_on(self)`**\n\nSets the fill mode for a `netCDF4.Dataset` open for writing to `on`.\n\nThis causes data to be pre-filled with fill values. The fill values can be\ncontrolled by the variable's `_Fill_Value` attribute, but is usually\nsufficient to the use the netCDF default `_Fill_Value` (defined\nseparately for each variable type). The default behavior of the netCDF\nlibrary corresponds to `set_fill_on`. Data which are equal to the\n`_Fill_Value` indicate that the variable was created, but never written\nto."; +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_31set_fill_on(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_fill_on (wrapper)", 0); - __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_28set_fill_on(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self)); + __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_30set_fill_on(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_28set_fill_on(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self) { - int __pyx_v_ierr; +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_30set_fill_on(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self) { int __pyx_v_oldmode; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations - int __pyx_t_1; - char *__pyx_t_2; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("set_fill_on", 0); - /* "netCDF4/_netCDF4.pyx":2026 + /* "netCDF4/_netCDF4.pyx":2064 * to.""" - * cdef int ierr, oldmode - * ierr = nc_set_fill (self._grpid, NC_FILL, &oldmode) # <<<<<<<<<<<<<< - * if ierr != NC_NOERR: - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) - */ - __pyx_v_ierr = nc_set_fill(__pyx_v_self->_grpid, NC_FILL, (&__pyx_v_oldmode)); - - /* "netCDF4/_netCDF4.pyx":2027 - * cdef int ierr, oldmode - * ierr = nc_set_fill (self._grpid, NC_FILL, &oldmode) - * if ierr != NC_NOERR: # <<<<<<<<<<<<<< - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) - * - */ - __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0); - if (__pyx_t_1) { - - /* "netCDF4/_netCDF4.pyx":2028 - * ierr = nc_set_fill (self._grpid, NC_FILL, &oldmode) - * if ierr != NC_NOERR: - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< + * cdef int oldmode + * _ensure_nc_success(nc_set_fill(self._grpid, NC_FILL, &oldmode)) # <<<<<<<<<<<<<< * * def set_fill_off(self): */ - __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2028, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2028, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_INCREF(__pyx_t_3); - __Pyx_GIVEREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2028, __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, 2028, __pyx_L1_error) - - /* "netCDF4/_netCDF4.pyx":2027 - * cdef int ierr, oldmode - * ierr = nc_set_fill (self._grpid, NC_FILL, &oldmode) - * if ierr != NC_NOERR: # <<<<<<<<<<<<<< - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) - * - */ - } + __pyx_t_1 = __Pyx_PyInt_From_int(nc_set_fill(__pyx_v_self->_grpid, NC_FILL, (&__pyx_v_oldmode))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2064, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_f_7netCDF4_8_netCDF4__ensure_nc_success(__pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2064, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":2012 + /* "netCDF4/_netCDF4.pyx":2050 * ierr = nc_enddef(self._grpid) * * def set_fill_on(self): # <<<<<<<<<<<<<< @@ -16481,8 +16758,8 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_28set_fill_on(struct __pyx __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.set_fill_on", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -16491,8 +16768,8 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_28set_fill_on(struct __pyx return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2030 - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) +/* "netCDF4/_netCDF4.pyx":2066 + * _ensure_nc_success(nc_set_fill(self._grpid, NC_FILL, &oldmode)) * * def set_fill_off(self): # <<<<<<<<<<<<<< * """ @@ -16500,83 +16777,43 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_28set_fill_on(struct __pyx */ /* Python wrapper */ -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_31set_fill_off(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_30set_fill_off[] = "\n**`set_fill_off(self)`**\n\nSets the fill mode for a `netCDF4.Dataset` open for writing to `off`.\n\nThis will prevent the data from being pre-filled with fill values, which\nmay result in some performance improvements. However, you must then make\nsure the data is actually written before being read."; -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_31set_fill_off(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_33set_fill_off(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_32set_fill_off[] = "\n**`set_fill_off(self)`**\n\nSets the fill mode for a `netCDF4.Dataset` open for writing to `off`.\n\nThis will prevent the data from being pre-filled with fill values, which\nmay result in some performance improvements. However, you must then make\nsure the data is actually written before being read."; +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_33set_fill_off(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_fill_off (wrapper)", 0); - __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_30set_fill_off(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self)); + __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_32set_fill_off(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_30set_fill_off(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self) { - int __pyx_v_ierr; +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_32set_fill_off(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self) { int __pyx_v_oldmode; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations - int __pyx_t_1; - char *__pyx_t_2; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("set_fill_off", 0); - /* "netCDF4/_netCDF4.pyx":2040 + /* "netCDF4/_netCDF4.pyx":2076 * sure the data is actually written before being read.""" - * cdef int ierr, oldmode - * ierr = nc_set_fill (self._grpid, NC_NOFILL, &oldmode) # <<<<<<<<<<<<<< - * if ierr != NC_NOERR: - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) - */ - __pyx_v_ierr = nc_set_fill(__pyx_v_self->_grpid, NC_NOFILL, (&__pyx_v_oldmode)); - - /* "netCDF4/_netCDF4.pyx":2041 - * cdef int ierr, oldmode - * ierr = nc_set_fill (self._grpid, NC_NOFILL, &oldmode) - * if ierr != NC_NOERR: # <<<<<<<<<<<<<< - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) - * - */ - __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0); - if (__pyx_t_1) { - - /* "netCDF4/_netCDF4.pyx":2042 - * ierr = nc_set_fill (self._grpid, NC_NOFILL, &oldmode) - * if ierr != NC_NOERR: - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< + * cdef int oldmode + * _ensure_nc_success(nc_set_fill(self._grpid, NC_NOFILL, &oldmode)) # <<<<<<<<<<<<<< * * def createDimension(self, dimname, size=None): */ - __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2042, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2042, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_INCREF(__pyx_t_3); - __Pyx_GIVEREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2042, __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, 2042, __pyx_L1_error) - - /* "netCDF4/_netCDF4.pyx":2041 - * cdef int ierr, oldmode - * ierr = nc_set_fill (self._grpid, NC_NOFILL, &oldmode) - * if ierr != NC_NOERR: # <<<<<<<<<<<<<< - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) - * - */ - } + __pyx_t_1 = __Pyx_PyInt_From_int(nc_set_fill(__pyx_v_self->_grpid, NC_NOFILL, (&__pyx_v_oldmode))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2076, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_f_7netCDF4_8_netCDF4__ensure_nc_success(__pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2076, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":2030 - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) + /* "netCDF4/_netCDF4.pyx":2066 + * _ensure_nc_success(nc_set_fill(self._grpid, NC_FILL, &oldmode)) * * def set_fill_off(self): # <<<<<<<<<<<<<< * """ @@ -16587,8 +16824,8 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_30set_fill_off(struct __py __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.set_fill_off", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -16597,8 +16834,8 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_30set_fill_off(struct __py return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2044 - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) +/* "netCDF4/_netCDF4.pyx":2078 + * _ensure_nc_success(nc_set_fill(self._grpid, NC_NOFILL, &oldmode)) * * def createDimension(self, dimname, size=None): # <<<<<<<<<<<<<< * """ @@ -16606,9 +16843,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_30set_fill_off(struct __py */ /* Python wrapper */ -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_33createDimension(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_32createDimension[] = "\n**`createDimension(self, dimname, size=None)`**\n\nCreates a new dimension with the given `dimname` and `size`.\n\n`size` must be a positive integer or `None`, which stands for\n\"unlimited\" (default is `None`). Specifying a size of 0 also\nresults in an unlimited dimension. The return value is the `netCDF4.Dimension`\nclass instance describing the new dimension. To determine the current\nmaximum size of the dimension, use the `len` function on the `netCDF4.Dimension`\ninstance. To determine if a dimension is 'unlimited', use the\n`netCDF4.Dimension.isunlimited` method of the `netCDF4.Dimension` instance."; -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_33createDimension(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_35createDimension(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_34createDimension[] = "\n**`createDimension(self, dimname, size=None)`**\n\nCreates a new dimension with the given `dimname` and `size`.\n\n`size` must be a positive integer or `None`, which stands for\n\"unlimited\" (default is `None`). Specifying a size of 0 also\nresults in an unlimited dimension. The return value is the `netCDF4.Dimension`\nclass instance describing the new dimension. To determine the current\nmaximum size of the dimension, use the `len` function on the `netCDF4.Dimension`\ninstance. To determine if a dimension is 'unlimited', use the\n`netCDF4.Dimension.isunlimited` method of the `netCDF4.Dimension` instance."; +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_35createDimension(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_dimname = 0; PyObject *__pyx_v_size = 0; PyObject *__pyx_r = 0; @@ -16639,7 +16876,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_33createDimension(PyObject } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "createDimension") < 0)) __PYX_ERR(0, 2044, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "createDimension") < 0)) __PYX_ERR(0, 2078, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -16654,20 +16891,20 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_33createDimension(PyObject } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("createDimension", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2044, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("createDimension", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2078, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.createDimension", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_32createDimension(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), __pyx_v_dimname, __pyx_v_size); + __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_34createDimension(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), __pyx_v_dimname, __pyx_v_size); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_32createDimension(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_dimname, PyObject *__pyx_v_size) { +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_34createDimension(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_dimname, PyObject *__pyx_v_size) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -16675,14 +16912,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_32createDimension(struct _ PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("createDimension", 0); - /* "netCDF4/_netCDF4.pyx":2057 + /* "netCDF4/_netCDF4.pyx":2091 * instance. To determine if a dimension is 'unlimited', use the * `netCDF4.Dimension.isunlimited` method of the `netCDF4.Dimension` instance.""" * self.dimensions[dimname] = Dimension(self, dimname, size=size) # <<<<<<<<<<<<<< * return self.dimensions[dimname] * */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2057, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2091, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); @@ -16690,17 +16927,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_32createDimension(struct _ __Pyx_INCREF(__pyx_v_dimname); __Pyx_GIVEREF(__pyx_v_dimname); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_dimname); - __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2057, __pyx_L1_error) + __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2091, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_size, __pyx_v_size) < 0) __PYX_ERR(0, 2057, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7netCDF4_8_netCDF4_Dimension), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2057, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_size, __pyx_v_size) < 0) __PYX_ERR(0, 2091, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7netCDF4_8_netCDF4_Dimension), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2091, __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; - if (unlikely(PyObject_SetItem(__pyx_v_self->dimensions, __pyx_v_dimname, __pyx_t_3) < 0)) __PYX_ERR(0, 2057, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v_self->dimensions, __pyx_v_dimname, __pyx_t_3) < 0)) __PYX_ERR(0, 2091, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":2058 + /* "netCDF4/_netCDF4.pyx":2092 * `netCDF4.Dimension.isunlimited` method of the `netCDF4.Dimension` instance.""" * self.dimensions[dimname] = Dimension(self, dimname, size=size) * return self.dimensions[dimname] # <<<<<<<<<<<<<< @@ -16708,14 +16945,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_32createDimension(struct _ * def renameDimension(self, oldname, newname): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyObject_GetItem(__pyx_v_self->dimensions, __pyx_v_dimname); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2058, __pyx_L1_error) + __pyx_t_3 = PyObject_GetItem(__pyx_v_self->dimensions, __pyx_v_dimname); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":2044 - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) + /* "netCDF4/_netCDF4.pyx":2078 + * _ensure_nc_success(nc_set_fill(self._grpid, NC_NOFILL, &oldmode)) * * def createDimension(self, dimname, size=None): # <<<<<<<<<<<<<< * """ @@ -16735,7 +16972,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_32createDimension(struct _ return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2060 +/* "netCDF4/_netCDF4.pyx":2094 * return self.dimensions[dimname] * * def renameDimension(self, oldname, newname): # <<<<<<<<<<<<<< @@ -16744,9 +16981,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_32createDimension(struct _ */ /* Python wrapper */ -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_35renameDimension(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_34renameDimension[] = "\n**`renameDimension(self, oldname, newname)`**\n\nrename a `netCDF4.Dimension` named `oldname` to `newname`."; -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_35renameDimension(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_37renameDimension(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_36renameDimension[] = "\n**`renameDimension(self, oldname, newname)`**\n\nrename a `netCDF4.Dimension` named `oldname` to `newname`."; +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_37renameDimension(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_oldname = 0; PyObject *__pyx_v_newname = 0; PyObject *__pyx_r = 0; @@ -16772,11 +17009,11 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_35renameDimension(PyObject case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_newname)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("renameDimension", 1, 2, 2, 1); __PYX_ERR(0, 2060, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("renameDimension", 1, 2, 2, 1); __PYX_ERR(0, 2094, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "renameDimension") < 0)) __PYX_ERR(0, 2060, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "renameDimension") < 0)) __PYX_ERR(0, 2094, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -16789,20 +17026,20 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_35renameDimension(PyObject } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("renameDimension", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2060, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("renameDimension", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2094, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.renameDimension", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_34renameDimension(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), __pyx_v_oldname, __pyx_v_newname); + __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_36renameDimension(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), __pyx_v_oldname, __pyx_v_newname); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_34renameDimension(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_oldname, PyObject *__pyx_v_newname) { +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_36renameDimension(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_oldname, PyObject *__pyx_v_newname) { char *__pyx_v_namstring; PyObject *__pyx_v_bytestr = NULL; PyObject *__pyx_v_dim = NULL; @@ -16822,38 +17059,38 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_34renameDimension(struct _ PyObject *__pyx_t_11 = NULL; __Pyx_RefNannySetupContext("renameDimension", 0); - /* "netCDF4/_netCDF4.pyx":2066 + /* "netCDF4/_netCDF4.pyx":2100 * rename a `netCDF4.Dimension` named `oldname` to `newname`.""" * cdef char *namstring * bytestr = _strencode(newname) # <<<<<<<<<<<<<< * namstring = bytestr * if self.data_model != 'NETCDF4': self._redef() */ - __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_newname, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2066, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_newname, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_bytestr = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":2067 + /* "netCDF4/_netCDF4.pyx":2101 * cdef char *namstring * bytestr = _strencode(newname) * namstring = bytestr # <<<<<<<<<<<<<< * if self.data_model != 'NETCDF4': self._redef() * try: */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 2067, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 2101, __pyx_L1_error) __pyx_v_namstring = __pyx_t_2; - /* "netCDF4/_netCDF4.pyx":2068 + /* "netCDF4/_netCDF4.pyx":2102 * bytestr = _strencode(newname) * namstring = bytestr * if self.data_model != 'NETCDF4': self._redef() # <<<<<<<<<<<<<< * try: * dim = self.dimensions[oldname] */ - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_self->data_model, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2068, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_self->data_model, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2102, __pyx_L1_error) if (__pyx_t_3) { - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_redef); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2068, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_redef); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -16866,17 +17103,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_34renameDimension(struct _ } } if (__pyx_t_5) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2068, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2102, __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, 2068, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2102, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "netCDF4/_netCDF4.pyx":2069 + /* "netCDF4/_netCDF4.pyx":2103 * namstring = bytestr * if self.data_model != 'NETCDF4': self._redef() * try: # <<<<<<<<<<<<<< @@ -16892,19 +17129,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_34renameDimension(struct _ __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { - /* "netCDF4/_netCDF4.pyx":2070 + /* "netCDF4/_netCDF4.pyx":2104 * if self.data_model != 'NETCDF4': self._redef() * try: * dim = self.dimensions[oldname] # <<<<<<<<<<<<<< * except KeyError: * raise KeyError('%s not a valid dimension name' % oldname) */ - __pyx_t_1 = PyObject_GetItem(__pyx_v_self->dimensions, __pyx_v_oldname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2070, __pyx_L4_error) + __pyx_t_1 = PyObject_GetItem(__pyx_v_self->dimensions, __pyx_v_oldname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2104, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_dim = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":2069 + /* "netCDF4/_netCDF4.pyx":2103 * namstring = bytestr * if self.data_model != 'NETCDF4': self._redef() * try: # <<<<<<<<<<<<<< @@ -16922,7 +17159,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_34renameDimension(struct _ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":2071 + /* "netCDF4/_netCDF4.pyx":2105 * try: * dim = self.dimensions[oldname] * except KeyError: # <<<<<<<<<<<<<< @@ -16932,36 +17169,36 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_34renameDimension(struct _ __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_9) { __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.renameDimension", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(0, 2071, __pyx_L6_except_error) + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(0, 2105, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_5); - /* "netCDF4/_netCDF4.pyx":2072 + /* "netCDF4/_netCDF4.pyx":2106 * dim = self.dimensions[oldname] * except KeyError: * raise KeyError('%s not a valid dimension name' % oldname) # <<<<<<<<<<<<<< * ierr = nc_rename_dim(self._grpid, dim._dimid, namstring) * if self.data_model != 'NETCDF4': self._enddef() */ - __pyx_t_10 = __Pyx_PyString_Format(__pyx_kp_s_s_not_a_valid_dimension_name, __pyx_v_oldname); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2072, __pyx_L6_except_error) + __pyx_t_10 = __Pyx_PyString_Format(__pyx_kp_s_s_not_a_valid_dimension_name, __pyx_v_oldname); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2106, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2072, __pyx_L6_except_error) + __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2106, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_11, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2072, __pyx_L6_except_error) + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_11, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2106, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_Raise(__pyx_t_10, 0, 0, 0); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __PYX_ERR(0, 2072, __pyx_L6_except_error) + __PYX_ERR(0, 2106, __pyx_L6_except_error) } goto __pyx_L6_except_error; __pyx_L6_except_error:; - /* "netCDF4/_netCDF4.pyx":2069 + /* "netCDF4/_netCDF4.pyx":2103 * namstring = bytestr * if self.data_model != 'NETCDF4': self._redef() * try: # <<<<<<<<<<<<<< @@ -16977,29 +17214,29 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_34renameDimension(struct _ __pyx_L11_try_end:; } - /* "netCDF4/_netCDF4.pyx":2073 + /* "netCDF4/_netCDF4.pyx":2107 * except KeyError: * raise KeyError('%s not a valid dimension name' % oldname) * ierr = nc_rename_dim(self._grpid, dim._dimid, namstring) # <<<<<<<<<<<<<< * if self.data_model != 'NETCDF4': self._enddef() - * if ierr != NC_NOERR: + * */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dim, __pyx_n_s_dimid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2073, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dim, __pyx_n_s_dimid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2107, __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, 2073, __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, 2107, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_ierr = nc_rename_dim(__pyx_v_self->_grpid, __pyx_t_9, __pyx_v_namstring); - /* "netCDF4/_netCDF4.pyx":2074 + /* "netCDF4/_netCDF4.pyx":2108 * raise KeyError('%s not a valid dimension name' % oldname) * ierr = nc_rename_dim(self._grpid, dim._dimid, namstring) * if self.data_model != 'NETCDF4': self._enddef() # <<<<<<<<<<<<<< - * if ierr != NC_NOERR: - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) + * + * _ensure_nc_success(ierr) */ - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_self->data_model, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2074, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_self->data_model, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2108, __pyx_L1_error) if (__pyx_t_3) { - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_enddef); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2074, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_enddef); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -17012,122 +17249,94 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_34renameDimension(struct _ } } if (__pyx_t_1) { - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2074, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2108, __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, 2074, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2108, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } - /* "netCDF4/_netCDF4.pyx":2075 - * ierr = nc_rename_dim(self._grpid, dim._dimid, namstring) - * if self.data_model != 'NETCDF4': self._enddef() - * if ierr != NC_NOERR: # <<<<<<<<<<<<<< - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) - * # remove old key from dimensions dict. - */ - __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0); - if (__pyx_t_3) { - - /* "netCDF4/_netCDF4.pyx":2076 + /* "netCDF4/_netCDF4.pyx":2110 * if self.data_model != 'NETCDF4': self._enddef() - * if ierr != NC_NOERR: - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< + * + * _ensure_nc_success(ierr) # <<<<<<<<<<<<<< * # remove old key from dimensions dict. * self.dimensions.pop(oldname) */ - __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2076, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2076, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_INCREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2076, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_Raise(__pyx_t_5, 0, 0, 0); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __PYX_ERR(0, 2076, __pyx_L1_error) - - /* "netCDF4/_netCDF4.pyx":2075 - * ierr = nc_rename_dim(self._grpid, dim._dimid, namstring) - * if self.data_model != 'NETCDF4': self._enddef() - * if ierr != NC_NOERR: # <<<<<<<<<<<<<< - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) - * # remove old key from dimensions dict. - */ - } + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ierr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __pyx_f_7netCDF4_8_netCDF4__ensure_nc_success(__pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":2078 - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) + /* "netCDF4/_netCDF4.pyx":2112 + * _ensure_nc_success(ierr) * # remove old key from dimensions dict. * self.dimensions.pop(oldname) # <<<<<<<<<<<<<< * # add new key. * self.dimensions[newname] = dim */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dimensions, __pyx_n_s_pop); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2078, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dimensions, __pyx_n_s_pop); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_1)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); + __Pyx_DECREF_SET(__pyx_t_5, function); } } if (!__pyx_t_1) { - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_oldname); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2078, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_oldname); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); } else { #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { + if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_oldname}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2078, __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, 2112, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_4); } else #endif #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { + if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_oldname}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2078, __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, 2112, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_4); } else #endif { - __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2078, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1); __pyx_t_1 = NULL; __Pyx_INCREF(__pyx_v_oldname); __Pyx_GIVEREF(__pyx_v_oldname); PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_oldname); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2078, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":2080 + /* "netCDF4/_netCDF4.pyx":2114 * self.dimensions.pop(oldname) * # add new key. * self.dimensions[newname] = dim # <<<<<<<<<<<<<< * # Variable.dimensions is determined by a method that * # looks in the file, so no need to manually update. */ - if (unlikely(PyObject_SetItem(__pyx_v_self->dimensions, __pyx_v_newname, __pyx_v_dim) < 0)) __PYX_ERR(0, 2080, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v_self->dimensions, __pyx_v_newname, __pyx_v_dim) < 0)) __PYX_ERR(0, 2114, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":2060 + /* "netCDF4/_netCDF4.pyx":2094 * return self.dimensions[dimname] * * def renameDimension(self, oldname, newname): # <<<<<<<<<<<<<< @@ -17154,7 +17363,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_34renameDimension(struct _ return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2084 +/* "netCDF4/_netCDF4.pyx":2118 * # looks in the file, so no need to manually update. * * def createCompoundType(self, datatype, datatype_name): # <<<<<<<<<<<<<< @@ -17163,9 +17372,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_34renameDimension(struct _ */ /* Python wrapper */ -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_37createCompoundType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_36createCompoundType[] = "\n**`createCompoundType(self, datatype, datatype_name)`**\n\nCreates a new compound data type named `datatype_name` from the numpy\ndtype object `datatype`.\n\n***Note***: If the new compound data type contains other compound data types\n(i.e. it is a 'nested' compound type, where not all of the elements\nare homogeneous numeric data types), then the 'inner' compound types **must** be\ncreated first.\n\nThe return value is the `netCDF4.CompoundType` class instance describing the new\ndatatype."; -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_37createCompoundType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_39createCompoundType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_38createCompoundType[] = "\n**`createCompoundType(self, datatype, datatype_name)`**\n\nCreates a new compound data type named `datatype_name` from the numpy\ndtype object `datatype`.\n\n***Note***: If the new compound data type contains other compound data types\n(i.e. it is a 'nested' compound type, where not all of the elements\nare homogeneous numeric data types), then the 'inner' compound types **must** be\ncreated first.\n\nThe return value is the `netCDF4.CompoundType` class instance describing the new\ndatatype."; +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_39createCompoundType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_datatype = 0; PyObject *__pyx_v_datatype_name = 0; PyObject *__pyx_r = 0; @@ -17191,11 +17400,11 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_37createCompoundType(PyObj case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_datatype_name)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("createCompoundType", 1, 2, 2, 1); __PYX_ERR(0, 2084, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("createCompoundType", 1, 2, 2, 1); __PYX_ERR(0, 2118, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "createCompoundType") < 0)) __PYX_ERR(0, 2084, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "createCompoundType") < 0)) __PYX_ERR(0, 2118, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -17208,34 +17417,34 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_37createCompoundType(PyObj } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("createCompoundType", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2084, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("createCompoundType", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2118, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.createCompoundType", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_36createCompoundType(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), __pyx_v_datatype, __pyx_v_datatype_name); + __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_38createCompoundType(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), __pyx_v_datatype, __pyx_v_datatype_name); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_36createCompoundType(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_datatype, PyObject *__pyx_v_datatype_name) { +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_38createCompoundType(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_datatype, PyObject *__pyx_v_datatype_name) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("createCompoundType", 0); - /* "netCDF4/_netCDF4.pyx":2098 + /* "netCDF4/_netCDF4.pyx":2132 * The return value is the `netCDF4.CompoundType` class instance describing the new * datatype.""" * self.cmptypes[datatype_name] = CompoundType(self, datatype,\ # <<<<<<<<<<<<<< * datatype_name) * return self.cmptypes[datatype_name] */ - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2098, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); @@ -17246,13 +17455,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_36createCompoundType(struc __Pyx_INCREF(__pyx_v_datatype_name); __Pyx_GIVEREF(__pyx_v_datatype_name); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_datatype_name); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7netCDF4_8_netCDF4_CompoundType), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2098, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7netCDF4_8_netCDF4_CompoundType), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(PyObject_SetItem(__pyx_v_self->cmptypes, __pyx_v_datatype_name, __pyx_t_2) < 0)) __PYX_ERR(0, 2098, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v_self->cmptypes, __pyx_v_datatype_name, __pyx_t_2) < 0)) __PYX_ERR(0, 2132, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":2100 + /* "netCDF4/_netCDF4.pyx":2134 * self.cmptypes[datatype_name] = CompoundType(self, datatype,\ * datatype_name) * return self.cmptypes[datatype_name] # <<<<<<<<<<<<<< @@ -17260,13 +17469,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_36createCompoundType(struc * def createVLType(self, datatype, datatype_name): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyObject_GetItem(__pyx_v_self->cmptypes, __pyx_v_datatype_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2100, __pyx_L1_error) + __pyx_t_2 = PyObject_GetItem(__pyx_v_self->cmptypes, __pyx_v_datatype_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":2084 + /* "netCDF4/_netCDF4.pyx":2118 * # looks in the file, so no need to manually update. * * def createCompoundType(self, datatype, datatype_name): # <<<<<<<<<<<<<< @@ -17286,7 +17495,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_36createCompoundType(struc return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2102 +/* "netCDF4/_netCDF4.pyx":2136 * return self.cmptypes[datatype_name] * * def createVLType(self, datatype, datatype_name): # <<<<<<<<<<<<<< @@ -17295,9 +17504,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_36createCompoundType(struc */ /* Python wrapper */ -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_39createVLType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_38createVLType[] = "\n**`createVLType(self, datatype, datatype_name)`**\n\nCreates a new VLEN data type named `datatype_name` from a numpy\ndtype object `datatype`.\n\nThe return value is the `netCDF4.VLType` class instance describing the new\ndatatype."; -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_39createVLType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_41createVLType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_40createVLType[] = "\n**`createVLType(self, datatype, datatype_name)`**\n\nCreates a new VLEN data type named `datatype_name` from a numpy\ndtype object `datatype`.\n\nThe return value is the `netCDF4.VLType` class instance describing the new\ndatatype."; +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_41createVLType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_datatype = 0; PyObject *__pyx_v_datatype_name = 0; PyObject *__pyx_r = 0; @@ -17323,11 +17532,11 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_39createVLType(PyObject *_ case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_datatype_name)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("createVLType", 1, 2, 2, 1); __PYX_ERR(0, 2102, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("createVLType", 1, 2, 2, 1); __PYX_ERR(0, 2136, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "createVLType") < 0)) __PYX_ERR(0, 2102, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "createVLType") < 0)) __PYX_ERR(0, 2136, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -17340,34 +17549,34 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_39createVLType(PyObject *_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("createVLType", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2102, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("createVLType", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2136, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.createVLType", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_38createVLType(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), __pyx_v_datatype, __pyx_v_datatype_name); + __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_40createVLType(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), __pyx_v_datatype, __pyx_v_datatype_name); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_38createVLType(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_datatype, PyObject *__pyx_v_datatype_name) { +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_40createVLType(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_datatype, PyObject *__pyx_v_datatype_name) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("createVLType", 0); - /* "netCDF4/_netCDF4.pyx":2111 + /* "netCDF4/_netCDF4.pyx":2145 * The return value is the `netCDF4.VLType` class instance describing the new * datatype.""" * self.vltypes[datatype_name] = VLType(self, datatype, datatype_name) # <<<<<<<<<<<<<< * return self.vltypes[datatype_name] * */ - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2111, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); @@ -17378,13 +17587,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_38createVLType(struct __py __Pyx_INCREF(__pyx_v_datatype_name); __Pyx_GIVEREF(__pyx_v_datatype_name); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_datatype_name); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7netCDF4_8_netCDF4_VLType), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2111, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7netCDF4_8_netCDF4_VLType), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(PyObject_SetItem(__pyx_v_self->vltypes, __pyx_v_datatype_name, __pyx_t_2) < 0)) __PYX_ERR(0, 2111, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v_self->vltypes, __pyx_v_datatype_name, __pyx_t_2) < 0)) __PYX_ERR(0, 2145, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":2112 + /* "netCDF4/_netCDF4.pyx":2146 * datatype.""" * self.vltypes[datatype_name] = VLType(self, datatype, datatype_name) * return self.vltypes[datatype_name] # <<<<<<<<<<<<<< @@ -17392,13 +17601,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_38createVLType(struct __py * def createEnumType(self, datatype, datatype_name, enum_dict): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyObject_GetItem(__pyx_v_self->vltypes, __pyx_v_datatype_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2112, __pyx_L1_error) + __pyx_t_2 = PyObject_GetItem(__pyx_v_self->vltypes, __pyx_v_datatype_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":2102 + /* "netCDF4/_netCDF4.pyx":2136 * return self.cmptypes[datatype_name] * * def createVLType(self, datatype, datatype_name): # <<<<<<<<<<<<<< @@ -17418,7 +17627,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_38createVLType(struct __py return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2114 +/* "netCDF4/_netCDF4.pyx":2148 * return self.vltypes[datatype_name] * * def createEnumType(self, datatype, datatype_name, enum_dict): # <<<<<<<<<<<<<< @@ -17427,9 +17636,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_38createVLType(struct __py */ /* Python wrapper */ -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_41createEnumType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_40createEnumType[] = "\n**`createEnumType(self, datatype, datatype_name, enum_dict)`**\n\nCreates a new Enum data type named `datatype_name` from a numpy\ninteger dtype object `datatype`, and a python dictionary\ndefining the enum fields and values.\n\nThe return value is the `netCDF4.EnumType` class instance describing the new\ndatatype."; -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_41createEnumType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_43createEnumType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_42createEnumType[] = "\n**`createEnumType(self, datatype, datatype_name, enum_dict)`**\n\nCreates a new Enum data type named `datatype_name` from a numpy\ninteger dtype object `datatype`, and a python dictionary\ndefining the enum fields and values.\n\nThe return value is the `netCDF4.EnumType` class instance describing the new\ndatatype."; +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_43createEnumType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_datatype = 0; PyObject *__pyx_v_datatype_name = 0; PyObject *__pyx_v_enum_dict = 0; @@ -17457,16 +17666,16 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_41createEnumType(PyObject case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_datatype_name)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("createEnumType", 1, 3, 3, 1); __PYX_ERR(0, 2114, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("createEnumType", 1, 3, 3, 1); __PYX_ERR(0, 2148, __pyx_L3_error) } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_enum_dict)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("createEnumType", 1, 3, 3, 2); __PYX_ERR(0, 2114, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("createEnumType", 1, 3, 3, 2); __PYX_ERR(0, 2148, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "createEnumType") < 0)) __PYX_ERR(0, 2114, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "createEnumType") < 0)) __PYX_ERR(0, 2148, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -17481,34 +17690,34 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_41createEnumType(PyObject } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("createEnumType", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2114, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("createEnumType", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2148, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.createEnumType", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_40createEnumType(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), __pyx_v_datatype, __pyx_v_datatype_name, __pyx_v_enum_dict); + __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_42createEnumType(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), __pyx_v_datatype, __pyx_v_datatype_name, __pyx_v_enum_dict); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_40createEnumType(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_datatype, PyObject *__pyx_v_datatype_name, PyObject *__pyx_v_enum_dict) { +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42createEnumType(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_datatype, PyObject *__pyx_v_datatype_name, PyObject *__pyx_v_enum_dict) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("createEnumType", 0); - /* "netCDF4/_netCDF4.pyx":2124 + /* "netCDF4/_netCDF4.pyx":2158 * The return value is the `netCDF4.EnumType` class instance describing the new * datatype.""" * self.enumtypes[datatype_name] = EnumType(self, datatype, datatype_name, # <<<<<<<<<<<<<< * enum_dict) * return self.enumtypes[datatype_name] */ - __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2124, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); @@ -17522,13 +17731,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_40createEnumType(struct __ __Pyx_INCREF(__pyx_v_enum_dict); __Pyx_GIVEREF(__pyx_v_enum_dict); PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_enum_dict); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7netCDF4_8_netCDF4_EnumType), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2124, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7netCDF4_8_netCDF4_EnumType), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(PyObject_SetItem(__pyx_v_self->enumtypes, __pyx_v_datatype_name, __pyx_t_2) < 0)) __PYX_ERR(0, 2124, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v_self->enumtypes, __pyx_v_datatype_name, __pyx_t_2) < 0)) __PYX_ERR(0, 2158, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":2126 + /* "netCDF4/_netCDF4.pyx":2160 * self.enumtypes[datatype_name] = EnumType(self, datatype, datatype_name, * enum_dict) * return self.enumtypes[datatype_name] # <<<<<<<<<<<<<< @@ -17536,13 +17745,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_40createEnumType(struct __ * def createVariable(self, varname, datatype, dimensions=(), zlib=False, */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyObject_GetItem(__pyx_v_self->enumtypes, __pyx_v_datatype_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2126, __pyx_L1_error) + __pyx_t_2 = PyObject_GetItem(__pyx_v_self->enumtypes, __pyx_v_datatype_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":2114 + /* "netCDF4/_netCDF4.pyx":2148 * return self.vltypes[datatype_name] * * def createEnumType(self, datatype, datatype_name, enum_dict): # <<<<<<<<<<<<<< @@ -17562,7 +17771,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_40createEnumType(struct __ return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2128 +/* "netCDF4/_netCDF4.pyx":2162 * return self.enumtypes[datatype_name] * * def createVariable(self, varname, datatype, dimensions=(), zlib=False, # <<<<<<<<<<<<<< @@ -17571,9 +17780,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_40createEnumType(struct __ */ /* Python wrapper */ -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_43createVariable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_42createVariable[] = "\n**`createVariable(self, varname, datatype, dimensions=(), zlib=False,\ncomplevel=4, shuffle=True, fletcher32=False, contiguous=False, chunksizes=None,\nendian='native', least_significant_digit=None, fill_value=None)`**\n\nCreates a new variable with the given `varname`, `datatype`, and\n`dimensions`. If dimensions are not given, the variable is assumed to be\na scalar.\n\nIf `varname` is specified as a path, using forward slashes as in unix to\nseparate components, then intermediate groups will be created as necessary \nFor example, `createVariable('/GroupA/GroupB/VarC', float, ('x','y'))` will create groups `GroupA`\nand `GroupA/GroupB`, plus the variable `GroupA/GroupB/VarC`, if the preceding\ngroups don't already exist.\n\nThe `datatype` can be a numpy datatype object, or a string that describes\na numpy dtype object (like the `dtype.str` attribute of a numpy array).\nSupported specifiers include: `'S1' or 'c' (NC_CHAR), 'i1' or 'b' or 'B'\n(NC_BYTE), 'u1' (NC_UBYTE), 'i2' or 'h' or 's' (NC_SHORT), 'u2'\n(NC_USHORT), 'i4' or 'i' or 'l' (NC_INT), 'u4' (NC_UINT), 'i8' (NC_INT64),\n'u8' (NC_UINT64), 'f4' or 'f' (NC_FLOAT), 'f8' or 'd' (NC_DOUBLE)`.\n`datatype` can also be a `netCDF4.CompoundType` instance\n(for a structured, or compound array), a `netCDF4.VLType` instance\n(for a variable-length array), or the python `str` builtin\n(for a variable-length string array). Numpy string and unicode datatypes with\nlength greater than one are aliases for `str`.\n\nData from netCDF variables is presented to python as numpy arrays with\nthe corresponding data type.\n\n`dimensions` must be a tuple containing dimension names (strings) that\nhave been defined previously using `netCDF4.Dataset.createDimension`. The default value\nis an empty tuple, which means the variable is a scalar.\n\nIf the optional keyword `zlib` is `True`, the data will be compressed in\nthe netCDF file using gzip compression (default `False`).\n\nThe optional keyword `complevel` is an integer between ""1 and 9 describing\nthe level of compression desired (default 4). Ignored if `zlib=False`.\n\nIf the optional keyword `shuffle` is `True`, the HDF5 shuffle filter\nwill be applied before compressing the data (default `True`). This\nsignificantly improves compression. Default is `True`. Ignored if\n`zlib=False`.\n\nIf the optional keyword `fletcher32` is `True`, the Fletcher32 HDF5\nchecksum algorithm is activated to detect errors. Default `False`.\n\nIf the optional keyword `contiguous` is `True`, the variable data is\nstored contiguously on disk. Default `False`. Setting to `True` for\na variable with an unlimited dimension will trigger an error.\n\nThe optional keyword `chunksizes` can be used to manually specify the\nHDF5 chunksizes for each dimension of the variable. A detailed\ndiscussion of HDF chunking and I/O performance is available\n[here](http://www.hdfgroup.org/HDF5/doc/H5.user/Chunking.html).\nBasically, you want the chunk size for each dimension to match as\nclosely as possible the size of the data block that users will read\nfrom the file. `chunksizes` cannot be set if `contiguous=True`.\n\nThe optional keyword `endian` can be used to control whether the\ndata is stored in little or big endian format on disk. Possible\nvalues are `little, big` or `native` (default). The library\nwill automatically handle endian conversions when the data is read,\nbut if the data is always going to be read on a computer with the\nopposite format as the one used to create the file, there may be\nsome performance advantage to be gained by setting the endian-ness.\n\nThe `zlib, complevel, shuffle, fletcher32, contiguous, chunksizes` and `endian`\nkeywords are silently ignored for netCDF 3 files that do not use HDF5.\n\nThe optional keyword `fill_value` can be used to override the default\nnetCDF `_FillValue` (the value that the variable gets filled with before\nany data is written to it, defaults given in `netCDF4.default_fillvals`).\nIf fill_value is set to `False`, t""hen the variable is not pre-filled.\n\nIf the optional keyword parameter `least_significant_digit` is\nspecified, variable data will be truncated (quantized). In conjunction\nwith `zlib=True` this produces 'lossy', but significantly more\nefficient compression. For example, if `least_significant_digit=1`,\ndata will be quantized using `numpy.around(scale*data)/scale`, where\nscale = 2**bits, and bits is determined so that a precision of 0.1 is\nretained (in this case bits=4). From the \n[PSD metadata conventions](http://www.esrl.noaa.gov/psd/data/gridded/conventions/cdc_netcdf_standard.shtml):\n\"least_significant_digit -- power of ten of the smallest decimal place\nin unpacked data that is a reliable value.\" Default is `None`, or no\nquantization, or 'lossless' compression.\n\nWhen creating variables in a `NETCDF4` or `NETCDF4_CLASSIC` formatted file,\nHDF5 creates something called a 'chunk cache' for each variable. The\ndefault size of the chunk cache may be large enough to completely fill\navailable memory when creating thousands of variables. The optional\nkeyword `chunk_cache` allows you to reduce (or increase) the size of\nthe default chunk cache when creating a variable. The setting only\npersists as long as the Dataset is open - you can use the set_var_chunk_cache\nmethod to change it the next time the Dataset is opened.\nWarning - messing with this parameter can seriously degrade performance.\n\nThe return value is the `netCDF4.Variable` class instance describing the new\nvariable.\n\nA list of names corresponding to netCDF variable attributes can be\nobtained with the `netCDF4.Variable` method `netCDF4.Variable.ncattrs`. A dictionary\ncontaining all the netCDF attribute name/value pairs is provided by\nthe `__dict__` attribute of a `netCDF4.Variable` instance.\n\n`netCDF4.Variable` instances behave much like array objects. Data can be\nassigned to or retrieved from a variable with indexing and slicing\noperations on the `netCDF4.Variable` instance. A `""netCDF4.Variable` instance has six\nDataset standard attributes: `dimensions, dtype, shape, ndim, name` and\n`least_significant_digit`. Application programs should never modify\nthese attributes. The `dimensions` attribute is a tuple containing the\nnames of the dimensions associated with this variable. The `dtype`\nattribute is a string describing the variable's data type (`i4, f8,\nS1,` etc). The `shape` attribute is a tuple describing the current\nsizes of all the variable's dimensions. The `name` attribute is a\nstring containing the name of the Variable instance.\nThe `least_significant_digit`\nattributes describes the power of ten of the smallest decimal place in\nthe data the contains a reliable value. assigned to the `netCDF4.Variable`\ninstance. If `None`, the data is not truncated. The `ndim` attribute\nis the number of variable dimensions."; -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_43createVariable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_45createVariable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_44createVariable[] = "\n**`createVariable(self, varname, datatype, dimensions=(), zlib=False,\ncomplevel=4, shuffle=True, fletcher32=False, contiguous=False, chunksizes=None,\nendian='native', least_significant_digit=None, fill_value=None)`**\n\nCreates a new variable with the given `varname`, `datatype`, and\n`dimensions`. If dimensions are not given, the variable is assumed to be\na scalar.\n\nIf `varname` is specified as a path, using forward slashes as in unix to\nseparate components, then intermediate groups will be created as necessary \nFor example, `createVariable('/GroupA/GroupB/VarC', float, ('x','y'))` will create groups `GroupA`\nand `GroupA/GroupB`, plus the variable `GroupA/GroupB/VarC`, if the preceding\ngroups don't already exist.\n\nThe `datatype` can be a numpy datatype object, or a string that describes\na numpy dtype object (like the `dtype.str` attribute of a numpy array).\nSupported specifiers include: `'S1' or 'c' (NC_CHAR), 'i1' or 'b' or 'B'\n(NC_BYTE), 'u1' (NC_UBYTE), 'i2' or 'h' or 's' (NC_SHORT), 'u2'\n(NC_USHORT), 'i4' or 'i' or 'l' (NC_INT), 'u4' (NC_UINT), 'i8' (NC_INT64),\n'u8' (NC_UINT64), 'f4' or 'f' (NC_FLOAT), 'f8' or 'd' (NC_DOUBLE)`.\n`datatype` can also be a `netCDF4.CompoundType` instance\n(for a structured, or compound array), a `netCDF4.VLType` instance\n(for a variable-length array), or the python `str` builtin\n(for a variable-length string array). Numpy string and unicode datatypes with\nlength greater than one are aliases for `str`.\n\nData from netCDF variables is presented to python as numpy arrays with\nthe corresponding data type.\n\n`dimensions` must be a tuple containing dimension names (strings) that\nhave been defined previously using `netCDF4.Dataset.createDimension`. The default value\nis an empty tuple, which means the variable is a scalar.\n\nIf the optional keyword `zlib` is `True`, the data will be compressed in\nthe netCDF file using gzip compression (default `False`).\n\nThe optional keyword `complevel` is an integer between ""1 and 9 describing\nthe level of compression desired (default 4). Ignored if `zlib=False`.\n\nIf the optional keyword `shuffle` is `True`, the HDF5 shuffle filter\nwill be applied before compressing the data (default `True`). This\nsignificantly improves compression. Default is `True`. Ignored if\n`zlib=False`.\n\nIf the optional keyword `fletcher32` is `True`, the Fletcher32 HDF5\nchecksum algorithm is activated to detect errors. Default `False`.\n\nIf the optional keyword `contiguous` is `True`, the variable data is\nstored contiguously on disk. Default `False`. Setting to `True` for\na variable with an unlimited dimension will trigger an error.\n\nThe optional keyword `chunksizes` can be used to manually specify the\nHDF5 chunksizes for each dimension of the variable. A detailed\ndiscussion of HDF chunking and I/O performance is available\n[here](http://www.hdfgroup.org/HDF5/doc/H5.user/Chunking.html).\nBasically, you want the chunk size for each dimension to match as\nclosely as possible the size of the data block that users will read\nfrom the file. `chunksizes` cannot be set if `contiguous=True`.\n\nThe optional keyword `endian` can be used to control whether the\ndata is stored in little or big endian format on disk. Possible\nvalues are `little, big` or `native` (default). The library\nwill automatically handle endian conversions when the data is read,\nbut if the data is always going to be read on a computer with the\nopposite format as the one used to create the file, there may be\nsome performance advantage to be gained by setting the endian-ness.\n\nThe `zlib, complevel, shuffle, fletcher32, contiguous, chunksizes` and `endian`\nkeywords are silently ignored for netCDF 3 files that do not use HDF5.\n\nThe optional keyword `fill_value` can be used to override the default\nnetCDF `_FillValue` (the value that the variable gets filled with before\nany data is written to it, defaults given in `netCDF4.default_fillvals`).\nIf fill_value is set to `False`, t""hen the variable is not pre-filled.\n\nIf the optional keyword parameter `least_significant_digit` is\nspecified, variable data will be truncated (quantized). In conjunction\nwith `zlib=True` this produces 'lossy', but significantly more\nefficient compression. For example, if `least_significant_digit=1`,\ndata will be quantized using `numpy.around(scale*data)/scale`, where\nscale = 2**bits, and bits is determined so that a precision of 0.1 is\nretained (in this case bits=4). From the \n[PSD metadata conventions](http://www.esrl.noaa.gov/psd/data/gridded/conventions/cdc_netcdf_standard.shtml):\n\"least_significant_digit -- power of ten of the smallest decimal place\nin unpacked data that is a reliable value.\" Default is `None`, or no\nquantization, or 'lossless' compression.\n\nWhen creating variables in a `NETCDF4` or `NETCDF4_CLASSIC` formatted file,\nHDF5 creates something called a 'chunk cache' for each variable. The\ndefault size of the chunk cache may be large enough to completely fill\navailable memory when creating thousands of variables. The optional\nkeyword `chunk_cache` allows you to reduce (or increase) the size of\nthe default chunk cache when creating a variable. The setting only\npersists as long as the Dataset is open - you can use the set_var_chunk_cache\nmethod to change it the next time the Dataset is opened.\nWarning - messing with this parameter can seriously degrade performance.\n\nThe return value is the `netCDF4.Variable` class instance describing the new\nvariable.\n\nA list of names corresponding to netCDF variable attributes can be\nobtained with the `netCDF4.Variable` method `netCDF4.Variable.ncattrs`. A dictionary\ncontaining all the netCDF attribute name/value pairs is provided by\nthe `__dict__` attribute of a `netCDF4.Variable` instance.\n\n`netCDF4.Variable` instances behave much like array objects. Data can be\nassigned to or retrieved from a variable with indexing and slicing\noperations on the `netCDF4.Variable` instance. A `""netCDF4.Variable` instance has six\nDataset standard attributes: `dimensions, dtype, shape, ndim, name` and\n`least_significant_digit`. Application programs should never modify\nthese attributes. The `dimensions` attribute is a tuple containing the\nnames of the dimensions associated with this variable. The `dtype`\nattribute is a string describing the variable's data type (`i4, f8,\nS1,` etc). The `shape` attribute is a tuple describing the current\nsizes of all the variable's dimensions. The `name` attribute is a\nstring containing the name of the Variable instance.\nThe `least_significant_digit`\nattributes describes the power of ten of the smallest decimal place in\nthe data the contains a reliable value. assigned to the `netCDF4.Variable`\ninstance. If `None`, the data is not truncated. The `ndim` attribute\nis the number of variable dimensions."; +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_45createVariable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_varname = 0; PyObject *__pyx_v_datatype = 0; PyObject *__pyx_v_dimensions = 0; @@ -17597,7 +17806,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_43createVariable(PyObject values[3] = ((PyObject *)Py_False); values[4] = ((PyObject *)__pyx_int_4); - /* "netCDF4/_netCDF4.pyx":2129 + /* "netCDF4/_netCDF4.pyx":2163 * * def createVariable(self, varname, datatype, dimensions=(), zlib=False, * complevel=4, shuffle=True, fletcher32=False, contiguous=False, # <<<<<<<<<<<<<< @@ -17608,7 +17817,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_43createVariable(PyObject values[6] = ((PyObject *)Py_False); values[7] = ((PyObject *)Py_False); - /* "netCDF4/_netCDF4.pyx":2130 + /* "netCDF4/_netCDF4.pyx":2164 * def createVariable(self, varname, datatype, dimensions=(), zlib=False, * complevel=4, shuffle=True, fletcher32=False, contiguous=False, * chunksizes=None, endian='native', least_significant_digit=None, # <<<<<<<<<<<<<< @@ -17619,7 +17828,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_43createVariable(PyObject values[9] = ((PyObject *)__pyx_n_s_native); values[10] = ((PyObject *)Py_None); - /* "netCDF4/_netCDF4.pyx":2131 + /* "netCDF4/_netCDF4.pyx":2165 * complevel=4, shuffle=True, fletcher32=False, contiguous=False, * chunksizes=None, endian='native', least_significant_digit=None, * fill_value=None, chunk_cache=None): # <<<<<<<<<<<<<< @@ -17656,7 +17865,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_43createVariable(PyObject case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_datatype)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("createVariable", 0, 2, 13, 1); __PYX_ERR(0, 2128, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("createVariable", 0, 2, 13, 1); __PYX_ERR(0, 2162, __pyx_L3_error) } case 2: if (kw_args > 0) { @@ -17715,7 +17924,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_43createVariable(PyObject } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "createVariable") < 0)) __PYX_ERR(0, 2128, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "createVariable") < 0)) __PYX_ERR(0, 2162, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -17752,15 +17961,15 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_43createVariable(PyObject } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("createVariable", 0, 2, 13, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2128, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("createVariable", 0, 2, 13, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2162, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.createVariable", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_42createVariable(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), __pyx_v_varname, __pyx_v_datatype, __pyx_v_dimensions, __pyx_v_zlib, __pyx_v_complevel, __pyx_v_shuffle, __pyx_v_fletcher32, __pyx_v_contiguous, __pyx_v_chunksizes, __pyx_v_endian, __pyx_v_least_significant_digit, __pyx_v_fill_value, __pyx_v_chunk_cache); + __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_44createVariable(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), __pyx_v_varname, __pyx_v_datatype, __pyx_v_dimensions, __pyx_v_zlib, __pyx_v_complevel, __pyx_v_shuffle, __pyx_v_fletcher32, __pyx_v_contiguous, __pyx_v_chunksizes, __pyx_v_endian, __pyx_v_least_significant_digit, __pyx_v_fill_value, __pyx_v_chunk_cache); - /* "netCDF4/_netCDF4.pyx":2128 + /* "netCDF4/_netCDF4.pyx":2162 * return self.enumtypes[datatype_name] * * def createVariable(self, varname, datatype, dimensions=(), zlib=False, # <<<<<<<<<<<<<< @@ -17773,7 +17982,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_43createVariable(PyObject return __pyx_r; } -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42createVariable(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_varname, PyObject *__pyx_v_datatype, PyObject *__pyx_v_dimensions, PyObject *__pyx_v_zlib, PyObject *__pyx_v_complevel, PyObject *__pyx_v_shuffle, PyObject *__pyx_v_fletcher32, PyObject *__pyx_v_contiguous, PyObject *__pyx_v_chunksizes, PyObject *__pyx_v_endian, PyObject *__pyx_v_least_significant_digit, PyObject *__pyx_v_fill_value, PyObject *__pyx_v_chunk_cache) { +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_44createVariable(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_varname, PyObject *__pyx_v_datatype, PyObject *__pyx_v_dimensions, PyObject *__pyx_v_zlib, PyObject *__pyx_v_complevel, PyObject *__pyx_v_shuffle, PyObject *__pyx_v_fletcher32, PyObject *__pyx_v_contiguous, PyObject *__pyx_v_chunksizes, PyObject *__pyx_v_endian, PyObject *__pyx_v_least_significant_digit, PyObject *__pyx_v_fill_value, PyObject *__pyx_v_chunk_cache) { PyObject *__pyx_v_dirname = NULL; PyObject *__pyx_v_group = NULL; PyObject *__pyx_r = NULL; @@ -17788,16 +17997,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42createVariable(struct __ __Pyx_RefNannySetupContext("createVariable", 0); __Pyx_INCREF(__pyx_v_varname); - /* "netCDF4/_netCDF4.pyx":2255 + /* "netCDF4/_netCDF4.pyx":2289 * is the number of variable dimensions.""" * # if varname specified as a path, split out group names. * varname = posixpath.normpath(varname) # <<<<<<<<<<<<<< * dirname, varname = posixpath.split(varname) # varname is last. * # create parent groups (like mkdir -p). */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_posixpath); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2255, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_posixpath); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_normpath); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2255, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_normpath); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -17811,13 +18020,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42createVariable(struct __ } } if (!__pyx_t_2) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_varname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2255, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_varname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_varname}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2255, __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, 2289, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -17825,19 +18034,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42createVariable(struct __ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_varname}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2255, __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, 2289, __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, 2255, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2289, __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_varname); __Pyx_GIVEREF(__pyx_v_varname); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_varname); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2255, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -17846,16 +18055,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42createVariable(struct __ __Pyx_DECREF_SET(__pyx_v_varname, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":2256 + /* "netCDF4/_netCDF4.pyx":2290 * # if varname specified as a path, split out group names. * varname = posixpath.normpath(varname) * dirname, varname = posixpath.split(varname) # varname is last. # <<<<<<<<<<<<<< * # create parent groups (like mkdir -p). * if not dirname: */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_posixpath); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2256, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_posixpath); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2256, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -17869,13 +18078,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42createVariable(struct __ } } if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_varname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2256, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_varname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2290, __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_varname}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2256, __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, 2290, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -17883,19 +18092,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42createVariable(struct __ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_varname}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2256, __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, 2290, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2256, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_INCREF(__pyx_v_varname); __Pyx_GIVEREF(__pyx_v_varname); PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_varname); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2256, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -17911,7 +18120,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42createVariable(struct __ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 2256, __pyx_L1_error) + __PYX_ERR(0, 2290, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -17924,15 +18133,15 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42createVariable(struct __ __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_2); #else - __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2256, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2256, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2256, __pyx_L1_error) + __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; @@ -17940,7 +18149,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42createVariable(struct __ __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_2 = __pyx_t_5(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_3), 2) < 0) __PYX_ERR(0, 2256, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_3), 2) < 0) __PYX_ERR(0, 2290, __pyx_L1_error) __pyx_t_5 = NULL; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L4_unpacking_done; @@ -17948,7 +18157,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42createVariable(struct __ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 2256, __pyx_L1_error) + __PYX_ERR(0, 2290, __pyx_L1_error) __pyx_L4_unpacking_done:; } __pyx_v_dirname = __pyx_t_4; @@ -17956,18 +18165,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42createVariable(struct __ __Pyx_DECREF_SET(__pyx_v_varname, __pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":2258 + /* "netCDF4/_netCDF4.pyx":2292 * dirname, varname = posixpath.split(varname) # varname is last. * # create parent groups (like mkdir -p). * if not dirname: # <<<<<<<<<<<<<< * group = self * else: */ - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_dirname); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2258, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_dirname); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2292, __pyx_L1_error) __pyx_t_7 = ((!__pyx_t_6) != 0); if (__pyx_t_7) { - /* "netCDF4/_netCDF4.pyx":2259 + /* "netCDF4/_netCDF4.pyx":2293 * # create parent groups (like mkdir -p). * if not dirname: * group = self # <<<<<<<<<<<<<< @@ -17977,7 +18186,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42createVariable(struct __ __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_v_group = ((PyObject *)__pyx_v_self); - /* "netCDF4/_netCDF4.pyx":2258 + /* "netCDF4/_netCDF4.pyx":2292 * dirname, varname = posixpath.split(varname) # varname is last. * # create parent groups (like mkdir -p). * if not dirname: # <<<<<<<<<<<<<< @@ -17987,7 +18196,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42createVariable(struct __ goto __pyx_L5; } - /* "netCDF4/_netCDF4.pyx":2261 + /* "netCDF4/_netCDF4.pyx":2295 * group = self * else: * group = self.createGroup(dirname) # <<<<<<<<<<<<<< @@ -17995,7 +18204,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42createVariable(struct __ * group.variables[varname] = Variable(group, varname, datatype, */ /*else*/ { - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_createGroup); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2261, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_createGroup); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -18008,13 +18217,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42createVariable(struct __ } } if (!__pyx_t_4) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_dirname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2261, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_dirname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2295, __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_4, __pyx_v_dirname}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2261, __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, 2295, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -18022,19 +18231,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42createVariable(struct __ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_dirname}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2261, __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, 2295, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2261, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_INCREF(__pyx_v_dirname); __Pyx_GIVEREF(__pyx_v_dirname); PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_dirname); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2261, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -18045,14 +18254,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42createVariable(struct __ } __pyx_L5:; - /* "netCDF4/_netCDF4.pyx":2263 + /* "netCDF4/_netCDF4.pyx":2297 * group = self.createGroup(dirname) * # create variable. * group.variables[varname] = Variable(group, varname, datatype, # <<<<<<<<<<<<<< * dimensions=dimensions, zlib=zlib, complevel=complevel, shuffle=shuffle, * fletcher32=fletcher32, contiguous=contiguous, chunksizes=chunksizes, */ - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2263, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2297, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_group); __Pyx_GIVEREF(__pyx_v_group); @@ -18064,69 +18273,69 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42createVariable(struct __ __Pyx_GIVEREF(__pyx_v_datatype); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_datatype); - /* "netCDF4/_netCDF4.pyx":2264 + /* "netCDF4/_netCDF4.pyx":2298 * # create variable. * group.variables[varname] = Variable(group, varname, datatype, * dimensions=dimensions, zlib=zlib, complevel=complevel, shuffle=shuffle, # <<<<<<<<<<<<<< * fletcher32=fletcher32, contiguous=contiguous, chunksizes=chunksizes, * endian=endian, least_significant_digit=least_significant_digit, */ - __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2264, __pyx_L1_error) + __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dimensions, __pyx_v_dimensions) < 0) __PYX_ERR(0, 2264, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_zlib, __pyx_v_zlib) < 0) __PYX_ERR(0, 2264, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_complevel, __pyx_v_complevel) < 0) __PYX_ERR(0, 2264, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_shuffle, __pyx_v_shuffle) < 0) __PYX_ERR(0, 2264, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dimensions, __pyx_v_dimensions) < 0) __PYX_ERR(0, 2298, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_zlib, __pyx_v_zlib) < 0) __PYX_ERR(0, 2298, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_complevel, __pyx_v_complevel) < 0) __PYX_ERR(0, 2298, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_shuffle, __pyx_v_shuffle) < 0) __PYX_ERR(0, 2298, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":2265 + /* "netCDF4/_netCDF4.pyx":2299 * group.variables[varname] = Variable(group, varname, datatype, * dimensions=dimensions, zlib=zlib, complevel=complevel, shuffle=shuffle, * fletcher32=fletcher32, contiguous=contiguous, chunksizes=chunksizes, # <<<<<<<<<<<<<< * endian=endian, least_significant_digit=least_significant_digit, * fill_value=fill_value, chunk_cache=chunk_cache) */ - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_fletcher32, __pyx_v_fletcher32) < 0) __PYX_ERR(0, 2264, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_contiguous, __pyx_v_contiguous) < 0) __PYX_ERR(0, 2264, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_chunksizes, __pyx_v_chunksizes) < 0) __PYX_ERR(0, 2264, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_fletcher32, __pyx_v_fletcher32) < 0) __PYX_ERR(0, 2298, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_contiguous, __pyx_v_contiguous) < 0) __PYX_ERR(0, 2298, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_chunksizes, __pyx_v_chunksizes) < 0) __PYX_ERR(0, 2298, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":2266 + /* "netCDF4/_netCDF4.pyx":2300 * dimensions=dimensions, zlib=zlib, complevel=complevel, shuffle=shuffle, * fletcher32=fletcher32, contiguous=contiguous, chunksizes=chunksizes, * endian=endian, least_significant_digit=least_significant_digit, # <<<<<<<<<<<<<< * fill_value=fill_value, chunk_cache=chunk_cache) * return group.variables[varname] */ - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_endian, __pyx_v_endian) < 0) __PYX_ERR(0, 2264, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_least_significant_digit, __pyx_v_least_significant_digit) < 0) __PYX_ERR(0, 2264, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_endian, __pyx_v_endian) < 0) __PYX_ERR(0, 2298, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_least_significant_digit, __pyx_v_least_significant_digit) < 0) __PYX_ERR(0, 2298, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":2267 + /* "netCDF4/_netCDF4.pyx":2301 * fletcher32=fletcher32, contiguous=contiguous, chunksizes=chunksizes, * endian=endian, least_significant_digit=least_significant_digit, * fill_value=fill_value, chunk_cache=chunk_cache) # <<<<<<<<<<<<<< * return group.variables[varname] * */ - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_fill_value, __pyx_v_fill_value) < 0) __PYX_ERR(0, 2264, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_chunk_cache, __pyx_v_chunk_cache) < 0) __PYX_ERR(0, 2264, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_fill_value, __pyx_v_fill_value) < 0) __PYX_ERR(0, 2298, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_chunk_cache, __pyx_v_chunk_cache) < 0) __PYX_ERR(0, 2298, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":2263 + /* "netCDF4/_netCDF4.pyx":2297 * group = self.createGroup(dirname) * # create variable. * group.variables[varname] = Variable(group, varname, datatype, # <<<<<<<<<<<<<< * dimensions=dimensions, zlib=zlib, complevel=complevel, shuffle=shuffle, * fletcher32=fletcher32, contiguous=contiguous, chunksizes=chunksizes, */ - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7netCDF4_8_netCDF4_Variable), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2263, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7netCDF4_8_netCDF4_Variable), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2297, __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_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_variables); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2263, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_variables); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2297, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_v_varname, __pyx_t_3) < 0)) __PYX_ERR(0, 2263, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_v_varname, __pyx_t_3) < 0)) __PYX_ERR(0, 2297, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":2268 + /* "netCDF4/_netCDF4.pyx":2302 * endian=endian, least_significant_digit=least_significant_digit, * fill_value=fill_value, chunk_cache=chunk_cache) * return group.variables[varname] # <<<<<<<<<<<<<< @@ -18134,16 +18343,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42createVariable(struct __ * def renameVariable(self, oldname, newname): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2268, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyObject_GetItem(__pyx_t_3, __pyx_v_varname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2268, __pyx_L1_error) + __pyx_t_2 = PyObject_GetItem(__pyx_t_3, __pyx_v_varname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":2128 + /* "netCDF4/_netCDF4.pyx":2162 * return self.enumtypes[datatype_name] * * def createVariable(self, varname, datatype, dimensions=(), zlib=False, # <<<<<<<<<<<<<< @@ -18168,7 +18377,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42createVariable(struct __ return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2270 +/* "netCDF4/_netCDF4.pyx":2304 * return group.variables[varname] * * def renameVariable(self, oldname, newname): # <<<<<<<<<<<<<< @@ -18177,9 +18386,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42createVariable(struct __ */ /* Python wrapper */ -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_45renameVariable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_44renameVariable[] = "\n**`renameVariable(self, oldname, newname)`**\n\nrename a `netCDF4.Variable` named `oldname` to `newname`"; -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_45renameVariable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_47renameVariable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_46renameVariable[] = "\n**`renameVariable(self, oldname, newname)`**\n\nrename a `netCDF4.Variable` named `oldname` to `newname`"; +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_47renameVariable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_oldname = 0; PyObject *__pyx_v_newname = 0; PyObject *__pyx_r = 0; @@ -18205,11 +18414,11 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_45renameVariable(PyObject case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_newname)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("renameVariable", 1, 2, 2, 1); __PYX_ERR(0, 2270, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("renameVariable", 1, 2, 2, 1); __PYX_ERR(0, 2304, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "renameVariable") < 0)) __PYX_ERR(0, 2270, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "renameVariable") < 0)) __PYX_ERR(0, 2304, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -18222,20 +18431,20 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_45renameVariable(PyObject } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("renameVariable", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2270, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("renameVariable", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2304, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.renameVariable", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_44renameVariable(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), __pyx_v_oldname, __pyx_v_newname); + __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_46renameVariable(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), __pyx_v_oldname, __pyx_v_newname); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_44renameVariable(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_oldname, PyObject *__pyx_v_newname) { +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_46renameVariable(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_oldname, PyObject *__pyx_v_newname) { char *__pyx_v_namstring; PyObject *__pyx_v_var = NULL; PyObject *__pyx_v_bytestr = NULL; @@ -18255,7 +18464,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_44renameVariable(struct __ int __pyx_t_11; __Pyx_RefNannySetupContext("renameVariable", 0); - /* "netCDF4/_netCDF4.pyx":2276 + /* "netCDF4/_netCDF4.pyx":2310 * rename a `netCDF4.Variable` named `oldname` to `newname`""" * cdef char *namstring * try: # <<<<<<<<<<<<<< @@ -18271,19 +18480,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_44renameVariable(struct __ __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "netCDF4/_netCDF4.pyx":2277 + /* "netCDF4/_netCDF4.pyx":2311 * cdef char *namstring * try: * var = self.variables[oldname] # <<<<<<<<<<<<<< * except KeyError: * raise KeyError('%s not a valid variable name' % oldname) */ - __pyx_t_4 = PyObject_GetItem(__pyx_v_self->variables, __pyx_v_oldname); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2277, __pyx_L3_error) + __pyx_t_4 = PyObject_GetItem(__pyx_v_self->variables, __pyx_v_oldname); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2311, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_var = __pyx_t_4; __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":2276 + /* "netCDF4/_netCDF4.pyx":2310 * rename a `netCDF4.Variable` named `oldname` to `newname`""" * cdef char *namstring * try: # <<<<<<<<<<<<<< @@ -18299,7 +18508,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_44renameVariable(struct __ __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":2278 + /* "netCDF4/_netCDF4.pyx":2312 * try: * var = self.variables[oldname] * except KeyError: # <<<<<<<<<<<<<< @@ -18309,36 +18518,36 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_44renameVariable(struct __ __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_5) { __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.renameVariable", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 2278, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 2312, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); - /* "netCDF4/_netCDF4.pyx":2279 + /* "netCDF4/_netCDF4.pyx":2313 * var = self.variables[oldname] * except KeyError: * raise KeyError('%s not a valid variable name' % oldname) # <<<<<<<<<<<<<< * bytestr = _strencode(newname) * namstring = bytestr */ - __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_s_not_a_valid_variable_name, __pyx_v_oldname); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2279, __pyx_L5_except_error) + __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_s_not_a_valid_variable_name, __pyx_v_oldname); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2313, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2279, __pyx_L5_except_error) + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2313, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2279, __pyx_L5_except_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2313, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __PYX_ERR(0, 2279, __pyx_L5_except_error) + __PYX_ERR(0, 2313, __pyx_L5_except_error) } goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "netCDF4/_netCDF4.pyx":2276 + /* "netCDF4/_netCDF4.pyx":2310 * rename a `netCDF4.Variable` named `oldname` to `newname`""" * cdef char *namstring * try: # <<<<<<<<<<<<<< @@ -18354,38 +18563,38 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_44renameVariable(struct __ __pyx_L10_try_end:; } - /* "netCDF4/_netCDF4.pyx":2280 + /* "netCDF4/_netCDF4.pyx":2314 * except KeyError: * raise KeyError('%s not a valid variable name' % oldname) * bytestr = _strencode(newname) # <<<<<<<<<<<<<< * namstring = bytestr * if self.data_model != 'NETCDF4': self._redef() */ - __pyx_t_7 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_newname, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2280, __pyx_L1_error) + __pyx_t_7 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_newname, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_v_bytestr = __pyx_t_7; __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":2281 + /* "netCDF4/_netCDF4.pyx":2315 * raise KeyError('%s not a valid variable name' % oldname) * bytestr = _strencode(newname) * namstring = bytestr # <<<<<<<<<<<<<< * if self.data_model != 'NETCDF4': self._redef() * ierr = nc_rename_var(self._grpid, var._varid, namstring) */ - __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 2281, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 2315, __pyx_L1_error) __pyx_v_namstring = __pyx_t_10; - /* "netCDF4/_netCDF4.pyx":2282 + /* "netCDF4/_netCDF4.pyx":2316 * bytestr = _strencode(newname) * namstring = bytestr * if self.data_model != 'NETCDF4': self._redef() # <<<<<<<<<<<<<< * ierr = nc_rename_var(self._grpid, var._varid, namstring) * if self.data_model != 'NETCDF4': self._enddef() */ - __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_v_self->data_model, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 2282, __pyx_L1_error) + __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_v_self->data_model, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 2316, __pyx_L1_error) if (__pyx_t_11) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_redef); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2282, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_redef); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -18398,39 +18607,39 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_44renameVariable(struct __ } } if (__pyx_t_4) { - __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2282, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2316, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { - __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2282, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2316, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } - /* "netCDF4/_netCDF4.pyx":2283 + /* "netCDF4/_netCDF4.pyx":2317 * namstring = bytestr * if self.data_model != 'NETCDF4': self._redef() * ierr = nc_rename_var(self._grpid, var._varid, namstring) # <<<<<<<<<<<<<< * if self.data_model != 'NETCDF4': self._enddef() - * if ierr != NC_NOERR: + * */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_varid); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2283, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_varid); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2283, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2317, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_ierr = nc_rename_var(__pyx_v_self->_grpid, __pyx_t_5, __pyx_v_namstring); - /* "netCDF4/_netCDF4.pyx":2284 + /* "netCDF4/_netCDF4.pyx":2318 * if self.data_model != 'NETCDF4': self._redef() * ierr = nc_rename_var(self._grpid, var._varid, namstring) * if self.data_model != 'NETCDF4': self._enddef() # <<<<<<<<<<<<<< - * if ierr != NC_NOERR: - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) + * + * _ensure_nc_success(ierr) */ - __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_v_self->data_model, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 2284, __pyx_L1_error) + __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_v_self->data_model, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 2318, __pyx_L1_error) if (__pyx_t_11) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_enddef); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2284, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_enddef); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -18443,122 +18652,94 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_44renameVariable(struct __ } } if (__pyx_t_4) { - __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2284, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2318, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { - __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2284, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2318, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } - /* "netCDF4/_netCDF4.pyx":2285 - * ierr = nc_rename_var(self._grpid, var._varid, namstring) - * if self.data_model != 'NETCDF4': self._enddef() - * if ierr != NC_NOERR: # <<<<<<<<<<<<<< - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) - * # remove old key from dimensions dict. - */ - __pyx_t_11 = ((__pyx_v_ierr != NC_NOERR) != 0); - if (__pyx_t_11) { - - /* "netCDF4/_netCDF4.pyx":2286 + /* "netCDF4/_netCDF4.pyx":2320 * if self.data_model != 'NETCDF4': self._enddef() - * if ierr != NC_NOERR: - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< + * + * _ensure_nc_success(ierr) # <<<<<<<<<<<<<< * # remove old key from dimensions dict. * self.variables.pop(oldname) */ - __pyx_t_10 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_7 = __Pyx_decode_c_string(__pyx_t_10, 0, strlen(__pyx_t_10), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2286, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2286, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_INCREF(__pyx_t_7); - __Pyx_GIVEREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2286, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_Raise(__pyx_t_7, 0, 0, 0); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __PYX_ERR(0, 2286, __pyx_L1_error) - - /* "netCDF4/_netCDF4.pyx":2285 - * ierr = nc_rename_var(self._grpid, var._varid, namstring) - * if self.data_model != 'NETCDF4': self._enddef() - * if ierr != NC_NOERR: # <<<<<<<<<<<<<< - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) - * # remove old key from dimensions dict. - */ - } + __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_ierr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2320, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __pyx_f_7netCDF4_8_netCDF4__ensure_nc_success(__pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2320, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":2288 - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) + /* "netCDF4/_netCDF4.pyx":2322 + * _ensure_nc_success(ierr) * # remove old key from dimensions dict. * self.variables.pop(oldname) # <<<<<<<<<<<<<< * # add new key. * self.variables[newname] = var */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->variables, __pyx_n_s_pop); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2288, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->variables, __pyx_n_s_pop); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); + __Pyx_DECREF_SET(__pyx_t_7, function); } } if (!__pyx_t_4) { - __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_oldname); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2288, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_oldname); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); } else { #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_6)) { + if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_oldname}; - __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2288, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2322, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_7); + __Pyx_GOTREF(__pyx_t_6); } else #endif #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_oldname}; - __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2288, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2322, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_7); + __Pyx_GOTREF(__pyx_t_6); } else #endif { - __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2288, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_INCREF(__pyx_v_oldname); __Pyx_GIVEREF(__pyx_v_oldname); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_oldname); - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2288, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } } - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":2290 + /* "netCDF4/_netCDF4.pyx":2324 * self.variables.pop(oldname) * # add new key. * self.variables[newname] = var # <<<<<<<<<<<<<< * * def createGroup(self, groupname): */ - if (unlikely(PyObject_SetItem(__pyx_v_self->variables, __pyx_v_newname, __pyx_v_var) < 0)) __PYX_ERR(0, 2290, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v_self->variables, __pyx_v_newname, __pyx_v_var) < 0)) __PYX_ERR(0, 2324, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":2270 + /* "netCDF4/_netCDF4.pyx":2304 * return group.variables[varname] * * def renameVariable(self, oldname, newname): # <<<<<<<<<<<<<< @@ -18585,7 +18766,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_44renameVariable(struct __ return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2292 +/* "netCDF4/_netCDF4.pyx":2326 * self.variables[newname] = var * * def createGroup(self, groupname): # <<<<<<<<<<<<<< @@ -18594,20 +18775,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_44renameVariable(struct __ */ /* Python wrapper */ -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_47createGroup(PyObject *__pyx_v_self, PyObject *__pyx_v_groupname); /*proto*/ -static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_46createGroup[] = "\n**`createGroup(self, groupname)`**\n\nCreates a new `netCDF4.Group` with the given `groupname`.\n\nIf `groupname` is specified as a path, using forward slashes as in unix to\nseparate components, then intermediate groups will be created as necessary \n(analogous to `mkdir -p` in unix). For example,\n`createGroup('/GroupA/GroupB/GroupC')` will create `GroupA`,\n`GroupA/GroupB`, and `GroupA/GroupB/GroupC`, if they don't already exist.\nIf the specified path describes a group that already exists, no error is\nraised.\n\nThe return value is a `netCDF4.Group` class instance."; -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_47createGroup(PyObject *__pyx_v_self, PyObject *__pyx_v_groupname) { +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_49createGroup(PyObject *__pyx_v_self, PyObject *__pyx_v_groupname); /*proto*/ +static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_48createGroup[] = "\n**`createGroup(self, groupname)`**\n\nCreates a new `netCDF4.Group` with the given `groupname`.\n\nIf `groupname` is specified as a path, using forward slashes as in unix to\nseparate components, then intermediate groups will be created as necessary \n(analogous to `mkdir -p` in unix). For example,\n`createGroup('/GroupA/GroupB/GroupC')` will create `GroupA`,\n`GroupA/GroupB`, and `GroupA/GroupB/GroupC`, if they don't already exist.\nIf the specified path describes a group that already exists, no error is\nraised.\n\nThe return value is a `netCDF4.Group` class instance."; +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_49createGroup(PyObject *__pyx_v_self, PyObject *__pyx_v_groupname) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("createGroup (wrapper)", 0); - __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_46createGroup(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_groupname)); + __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_48createGroup(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_groupname)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_46createGroup(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_groupname) { +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_48createGroup(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_groupname) { PyObject *__pyx_v_nestedgroups = NULL; PyObject *__pyx_v_group = NULL; PyObject *__pyx_v_g = NULL; @@ -18624,16 +18805,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_46createGroup(struct __pyx __Pyx_RefNannySetupContext("createGroup", 0); __Pyx_INCREF(__pyx_v_groupname); - /* "netCDF4/_netCDF4.pyx":2308 + /* "netCDF4/_netCDF4.pyx":2342 * The return value is a `netCDF4.Group` class instance.""" * # if group specified as a path, split out group names * groupname = posixpath.normpath(groupname) # <<<<<<<<<<<<<< * nestedgroups = groupname.split('/') * group = self */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_posixpath); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2308, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_posixpath); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_normpath); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2308, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_normpath); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -18647,13 +18828,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_46createGroup(struct __pyx } } if (!__pyx_t_2) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_groupname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2308, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_groupname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_groupname}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2308, __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, 2342, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -18661,19 +18842,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_46createGroup(struct __pyx #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_groupname}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2308, __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, 2342, __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, 2308, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2342, __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_groupname); __Pyx_GIVEREF(__pyx_v_groupname); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_groupname); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2308, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -18682,22 +18863,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_46createGroup(struct __pyx __Pyx_DECREF_SET(__pyx_v_groupname, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":2309 + /* "netCDF4/_netCDF4.pyx":2343 * # if group specified as a path, split out group names * groupname = posixpath.normpath(groupname) * nestedgroups = groupname.split('/') # <<<<<<<<<<<<<< * group = self * # loop over group names, create parent groups if they do not already */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_groupname, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2309, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_groupname, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2309, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_nestedgroups = __pyx_t_3; __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":2310 + /* "netCDF4/_netCDF4.pyx":2344 * groupname = posixpath.normpath(groupname) * nestedgroups = groupname.split('/') * group = self # <<<<<<<<<<<<<< @@ -18707,7 +18888,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_46createGroup(struct __pyx __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_v_group = ((PyObject *)__pyx_v_self); - /* "netCDF4/_netCDF4.pyx":2313 + /* "netCDF4/_netCDF4.pyx":2347 * # loop over group names, create parent groups if they do not already * # exist. * for g in nestedgroups: # <<<<<<<<<<<<<< @@ -18718,26 +18899,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_46createGroup(struct __pyx __pyx_t_3 = __pyx_v_nestedgroups; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_nestedgroups); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2313, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_nestedgroups); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2313, __pyx_L1_error) + __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2347, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_6)) { if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_5 >= 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_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 2313, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 2347, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2313, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_5 >= 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_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 2313, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 2347, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2313, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -18747,7 +18928,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_46createGroup(struct __pyx 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, 2313, __pyx_L1_error) + else __PYX_ERR(0, 2347, __pyx_L1_error) } break; } @@ -18756,41 +18937,41 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_46createGroup(struct __pyx __Pyx_XDECREF_SET(__pyx_v_g, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":2314 + /* "netCDF4/_netCDF4.pyx":2348 * # exist. * for g in nestedgroups: * if not g: continue # <<<<<<<<<<<<<< * if g not in group.groups: * group.groups[g] = Group(group, g) */ - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_g); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2314, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_g); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2348, __pyx_L1_error) __pyx_t_8 = ((!__pyx_t_7) != 0); if (__pyx_t_8) { goto __pyx_L3_continue; } - /* "netCDF4/_netCDF4.pyx":2315 + /* "netCDF4/_netCDF4.pyx":2349 * for g in nestedgroups: * if not g: continue * if g not in group.groups: # <<<<<<<<<<<<<< * group.groups[g] = Group(group, g) * group = group.groups[g] */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_groups); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2315, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_groups); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_g, __pyx_t_1, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 2315, __pyx_L1_error) + __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_g, __pyx_t_1, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 2349, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = (__pyx_t_8 != 0); if (__pyx_t_7) { - /* "netCDF4/_netCDF4.pyx":2316 + /* "netCDF4/_netCDF4.pyx":2350 * if not g: continue * if g not in group.groups: * group.groups[g] = Group(group, g) # <<<<<<<<<<<<<< * group = group.groups[g] * # if group already exists, just return the group */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2316, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_group); __Pyx_GIVEREF(__pyx_v_group); @@ -18798,16 +18979,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_46createGroup(struct __pyx __Pyx_INCREF(__pyx_v_g); __Pyx_GIVEREF(__pyx_v_g); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_g); - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7netCDF4_8_netCDF4_Group), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2316, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7netCDF4_8_netCDF4_Group), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_groups); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2316, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_groups); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_g, __pyx_t_4) < 0)) __PYX_ERR(0, 2316, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_g, __pyx_t_4) < 0)) __PYX_ERR(0, 2350, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":2315 + /* "netCDF4/_netCDF4.pyx":2349 * for g in nestedgroups: * if not g: continue * if g not in group.groups: # <<<<<<<<<<<<<< @@ -18816,22 +18997,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_46createGroup(struct __pyx */ } - /* "netCDF4/_netCDF4.pyx":2317 + /* "netCDF4/_netCDF4.pyx":2351 * if g not in group.groups: * group.groups[g] = Group(group, g) * group = group.groups[g] # <<<<<<<<<<<<<< * # if group already exists, just return the group * # (prior to 1.1.8, this would have raised an error) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_groups); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2317, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_groups); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyObject_GetItem(__pyx_t_4, __pyx_v_g); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2317, __pyx_L1_error) + __pyx_t_1 = PyObject_GetItem(__pyx_t_4, __pyx_v_g); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_group, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":2313 + /* "netCDF4/_netCDF4.pyx":2347 * # loop over group names, create parent groups if they do not already * # exist. * for g in nestedgroups: # <<<<<<<<<<<<<< @@ -18842,7 +19023,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_46createGroup(struct __pyx } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":2320 + /* "netCDF4/_netCDF4.pyx":2354 * # if group already exists, just return the group * # (prior to 1.1.8, this would have raised an error) * return group # <<<<<<<<<<<<<< @@ -18854,7 +19035,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_46createGroup(struct __pyx __pyx_r = __pyx_v_group; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":2292 + /* "netCDF4/_netCDF4.pyx":2326 * self.variables[newname] = var * * def createGroup(self, groupname): # <<<<<<<<<<<<<< @@ -18880,7 +19061,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_46createGroup(struct __pyx return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2322 +/* "netCDF4/_netCDF4.pyx":2356 * return group * * def ncattrs(self): # <<<<<<<<<<<<<< @@ -18889,26 +19070,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_46createGroup(struct __pyx */ /* Python wrapper */ -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_49ncattrs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_48ncattrs[] = "\n**`ncattrs(self)`**\n\nreturn netCDF global attribute names for this `netCDF4.Dataset` or `netCDF4.Group` in a list."; -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_49ncattrs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_51ncattrs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_50ncattrs[] = "\n**`ncattrs(self)`**\n\nreturn netCDF global attribute names for this `netCDF4.Dataset` or `netCDF4.Group` in a list."; +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_51ncattrs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ncattrs (wrapper)", 0); - __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_48ncattrs(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self)); + __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_50ncattrs(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_48ncattrs(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self) { +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_50ncattrs(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("ncattrs", 0); - /* "netCDF4/_netCDF4.pyx":2327 + /* "netCDF4/_netCDF4.pyx":2361 * * return netCDF global attribute names for this `netCDF4.Dataset` or `netCDF4.Group` in a list.""" * return _get_att_names(self._grpid, NC_GLOBAL) # <<<<<<<<<<<<<< @@ -18916,13 +19097,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_48ncattrs(struct __pyx_obj * def setncattr(self,name,value): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__get_att_names(__pyx_v_self->_grpid, NC_GLOBAL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2327, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__get_att_names(__pyx_v_self->_grpid, NC_GLOBAL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":2322 + /* "netCDF4/_netCDF4.pyx":2356 * return group * * def ncattrs(self): # <<<<<<<<<<<<<< @@ -18941,7 +19122,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_48ncattrs(struct __pyx_obj return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2329 +/* "netCDF4/_netCDF4.pyx":2363 * return _get_att_names(self._grpid, NC_GLOBAL) * * def setncattr(self,name,value): # <<<<<<<<<<<<<< @@ -18950,9 +19131,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_48ncattrs(struct __pyx_obj */ /* Python wrapper */ -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_51setncattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_50setncattr[] = "\n**`setncattr(self,name,value)`**\n\nset a netCDF dataset or group attribute using name,value pair.\nUse if you need to set a netCDF attribute with the\nwith the same name as one of the reserved python attributes."; -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_51setncattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_53setncattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_52setncattr[] = "\n**`setncattr(self,name,value)`**\n\nset a netCDF dataset or group attribute using name,value pair.\nUse if you need to set a netCDF attribute with the\nwith the same name as one of the reserved python attributes."; +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_53setncattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; PyObject *__pyx_v_value = 0; PyObject *__pyx_r = 0; @@ -18978,11 +19159,11 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_51setncattr(PyObject *__py case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("setncattr", 1, 2, 2, 1); __PYX_ERR(0, 2329, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("setncattr", 1, 2, 2, 1); __PYX_ERR(0, 2363, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setncattr") < 0)) __PYX_ERR(0, 2329, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setncattr") < 0)) __PYX_ERR(0, 2363, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -18995,20 +19176,20 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_51setncattr(PyObject *__py } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("setncattr", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2329, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("setncattr", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2363, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.setncattr", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_50setncattr(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), __pyx_v_name, __pyx_v_value); + __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_52setncattr(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), __pyx_v_name, __pyx_v_value); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_50setncattr(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) { +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_52setncattr(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; @@ -19017,16 +19198,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_50setncattr(struct __pyx_o PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("setncattr", 0); - /* "netCDF4/_netCDF4.pyx":2336 + /* "netCDF4/_netCDF4.pyx":2370 * Use if you need to set a netCDF attribute with the * with the same name as one of the reserved python attributes.""" * if self.data_model != 'NETCDF4': self._redef() # <<<<<<<<<<<<<< * _set_att(self, NC_GLOBAL, name, value) * if self.data_model != 'NETCDF4': self._enddef() */ - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->data_model, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2336, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->data_model, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2370, __pyx_L1_error) if (__pyx_t_1) { - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_redef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2336, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_redef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -19039,37 +19220,37 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_50setncattr(struct __pyx_o } } if (__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2336, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2370, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2336, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2370, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } - /* "netCDF4/_netCDF4.pyx":2337 + /* "netCDF4/_netCDF4.pyx":2371 * with the same name as one of the reserved python attributes.""" * if self.data_model != 'NETCDF4': self._redef() * _set_att(self, NC_GLOBAL, name, value) # <<<<<<<<<<<<<< * if self.data_model != 'NETCDF4': self._enddef() * */ - __pyx_t_2 = __pyx_f_7netCDF4_8_netCDF4__set_att(((PyObject *)__pyx_v_self), NC_GLOBAL, __pyx_v_name, __pyx_v_value, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2337, __pyx_L1_error) + __pyx_t_2 = __pyx_f_7netCDF4_8_netCDF4__set_att(((PyObject *)__pyx_v_self), NC_GLOBAL, __pyx_v_name, __pyx_v_value, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":2338 + /* "netCDF4/_netCDF4.pyx":2372 * if self.data_model != 'NETCDF4': self._redef() * _set_att(self, NC_GLOBAL, name, value) * if self.data_model != 'NETCDF4': self._enddef() # <<<<<<<<<<<<<< * * def setncattr_string(self,name,value): */ - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->data_model, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2338, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->data_model, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2372, __pyx_L1_error) if (__pyx_t_1) { - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_enddef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2338, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_enddef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -19082,17 +19263,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_50setncattr(struct __pyx_o } } if (__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2338, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2372, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2338, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2372, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } - /* "netCDF4/_netCDF4.pyx":2329 + /* "netCDF4/_netCDF4.pyx":2363 * return _get_att_names(self._grpid, NC_GLOBAL) * * def setncattr(self,name,value): # <<<<<<<<<<<<<< @@ -19115,7 +19296,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_50setncattr(struct __pyx_o return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2340 +/* "netCDF4/_netCDF4.pyx":2374 * if self.data_model != 'NETCDF4': self._enddef() * * def setncattr_string(self,name,value): # <<<<<<<<<<<<<< @@ -19124,9 +19305,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_50setncattr(struct __pyx_o */ /* Python wrapper */ -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_53setncattr_string(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_52setncattr_string[] = "\n**`setncattr_string(self,name,value)`**\n\nset a netCDF dataset or group string attribute using name,value pair.\nUse if you need to ensure that a netCDF attribute is created with type\n`NC_STRING` if the file format is `NETCDF4`.\nUse if you need to set an attribute to an array of variable-length strings."; -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_53setncattr_string(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_55setncattr_string(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_54setncattr_string[] = "\n**`setncattr_string(self,name,value)`**\n\nset a netCDF dataset or group string attribute using name,value pair.\nUse if you need to ensure that a netCDF attribute is created with type\n`NC_STRING` if the file format is `NETCDF4`.\nUse if you need to set an attribute to an array of variable-length strings."; +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_55setncattr_string(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; PyObject *__pyx_v_value = 0; PyObject *__pyx_r = 0; @@ -19152,11 +19333,11 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_53setncattr_string(PyObjec case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("setncattr_string", 1, 2, 2, 1); __PYX_ERR(0, 2340, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("setncattr_string", 1, 2, 2, 1); __PYX_ERR(0, 2374, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setncattr_string") < 0)) __PYX_ERR(0, 2340, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setncattr_string") < 0)) __PYX_ERR(0, 2374, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -19169,20 +19350,20 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_53setncattr_string(PyObjec } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("setncattr_string", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2340, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("setncattr_string", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2374, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.setncattr_string", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_52setncattr_string(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), __pyx_v_name, __pyx_v_value); + __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_54setncattr_string(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), __pyx_v_name, __pyx_v_value); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_52setncattr_string(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) { +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_54setncattr_string(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) { nc_type __pyx_v_xtype; PyObject *__pyx_v_msg = NULL; PyObject *__pyx_r = NULL; @@ -19193,7 +19374,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_52setncattr_string(struct struct __pyx_opt_args_7netCDF4_8_netCDF4__set_att __pyx_t_4; __Pyx_RefNannySetupContext("setncattr_string", 0); - /* "netCDF4/_netCDF4.pyx":2349 + /* "netCDF4/_netCDF4.pyx":2383 * Use if you need to set an attribute to an array of variable-length strings.""" * cdef nc_type xtype * xtype=-99 # <<<<<<<<<<<<<< @@ -19202,17 +19383,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_52setncattr_string(struct */ __pyx_v_xtype = -99; - /* "netCDF4/_netCDF4.pyx":2350 + /* "netCDF4/_netCDF4.pyx":2384 * cdef nc_type xtype * xtype=-99 * if self.data_model != 'NETCDF4': # <<<<<<<<<<<<<< * msg='file format does not support NC_STRING attributes' * raise IOError(msg) */ - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->data_model, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2350, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->data_model, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2384, __pyx_L1_error) if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":2351 + /* "netCDF4/_netCDF4.pyx":2385 * xtype=-99 * if self.data_model != 'NETCDF4': * msg='file format does not support NC_STRING attributes' # <<<<<<<<<<<<<< @@ -19222,26 +19403,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_52setncattr_string(struct __Pyx_INCREF(__pyx_kp_s_file_format_does_not_support_NC); __pyx_v_msg = __pyx_kp_s_file_format_does_not_support_NC; - /* "netCDF4/_netCDF4.pyx":2352 + /* "netCDF4/_netCDF4.pyx":2386 * if self.data_model != 'NETCDF4': * msg='file format does not support NC_STRING attributes' * raise IOError(msg) # <<<<<<<<<<<<<< * _set_att(self, NC_GLOBAL, name, value, xtype=xtype, force_ncstring=True) * */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2352, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2386, __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_3 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2352, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2386, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 2352, __pyx_L1_error) + __PYX_ERR(0, 2386, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":2350 + /* "netCDF4/_netCDF4.pyx":2384 * cdef nc_type xtype * xtype=-99 * if self.data_model != 'NETCDF4': # <<<<<<<<<<<<<< @@ -19250,7 +19431,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_52setncattr_string(struct */ } - /* "netCDF4/_netCDF4.pyx":2353 + /* "netCDF4/_netCDF4.pyx":2387 * msg='file format does not support NC_STRING attributes' * raise IOError(msg) * _set_att(self, NC_GLOBAL, name, value, xtype=xtype, force_ncstring=True) # <<<<<<<<<<<<<< @@ -19260,11 +19441,11 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_52setncattr_string(struct __pyx_t_4.__pyx_n = 2; __pyx_t_4.xtype = __pyx_v_xtype; __pyx_t_4.force_ncstring = Py_True; - __pyx_t_3 = __pyx_f_7netCDF4_8_netCDF4__set_att(((PyObject *)__pyx_v_self), NC_GLOBAL, __pyx_v_name, __pyx_v_value, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2353, __pyx_L1_error) + __pyx_t_3 = __pyx_f_7netCDF4_8_netCDF4__set_att(((PyObject *)__pyx_v_self), NC_GLOBAL, __pyx_v_name, __pyx_v_value, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2387, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":2340 + /* "netCDF4/_netCDF4.pyx":2374 * if self.data_model != 'NETCDF4': self._enddef() * * def setncattr_string(self,name,value): # <<<<<<<<<<<<<< @@ -19287,7 +19468,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_52setncattr_string(struct return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2355 +/* "netCDF4/_netCDF4.pyx":2389 * _set_att(self, NC_GLOBAL, name, value, xtype=xtype, force_ncstring=True) * * def setncatts(self,attdict): # <<<<<<<<<<<<<< @@ -19296,20 +19477,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_52setncattr_string(struct */ /* Python wrapper */ -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_55setncatts(PyObject *__pyx_v_self, PyObject *__pyx_v_attdict); /*proto*/ -static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_54setncatts[] = "\n**`setncatts(self,attdict)`**\n\nset a bunch of netCDF dataset or group attributes at once using a python dictionary.\nThis may be faster when setting a lot of attributes for a `NETCDF3`\nformatted file, since nc_redef/nc_enddef is not called in between setting\neach attribute"; -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_55setncatts(PyObject *__pyx_v_self, PyObject *__pyx_v_attdict) { +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_57setncatts(PyObject *__pyx_v_self, PyObject *__pyx_v_attdict); /*proto*/ +static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_56setncatts[] = "\n**`setncatts(self,attdict)`**\n\nset a bunch of netCDF dataset or group attributes at once using a python dictionary.\nThis may be faster when setting a lot of attributes for a `NETCDF3`\nformatted file, since nc_redef/nc_enddef is not called in between setting\neach attribute"; +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_57setncatts(PyObject *__pyx_v_self, PyObject *__pyx_v_attdict) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setncatts (wrapper)", 0); - __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_54setncatts(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_attdict)); + __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_56setncatts(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_attdict)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_54setncatts(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_attdict) { +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_56setncatts(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_attdict) { PyObject *__pyx_v_name = NULL; PyObject *__pyx_v_value = NULL; PyObject *__pyx_r = NULL; @@ -19325,16 +19506,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_54setncatts(struct __pyx_o PyObject *(*__pyx_t_9)(PyObject *); __Pyx_RefNannySetupContext("setncatts", 0); - /* "netCDF4/_netCDF4.pyx":2363 + /* "netCDF4/_netCDF4.pyx":2397 * formatted file, since nc_redef/nc_enddef is not called in between setting * each attribute""" * if self.data_model != 'NETCDF4': self._redef() # <<<<<<<<<<<<<< * for name, value in attdict.items(): * _set_att(self, NC_GLOBAL, name, value) */ - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->data_model, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2363, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->data_model, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2397, __pyx_L1_error) if (__pyx_t_1) { - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_redef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2363, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_redef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2397, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -19347,24 +19528,24 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_54setncatts(struct __pyx_o } } if (__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2363, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2397, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2363, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2397, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } - /* "netCDF4/_netCDF4.pyx":2364 + /* "netCDF4/_netCDF4.pyx":2398 * each attribute""" * if self.data_model != 'NETCDF4': self._redef() * for name, value in attdict.items(): # <<<<<<<<<<<<<< * _set_att(self, NC_GLOBAL, name, value) * if self.data_model != 'NETCDF4': self._enddef() */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_attdict, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2364, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_attdict, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2398, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -19377,10 +19558,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_54setncatts(struct __pyx_o } } if (__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2364, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2398, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2364, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2398, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -19388,9 +19569,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_54setncatts(struct __pyx_o __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2364, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2398, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2364, __pyx_L1_error) + __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2398, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { @@ -19398,17 +19579,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_54setncatts(struct __pyx_o if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 2364, __pyx_L1_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 2398, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2364, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2398, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 2364, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 2398, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2364, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2398, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } @@ -19418,7 +19599,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_54setncatts(struct __pyx_o 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, 2364, __pyx_L1_error) + else __PYX_ERR(0, 2398, __pyx_L1_error) } break; } @@ -19434,7 +19615,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_54setncatts(struct __pyx_o if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 2364, __pyx_L1_error) + __PYX_ERR(0, 2398, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -19447,15 +19628,15 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_54setncatts(struct __pyx_o __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); #else - __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2364, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2398, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2364, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2398, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; - __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2364, __pyx_L1_error) + __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2398, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; @@ -19463,7 +19644,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_54setncatts(struct __pyx_o __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 2364, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 2398, __pyx_L1_error) __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L7_unpacking_done; @@ -19471,7 +19652,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_54setncatts(struct __pyx_o __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 2364, __pyx_L1_error) + __PYX_ERR(0, 2398, __pyx_L1_error) __pyx_L7_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_4); @@ -19479,18 +19660,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_54setncatts(struct __pyx_o __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":2365 + /* "netCDF4/_netCDF4.pyx":2399 * if self.data_model != 'NETCDF4': self._redef() * for name, value in attdict.items(): * _set_att(self, NC_GLOBAL, name, value) # <<<<<<<<<<<<<< * if self.data_model != 'NETCDF4': self._enddef() * */ - __pyx_t_2 = __pyx_f_7netCDF4_8_netCDF4__set_att(((PyObject *)__pyx_v_self), NC_GLOBAL, __pyx_v_name, __pyx_v_value, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2365, __pyx_L1_error) + __pyx_t_2 = __pyx_f_7netCDF4_8_netCDF4__set_att(((PyObject *)__pyx_v_self), NC_GLOBAL, __pyx_v_name, __pyx_v_value, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2399, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":2364 + /* "netCDF4/_netCDF4.pyx":2398 * each attribute""" * if self.data_model != 'NETCDF4': self._redef() * for name, value in attdict.items(): # <<<<<<<<<<<<<< @@ -19500,16 +19681,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_54setncatts(struct __pyx_o } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":2366 + /* "netCDF4/_netCDF4.pyx":2400 * for name, value in attdict.items(): * _set_att(self, NC_GLOBAL, name, value) * if self.data_model != 'NETCDF4': self._enddef() # <<<<<<<<<<<<<< * * def getncattr(self,name): */ - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->data_model, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2366, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->data_model, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2400, __pyx_L1_error) if (__pyx_t_1) { - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_enddef); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2366, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_enddef); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2400, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -19522,17 +19703,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_54setncatts(struct __pyx_o } } if (__pyx_t_7) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2366, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2400, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2366, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2400, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - /* "netCDF4/_netCDF4.pyx":2355 + /* "netCDF4/_netCDF4.pyx":2389 * _set_att(self, NC_GLOBAL, name, value, xtype=xtype, force_ncstring=True) * * def setncatts(self,attdict): # <<<<<<<<<<<<<< @@ -19559,7 +19740,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_54setncatts(struct __pyx_o return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2368 +/* "netCDF4/_netCDF4.pyx":2402 * if self.data_model != 'NETCDF4': self._enddef() * * def getncattr(self,name): # <<<<<<<<<<<<<< @@ -19568,26 +19749,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_54setncatts(struct __pyx_o */ /* Python wrapper */ -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_57getncattr(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/ -static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_56getncattr[] = "\n**`getncattr(self,name)`**\n\nretrieve a netCDF dataset or group attribute.\nUse if you need to get a netCDF attribute with the same \nname as one of the reserved python attributes."; -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_57getncattr(PyObject *__pyx_v_self, PyObject *__pyx_v_name) { +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_59getncattr(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/ +static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_58getncattr[] = "\n**`getncattr(self,name)`**\n\nretrieve a netCDF dataset or group attribute.\nUse if you need to get a netCDF attribute with the same \nname as one of the reserved python attributes."; +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_59getncattr(PyObject *__pyx_v_self, PyObject *__pyx_v_name) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getncattr (wrapper)", 0); - __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_56getncattr(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_name)); + __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_58getncattr(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_name)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_56getncattr(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name) { +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_58getncattr(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("getncattr", 0); - /* "netCDF4/_netCDF4.pyx":2375 + /* "netCDF4/_netCDF4.pyx":2409 * Use if you need to get a netCDF attribute with the same * name as one of the reserved python attributes.""" * return _get_att(self, NC_GLOBAL, name) # <<<<<<<<<<<<<< @@ -19595,13 +19776,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_56getncattr(struct __pyx_o * def __delattr__(self,name): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__get_att(((PyObject *)__pyx_v_self), NC_GLOBAL, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2375, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__get_att(((PyObject *)__pyx_v_self), NC_GLOBAL, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":2368 + /* "netCDF4/_netCDF4.pyx":2402 * if self.data_model != 'NETCDF4': self._enddef() * * def getncattr(self,name): # <<<<<<<<<<<<<< @@ -19620,7 +19801,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_56getncattr(struct __pyx_o return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2377 +/* "netCDF4/_netCDF4.pyx":2411 * return _get_att(self, NC_GLOBAL, name) * * def __delattr__(self,name): # <<<<<<<<<<<<<< @@ -19629,19 +19810,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_56getncattr(struct __pyx_o */ /* Python wrapper */ -static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_59__delattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/ -static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_59__delattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) { +static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_61__delattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/ +static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_61__delattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__delattr__ (wrapper)", 0); - __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_58__delattr__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_name)); + __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_60__delattr__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_name)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_58__delattr__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name) { +static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_60__delattr__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -19652,28 +19833,28 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_58__delattr__(struct __pyx_obj_7 PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("__delattr__", 0); - /* "netCDF4/_netCDF4.pyx":2379 + /* "netCDF4/_netCDF4.pyx":2413 * def __delattr__(self,name): * # if it's a netCDF attribute, remove it * if name not in _private_atts: # <<<<<<<<<<<<<< * self.delncattr(name) * else: */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2379, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2413, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_name, __pyx_t_1, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2379, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_name, __pyx_t_1, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2413, __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":2380 + /* "netCDF4/_netCDF4.pyx":2414 * # if it's a netCDF attribute, remove it * if name not in _private_atts: * self.delncattr(name) # <<<<<<<<<<<<<< * else: * raise AttributeError( */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_delncattr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2380, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_delncattr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -19686,13 +19867,13 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_58__delattr__(struct __pyx_obj_7 } } if (!__pyx_t_5) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2380, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2414, __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_5, __pyx_v_name}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2380, __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, 2414, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -19700,19 +19881,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_58__delattr__(struct __pyx_obj_7 #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_name}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2380, __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, 2414, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2380, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2414, __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_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_name); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2380, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -19720,7 +19901,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_58__delattr__(struct __pyx_obj_7 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":2379 + /* "netCDF4/_netCDF4.pyx":2413 * def __delattr__(self,name): * # if it's a netCDF attribute, remove it * if name not in _private_atts: # <<<<<<<<<<<<<< @@ -19730,7 +19911,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_58__delattr__(struct __pyx_obj_7 goto __pyx_L3; } - /* "netCDF4/_netCDF4.pyx":2382 + /* "netCDF4/_netCDF4.pyx":2416 * self.delncattr(name) * else: * raise AttributeError( # <<<<<<<<<<<<<< @@ -19739,19 +19920,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_58__delattr__(struct __pyx_obj_7 */ /*else*/ { - /* "netCDF4/_netCDF4.pyx":2383 + /* "netCDF4/_netCDF4.pyx":2417 * else: * raise AttributeError( * "'%s' is one of the reserved attributes %s, cannot delete. Use delncattr instead." % (name, tuple(_private_atts))) # <<<<<<<<<<<<<< * * def delncattr(self, name): */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2383, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2383, __pyx_L1_error) + __pyx_t_4 = PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2383, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); @@ -19759,32 +19940,32 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_58__delattr__(struct __pyx_obj_7 __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_s_is_one_of_the_reserved_attrib, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2383, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_s_is_one_of_the_reserved_attrib, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":2382 + /* "netCDF4/_netCDF4.pyx":2416 * self.delncattr(name) * else: * raise AttributeError( # <<<<<<<<<<<<<< * "'%s' is one of the reserved attributes %s, cannot delete. Use delncattr instead." % (name, tuple(_private_atts))) * */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2382, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2382, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(0, 2382, __pyx_L1_error) + __PYX_ERR(0, 2416, __pyx_L1_error) } __pyx_L3:; - /* "netCDF4/_netCDF4.pyx":2377 + /* "netCDF4/_netCDF4.pyx":2411 * return _get_att(self, NC_GLOBAL, name) * * def __delattr__(self,name): # <<<<<<<<<<<<<< @@ -19807,7 +19988,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_58__delattr__(struct __pyx_obj_7 return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2385 +/* "netCDF4/_netCDF4.pyx":2419 * "'%s' is one of the reserved attributes %s, cannot delete. Use delncattr instead." % (name, tuple(_private_atts))) * * def delncattr(self, name): # <<<<<<<<<<<<<< @@ -19816,20 +19997,20 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_58__delattr__(struct __pyx_obj_7 */ /* Python wrapper */ -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_61delncattr(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/ -static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_60delncattr[] = "\n**`delncattr(self,name,value)`**\n\ndelete a netCDF dataset or group attribute. Use if you need to delete a\nnetCDF attribute with the same name as one of the reserved python\nattributes."; -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_61delncattr(PyObject *__pyx_v_self, PyObject *__pyx_v_name) { +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_63delncattr(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/ +static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_62delncattr[] = "\n**`delncattr(self,name,value)`**\n\ndelete a netCDF dataset or group attribute. Use if you need to delete a\nnetCDF attribute with the same name as one of the reserved python\nattributes."; +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_63delncattr(PyObject *__pyx_v_self, PyObject *__pyx_v_name) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("delncattr (wrapper)", 0); - __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_60delncattr(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_name)); + __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_62delncattr(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_name)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_60delncattr(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name) { +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_62delncattr(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name) { char *__pyx_v_attname; int __pyx_v_ierr; PyObject *__pyx_v_bytestr = NULL; @@ -19842,38 +20023,38 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_60delncattr(struct __pyx_o PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("delncattr", 0); - /* "netCDF4/_netCDF4.pyx":2394 + /* "netCDF4/_netCDF4.pyx":2428 * cdef char *attname * cdef int ierr * bytestr = _strencode(name) # <<<<<<<<<<<<<< * attname = bytestr * if self.data_model != 'NETCDF4': self._redef() */ - __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2394, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2428, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_bytestr = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":2395 + /* "netCDF4/_netCDF4.pyx":2429 * cdef int ierr * bytestr = _strencode(name) * attname = bytestr # <<<<<<<<<<<<<< * if self.data_model != 'NETCDF4': self._redef() * ierr = nc_del_att(self._grpid, NC_GLOBAL, attname) */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 2395, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 2429, __pyx_L1_error) __pyx_v_attname = __pyx_t_2; - /* "netCDF4/_netCDF4.pyx":2396 + /* "netCDF4/_netCDF4.pyx":2430 * bytestr = _strencode(name) * attname = bytestr * if self.data_model != 'NETCDF4': self._redef() # <<<<<<<<<<<<<< * ierr = nc_del_att(self._grpid, NC_GLOBAL, attname) * if self.data_model != 'NETCDF4': self._enddef() */ - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_self->data_model, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2396, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_self->data_model, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2430, __pyx_L1_error) if (__pyx_t_3) { - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_redef); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2396, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_redef); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -19886,35 +20067,35 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_60delncattr(struct __pyx_o } } if (__pyx_t_5) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2396, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2430, __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, 2396, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2430, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "netCDF4/_netCDF4.pyx":2397 + /* "netCDF4/_netCDF4.pyx":2431 * attname = bytestr * if self.data_model != 'NETCDF4': self._redef() * ierr = nc_del_att(self._grpid, NC_GLOBAL, attname) # <<<<<<<<<<<<<< * if self.data_model != 'NETCDF4': self._enddef() - * if ierr != NC_NOERR: + * _ensure_nc_success(ierr) */ __pyx_v_ierr = nc_del_att(__pyx_v_self->_grpid, NC_GLOBAL, __pyx_v_attname); - /* "netCDF4/_netCDF4.pyx":2398 + /* "netCDF4/_netCDF4.pyx":2432 * if self.data_model != 'NETCDF4': self._redef() * ierr = nc_del_att(self._grpid, NC_GLOBAL, attname) * if self.data_model != 'NETCDF4': self._enddef() # <<<<<<<<<<<<<< - * if ierr != NC_NOERR: - * raise AttributeError((nc_strerror(ierr)).decode('ascii')) + * _ensure_nc_success(ierr) + * */ - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_self->data_model, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2398, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_self->data_model, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2432, __pyx_L1_error) if (__pyx_t_3) { - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_enddef); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2398, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_enddef); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -19927,59 +20108,31 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_60delncattr(struct __pyx_o } } if (__pyx_t_5) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2398, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2432, __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, 2398, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2432, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "netCDF4/_netCDF4.pyx":2399 + /* "netCDF4/_netCDF4.pyx":2433 * ierr = nc_del_att(self._grpid, NC_GLOBAL, attname) * if self.data_model != 'NETCDF4': self._enddef() - * if ierr != NC_NOERR: # <<<<<<<<<<<<<< - * raise AttributeError((nc_strerror(ierr)).decode('ascii')) - * - */ - __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0); - if (__pyx_t_3) { - - /* "netCDF4/_netCDF4.pyx":2400 - * if self.data_model != 'NETCDF4': self._enddef() - * if ierr != NC_NOERR: - * raise AttributeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< + * _ensure_nc_success(ierr) # <<<<<<<<<<<<<< * * def __setattr__(self,name,value): */ - __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, 2400, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2400, __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_AttributeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2400, __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, 2400, __pyx_L1_error) - - /* "netCDF4/_netCDF4.pyx":2399 - * ierr = nc_del_att(self._grpid, NC_GLOBAL, attname) - * if self.data_model != 'NETCDF4': self._enddef() - * if ierr != NC_NOERR: # <<<<<<<<<<<<<< - * raise AttributeError((nc_strerror(ierr)).decode('ascii')) - * - */ - } + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ierr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2433, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __pyx_f_7netCDF4_8_netCDF4__ensure_nc_success(__pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2433, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":2385 + /* "netCDF4/_netCDF4.pyx":2419 * "'%s' is one of the reserved attributes %s, cannot delete. Use delncattr instead." % (name, tuple(_private_atts))) * * def delncattr(self, name): # <<<<<<<<<<<<<< @@ -20003,8 +20156,8 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_60delncattr(struct __pyx_o return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2402 - * raise AttributeError((nc_strerror(ierr)).decode('ascii')) +/* "netCDF4/_netCDF4.pyx":2435 + * _ensure_nc_success(ierr) * * def __setattr__(self,name,value): # <<<<<<<<<<<<<< * # if name in _private_atts, it is stored at the python @@ -20012,19 +20165,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_60delncattr(struct __pyx_o */ /* Python wrapper */ -static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_63__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /*proto*/ -static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_63__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) { +static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_65__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_65__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setattr__ (wrapper)", 0); - __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_62__setattr__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_name), ((PyObject *)__pyx_v_value)); + __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_64__setattr__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_name), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_62__setattr__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) { +static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_64__setattr__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -20036,28 +20189,28 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_62__setattr__(struct __pyx_obj_7 PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("__setattr__", 0); - /* "netCDF4/_netCDF4.pyx":2405 + /* "netCDF4/_netCDF4.pyx":2438 * # if name in _private_atts, it is stored at the python * # level and not in the netCDF file. * if name not in _private_atts: # <<<<<<<<<<<<<< * self.setncattr(name, value) * elif not name.endswith('__'): */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2405, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_name, __pyx_t_1, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2405, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_name, __pyx_t_1, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2438, __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":2406 + /* "netCDF4/_netCDF4.pyx":2439 * # level and not in the netCDF file. * if name not in _private_atts: * self.setncattr(name, value) # <<<<<<<<<<<<<< * elif not name.endswith('__'): * if hasattr(self,name): */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setncattr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2406, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setncattr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -20074,7 +20227,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_62__setattr__(struct __pyx_obj_7 #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_name, __pyx_v_value}; - __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, 2406, __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, 2439, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -20082,13 +20235,13 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_62__setattr__(struct __pyx_obj_7 #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_name, __pyx_v_value}; - __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, 2406, __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, 2439, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2406, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -20099,14 +20252,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_62__setattr__(struct __pyx_obj_7 __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_value); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2406, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":2405 + /* "netCDF4/_netCDF4.pyx":2438 * # if name in _private_atts, it is stored at the python * # level and not in the netCDF file. * if name not in _private_atts: # <<<<<<<<<<<<<< @@ -20116,47 +20269,47 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_62__setattr__(struct __pyx_obj_7 goto __pyx_L3; } - /* "netCDF4/_netCDF4.pyx":2407 + /* "netCDF4/_netCDF4.pyx":2440 * if name not in _private_atts: * self.setncattr(name, value) * elif not name.endswith('__'): # <<<<<<<<<<<<<< * if hasattr(self,name): * raise AttributeError( */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_endswith); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2407, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_endswith); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2407, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2407, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2440, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = ((!__pyx_t_3) != 0); if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":2408 + /* "netCDF4/_netCDF4.pyx":2441 * self.setncattr(name, value) * elif not name.endswith('__'): * if hasattr(self,name): # <<<<<<<<<<<<<< * raise AttributeError( * "'%s' is one of the reserved attributes %s, cannot rebind. Use setncattr instead." % (name, tuple(_private_atts))) */ - __pyx_t_2 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_v_name); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 2408, __pyx_L1_error) + __pyx_t_2 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_v_name); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 2441, __pyx_L1_error) __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":2410 + /* "netCDF4/_netCDF4.pyx":2443 * if hasattr(self,name): * raise AttributeError( * "'%s' is one of the reserved attributes %s, cannot rebind. Use setncattr instead." % (name, tuple(_private_atts))) # <<<<<<<<<<<<<< * else: * self.__dict__[name]=value */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2410, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2443, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2410, __pyx_L1_error) + __pyx_t_1 = PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2443, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2410, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2443, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); @@ -20164,30 +20317,30 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_62__setattr__(struct __pyx_obj_7 __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_is_one_of_the_reserved_attrib_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2410, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_is_one_of_the_reserved_attrib_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2443, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":2409 + /* "netCDF4/_netCDF4.pyx":2442 * elif not name.endswith('__'): * if hasattr(self,name): * raise AttributeError( # <<<<<<<<<<<<<< * "'%s' is one of the reserved attributes %s, cannot rebind. Use setncattr instead." % (name, tuple(_private_atts))) * else: */ - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2409, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2442, __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 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2409, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2442, __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, 2409, __pyx_L1_error) + __PYX_ERR(0, 2442, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":2408 + /* "netCDF4/_netCDF4.pyx":2441 * self.setncattr(name, value) * elif not name.endswith('__'): * if hasattr(self,name): # <<<<<<<<<<<<<< @@ -20196,7 +20349,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_62__setattr__(struct __pyx_obj_7 */ } - /* "netCDF4/_netCDF4.pyx":2412 + /* "netCDF4/_netCDF4.pyx":2445 * "'%s' is one of the reserved attributes %s, cannot rebind. Use setncattr instead." % (name, tuple(_private_atts))) * else: * self.__dict__[name]=value # <<<<<<<<<<<<<< @@ -20204,13 +20357,13 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_62__setattr__(struct __pyx_obj_7 * def __getattr__(self,name): */ /*else*/ { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2412, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(0, 2412, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(0, 2445, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "netCDF4/_netCDF4.pyx":2407 + /* "netCDF4/_netCDF4.pyx":2440 * if name not in _private_atts: * self.setncattr(name, value) * elif not name.endswith('__'): # <<<<<<<<<<<<<< @@ -20220,8 +20373,8 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_62__setattr__(struct __pyx_obj_7 } __pyx_L3:; - /* "netCDF4/_netCDF4.pyx":2402 - * raise AttributeError((nc_strerror(ierr)).decode('ascii')) + /* "netCDF4/_netCDF4.pyx":2435 + * _ensure_nc_success(ierr) * * def __setattr__(self,name,value): # <<<<<<<<<<<<<< * # if name in _private_atts, it is stored at the python @@ -20243,7 +20396,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_62__setattr__(struct __pyx_obj_7 return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2414 +/* "netCDF4/_netCDF4.pyx":2447 * self.__dict__[name]=value * * def __getattr__(self,name): # <<<<<<<<<<<<<< @@ -20252,19 +20405,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_62__setattr__(struct __pyx_obj_7 */ /* Python wrapper */ -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_65__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/ -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_65__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) { +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_67__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/ +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_67__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0); - __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_64__getattr__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_name)); + __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_66__getattr__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_name)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_64__getattr__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name) { +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_66__getattr__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name) { PyObject *__pyx_v_names = NULL; PyObject *__pyx_v_values = NULL; PyObject *__pyx_r = NULL; @@ -20284,54 +20437,54 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_64__getattr__(struct __pyx __Pyx_RefNannySetupContext("__getattr__", 0); __Pyx_INCREF(__pyx_v_name); - /* "netCDF4/_netCDF4.pyx":2417 + /* "netCDF4/_netCDF4.pyx":2450 * # if name in _private_atts, it is stored at the python * # level and not in the netCDF file. * if name.startswith('__') and name.endswith('__'): # <<<<<<<<<<<<<< * # if __dict__ requested, return a dict with netCDF attributes. * if name == '__dict__': */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_startswith); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2417, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_startswith); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2417, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2417, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2450, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_4) { } else { __pyx_t_1 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_endswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2417, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_endswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2417, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2417, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2450, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":2419 + /* "netCDF4/_netCDF4.pyx":2452 * if name.startswith('__') and name.endswith('__'): * # if __dict__ requested, return a dict with netCDF attributes. * if name == '__dict__': # <<<<<<<<<<<<<< * names = self.ncattrs() * values = [] */ - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_dict, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2419, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_dict, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2452, __pyx_L1_error) if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":2420 + /* "netCDF4/_netCDF4.pyx":2453 * # if __dict__ requested, return a dict with netCDF attributes. * if name == '__dict__': * names = self.ncattrs() # <<<<<<<<<<<<<< * values = [] * for name in names: */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ncattrs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2420, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ncattrs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -20344,29 +20497,29 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_64__getattr__(struct __pyx } } if (__pyx_t_5) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2420, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2453, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2420, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2453, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_names = __pyx_t_2; __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":2421 + /* "netCDF4/_netCDF4.pyx":2454 * if name == '__dict__': * names = self.ncattrs() * values = [] # <<<<<<<<<<<<<< * for name in names: * values.append(_get_att(self, NC_GLOBAL, name)) */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2421, __pyx_L1_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_values = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":2422 + /* "netCDF4/_netCDF4.pyx":2455 * names = self.ncattrs() * values = [] * for name in names: # <<<<<<<<<<<<<< @@ -20377,26 +20530,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_64__getattr__(struct __pyx __pyx_t_2 = __pyx_v_names; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_names); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2422, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_names); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2422, __pyx_L1_error) + __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2455, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2422, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2455, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2422, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2422, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2455, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2422, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } @@ -20406,7 +20559,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_64__getattr__(struct __pyx 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, 2422, __pyx_L1_error) + else __PYX_ERR(0, 2455, __pyx_L1_error) } break; } @@ -20415,19 +20568,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_64__getattr__(struct __pyx __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":2423 + /* "netCDF4/_netCDF4.pyx":2456 * values = [] * for name in names: * values.append(_get_att(self, NC_GLOBAL, name)) # <<<<<<<<<<<<<< * return OrderedDict(zip(names,values)) * else: */ - __pyx_t_3 = __pyx_f_7netCDF4_8_netCDF4__get_att(((PyObject *)__pyx_v_self), NC_GLOBAL, __pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2423, __pyx_L1_error) + __pyx_t_3 = __pyx_f_7netCDF4_8_netCDF4__get_att(((PyObject *)__pyx_v_self), NC_GLOBAL, __pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2456, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_values, __pyx_t_3); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 2423, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_values, __pyx_t_3); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 2456, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":2422 + /* "netCDF4/_netCDF4.pyx":2455 * names = self.ncattrs() * values = [] * for name in names: # <<<<<<<<<<<<<< @@ -20437,7 +20590,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_64__getattr__(struct __pyx } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":2424 + /* "netCDF4/_netCDF4.pyx":2457 * for name in names: * values.append(_get_att(self, NC_GLOBAL, name)) * return OrderedDict(zip(names,values)) # <<<<<<<<<<<<<< @@ -20445,9 +20598,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_64__getattr__(struct __pyx * raise AttributeError */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2424, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2457, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2424, __pyx_L1_error) + __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2457, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; __pyx_t_11 = 0; @@ -20464,7 +20617,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_64__getattr__(struct __pyx #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_9)) { PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_names, __pyx_v_values}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2424, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2457, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_5); } else @@ -20472,13 +20625,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_64__getattr__(struct __pyx #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) { PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_names, __pyx_v_values}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2424, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2457, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { - __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2424, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2457, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); if (__pyx_t_10) { __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL; @@ -20489,7 +20642,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_64__getattr__(struct __pyx __Pyx_INCREF(__pyx_v_values); __Pyx_GIVEREF(__pyx_v_values); PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_v_values); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_12, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2424, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_12, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2457, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } @@ -20505,14 +20658,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_64__getattr__(struct __pyx } } if (!__pyx_t_9) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2424, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2457, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_5}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2424, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2457, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -20521,20 +20674,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_64__getattr__(struct __pyx #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_5}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2424, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2457, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { - __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2424, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2457, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_9); __pyx_t_9 = NULL; __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_5); __pyx_t_5 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2424, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2457, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } @@ -20544,7 +20697,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_64__getattr__(struct __pyx __pyx_t_2 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":2419 + /* "netCDF4/_netCDF4.pyx":2452 * if name.startswith('__') and name.endswith('__'): * # if __dict__ requested, return a dict with netCDF attributes. * if name == '__dict__': # <<<<<<<<<<<<<< @@ -20553,7 +20706,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_64__getattr__(struct __pyx */ } - /* "netCDF4/_netCDF4.pyx":2426 + /* "netCDF4/_netCDF4.pyx":2459 * return OrderedDict(zip(names,values)) * else: * raise AttributeError # <<<<<<<<<<<<<< @@ -20562,10 +20715,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_64__getattr__(struct __pyx */ /*else*/ { __Pyx_Raise(__pyx_builtin_AttributeError, 0, 0, 0); - __PYX_ERR(0, 2426, __pyx_L1_error) + __PYX_ERR(0, 2459, __pyx_L1_error) } - /* "netCDF4/_netCDF4.pyx":2417 + /* "netCDF4/_netCDF4.pyx":2450 * # if name in _private_atts, it is stored at the python * # level and not in the netCDF file. * if name.startswith('__') and name.endswith('__'): # <<<<<<<<<<<<<< @@ -20574,21 +20727,21 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_64__getattr__(struct __pyx */ } - /* "netCDF4/_netCDF4.pyx":2427 + /* "netCDF4/_netCDF4.pyx":2460 * else: * raise AttributeError * elif name in _private_atts: # <<<<<<<<<<<<<< * return self.__dict__[name] * else: */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2427, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2460, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_name, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2427, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_name, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2460, __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":2428 + /* "netCDF4/_netCDF4.pyx":2461 * raise AttributeError * elif name in _private_atts: * return self.__dict__[name] # <<<<<<<<<<<<<< @@ -20596,16 +20749,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_64__getattr__(struct __pyx * return self.getncattr(name) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2428, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_GetItem(__pyx_t_2, __pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2428, __pyx_L1_error) + __pyx_t_3 = PyObject_GetItem(__pyx_t_2, __pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":2427 + /* "netCDF4/_netCDF4.pyx":2460 * else: * raise AttributeError * elif name in _private_atts: # <<<<<<<<<<<<<< @@ -20614,7 +20767,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_64__getattr__(struct __pyx */ } - /* "netCDF4/_netCDF4.pyx":2430 + /* "netCDF4/_netCDF4.pyx":2463 * return self.__dict__[name] * else: * return self.getncattr(name) # <<<<<<<<<<<<<< @@ -20623,7 +20776,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_64__getattr__(struct __pyx */ /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getncattr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2430, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getncattr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -20636,13 +20789,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_64__getattr__(struct __pyx } } if (!__pyx_t_12) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2430, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v_name}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2430, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2463, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -20650,19 +20803,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_64__getattr__(struct __pyx #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v_name}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2430, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2463, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2430, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_12); __pyx_t_12 = NULL; __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_name); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2430, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -20673,7 +20826,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_64__getattr__(struct __pyx goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":2414 + /* "netCDF4/_netCDF4.pyx":2447 * self.__dict__[name]=value * * def __getattr__(self,name): # <<<<<<<<<<<<<< @@ -20700,7 +20853,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_64__getattr__(struct __pyx return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2432 +/* "netCDF4/_netCDF4.pyx":2465 * return self.getncattr(name) * * def renameAttribute(self, oldname, newname): # <<<<<<<<<<<<<< @@ -20709,9 +20862,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_64__getattr__(struct __pyx */ /* Python wrapper */ -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_67renameAttribute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_66renameAttribute[] = "\n**`renameAttribute(self, oldname, newname)`**\n\nrename a `netCDF4.Dataset` or `netCDF4.Group` attribute named `oldname` to `newname`."; -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_67renameAttribute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_69renameAttribute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_68renameAttribute[] = "\n**`renameAttribute(self, oldname, newname)`**\n\nrename a `netCDF4.Dataset` or `netCDF4.Group` attribute named `oldname` to `newname`."; +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_69renameAttribute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_oldname = 0; PyObject *__pyx_v_newname = 0; PyObject *__pyx_r = 0; @@ -20737,11 +20890,11 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_67renameAttribute(PyObject case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_newname)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("renameAttribute", 1, 2, 2, 1); __PYX_ERR(0, 2432, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("renameAttribute", 1, 2, 2, 1); __PYX_ERR(0, 2465, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "renameAttribute") < 0)) __PYX_ERR(0, 2432, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "renameAttribute") < 0)) __PYX_ERR(0, 2465, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -20754,21 +20907,20 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_67renameAttribute(PyObject } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("renameAttribute", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2432, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("renameAttribute", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2465, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.renameAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_66renameAttribute(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), __pyx_v_oldname, __pyx_v_newname); + __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_68renameAttribute(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), __pyx_v_oldname, __pyx_v_newname); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_66renameAttribute(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_oldname, PyObject *__pyx_v_newname) { - int __pyx_v_ierr; +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_68renameAttribute(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_oldname, PyObject *__pyx_v_newname) { char *__pyx_v_oldnamec; char *__pyx_v_newnamec; PyObject *__pyx_v_bytestr = NULL; @@ -20776,106 +20928,68 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_66renameAttribute(struct _ __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; char *__pyx_t_2; - int __pyx_t_3; - PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("renameAttribute", 0); - /* "netCDF4/_netCDF4.pyx":2440 + /* "netCDF4/_netCDF4.pyx":2472 * cdef char *oldnamec * cdef char *newnamec * bytestr = _strencode(oldname) # <<<<<<<<<<<<<< * oldnamec = bytestr * bytestr = _strencode(newname) */ - __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_oldname, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2440, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_oldname, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2472, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_bytestr = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":2441 + /* "netCDF4/_netCDF4.pyx":2473 * cdef char *newnamec * bytestr = _strencode(oldname) * oldnamec = bytestr # <<<<<<<<<<<<<< * bytestr = _strencode(newname) * newnamec = bytestr */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 2441, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 2473, __pyx_L1_error) __pyx_v_oldnamec = __pyx_t_2; - /* "netCDF4/_netCDF4.pyx":2442 + /* "netCDF4/_netCDF4.pyx":2474 * bytestr = _strencode(oldname) * oldnamec = bytestr * bytestr = _strencode(newname) # <<<<<<<<<<<<<< * newnamec = bytestr - * ierr = nc_rename_att(self._grpid, NC_GLOBAL, oldnamec, newnamec) + * _ensure_nc_success(nc_rename_att(self._grpid, NC_GLOBAL, oldnamec, newnamec)) */ - __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_newname, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2442, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_newname, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2474, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_bytestr, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":2443 + /* "netCDF4/_netCDF4.pyx":2475 * oldnamec = bytestr * bytestr = _strencode(newname) * newnamec = bytestr # <<<<<<<<<<<<<< - * ierr = nc_rename_att(self._grpid, NC_GLOBAL, oldnamec, newnamec) - * if ierr != NC_NOERR: + * _ensure_nc_success(nc_rename_att(self._grpid, NC_GLOBAL, oldnamec, newnamec)) + * */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 2443, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 2475, __pyx_L1_error) __pyx_v_newnamec = __pyx_t_2; - /* "netCDF4/_netCDF4.pyx":2444 + /* "netCDF4/_netCDF4.pyx":2476 * bytestr = _strencode(newname) * newnamec = bytestr - * ierr = nc_rename_att(self._grpid, NC_GLOBAL, oldnamec, newnamec) # <<<<<<<<<<<<<< - * if ierr != NC_NOERR: - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) - */ - __pyx_v_ierr = nc_rename_att(__pyx_v_self->_grpid, NC_GLOBAL, __pyx_v_oldnamec, __pyx_v_newnamec); - - /* "netCDF4/_netCDF4.pyx":2445 - * newnamec = bytestr - * ierr = nc_rename_att(self._grpid, NC_GLOBAL, oldnamec, newnamec) - * if ierr != NC_NOERR: # <<<<<<<<<<<<<< - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) - * - */ - __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0); - if (__pyx_t_3) { - - /* "netCDF4/_netCDF4.pyx":2446 - * ierr = nc_rename_att(self._grpid, NC_GLOBAL, oldnamec, newnamec) - * if ierr != NC_NOERR: - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< + * _ensure_nc_success(nc_rename_att(self._grpid, NC_GLOBAL, oldnamec, newnamec)) # <<<<<<<<<<<<<< * * def renameGroup(self, oldname, newname): */ - __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, 2446, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2446, __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, 2446, __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, 2446, __pyx_L1_error) - - /* "netCDF4/_netCDF4.pyx":2445 - * newnamec = bytestr - * ierr = nc_rename_att(self._grpid, NC_GLOBAL, oldnamec, newnamec) - * if ierr != NC_NOERR: # <<<<<<<<<<<<<< - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) - * - */ - } + __pyx_t_1 = __Pyx_PyInt_From_int(nc_rename_att(__pyx_v_self->_grpid, NC_GLOBAL, __pyx_v_oldnamec, __pyx_v_newnamec)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2476, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __pyx_f_7netCDF4_8_netCDF4__ensure_nc_success(__pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2476, __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; - /* "netCDF4/_netCDF4.pyx":2432 + /* "netCDF4/_netCDF4.pyx":2465 * return self.getncattr(name) * * def renameAttribute(self, oldname, newname): # <<<<<<<<<<<<<< @@ -20888,7 +21002,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_66renameAttribute(struct _ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.renameAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -20898,8 +21012,8 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_66renameAttribute(struct _ return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2448 - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) +/* "netCDF4/_netCDF4.pyx":2478 + * _ensure_nc_success(nc_rename_att(self._grpid, NC_GLOBAL, oldnamec, newnamec)) * * def renameGroup(self, oldname, newname): # <<<<<<<<<<<<<< * """ @@ -20907,9 +21021,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_66renameAttribute(struct _ */ /* Python wrapper */ -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_69renameGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_68renameGroup[] = "\n**`renameGroup(self, oldname, newname)`**\n\nrename a `netCDF4.Group` named `oldname` to `newname` (requires netcdf >= 4.3.1)."; -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_69renameGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_71renameGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_70renameGroup[] = "\n**`renameGroup(self, oldname, newname)`**\n\nrename a `netCDF4.Group` named `oldname` to `newname` (requires netcdf >= 4.3.1)."; +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_71renameGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_oldname = 0; CYTHON_UNUSED PyObject *__pyx_v_newname = 0; PyObject *__pyx_r = 0; @@ -20935,11 +21049,11 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_69renameGroup(PyObject *__ case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_newname)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("renameGroup", 1, 2, 2, 1); __PYX_ERR(0, 2448, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("renameGroup", 1, 2, 2, 1); __PYX_ERR(0, 2478, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "renameGroup") < 0)) __PYX_ERR(0, 2448, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "renameGroup") < 0)) __PYX_ERR(0, 2478, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -20952,20 +21066,20 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_69renameGroup(PyObject *__ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("renameGroup", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2448, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("renameGroup", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2478, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.renameGroup", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_68renameGroup(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), __pyx_v_oldname, __pyx_v_newname); + __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_70renameGroup(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), __pyx_v_oldname, __pyx_v_newname); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_68renameGroup(CYTHON_UNUSED struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_oldname, CYTHON_UNUSED PyObject *__pyx_v_newname) { +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70renameGroup(CYTHON_UNUSED struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_oldname, CYTHON_UNUSED PyObject *__pyx_v_newname) { PyObject *__pyx_v_msg = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -20973,7 +21087,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_68renameGroup(CYTHON_UNUSE PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("renameGroup", 0); - /* "netCDF4/_netCDF4.pyx":2470 + /* "netCDF4/_netCDF4.pyx":2497 * self.groups[newname] = grp * ELSE: * msg = """ # <<<<<<<<<<<<<< @@ -20983,27 +21097,27 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_68renameGroup(CYTHON_UNUSE __Pyx_INCREF(__pyx_kp_s_renameGroup_method_not_enabled); __pyx_v_msg = __pyx_kp_s_renameGroup_method_not_enabled; - /* "netCDF4/_netCDF4.pyx":2473 + /* "netCDF4/_netCDF4.pyx":2500 * renameGroup method not enabled. To enable, install Cython, make sure you have * version 4.3.1 or higher of the netcdf C lib, and rebuild netcdf4-python.""" * raise ValueError(msg) # <<<<<<<<<<<<<< * * def set_auto_maskandscale(self, value): */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2473, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_msg); __Pyx_GIVEREF(__pyx_v_msg); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_msg); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2473, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 2473, __pyx_L1_error) + __PYX_ERR(0, 2500, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":2448 - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) + /* "netCDF4/_netCDF4.pyx":2478 + * _ensure_nc_success(nc_rename_att(self._grpid, NC_GLOBAL, oldnamec, newnamec)) * * def renameGroup(self, oldname, newname): # <<<<<<<<<<<<<< * """ @@ -21022,7 +21136,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_68renameGroup(CYTHON_UNUSE return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2475 +/* "netCDF4/_netCDF4.pyx":2502 * raise ValueError(msg) * * def set_auto_maskandscale(self, value): # <<<<<<<<<<<<<< @@ -21031,20 +21145,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_68renameGroup(CYTHON_UNUSE */ /* Python wrapper */ -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_71set_auto_maskandscale(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ -static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_70set_auto_maskandscale[] = "\n**`set_auto_maskandscale(self, True_or_False)`**\n\nCall `netCDF4.Variable.set_auto_maskandscale` for all variables contained in this `netCDF4.Dataset` or\n`netCDF4.Group`, as well as for all variables in all its subgroups.\n\n**`True_or_False`**: Boolean determining if automatic conversion to masked arrays\nand variable scaling shall be applied for all variables.\n\n***Note***: Calling this function only affects existing variables. Variables created\nafter calling this function will follow the default behaviour.\n "; -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_71set_auto_maskandscale(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_73set_auto_maskandscale(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_72set_auto_maskandscale[] = "\n**`set_auto_maskandscale(self, True_or_False)`**\n\nCall `netCDF4.Variable.set_auto_maskandscale` for all variables contained in this `netCDF4.Dataset` or\n`netCDF4.Group`, as well as for all variables in all its subgroups.\n\n**`True_or_False`**: Boolean determining if automatic conversion to masked arrays\nand variable scaling shall be applied for all variables.\n\n***Note***: Calling this function only affects existing variables. Variables created\nafter calling this function will follow the default behaviour.\n "; +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_73set_auto_maskandscale(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_auto_maskandscale (wrapper)", 0); - __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_maskandscale(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_maskandscale(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_maskandscale(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value) { +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_maskandscale(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value) { PyObject *__pyx_v__vars = NULL; PyObject *__pyx_v_var = NULL; PyObject *__pyx_v_groups = NULL; @@ -21068,7 +21182,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_maskandscale(st PyObject *__pyx_t_15 = NULL; __Pyx_RefNannySetupContext("set_auto_maskandscale", 0); - /* "netCDF4/_netCDF4.pyx":2491 + /* "netCDF4/_netCDF4.pyx":2518 * # this is a hack to make inheritance work in MFDataset * # (which stores variables in _vars) * _vars = self.variables # <<<<<<<<<<<<<< @@ -21080,7 +21194,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_maskandscale(st __pyx_v__vars = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":2492 + /* "netCDF4/_netCDF4.pyx":2519 * # (which stores variables in _vars) * _vars = self.variables * if _vars is None: _vars = self._vars # <<<<<<<<<<<<<< @@ -21090,20 +21204,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_maskandscale(st __pyx_t_2 = (__pyx_v__vars == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_vars); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2492, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_vars); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2519, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v__vars, __pyx_t_1); __pyx_t_1 = 0; } - /* "netCDF4/_netCDF4.pyx":2493 + /* "netCDF4/_netCDF4.pyx":2520 * _vars = self.variables * if _vars is None: _vars = self._vars * for var in _vars.values(): # <<<<<<<<<<<<<< * var.set_auto_maskandscale(value) * */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v__vars, __pyx_n_s_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2493, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v__vars, __pyx_n_s_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -21116,10 +21230,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_maskandscale(st } } if (__pyx_t_5) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2493, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2520, __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, 2493, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2520, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -21127,9 +21241,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_maskandscale(st __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2493, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2493, __pyx_L1_error) + __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2520, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -21137,17 +21251,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_maskandscale(st if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2493, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2520, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2493, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2493, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2520, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2493, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -21157,7 +21271,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_maskandscale(st 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, 2493, __pyx_L1_error) + else __PYX_ERR(0, 2520, __pyx_L1_error) } break; } @@ -21166,14 +21280,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_maskandscale(st __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":2494 + /* "netCDF4/_netCDF4.pyx":2521 * if _vars is None: _vars = self._vars * for var in _vars.values(): * var.set_auto_maskandscale(value) # <<<<<<<<<<<<<< * * for groups in _walk_grps(self): */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_set_auto_maskandscale); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2494, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_set_auto_maskandscale); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2521, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -21186,13 +21300,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_maskandscale(st } } if (!__pyx_t_8) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2494, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2521, __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_8, __pyx_v_value}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2494, __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, 2521, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -21200,19 +21314,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_maskandscale(st #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_value}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2494, __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, 2521, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2494, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2521, __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_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_value); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2494, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2521, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -21220,7 +21334,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_maskandscale(st __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":2493 + /* "netCDF4/_netCDF4.pyx":2520 * _vars = self.variables * if _vars is None: _vars = self._vars * for var in _vars.values(): # <<<<<<<<<<<<<< @@ -21230,14 +21344,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_maskandscale(st } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":2496 + /* "netCDF4/_netCDF4.pyx":2523 * var.set_auto_maskandscale(value) * * for groups in _walk_grps(self): # <<<<<<<<<<<<<< * for group in groups: * for var in group.variables.values(): */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_walk_grps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2496, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_walk_grps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { @@ -21250,13 +21364,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_maskandscale(st } } if (!__pyx_t_5) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2496, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_5, ((PyObject *)__pyx_v_self)}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2496, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2523, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_4); } else @@ -21264,19 +21378,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_maskandscale(st #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_5, ((PyObject *)__pyx_v_self)}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2496, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2523, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { - __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2496, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_9, 0+1, ((PyObject *)__pyx_v_self)); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2496, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -21286,9 +21400,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_maskandscale(st __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2496, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2496, __pyx_L1_error) + __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2523, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -21296,17 +21410,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_maskandscale(st if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_6 >= 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_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2496, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2523, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2496, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_6 >= 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_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2496, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2523, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2496, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -21316,7 +21430,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_maskandscale(st 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, 2496, __pyx_L1_error) + else __PYX_ERR(0, 2523, __pyx_L1_error) } break; } @@ -21325,7 +21439,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_maskandscale(st __Pyx_XDECREF_SET(__pyx_v_groups, __pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":2497 + /* "netCDF4/_netCDF4.pyx":2524 * * for groups in _walk_grps(self): * for group in groups: # <<<<<<<<<<<<<< @@ -21336,26 +21450,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_maskandscale(st __pyx_t_4 = __pyx_v_groups; __Pyx_INCREF(__pyx_t_4); __pyx_t_10 = 0; __pyx_t_11 = NULL; } else { - __pyx_t_10 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_groups); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2497, __pyx_L1_error) + __pyx_t_10 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_groups); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_11 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2497, __pyx_L1_error) + __pyx_t_11 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2524, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_11)) { if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_9 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 2497, __pyx_L1_error) + __pyx_t_9 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 2524, __pyx_L1_error) #else - __pyx_t_9 = PySequence_ITEM(__pyx_t_4, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2497, __pyx_L1_error) + __pyx_t_9 = PySequence_ITEM(__pyx_t_4, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); #endif } else { if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 2497, __pyx_L1_error) + __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 2524, __pyx_L1_error) #else - __pyx_t_9 = PySequence_ITEM(__pyx_t_4, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2497, __pyx_L1_error) + __pyx_t_9 = PySequence_ITEM(__pyx_t_4, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); #endif } @@ -21365,7 +21479,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_maskandscale(st 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, 2497, __pyx_L1_error) + else __PYX_ERR(0, 2524, __pyx_L1_error) } break; } @@ -21374,16 +21488,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_maskandscale(st __Pyx_XDECREF_SET(__pyx_v_group, __pyx_t_9); __pyx_t_9 = 0; - /* "netCDF4/_netCDF4.pyx":2498 + /* "netCDF4/_netCDF4.pyx":2525 * for groups in _walk_grps(self): * for group in groups: * for var in group.variables.values(): # <<<<<<<<<<<<<< * var.set_auto_maskandscale(value) * */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_variables); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2498, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_variables); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_values); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2498, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_values); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -21397,10 +21511,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_maskandscale(st } } if (__pyx_t_5) { - __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2498, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2525, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { - __pyx_t_9 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2498, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2525, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -21408,9 +21522,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_maskandscale(st __pyx_t_8 = __pyx_t_9; __Pyx_INCREF(__pyx_t_8); __pyx_t_12 = 0; __pyx_t_13 = NULL; } else { - __pyx_t_12 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2498, __pyx_L1_error) + __pyx_t_12 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2525, __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, 2498, __pyx_L1_error) + __pyx_t_13 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2525, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; for (;;) { @@ -21418,17 +21532,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_maskandscale(st if (likely(PyList_CheckExact(__pyx_t_8))) { if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_8)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_9 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_12); __Pyx_INCREF(__pyx_t_9); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 2498, __pyx_L1_error) + __pyx_t_9 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_12); __Pyx_INCREF(__pyx_t_9); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 2525, __pyx_L1_error) #else - __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2498, __pyx_L1_error) + __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); #endif } else { if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_8)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_12); __Pyx_INCREF(__pyx_t_9); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 2498, __pyx_L1_error) + __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_12); __Pyx_INCREF(__pyx_t_9); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 2525, __pyx_L1_error) #else - __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2498, __pyx_L1_error) + __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); #endif } @@ -21438,7 +21552,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_maskandscale(st 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, 2498, __pyx_L1_error) + else __PYX_ERR(0, 2525, __pyx_L1_error) } break; } @@ -21447,14 +21561,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_maskandscale(st __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_9); __pyx_t_9 = 0; - /* "netCDF4/_netCDF4.pyx":2499 + /* "netCDF4/_netCDF4.pyx":2526 * for group in groups: * for var in group.variables.values(): * var.set_auto_maskandscale(value) # <<<<<<<<<<<<<< * * */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_set_auto_maskandscale); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2499, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_set_auto_maskandscale); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_14 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -21467,13 +21581,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_maskandscale(st } } if (!__pyx_t_14) { - __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_value); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2499, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_value); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_v_value}; - __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2499, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2526, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_GOTREF(__pyx_t_9); } else @@ -21481,19 +21595,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_maskandscale(st #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_v_value}; - __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2499, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2526, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_GOTREF(__pyx_t_9); } else #endif { - __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2499, __pyx_L1_error) + __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_14); __pyx_t_14 = NULL; __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_15, 0+1, __pyx_v_value); - __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_15, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2499, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_15, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; } @@ -21501,7 +21615,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_maskandscale(st __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "netCDF4/_netCDF4.pyx":2498 + /* "netCDF4/_netCDF4.pyx":2525 * for groups in _walk_grps(self): * for group in groups: * for var in group.variables.values(): # <<<<<<<<<<<<<< @@ -21511,7 +21625,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_maskandscale(st } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":2497 + /* "netCDF4/_netCDF4.pyx":2524 * * for groups in _walk_grps(self): * for group in groups: # <<<<<<<<<<<<<< @@ -21521,7 +21635,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_maskandscale(st } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":2496 + /* "netCDF4/_netCDF4.pyx":2523 * var.set_auto_maskandscale(value) * * for groups in _walk_grps(self): # <<<<<<<<<<<<<< @@ -21531,7 +21645,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_maskandscale(st } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":2475 + /* "netCDF4/_netCDF4.pyx":2502 * raise ValueError(msg) * * def set_auto_maskandscale(self, value): # <<<<<<<<<<<<<< @@ -21562,7 +21676,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_maskandscale(st return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2502 +/* "netCDF4/_netCDF4.pyx":2529 * * * def set_auto_mask(self, value): # <<<<<<<<<<<<<< @@ -21571,20 +21685,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_maskandscale(st */ /* Python wrapper */ -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_73set_auto_mask(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ -static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_72set_auto_mask[] = "\n**`set_auto_mask(self, True_or_False)`**\n\nCall `netCDF4.Variable.set_auto_mask` for all variables contained in this `netCDF4.Dataset` or\n`netCDF4.Group`, as well as for all variables in all its subgroups.\n\n**`True_or_False`**: Boolean determining if automatic conversion to masked arrays\nshall be applied for all variables.\n\n***Note***: Calling this function only affects existing variables. Variables created\nafter calling this function will follow the default behaviour.\n "; -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_73set_auto_mask(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_75set_auto_mask(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_74set_auto_mask[] = "\n**`set_auto_mask(self, True_or_False)`**\n\nCall `netCDF4.Variable.set_auto_mask` for all variables contained in this `netCDF4.Dataset` or\n`netCDF4.Group`, as well as for all variables in all its subgroups.\n\n**`True_or_False`**: Boolean determining if automatic conversion to masked arrays\nshall be applied for all variables.\n\n***Note***: Calling this function only affects existing variables. Variables created\nafter calling this function will follow the default behaviour.\n "; +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_75set_auto_mask(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_auto_mask (wrapper)", 0); - __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_mask(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_74set_auto_mask(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_mask(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value) { +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74set_auto_mask(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value) { PyObject *__pyx_v_var = NULL; PyObject *__pyx_v_groups = NULL; PyObject *__pyx_v_group = NULL; @@ -21605,14 +21719,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_mask(struct __p PyObject *__pyx_t_13 = NULL; __Pyx_RefNannySetupContext("set_auto_mask", 0); - /* "netCDF4/_netCDF4.pyx":2516 + /* "netCDF4/_netCDF4.pyx":2543 * """ * * for var in self.variables.values(): # <<<<<<<<<<<<<< * var.set_auto_mask(value) * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->variables, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2516, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->variables, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -21625,10 +21739,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_mask(struct __p } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2516, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2543, __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, 2516, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2543, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -21636,9 +21750,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_mask(struct __p __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2516, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2516, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2543, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -21646,17 +21760,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_mask(struct __p if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2516, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2543, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2516, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2516, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2543, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2516, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -21666,7 +21780,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_mask(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, 2516, __pyx_L1_error) + else __PYX_ERR(0, 2543, __pyx_L1_error) } break; } @@ -21675,14 +21789,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_mask(struct __p __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":2517 + /* "netCDF4/_netCDF4.pyx":2544 * * for var in self.variables.values(): * var.set_auto_mask(value) # <<<<<<<<<<<<<< * * for groups in _walk_grps(self): */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_set_auto_mask); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2517, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_set_auto_mask); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -21695,13 +21809,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_mask(struct __p } } if (!__pyx_t_6) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2517, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_value}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2517, __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, 2544, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -21709,19 +21823,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_mask(struct __p #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_value}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2517, __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, 2544, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2517, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2544, __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_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_value); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2517, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -21729,7 +21843,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_mask(struct __p __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":2516 + /* "netCDF4/_netCDF4.pyx":2543 * """ * * for var in self.variables.values(): # <<<<<<<<<<<<<< @@ -21739,14 +21853,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_mask(struct __p } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":2519 + /* "netCDF4/_netCDF4.pyx":2546 * var.set_auto_mask(value) * * for groups in _walk_grps(self): # <<<<<<<<<<<<<< * for group in groups: * for var in group.variables.values(): */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_walk_grps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2519, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_walk_grps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { @@ -21759,13 +21873,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_mask(struct __p } } if (!__pyx_t_3) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2519, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_3, ((PyObject *)__pyx_v_self)}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2519, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2546, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -21773,19 +21887,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_mask(struct __p #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_3, ((PyObject *)__pyx_v_self)}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2519, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2546, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2519, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_7, 0+1, ((PyObject *)__pyx_v_self)); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2519, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -21795,9 +21909,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_mask(struct __p __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2519, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2519, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2546, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { @@ -21805,17 +21919,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_mask(struct __p if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2519, __pyx_L1_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2546, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2519, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2519, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2546, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2519, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } @@ -21825,7 +21939,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_mask(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, 2519, __pyx_L1_error) + else __PYX_ERR(0, 2546, __pyx_L1_error) } break; } @@ -21834,7 +21948,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_mask(struct __p __Pyx_XDECREF_SET(__pyx_v_groups, __pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":2520 + /* "netCDF4/_netCDF4.pyx":2547 * * for groups in _walk_grps(self): * for group in groups: # <<<<<<<<<<<<<< @@ -21845,26 +21959,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_mask(struct __p __pyx_t_2 = __pyx_v_groups; __Pyx_INCREF(__pyx_t_2); __pyx_t_8 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_groups); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2520, __pyx_L1_error) + __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_groups); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_9 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2520, __pyx_L1_error) + __pyx_t_9 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2547, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_9)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2520, __pyx_L1_error) + __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2547, __pyx_L1_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2520, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } else { if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2520, __pyx_L1_error) + __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2547, __pyx_L1_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2520, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } @@ -21874,7 +21988,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_mask(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, 2520, __pyx_L1_error) + else __PYX_ERR(0, 2547, __pyx_L1_error) } break; } @@ -21883,16 +21997,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_mask(struct __p __Pyx_XDECREF_SET(__pyx_v_group, __pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":2521 + /* "netCDF4/_netCDF4.pyx":2548 * for groups in _walk_grps(self): * for group in groups: * for var in group.variables.values(): # <<<<<<<<<<<<<< * var.set_auto_mask(value) * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2521, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_values); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2521, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_values); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -21906,10 +22020,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_mask(struct __p } } if (__pyx_t_3) { - __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2521, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2548, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2521, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2548, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -21917,9 +22031,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_mask(struct __p __pyx_t_6 = __pyx_t_7; __Pyx_INCREF(__pyx_t_6); __pyx_t_10 = 0; __pyx_t_11 = NULL; } else { - __pyx_t_10 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2521, __pyx_L1_error) + __pyx_t_10 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_11 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2521, __pyx_L1_error) + __pyx_t_11 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2548, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; for (;;) { @@ -21927,17 +22041,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_mask(struct __p if (likely(PyList_CheckExact(__pyx_t_6))) { if (__pyx_t_10 >= 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_10); __Pyx_INCREF(__pyx_t_7); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 2521, __pyx_L1_error) + __pyx_t_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_10); __Pyx_INCREF(__pyx_t_7); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 2548, __pyx_L1_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2521, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } else { if (__pyx_t_10 >= 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_10); __Pyx_INCREF(__pyx_t_7); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 2521, __pyx_L1_error) + __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_10); __Pyx_INCREF(__pyx_t_7); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 2548, __pyx_L1_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2521, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } @@ -21947,7 +22061,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_mask(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, 2521, __pyx_L1_error) + else __PYX_ERR(0, 2548, __pyx_L1_error) } break; } @@ -21956,14 +22070,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_mask(struct __p __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":2522 + /* "netCDF4/_netCDF4.pyx":2549 * for group in groups: * for var in group.variables.values(): * var.set_auto_mask(value) # <<<<<<<<<<<<<< * * def set_auto_scale(self, value): */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_set_auto_mask); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2522, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_set_auto_mask); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -21976,13 +22090,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_mask(struct __p } } if (!__pyx_t_12) { - __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2522, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v_value}; - __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2522, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2549, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_7); } else @@ -21990,19 +22104,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_mask(struct __p #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v_value}; - __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2522, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2549, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_7); } else #endif { - __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2522, __pyx_L1_error) + __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __pyx_t_12 = NULL; __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_v_value); - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_13, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2522, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_13, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } @@ -22010,7 +22124,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_mask(struct __p __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":2521 + /* "netCDF4/_netCDF4.pyx":2548 * for groups in _walk_grps(self): * for group in groups: * for var in group.variables.values(): # <<<<<<<<<<<<<< @@ -22020,7 +22134,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_mask(struct __p } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":2520 + /* "netCDF4/_netCDF4.pyx":2547 * * for groups in _walk_grps(self): * for group in groups: # <<<<<<<<<<<<<< @@ -22030,7 +22144,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_mask(struct __p } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":2519 + /* "netCDF4/_netCDF4.pyx":2546 * var.set_auto_mask(value) * * for groups in _walk_grps(self): # <<<<<<<<<<<<<< @@ -22040,7 +22154,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_mask(struct __p } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":2502 + /* "netCDF4/_netCDF4.pyx":2529 * * * def set_auto_mask(self, value): # <<<<<<<<<<<<<< @@ -22070,7 +22184,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_mask(struct __p return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2524 +/* "netCDF4/_netCDF4.pyx":2551 * var.set_auto_mask(value) * * def set_auto_scale(self, value): # <<<<<<<<<<<<<< @@ -22079,20 +22193,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_mask(struct __p */ /* Python wrapper */ -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_75set_auto_scale(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ -static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_74set_auto_scale[] = "\n**`set_auto_scale(self, True_or_False)`**\n\nCall `netCDF4.Variable.set_auto_scale` for all variables contained in this `netCDF4.Dataset` or\n`netCDF4.Group`, as well as for all variables in all its subgroups.\n\n**`True_or_False`**: Boolean determining if automatic variable scaling\nshall be applied for all variables.\n\n***Note***: Calling this function only affects existing variables. Variables created\nafter calling this function will follow the default behaviour.\n "; -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_75set_auto_scale(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_77set_auto_scale(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_76set_auto_scale[] = "\n**`set_auto_scale(self, True_or_False)`**\n\nCall `netCDF4.Variable.set_auto_scale` for all variables contained in this `netCDF4.Dataset` or\n`netCDF4.Group`, as well as for all variables in all its subgroups.\n\n**`True_or_False`**: Boolean determining if automatic variable scaling\nshall be applied for all variables.\n\n***Note***: Calling this function only affects existing variables. Variables created\nafter calling this function will follow the default behaviour.\n "; +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_77set_auto_scale(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_auto_scale (wrapper)", 0); - __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_74set_auto_scale(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_76set_auto_scale(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74set_auto_scale(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value) { +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_76set_auto_scale(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value) { PyObject *__pyx_v__vars = NULL; PyObject *__pyx_v_var = NULL; PyObject *__pyx_v_groups = NULL; @@ -22116,7 +22230,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74set_auto_scale(struct __ PyObject *__pyx_t_15 = NULL; __Pyx_RefNannySetupContext("set_auto_scale", 0); - /* "netCDF4/_netCDF4.pyx":2540 + /* "netCDF4/_netCDF4.pyx":2567 * # this is a hack to make inheritance work in MFDataset * # (which stores variables in _vars) * _vars = self.variables # <<<<<<<<<<<<<< @@ -22128,7 +22242,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74set_auto_scale(struct __ __pyx_v__vars = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":2541 + /* "netCDF4/_netCDF4.pyx":2568 * # (which stores variables in _vars) * _vars = self.variables * if _vars is None: _vars = self._vars # <<<<<<<<<<<<<< @@ -22138,20 +22252,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74set_auto_scale(struct __ __pyx_t_2 = (__pyx_v__vars == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_vars); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2541, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_vars); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v__vars, __pyx_t_1); __pyx_t_1 = 0; } - /* "netCDF4/_netCDF4.pyx":2542 + /* "netCDF4/_netCDF4.pyx":2569 * _vars = self.variables * if _vars is None: _vars = self._vars * for var in _vars.values(): # <<<<<<<<<<<<<< * var.set_auto_scale(value) * */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v__vars, __pyx_n_s_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2542, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v__vars, __pyx_n_s_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -22164,10 +22278,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74set_auto_scale(struct __ } } if (__pyx_t_5) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2542, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2569, __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, 2542, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2569, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -22175,9 +22289,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74set_auto_scale(struct __ __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2542, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2542, __pyx_L1_error) + __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2569, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -22185,17 +22299,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74set_auto_scale(struct __ if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2542, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2569, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2542, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2542, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2569, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2542, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -22205,7 +22319,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74set_auto_scale(struct __ 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, 2542, __pyx_L1_error) + else __PYX_ERR(0, 2569, __pyx_L1_error) } break; } @@ -22214,14 +22328,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74set_auto_scale(struct __ __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":2543 + /* "netCDF4/_netCDF4.pyx":2570 * if _vars is None: _vars = self._vars * for var in _vars.values(): * var.set_auto_scale(value) # <<<<<<<<<<<<<< * * for groups in _walk_grps(self): */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_set_auto_scale); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2543, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_set_auto_scale); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -22234,13 +22348,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74set_auto_scale(struct __ } } if (!__pyx_t_8) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2543, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2570, __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_8, __pyx_v_value}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2543, __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, 2570, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -22248,19 +22362,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74set_auto_scale(struct __ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_value}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2543, __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, 2570, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2543, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2570, __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_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_value); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2543, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -22268,7 +22382,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74set_auto_scale(struct __ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":2542 + /* "netCDF4/_netCDF4.pyx":2569 * _vars = self.variables * if _vars is None: _vars = self._vars * for var in _vars.values(): # <<<<<<<<<<<<<< @@ -22278,14 +22392,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74set_auto_scale(struct __ } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":2545 + /* "netCDF4/_netCDF4.pyx":2572 * var.set_auto_scale(value) * * for groups in _walk_grps(self): # <<<<<<<<<<<<<< * for group in groups: * for var in group.variables.values(): */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_walk_grps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2545, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_walk_grps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { @@ -22298,13 +22412,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74set_auto_scale(struct __ } } if (!__pyx_t_5) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2545, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_5, ((PyObject *)__pyx_v_self)}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2545, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2572, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_4); } else @@ -22312,19 +22426,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74set_auto_scale(struct __ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_5, ((PyObject *)__pyx_v_self)}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2545, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2572, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { - __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2545, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_9, 0+1, ((PyObject *)__pyx_v_self)); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2545, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -22334,9 +22448,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74set_auto_scale(struct __ __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2545, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2545, __pyx_L1_error) + __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2572, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -22344,17 +22458,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74set_auto_scale(struct __ if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_6 >= 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_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2545, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2572, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2545, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_6 >= 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_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2545, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2572, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2545, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -22364,7 +22478,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74set_auto_scale(struct __ 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, 2545, __pyx_L1_error) + else __PYX_ERR(0, 2572, __pyx_L1_error) } break; } @@ -22373,7 +22487,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74set_auto_scale(struct __ __Pyx_XDECREF_SET(__pyx_v_groups, __pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":2546 + /* "netCDF4/_netCDF4.pyx":2573 * * for groups in _walk_grps(self): * for group in groups: # <<<<<<<<<<<<<< @@ -22384,26 +22498,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74set_auto_scale(struct __ __pyx_t_4 = __pyx_v_groups; __Pyx_INCREF(__pyx_t_4); __pyx_t_10 = 0; __pyx_t_11 = NULL; } else { - __pyx_t_10 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_groups); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2546, __pyx_L1_error) + __pyx_t_10 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_groups); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_11 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2546, __pyx_L1_error) + __pyx_t_11 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2573, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_11)) { if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_9 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 2546, __pyx_L1_error) + __pyx_t_9 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 2573, __pyx_L1_error) #else - __pyx_t_9 = PySequence_ITEM(__pyx_t_4, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2546, __pyx_L1_error) + __pyx_t_9 = PySequence_ITEM(__pyx_t_4, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); #endif } else { if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 2546, __pyx_L1_error) + __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 2573, __pyx_L1_error) #else - __pyx_t_9 = PySequence_ITEM(__pyx_t_4, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2546, __pyx_L1_error) + __pyx_t_9 = PySequence_ITEM(__pyx_t_4, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); #endif } @@ -22413,7 +22527,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74set_auto_scale(struct __ 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, 2546, __pyx_L1_error) + else __PYX_ERR(0, 2573, __pyx_L1_error) } break; } @@ -22422,16 +22536,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74set_auto_scale(struct __ __Pyx_XDECREF_SET(__pyx_v_group, __pyx_t_9); __pyx_t_9 = 0; - /* "netCDF4/_netCDF4.pyx":2547 + /* "netCDF4/_netCDF4.pyx":2574 * for groups in _walk_grps(self): * for group in groups: * for var in group.variables.values(): # <<<<<<<<<<<<<< * var.set_auto_scale(value) * */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_variables); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2547, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_variables); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2574, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_values); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2547, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_values); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2574, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -22445,10 +22559,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74set_auto_scale(struct __ } } if (__pyx_t_5) { - __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2547, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2574, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { - __pyx_t_9 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2547, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2574, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -22456,9 +22570,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74set_auto_scale(struct __ __pyx_t_8 = __pyx_t_9; __Pyx_INCREF(__pyx_t_8); __pyx_t_12 = 0; __pyx_t_13 = NULL; } else { - __pyx_t_12 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2547, __pyx_L1_error) + __pyx_t_12 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2574, __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, 2547, __pyx_L1_error) + __pyx_t_13 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2574, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; for (;;) { @@ -22466,17 +22580,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74set_auto_scale(struct __ if (likely(PyList_CheckExact(__pyx_t_8))) { if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_8)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_9 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_12); __Pyx_INCREF(__pyx_t_9); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 2547, __pyx_L1_error) + __pyx_t_9 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_12); __Pyx_INCREF(__pyx_t_9); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 2574, __pyx_L1_error) #else - __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2547, __pyx_L1_error) + __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2574, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); #endif } else { if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_8)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_12); __Pyx_INCREF(__pyx_t_9); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 2547, __pyx_L1_error) + __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_12); __Pyx_INCREF(__pyx_t_9); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 2574, __pyx_L1_error) #else - __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2547, __pyx_L1_error) + __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2574, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); #endif } @@ -22486,7 +22600,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74set_auto_scale(struct __ 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, 2547, __pyx_L1_error) + else __PYX_ERR(0, 2574, __pyx_L1_error) } break; } @@ -22495,14 +22609,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74set_auto_scale(struct __ __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_9); __pyx_t_9 = 0; - /* "netCDF4/_netCDF4.pyx":2548 + /* "netCDF4/_netCDF4.pyx":2575 * for group in groups: * for var in group.variables.values(): * var.set_auto_scale(value) # <<<<<<<<<<<<<< * * def get_variables_by_attributes(self, **kwargs): */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_set_auto_scale); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2548, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_set_auto_scale); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_14 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -22515,13 +22629,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74set_auto_scale(struct __ } } if (!__pyx_t_14) { - __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_value); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2548, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_value); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_v_value}; - __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2548, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2575, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_GOTREF(__pyx_t_9); } else @@ -22529,19 +22643,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74set_auto_scale(struct __ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_v_value}; - __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2548, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2575, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_GOTREF(__pyx_t_9); } else #endif { - __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2548, __pyx_L1_error) + __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_14); __pyx_t_14 = NULL; __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_15, 0+1, __pyx_v_value); - __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_15, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2548, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_15, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; } @@ -22549,7 +22663,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74set_auto_scale(struct __ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "netCDF4/_netCDF4.pyx":2547 + /* "netCDF4/_netCDF4.pyx":2574 * for groups in _walk_grps(self): * for group in groups: * for var in group.variables.values(): # <<<<<<<<<<<<<< @@ -22559,7 +22673,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74set_auto_scale(struct __ } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":2546 + /* "netCDF4/_netCDF4.pyx":2573 * * for groups in _walk_grps(self): * for group in groups: # <<<<<<<<<<<<<< @@ -22569,7 +22683,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74set_auto_scale(struct __ } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":2545 + /* "netCDF4/_netCDF4.pyx":2572 * var.set_auto_scale(value) * * for groups in _walk_grps(self): # <<<<<<<<<<<<<< @@ -22579,7 +22693,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74set_auto_scale(struct __ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":2524 + /* "netCDF4/_netCDF4.pyx":2551 * var.set_auto_mask(value) * * def set_auto_scale(self, value): # <<<<<<<<<<<<<< @@ -22610,7 +22724,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74set_auto_scale(struct __ return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2550 +/* "netCDF4/_netCDF4.pyx":2577 * var.set_auto_scale(value) * * def get_variables_by_attributes(self, **kwargs): # <<<<<<<<<<<<<< @@ -22619,9 +22733,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74set_auto_scale(struct __ */ /* Python wrapper */ -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_77get_variables_by_attributes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_76get_variables_by_attributes[] = "\n**`get_variables_by_attribute(self, **kwargs)`**\n\nReturns a list of variables that match specific conditions.\n\nCan pass in key=value parameters and variables are returned that\ncontain all of the matches. For example, \n\n :::python\n >>> # Get variables with x-axis attribute.\n >>> vs = nc.get_variables_by_attributes(axis='X')\n >>> # Get variables with matching \"standard_name\" attribute\n >>> vs = nc.get_variables_by_attributes(standard_name='northward_sea_water_velocity')\n\nCan pass in key=callable parameter and variables are returned if the\ncallable returns True. The callable should accept a single parameter,\nthe attribute value. None is given as the attribute value when the\nattribute does not exist on the variable. For example,\n\n :::python\n >>> # Get Axis variables\n >>> vs = nc.get_variables_by_attributes(axis=lambda v: v in ['X', 'Y', 'Z', 'T'])\n >>> # Get variables that don't have an \"axis\" attribute\n >>> vs = nc.get_variables_by_attributes(axis=lambda v: v is None)\n >>> # Get variables that have a \"grid_mapping\" attribute\n >>> vs = nc.get_variables_by_attributes(grid_mapping=lambda v: v is not None)\n"; -static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_77get_variables_by_attributes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_79get_variables_by_attributes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_78get_variables_by_attributes[] = "\n**`get_variables_by_attribute(self, **kwargs)`**\n\nReturns a list of variables that match specific conditions.\n\nCan pass in key=value parameters and variables are returned that\ncontain all of the matches. For example, \n\n :::python\n >>> # Get variables with x-axis attribute.\n >>> vs = nc.get_variables_by_attributes(axis='X')\n >>> # Get variables with matching \"standard_name\" attribute\n >>> vs = nc.get_variables_by_attributes(standard_name='northward_sea_water_velocity')\n\nCan pass in key=callable parameter and variables are returned if the\ncallable returns True. The callable should accept a single parameter,\nthe attribute value. None is given as the attribute value when the\nattribute does not exist on the variable. For example,\n\n :::python\n >>> # Get Axis variables\n >>> vs = nc.get_variables_by_attributes(axis=lambda v: v in ['X', 'Y', 'Z', 'T'])\n >>> # Get variables that don't have an \"axis\" attribute\n >>> vs = nc.get_variables_by_attributes(axis=lambda v: v is None)\n >>> # Get variables that have a \"grid_mapping\" attribute\n >>> vs = nc.get_variables_by_attributes(grid_mapping=lambda v: v is not None)\n"; +static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_79get_variables_by_attributes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_kwargs = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations @@ -22631,7 +22745,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_77get_variables_by_attribu if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "get_variables_by_attributes", 1))) return NULL; __pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL; __Pyx_GOTREF(__pyx_v_kwargs); - __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_76get_variables_by_attributes(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), __pyx_v_kwargs); + __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_78get_variables_by_attributes(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), __pyx_v_kwargs); /* function exit code */ __Pyx_XDECREF(__pyx_v_kwargs); @@ -22639,7 +22753,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_77get_variables_by_attribu return __pyx_r; } -static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_76get_variables_by_attributes(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_kwargs) { +static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_78get_variables_by_attributes(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_kwargs) { PyObject *__pyx_v_vs = NULL; PyObject *__pyx_v_has_value_flag = NULL; PyObject *__pyx_v__vars = NULL; @@ -22667,19 +22781,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_76get_variables_by_attribu int __pyx_t_16; __Pyx_RefNannySetupContext("get_variables_by_attributes", 0); - /* "netCDF4/_netCDF4.pyx":2578 + /* "netCDF4/_netCDF4.pyx":2605 * >>> vs = nc.get_variables_by_attributes(grid_mapping=lambda v: v is not None) * """ * vs = [] # <<<<<<<<<<<<<< * * has_value_flag = False */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2578, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2605, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_vs = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":2580 + /* "netCDF4/_netCDF4.pyx":2607 * vs = [] * * has_value_flag = False # <<<<<<<<<<<<<< @@ -22689,7 +22803,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_76get_variables_by_attribu __Pyx_INCREF(Py_False); __pyx_v_has_value_flag = Py_False; - /* "netCDF4/_netCDF4.pyx":2583 + /* "netCDF4/_netCDF4.pyx":2610 * # this is a hack to make inheritance work in MFDataset * # (which stores variables in _vars) * _vars = self.variables # <<<<<<<<<<<<<< @@ -22701,7 +22815,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_76get_variables_by_attribu __pyx_v__vars = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":2584 + /* "netCDF4/_netCDF4.pyx":2611 * # (which stores variables in _vars) * _vars = self.variables * if _vars is None: _vars = self._vars # <<<<<<<<<<<<<< @@ -22711,13 +22825,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_76get_variables_by_attribu __pyx_t_2 = (__pyx_v__vars == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_vars); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2584, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_vars); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2611, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v__vars, __pyx_t_1); __pyx_t_1 = 0; } - /* "netCDF4/_netCDF4.pyx":2585 + /* "netCDF4/_netCDF4.pyx":2612 * _vars = self.variables * if _vars is None: _vars = self._vars * for vname in _vars: # <<<<<<<<<<<<<< @@ -22728,26 +22842,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_76get_variables_by_attribu __pyx_t_1 = __pyx_v__vars; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v__vars); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2585, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v__vars); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2585, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2612, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_5)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2585, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2612, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2585, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2585, __pyx_L1_error) + __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2612, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2585, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } @@ -22757,7 +22871,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_76get_variables_by_attribu 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, 2585, __pyx_L1_error) + else __PYX_ERR(0, 2612, __pyx_L1_error) } break; } @@ -22766,34 +22880,34 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_76get_variables_by_attribu __Pyx_XDECREF_SET(__pyx_v_vname, __pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":2586 + /* "netCDF4/_netCDF4.pyx":2613 * if _vars is None: _vars = self._vars * for vname in _vars: * var = _vars[vname] # <<<<<<<<<<<<<< * for k, v in kwargs.items(): * if callable(v): */ - __pyx_t_6 = PyObject_GetItem(__pyx_v__vars, __pyx_v_vname); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2586, __pyx_L1_error) + __pyx_t_6 = PyObject_GetItem(__pyx_v__vars, __pyx_v_vname); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2613, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":2587 + /* "netCDF4/_netCDF4.pyx":2614 * for vname in _vars: * var = _vars[vname] * for k, v in kwargs.items(): # <<<<<<<<<<<<<< * if callable(v): * has_value_flag = v(getattr(var, k, None)) */ - __pyx_t_6 = __Pyx_PyDict_Items(__pyx_v_kwargs); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2587, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_Items(__pyx_v_kwargs); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2614, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) { __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2587, __pyx_L1_error) + __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2614, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2587, __pyx_L1_error) + __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2614, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; for (;;) { @@ -22801,17 +22915,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_76get_variables_by_attribu if (likely(PyList_CheckExact(__pyx_t_7))) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2587, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2614, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2587, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2614, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } else { if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2587, __pyx_L1_error) + __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2614, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2587, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2614, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } @@ -22821,7 +22935,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_76get_variables_by_attribu 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, 2587, __pyx_L1_error) + else __PYX_ERR(0, 2614, __pyx_L1_error) } break; } @@ -22837,7 +22951,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_76get_variables_by_attribu if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 2587, __pyx_L1_error) + __PYX_ERR(0, 2614, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -22850,15 +22964,15 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_76get_variables_by_attribu __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(__pyx_t_11); #else - __pyx_t_10 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2587, __pyx_L1_error) + __pyx_t_10 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2614, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2587, __pyx_L1_error) + __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2614, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; - __pyx_t_12 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2587, __pyx_L1_error) + __pyx_t_12 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2614, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext; @@ -22866,7 +22980,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_76get_variables_by_attribu __Pyx_GOTREF(__pyx_t_10); index = 1; __pyx_t_11 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_11)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_11); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) __PYX_ERR(0, 2587, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) __PYX_ERR(0, 2614, __pyx_L1_error) __pyx_t_13 = NULL; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L9_unpacking_done; @@ -22874,7 +22988,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_76get_variables_by_attribu __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_13 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 2587, __pyx_L1_error) + __PYX_ERR(0, 2614, __pyx_L1_error) __pyx_L9_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_10); @@ -22882,25 +22996,25 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_76get_variables_by_attribu __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":2588 + /* "netCDF4/_netCDF4.pyx":2615 * var = _vars[vname] * for k, v in kwargs.items(): * if callable(v): # <<<<<<<<<<<<<< * has_value_flag = v(getattr(var, k, None)) * if has_value_flag is False: */ - __pyx_t_3 = __Pyx_PyCallable_Check(__pyx_v_v); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(0, 2588, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCallable_Check(__pyx_v_v); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(0, 2615, __pyx_L1_error) __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":2589 + /* "netCDF4/_netCDF4.pyx":2616 * for k, v in kwargs.items(): * if callable(v): * has_value_flag = v(getattr(var, k, None)) # <<<<<<<<<<<<<< * if has_value_flag is False: * break */ - __pyx_t_11 = __Pyx_GetAttr3(__pyx_v_var, __pyx_v_k, Py_None); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2589, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetAttr3(__pyx_v_var, __pyx_v_k, Py_None); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2616, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(__pyx_v_v); __pyx_t_10 = __pyx_v_v; __pyx_t_12 = NULL; @@ -22914,14 +23028,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_76get_variables_by_attribu } } if (!__pyx_t_12) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2589, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2616, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_6); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_11}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2589, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2616, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; @@ -22930,20 +23044,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_76get_variables_by_attribu #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_11}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2589, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2616, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } else #endif { - __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2589, __pyx_L1_error) + __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2616, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_12); __pyx_t_12 = NULL; __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_t_11); __pyx_t_11 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_14, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2589, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_14, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2616, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } @@ -22952,7 +23066,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_76get_variables_by_attribu __Pyx_DECREF_SET(__pyx_v_has_value_flag, __pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":2590 + /* "netCDF4/_netCDF4.pyx":2617 * if callable(v): * has_value_flag = v(getattr(var, k, None)) * if has_value_flag is False: # <<<<<<<<<<<<<< @@ -22963,7 +23077,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_76get_variables_by_attribu __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":2591 + /* "netCDF4/_netCDF4.pyx":2618 * has_value_flag = v(getattr(var, k, None)) * if has_value_flag is False: * break # <<<<<<<<<<<<<< @@ -22972,7 +23086,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_76get_variables_by_attribu */ goto __pyx_L7_break; - /* "netCDF4/_netCDF4.pyx":2590 + /* "netCDF4/_netCDF4.pyx":2617 * if callable(v): * has_value_flag = v(getattr(var, k, None)) * if has_value_flag is False: # <<<<<<<<<<<<<< @@ -22981,7 +23095,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_76get_variables_by_attribu */ } - /* "netCDF4/_netCDF4.pyx":2588 + /* "netCDF4/_netCDF4.pyx":2615 * var = _vars[vname] * for k, v in kwargs.items(): * if callable(v): # <<<<<<<<<<<<<< @@ -22991,31 +23105,31 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_76get_variables_by_attribu goto __pyx_L10; } - /* "netCDF4/_netCDF4.pyx":2592 + /* "netCDF4/_netCDF4.pyx":2619 * if has_value_flag is False: * break * elif hasattr(var, k) and getattr(var, k) == v: # <<<<<<<<<<<<<< * has_value_flag = True * else: */ - __pyx_t_2 = PyObject_HasAttr(__pyx_v_var, __pyx_v_k); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 2592, __pyx_L1_error) + __pyx_t_2 = PyObject_HasAttr(__pyx_v_var, __pyx_v_k); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 2619, __pyx_L1_error) __pyx_t_15 = (__pyx_t_2 != 0); if (__pyx_t_15) { } else { __pyx_t_3 = __pyx_t_15; goto __pyx_L12_bool_binop_done; } - __pyx_t_6 = __Pyx_GetAttr(__pyx_v_var, __pyx_v_k); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2592, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetAttr(__pyx_v_var, __pyx_v_k); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_10 = PyObject_RichCompare(__pyx_t_6, __pyx_v_v, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2592, __pyx_L1_error) + __pyx_t_10 = PyObject_RichCompare(__pyx_t_6, __pyx_v_v, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2619, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 2592, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 2619, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_3 = __pyx_t_15; __pyx_L12_bool_binop_done:; if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":2593 + /* "netCDF4/_netCDF4.pyx":2620 * break * elif hasattr(var, k) and getattr(var, k) == v: * has_value_flag = True # <<<<<<<<<<<<<< @@ -23025,7 +23139,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_76get_variables_by_attribu __Pyx_INCREF(Py_True); __Pyx_DECREF_SET(__pyx_v_has_value_flag, Py_True); - /* "netCDF4/_netCDF4.pyx":2592 + /* "netCDF4/_netCDF4.pyx":2619 * if has_value_flag is False: * break * elif hasattr(var, k) and getattr(var, k) == v: # <<<<<<<<<<<<<< @@ -23035,7 +23149,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_76get_variables_by_attribu goto __pyx_L10; } - /* "netCDF4/_netCDF4.pyx":2595 + /* "netCDF4/_netCDF4.pyx":2622 * has_value_flag = True * else: * has_value_flag = False # <<<<<<<<<<<<<< @@ -23046,7 +23160,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_76get_variables_by_attribu __Pyx_INCREF(Py_False); __Pyx_DECREF_SET(__pyx_v_has_value_flag, Py_False); - /* "netCDF4/_netCDF4.pyx":2596 + /* "netCDF4/_netCDF4.pyx":2623 * else: * has_value_flag = False * break # <<<<<<<<<<<<<< @@ -23057,7 +23171,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_76get_variables_by_attribu } __pyx_L10:; - /* "netCDF4/_netCDF4.pyx":2587 + /* "netCDF4/_netCDF4.pyx":2614 * for vname in _vars: * var = _vars[vname] * for k, v in kwargs.items(): # <<<<<<<<<<<<<< @@ -23068,7 +23182,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_76get_variables_by_attribu __pyx_L7_break:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":2598 + /* "netCDF4/_netCDF4.pyx":2625 * break * * if has_value_flag is True: # <<<<<<<<<<<<<< @@ -23079,19 +23193,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_76get_variables_by_attribu __pyx_t_15 = (__pyx_t_3 != 0); if (__pyx_t_15) { - /* "netCDF4/_netCDF4.pyx":2599 + /* "netCDF4/_netCDF4.pyx":2626 * * if has_value_flag is True: * vs.append(_vars[vname]) # <<<<<<<<<<<<<< * * return vs */ - __pyx_t_7 = PyObject_GetItem(__pyx_v__vars, __pyx_v_vname); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2599, __pyx_L1_error) + __pyx_t_7 = PyObject_GetItem(__pyx_v__vars, __pyx_v_vname); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2626, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_16 = __Pyx_PyList_Append(__pyx_v_vs, __pyx_t_7); if (unlikely(__pyx_t_16 == -1)) __PYX_ERR(0, 2599, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyList_Append(__pyx_v_vs, __pyx_t_7); if (unlikely(__pyx_t_16 == -1)) __PYX_ERR(0, 2626, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":2598 + /* "netCDF4/_netCDF4.pyx":2625 * break * * if has_value_flag is True: # <<<<<<<<<<<<<< @@ -23100,7 +23214,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_76get_variables_by_attribu */ } - /* "netCDF4/_netCDF4.pyx":2585 + /* "netCDF4/_netCDF4.pyx":2612 * _vars = self.variables * if _vars is None: _vars = self._vars * for vname in _vars: # <<<<<<<<<<<<<< @@ -23110,7 +23224,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_76get_variables_by_attribu } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":2601 + /* "netCDF4/_netCDF4.pyx":2628 * vs.append(_vars[vname]) * * return vs # <<<<<<<<<<<<<< @@ -23122,7 +23236,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_76get_variables_by_attribu __pyx_r = __pyx_v_vs; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":2550 + /* "netCDF4/_netCDF4.pyx":2577 * var.set_auto_scale(value) * * def get_variables_by_attributes(self, **kwargs): # <<<<<<<<<<<<<< @@ -23154,12 +23268,12 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_76get_variables_by_attribu return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":1659 +/* "netCDF4/_netCDF4.pyx":1665 * """ * cdef object __weakref__ * cdef public int _grpid # <<<<<<<<<<<<<< * cdef public int _isopen - * cdef public groups, dimensions, variables, disk_format, path, parent,\ + * cdef Py_buffer _buffer */ /* Python wrapper */ @@ -23181,7 +23295,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_6_grpid___get__(struct __p PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1659, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1665, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -23216,7 +23330,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_6_grpid_2__set__(struct __pyx_ob __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1659, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1665, __pyx_L1_error) __pyx_v_self->_grpid = __pyx_t_1; /* function exit code */ @@ -23230,12 +23344,12 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_6_grpid_2__set__(struct __pyx_ob return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":1660 +/* "netCDF4/_netCDF4.pyx":1666 * cdef object __weakref__ * cdef public int _grpid * cdef public int _isopen # <<<<<<<<<<<<<< + * cdef Py_buffer _buffer * cdef public groups, dimensions, variables, disk_format, path, parent,\ - * file_format, data_model, cmptypes, vltypes, enumtypes, __orthogonal_indexing__, \ */ /* Python wrapper */ @@ -23257,7 +23371,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_7_isopen___get__(struct __ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_isopen); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1660, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_isopen); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1666, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -23292,7 +23406,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_7_isopen_2__set__(struct __pyx_o __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1660, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1666, __pyx_L1_error) __pyx_v_self->_isopen = __pyx_t_1; /* function exit code */ @@ -23306,9 +23420,9 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_7_isopen_2__set__(struct __pyx_o return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":1661 - * cdef public int _grpid +/* "netCDF4/_netCDF4.pyx":1668 * cdef public int _isopen + * cdef Py_buffer _buffer * cdef public groups, dimensions, variables, disk_format, path, parent,\ # <<<<<<<<<<<<<< * file_format, data_model, cmptypes, vltypes, enumtypes, __orthogonal_indexing__, \ * keepweakref @@ -23836,8 +23950,8 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_6parent_4__del__(struct __pyx_ob return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":1662 - * cdef public int _isopen +/* "netCDF4/_netCDF4.pyx":1669 + * cdef Py_buffer _buffer * cdef public groups, dimensions, variables, disk_format, path, parent,\ * file_format, data_model, cmptypes, vltypes, enumtypes, __orthogonal_indexing__, \ # <<<<<<<<<<<<<< * keepweakref @@ -24366,7 +24480,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_23__orthogonal_indexing___4__del return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":1663 +/* "netCDF4/_netCDF4.pyx":1670 * cdef public groups, dimensions, variables, disk_format, path, parent,\ * file_format, data_model, cmptypes, vltypes, enumtypes, __orthogonal_indexing__, \ * keepweakref # <<<<<<<<<<<<<< @@ -24461,7 +24575,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_11keepweakref_4__del__(struct __ return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2623 +/* "netCDF4/_netCDF4.pyx":2650 * __pdoc__['Group.name']=\ * """A string describing the name of the `netCDF4.Group`.""" * def __init__(self, parent, name, **kwargs): # <<<<<<<<<<<<<< @@ -24504,11 +24618,11 @@ static int __pyx_pw_7netCDF4_8_netCDF4_5Group_1__init__(PyObject *__pyx_v_self, case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 2623, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 2650, __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, 2623, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2650, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -24521,7 +24635,7 @@ static int __pyx_pw_7netCDF4_8_netCDF4_5Group_1__init__(PyObject *__pyx_v_self, } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2623, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2650, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_AddTraceback("netCDF4._netCDF4.Group.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -24537,7 +24651,6 @@ static int __pyx_pw_7netCDF4_8_netCDF4_5Group_1__init__(PyObject *__pyx_v_self, } static int __pyx_pf_7netCDF4_8_netCDF4_5Group___init__(struct __pyx_obj_7netCDF4_8_netCDF4_Group *__pyx_v_self, PyObject *__pyx_v_parent, PyObject *__pyx_v_name, PyObject *__pyx_v_kwargs) { - int __pyx_v_ierr; char *__pyx_v_groupname; PyObject *__pyx_v_bytestr = NULL; int __pyx_r; @@ -24554,7 +24667,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_5Group___init__(struct __pyx_obj_7netCDF4 char *__pyx_t_10; __Pyx_RefNannySetupContext("__init__", 0); - /* "netCDF4/_netCDF4.pyx":2640 + /* "netCDF4/_netCDF4.pyx":2666 * cdef char *groupname * # flag to indicate that Variables in this Group support orthogonal indexing. * self.__orthogonal_indexing__ = True # <<<<<<<<<<<<<< @@ -24567,14 +24680,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_5Group___init__(struct __pyx_obj_7netCDF4 __Pyx_DECREF(__pyx_v_self->__pyx_base.__orthogonal_indexing__); __pyx_v_self->__pyx_base.__orthogonal_indexing__ = Py_True; - /* "netCDF4/_netCDF4.pyx":2642 + /* "netCDF4/_netCDF4.pyx":2668 * self.__orthogonal_indexing__ = True * # set data_model and file_format attributes. * self.data_model = parent.data_model # <<<<<<<<<<<<<< * self.file_format = parent.file_format * # full path to Group. */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parent, __pyx_n_s_data_model); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2642, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parent, __pyx_n_s_data_model); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx_base.data_model); @@ -24582,14 +24695,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_5Group___init__(struct __pyx_obj_7netCDF4 __pyx_v_self->__pyx_base.data_model = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":2643 + /* "netCDF4/_netCDF4.pyx":2669 * # set data_model and file_format attributes. * self.data_model = parent.data_model * self.file_format = parent.file_format # <<<<<<<<<<<<<< * # full path to Group. * self.path = posixpath.join(parent.path, name) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parent, __pyx_n_s_file_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2643, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parent, __pyx_n_s_file_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx_base.file_format); @@ -24597,19 +24710,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_5Group___init__(struct __pyx_obj_7netCDF4 __pyx_v_self->__pyx_base.file_format = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":2645 + /* "netCDF4/_netCDF4.pyx":2671 * self.file_format = parent.file_format * # full path to Group. * self.path = posixpath.join(parent.path, name) # <<<<<<<<<<<<<< * # parent group. * self.parent = parent */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_posixpath); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2645, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_posixpath); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_join); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2645, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_join); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2671, __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_parent, __pyx_n_s_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2645, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_parent, __pyx_n_s_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -24626,7 +24739,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_5Group___init__(struct __pyx_obj_7netCDF4 #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_2, __pyx_v_name}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2645, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2671, __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; @@ -24635,14 +24748,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_5Group___init__(struct __pyx_obj_7netCDF4 #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_2, __pyx_v_name}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2645, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2671, __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; } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2645, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -24653,7 +24766,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_5Group___init__(struct __pyx_obj_7netCDF4 __Pyx_GIVEREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_name); __pyx_t_2 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2645, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -24664,7 +24777,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_5Group___init__(struct __pyx_obj_7netCDF4 __pyx_v_self->__pyx_base.path = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":2647 + /* "netCDF4/_netCDF4.pyx":2673 * self.path = posixpath.join(parent.path, name) * # parent group. * self.parent = parent # <<<<<<<<<<<<<< @@ -24677,14 +24790,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_5Group___init__(struct __pyx_obj_7netCDF4 __Pyx_DECREF(__pyx_v_self->__pyx_base.parent); __pyx_v_self->__pyx_base.parent = __pyx_v_parent; - /* "netCDF4/_netCDF4.pyx":2649 + /* "netCDF4/_netCDF4.pyx":2675 * self.parent = parent * # propagate weak reference setting from parent. * self.keepweakref = parent.keepweakref # <<<<<<<<<<<<<< * if 'id' in kwargs: * self._grpid = kwargs['id'] */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parent, __pyx_n_s_keepweakref); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2649, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parent, __pyx_n_s_keepweakref); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx_base.keepweakref); @@ -24692,38 +24805,38 @@ static int __pyx_pf_7netCDF4_8_netCDF4_5Group___init__(struct __pyx_obj_7netCDF4 __pyx_v_self->__pyx_base.keepweakref = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":2650 + /* "netCDF4/_netCDF4.pyx":2676 * # propagate weak reference setting from parent. * self.keepweakref = parent.keepweakref * if 'id' in kwargs: # <<<<<<<<<<<<<< * self._grpid = kwargs['id'] * # get compound, vlen and enum types in this Group. */ - __pyx_t_7 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_id, __pyx_v_kwargs, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2650, __pyx_L1_error) + __pyx_t_7 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_id, __pyx_v_kwargs, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2676, __pyx_L1_error) __pyx_t_8 = (__pyx_t_7 != 0); if (__pyx_t_8) { - /* "netCDF4/_netCDF4.pyx":2651 + /* "netCDF4/_netCDF4.pyx":2677 * self.keepweakref = parent.keepweakref * if 'id' in kwargs: * self._grpid = kwargs['id'] # <<<<<<<<<<<<<< * # get compound, vlen and enum types in this Group. * self.cmptypes, self.vltypes, self.enumtypes = _get_types(self) */ - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_s_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2651, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_s_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2677, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2651, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2677, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->__pyx_base._grpid = __pyx_t_5; - /* "netCDF4/_netCDF4.pyx":2653 + /* "netCDF4/_netCDF4.pyx":2679 * self._grpid = kwargs['id'] * # get compound, vlen and enum types in this Group. * self.cmptypes, self.vltypes, self.enumtypes = _get_types(self) # <<<<<<<<<<<<<< * # get dimensions in this Group. * self.dimensions = _get_dims(self) */ - __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__get_types(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2653, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__get_types(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; @@ -24735,7 +24848,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_5Group___init__(struct __pyx_obj_7netCDF4 if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 2653, __pyx_L1_error) + __PYX_ERR(0, 2679, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -24751,17 +24864,17 @@ static int __pyx_pf_7netCDF4_8_netCDF4_5Group___init__(struct __pyx_obj_7netCDF4 __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_2); #else - __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2653, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2653, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2653, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2653, __pyx_L1_error) + __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = Py_TYPE(__pyx_t_4)->tp_iternext; @@ -24771,7 +24884,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_5Group___init__(struct __pyx_obj_7netCDF4 __Pyx_GOTREF(__pyx_t_6); index = 2; __pyx_t_2 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_4), 3) < 0) __PYX_ERR(0, 2653, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_4), 3) < 0) __PYX_ERR(0, 2679, __pyx_L1_error) __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L5_unpacking_done; @@ -24779,7 +24892,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_5Group___init__(struct __pyx_obj_7netCDF4 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 2653, __pyx_L1_error) + __PYX_ERR(0, 2679, __pyx_L1_error) __pyx_L5_unpacking_done:; } __Pyx_GIVEREF(__pyx_t_3); @@ -24798,14 +24911,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_5Group___init__(struct __pyx_obj_7netCDF4 __pyx_v_self->__pyx_base.enumtypes = __pyx_t_2; __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":2655 + /* "netCDF4/_netCDF4.pyx":2681 * self.cmptypes, self.vltypes, self.enumtypes = _get_types(self) * # get dimensions in this Group. * self.dimensions = _get_dims(self) # <<<<<<<<<<<<<< * # get variables in this Group. * self.variables = _get_vars(self) */ - __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__get_dims(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2655, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__get_dims(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx_base.dimensions); @@ -24813,14 +24926,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_5Group___init__(struct __pyx_obj_7netCDF4 __pyx_v_self->__pyx_base.dimensions = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":2657 + /* "netCDF4/_netCDF4.pyx":2683 * self.dimensions = _get_dims(self) * # get variables in this Group. * self.variables = _get_vars(self) # <<<<<<<<<<<<<< * # get groups in this Group. * self.groups = _get_grps(self) */ - __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__get_vars(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2657, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__get_vars(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2683, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx_base.variables); @@ -24828,14 +24941,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_5Group___init__(struct __pyx_obj_7netCDF4 __pyx_v_self->__pyx_base.variables = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":2659 + /* "netCDF4/_netCDF4.pyx":2685 * self.variables = _get_vars(self) * # get groups in this Group. * self.groups = _get_grps(self) # <<<<<<<<<<<<<< * else: * bytestr = _strencode(name) */ - __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__get_grps(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2659, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__get_grps(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx_base.groups); @@ -24843,7 +24956,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_5Group___init__(struct __pyx_obj_7netCDF4 __pyx_v_self->__pyx_base.groups = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":2650 + /* "netCDF4/_netCDF4.pyx":2676 * # propagate weak reference setting from parent. * self.keepweakref = parent.keepweakref * if 'id' in kwargs: # <<<<<<<<<<<<<< @@ -24853,285 +24966,248 @@ static int __pyx_pf_7netCDF4_8_netCDF4_5Group___init__(struct __pyx_obj_7netCDF4 goto __pyx_L3; } - /* "netCDF4/_netCDF4.pyx":2661 + /* "netCDF4/_netCDF4.pyx":2687 * self.groups = _get_grps(self) * else: * bytestr = _strencode(name) # <<<<<<<<<<<<<< * groupname = bytestr - * ierr = nc_def_grp(parent._grpid, groupname, &self._grpid) + * _ensure_nc_success(nc_def_grp(parent._grpid, groupname, &self._grpid)) */ /*else*/ { - __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2661, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_bytestr = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":2662 + /* "netCDF4/_netCDF4.pyx":2688 * else: * bytestr = _strencode(name) * groupname = bytestr # <<<<<<<<<<<<<< - * ierr = nc_def_grp(parent._grpid, groupname, &self._grpid) - * if ierr != NC_NOERR: + * _ensure_nc_success(nc_def_grp(parent._grpid, groupname, &self._grpid)) + * self.cmptypes = OrderedDict() */ - __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 2662, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 2688, __pyx_L1_error) __pyx_v_groupname = __pyx_t_10; - /* "netCDF4/_netCDF4.pyx":2663 + /* "netCDF4/_netCDF4.pyx":2689 * bytestr = _strencode(name) * groupname = bytestr - * ierr = nc_def_grp(parent._grpid, groupname, &self._grpid) # <<<<<<<<<<<<<< - * if ierr != NC_NOERR: - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) - */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parent, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2663, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2663, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_ierr = nc_def_grp(__pyx_t_5, __pyx_v_groupname, (&__pyx_v_self->__pyx_base._grpid)); - - /* "netCDF4/_netCDF4.pyx":2664 - * groupname = bytestr - * ierr = nc_def_grp(parent._grpid, groupname, &self._grpid) - * if ierr != NC_NOERR: # <<<<<<<<<<<<<< - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) - * self.cmptypes = OrderedDict() - */ - __pyx_t_8 = ((__pyx_v_ierr != NC_NOERR) != 0); - if (__pyx_t_8) { - - /* "netCDF4/_netCDF4.pyx":2665 - * ierr = nc_def_grp(parent._grpid, groupname, &self._grpid) - * if ierr != NC_NOERR: - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< + * _ensure_nc_success(nc_def_grp(parent._grpid, groupname, &self._grpid)) # <<<<<<<<<<<<<< * self.cmptypes = OrderedDict() * self.vltypes = OrderedDict() */ - __pyx_t_10 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_10, 0, strlen(__pyx_t_10), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2665, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2665, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(__pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2665, __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, 2665, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parent, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2689, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2689, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyInt_From_int(nc_def_grp(__pyx_t_5, __pyx_v_groupname, (&__pyx_v_self->__pyx_base._grpid))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2689, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_f_7netCDF4_8_netCDF4__ensure_nc_success(__pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2689, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":2664 + /* "netCDF4/_netCDF4.pyx":2690 * groupname = bytestr - * ierr = nc_def_grp(parent._grpid, groupname, &self._grpid) - * if ierr != NC_NOERR: # <<<<<<<<<<<<<< - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) - * self.cmptypes = OrderedDict() - */ - } - - /* "netCDF4/_netCDF4.pyx":2666 - * if ierr != NC_NOERR: - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) + * _ensure_nc_success(nc_def_grp(parent._grpid, groupname, &self._grpid)) * self.cmptypes = OrderedDict() # <<<<<<<<<<<<<< * self.vltypes = OrderedDict() * self.enumtypes = OrderedDict() */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2666, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2690, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); + __Pyx_DECREF_SET(__pyx_t_1, function); } } if (__pyx_t_6) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2666, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2690, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2666, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2690, __pyx_L1_error) } - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->__pyx_base.cmptypes); __Pyx_DECREF(__pyx_v_self->__pyx_base.cmptypes); - __pyx_v_self->__pyx_base.cmptypes = __pyx_t_1; - __pyx_t_1 = 0; + __pyx_v_self->__pyx_base.cmptypes = __pyx_t_2; + __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":2667 - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) + /* "netCDF4/_netCDF4.pyx":2691 + * _ensure_nc_success(nc_def_grp(parent._grpid, groupname, &self._grpid)) * self.cmptypes = OrderedDict() * self.vltypes = OrderedDict() # <<<<<<<<<<<<<< * self.enumtypes = OrderedDict() * self.dimensions = OrderedDict() */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2667, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2691, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); + __Pyx_DECREF_SET(__pyx_t_1, function); } } if (__pyx_t_6) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2667, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2691, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2667, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2691, __pyx_L1_error) } - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->__pyx_base.vltypes); __Pyx_DECREF(__pyx_v_self->__pyx_base.vltypes); - __pyx_v_self->__pyx_base.vltypes = __pyx_t_1; - __pyx_t_1 = 0; + __pyx_v_self->__pyx_base.vltypes = __pyx_t_2; + __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":2668 + /* "netCDF4/_netCDF4.pyx":2692 * self.cmptypes = OrderedDict() * self.vltypes = OrderedDict() * self.enumtypes = OrderedDict() # <<<<<<<<<<<<<< * self.dimensions = OrderedDict() * self.variables = OrderedDict() */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2668, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2692, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); + __Pyx_DECREF_SET(__pyx_t_1, function); } } if (__pyx_t_6) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2668, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2692, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2668, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2692, __pyx_L1_error) } - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->__pyx_base.enumtypes); __Pyx_DECREF(__pyx_v_self->__pyx_base.enumtypes); - __pyx_v_self->__pyx_base.enumtypes = __pyx_t_1; - __pyx_t_1 = 0; + __pyx_v_self->__pyx_base.enumtypes = __pyx_t_2; + __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":2669 + /* "netCDF4/_netCDF4.pyx":2693 * self.vltypes = OrderedDict() * self.enumtypes = OrderedDict() * self.dimensions = OrderedDict() # <<<<<<<<<<<<<< * self.variables = OrderedDict() * self.groups = OrderedDict() */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2669, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2693, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); + __Pyx_DECREF_SET(__pyx_t_1, function); } } if (__pyx_t_6) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2669, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2693, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2669, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2693, __pyx_L1_error) } - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->__pyx_base.dimensions); __Pyx_DECREF(__pyx_v_self->__pyx_base.dimensions); - __pyx_v_self->__pyx_base.dimensions = __pyx_t_1; - __pyx_t_1 = 0; + __pyx_v_self->__pyx_base.dimensions = __pyx_t_2; + __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":2670 + /* "netCDF4/_netCDF4.pyx":2694 * self.enumtypes = OrderedDict() * self.dimensions = OrderedDict() * self.variables = OrderedDict() # <<<<<<<<<<<<<< * self.groups = OrderedDict() * */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2670, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2694, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); + __Pyx_DECREF_SET(__pyx_t_1, function); } } if (__pyx_t_6) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2670, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2694, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2670, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2694, __pyx_L1_error) } - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->__pyx_base.variables); __Pyx_DECREF(__pyx_v_self->__pyx_base.variables); - __pyx_v_self->__pyx_base.variables = __pyx_t_1; - __pyx_t_1 = 0; + __pyx_v_self->__pyx_base.variables = __pyx_t_2; + __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":2671 + /* "netCDF4/_netCDF4.pyx":2695 * self.dimensions = OrderedDict() * self.variables = OrderedDict() * self.groups = OrderedDict() # <<<<<<<<<<<<<< * * def close(self): */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2671, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2695, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); + __Pyx_DECREF_SET(__pyx_t_1, function); } } if (__pyx_t_6) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2671, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2695, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2671, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2695, __pyx_L1_error) } - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->__pyx_base.groups); __Pyx_DECREF(__pyx_v_self->__pyx_base.groups); - __pyx_v_self->__pyx_base.groups = __pyx_t_1; - __pyx_t_1 = 0; + __pyx_v_self->__pyx_base.groups = __pyx_t_2; + __pyx_t_2 = 0; } __pyx_L3:; - /* "netCDF4/_netCDF4.pyx":2623 + /* "netCDF4/_netCDF4.pyx":2650 * __pdoc__['Group.name']=\ * """A string describing the name of the `netCDF4.Group`.""" * def __init__(self, parent, name, **kwargs): # <<<<<<<<<<<<<< @@ -25156,7 +25232,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_5Group___init__(struct __pyx_obj_7netCDF4 return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2673 +/* "netCDF4/_netCDF4.pyx":2697 * self.groups = OrderedDict() * * def close(self): # <<<<<<<<<<<<<< @@ -25184,20 +25260,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_5Group_2close(CYTHON_UNUSED struct PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("close", 0); - /* "netCDF4/_netCDF4.pyx":2679 + /* "netCDF4/_netCDF4.pyx":2703 * overrides `netCDF4.Dataset` close method which does not apply to `netCDF4.Group` * instances, raises IOError.""" * raise IOError('cannot close a `netCDF4.Group` (only applies to Dataset)') # <<<<<<<<<<<<<< * * def _getname(self): */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2679, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2703, __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, 2679, __pyx_L1_error) + __PYX_ERR(0, 2703, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":2673 + /* "netCDF4/_netCDF4.pyx":2697 * self.groups = OrderedDict() * * def close(self): # <<<<<<<<<<<<<< @@ -25215,12 +25291,12 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_5Group_2close(CYTHON_UNUSED struct return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2681 +/* "netCDF4/_netCDF4.pyx":2705 * raise IOError('cannot close a `netCDF4.Group` (only applies to Dataset)') * * def _getname(self): # <<<<<<<<<<<<<< * # private method to get name associated with instance. - * cdef int err + * cdef int ierr */ /* Python wrapper */ @@ -25237,27 +25313,25 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_5Group_5_getname(PyObject *__pyx_v_ } static PyObject *__pyx_pf_7netCDF4_8_netCDF4_5Group_4_getname(struct __pyx_obj_7netCDF4_8_netCDF4_Group *__pyx_v_self) { - char __pyx_v_namstring[(NC_MAX_NAME + 1)]; int __pyx_v_ierr; + char __pyx_v_namstring[(NC_MAX_NAME + 1)]; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations - int __pyx_t_1; - char *__pyx_t_2; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; + int __pyx_t_6; PyObject *__pyx_t_7 = NULL; - int __pyx_t_8; - PyObject *__pyx_t_9 = NULL; __Pyx_RefNannySetupContext("_getname", 0); - /* "netCDF4/_netCDF4.pyx":2685 - * cdef int err + /* "netCDF4/_netCDF4.pyx":2709 + * cdef int ierr * cdef char namstring[NC_MAX_NAME+1] * with nogil: # <<<<<<<<<<<<<< * ierr = nc_inq_grpname(self._grpid, namstring) - * if ierr != NC_NOERR: + * _ensure_nc_success(ierr) */ { #ifdef WITH_THREAD @@ -25266,22 +25340,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_5Group_4_getname(struct __pyx_obj_7 #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":2686 + /* "netCDF4/_netCDF4.pyx":2710 * cdef char namstring[NC_MAX_NAME+1] * with nogil: * ierr = nc_inq_grpname(self._grpid, namstring) # <<<<<<<<<<<<<< - * if ierr != NC_NOERR: - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) + * _ensure_nc_success(ierr) + * return namstring.decode(default_encoding,unicode_error) */ __pyx_v_ierr = nc_inq_grpname(__pyx_v_self->__pyx_base._grpid, __pyx_v_namstring); } - /* "netCDF4/_netCDF4.pyx":2685 - * cdef int err + /* "netCDF4/_netCDF4.pyx":2709 + * cdef int ierr * cdef char namstring[NC_MAX_NAME+1] * with nogil: # <<<<<<<<<<<<<< * ierr = nc_inq_grpname(self._grpid, namstring) - * if ierr != NC_NOERR: + * _ensure_nc_success(ierr) */ /*finally:*/ { /*normal exit:*/{ @@ -25294,134 +25368,106 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_5Group_4_getname(struct __pyx_obj_7 } } - /* "netCDF4/_netCDF4.pyx":2687 + /* "netCDF4/_netCDF4.pyx":2711 * with nogil: * ierr = nc_inq_grpname(self._grpid, namstring) - * if ierr != NC_NOERR: # <<<<<<<<<<<<<< - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) - * return namstring.decode(default_encoding,unicode_error) - */ - __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0); - if (__pyx_t_1) { - - /* "netCDF4/_netCDF4.pyx":2688 - * ierr = nc_inq_grpname(self._grpid, namstring) - * if ierr != NC_NOERR: - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< + * _ensure_nc_success(ierr) # <<<<<<<<<<<<<< * return namstring.decode(default_encoding,unicode_error) * */ - __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2688, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2688, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_INCREF(__pyx_t_3); - __Pyx_GIVEREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2688, __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, 2688, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ierr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2711, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_f_7netCDF4_8_netCDF4__ensure_nc_success(__pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2711, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":2687 - * with nogil: + /* "netCDF4/_netCDF4.pyx":2712 * ierr = nc_inq_grpname(self._grpid, namstring) - * if ierr != NC_NOERR: # <<<<<<<<<<<<<< - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) - * return namstring.decode(default_encoding,unicode_error) - */ - } - - /* "netCDF4/_netCDF4.pyx":2689 - * if ierr != NC_NOERR: - * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) + * _ensure_nc_success(ierr) * return namstring.decode(default_encoding,unicode_error) # <<<<<<<<<<<<<< * * property name: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2689, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_decode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2689, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __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, 2689, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2712, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_decode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2712, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __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, 2712, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2689, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = NULL; - __pyx_t_8 = 0; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_7)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_7); + __pyx_t_5 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_5, function); - __pyx_t_8 = 1; + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_4, __pyx_t_6}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2689, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_3); + if (PyFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_t_4}; + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2712, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __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_6); __pyx_t_6 = 0; } else #endif #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_4, __pyx_t_6}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2689, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_t_4}; + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2712, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __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_6); __pyx_t_6 = 0; } else #endif { - __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2689, __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; + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2712, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_5) { + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; } + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_4); - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4); + __pyx_t_1 = 0; __pyx_t_4 = 0; - __pyx_t_6 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2689, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2712, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_r = __pyx_t_3; - __pyx_t_3 = 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":2681 + /* "netCDF4/_netCDF4.pyx":2705 * raise IOError('cannot close a `netCDF4.Group` (only applies to Dataset)') * * def _getname(self): # <<<<<<<<<<<<<< * # private method to get name associated with instance. - * cdef int err + * cdef int ierr */ /* function exit code */ __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("netCDF4._netCDF4.Group._getname", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -25430,7 +25476,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_5Group_4_getname(struct __pyx_obj_7 return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2693 +/* "netCDF4/_netCDF4.pyx":2716 * property name: * """string name of Group instance""" * def __get__(self): # <<<<<<<<<<<<<< @@ -25459,7 +25505,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_5Group_4name___get__(struct __pyx_o PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "netCDF4/_netCDF4.pyx":2694 + /* "netCDF4/_netCDF4.pyx":2717 * """string name of Group instance""" * def __get__(self): * return self._getname() # <<<<<<<<<<<<<< @@ -25467,7 +25513,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_5Group_4name___get__(struct __pyx_o * raise AttributeError("name cannot be altered") */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2694, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2717, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -25480,10 +25526,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_5Group_4name___get__(struct __pyx_o } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2694, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2717, __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, 2694, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2717, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -25491,7 +25537,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_5Group_4name___get__(struct __pyx_o __pyx_t_1 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":2693 + /* "netCDF4/_netCDF4.pyx":2716 * property name: * """string name of Group instance""" * def __get__(self): # <<<<<<<<<<<<<< @@ -25512,7 +25558,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_5Group_4name___get__(struct __pyx_o return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2695 +/* "netCDF4/_netCDF4.pyx":2718 * def __get__(self): * return self._getname() * def __set__(self,value): # <<<<<<<<<<<<<< @@ -25539,20 +25585,20 @@ static int __pyx_pf_7netCDF4_8_netCDF4_5Group_4name_2__set__(CYTHON_UNUSED struc PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__set__", 0); - /* "netCDF4/_netCDF4.pyx":2696 + /* "netCDF4/_netCDF4.pyx":2719 * return self._getname() * def __set__(self,value): * raise AttributeError("name cannot be altered") # <<<<<<<<<<<<<< * * */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2696, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2719, __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, 2696, __pyx_L1_error) + __PYX_ERR(0, 2719, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":2695 + /* "netCDF4/_netCDF4.pyx":2718 * def __get__(self): * return self._getname() * def __set__(self,value): # <<<<<<<<<<<<<< @@ -25569,7 +25615,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_5Group_4name_2__set__(CYTHON_UNUSED struc return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2724 +/* "netCDF4/_netCDF4.pyx":2747 * `netCDF4.Variable` instance with `netCDF4.Dataset.createVariable`.""" * * def __init__(self, grp, name, size=None, **kwargs): # <<<<<<<<<<<<<< @@ -25615,7 +25661,7 @@ static int __pyx_pw_7netCDF4_8_netCDF4_9Dimension_1__init__(PyObject *__pyx_v_se case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); __PYX_ERR(0, 2724, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); __PYX_ERR(0, 2747, __pyx_L3_error) } case 2: if (kw_args > 0) { @@ -25624,7 +25670,7 @@ static int __pyx_pw_7netCDF4_8_netCDF4_9Dimension_1__init__(PyObject *__pyx_v_se } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2724, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2747, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -25641,7 +25687,7 @@ static int __pyx_pw_7netCDF4_8_netCDF4_9Dimension_1__init__(PyObject *__pyx_v_se } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2724, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2747, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_AddTraceback("netCDF4._netCDF4.Dimension.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -25674,42 +25720,42 @@ static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension___init__(struct __pyx_obj_7net size_t __pyx_t_9; __Pyx_RefNannySetupContext("__init__", 0); - /* "netCDF4/_netCDF4.pyx":2743 + /* "netCDF4/_netCDF4.pyx":2766 * cdef char *dimname * cdef size_t lendim * self._grpid = grp._grpid # <<<<<<<<<<<<<< * # make a weakref to group to avoid circular ref (issue 218) * # keep strong reference the default behaviour (issue 251) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2743, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2766, __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, 2743, __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, 2766, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->_grpid = __pyx_t_2; - /* "netCDF4/_netCDF4.pyx":2746 + /* "netCDF4/_netCDF4.pyx":2769 * # make a weakref to group to avoid circular ref (issue 218) * # keep strong reference the default behaviour (issue 251) * if grp.keepweakref: # <<<<<<<<<<<<<< * self._grp = weakref.proxy(grp) * else: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_keepweakref); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2746, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_keepweakref); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2769, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2746, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2769, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":2747 + /* "netCDF4/_netCDF4.pyx":2770 * # keep strong reference the default behaviour (issue 251) * if grp.keepweakref: * self._grp = weakref.proxy(grp) # <<<<<<<<<<<<<< * else: * self._grp = grp */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_weakref); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2747, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_weakref); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2770, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_proxy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2747, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_proxy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2770, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -25723,13 +25769,13 @@ static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension___init__(struct __pyx_obj_7net } } if (!__pyx_t_4) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_grp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2747, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_grp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2770, __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_grp}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2747, __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, 2770, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -25737,19 +25783,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension___init__(struct __pyx_obj_7net #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_grp}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2747, __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, 2770, __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, 2747, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2770, __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_grp); __Pyx_GIVEREF(__pyx_v_grp); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_grp); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2747, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2770, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -25761,7 +25807,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension___init__(struct __pyx_obj_7net __pyx_v_self->_grp = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":2746 + /* "netCDF4/_netCDF4.pyx":2769 * # make a weakref to group to avoid circular ref (issue 218) * # keep strong reference the default behaviour (issue 251) * if grp.keepweakref: # <<<<<<<<<<<<<< @@ -25771,7 +25817,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension___init__(struct __pyx_obj_7net goto __pyx_L3; } - /* "netCDF4/_netCDF4.pyx":2749 + /* "netCDF4/_netCDF4.pyx":2772 * self._grp = weakref.proxy(grp) * else: * self._grp = grp # <<<<<<<<<<<<<< @@ -25787,14 +25833,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension___init__(struct __pyx_obj_7net } __pyx_L3:; - /* "netCDF4/_netCDF4.pyx":2750 + /* "netCDF4/_netCDF4.pyx":2773 * else: * self._grp = grp * self._data_model = grp.data_model # <<<<<<<<<<<<<< * self._name = name * if 'id' in kwargs: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2750, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2773, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_data_model); @@ -25802,7 +25848,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension___init__(struct __pyx_obj_7net __pyx_v_self->_data_model = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":2751 + /* "netCDF4/_netCDF4.pyx":2774 * self._grp = grp * self._data_model = grp.data_model * self._name = name # <<<<<<<<<<<<<< @@ -25815,31 +25861,31 @@ static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension___init__(struct __pyx_obj_7net __Pyx_DECREF(__pyx_v_self->_name); __pyx_v_self->_name = __pyx_v_name; - /* "netCDF4/_netCDF4.pyx":2752 + /* "netCDF4/_netCDF4.pyx":2775 * self._data_model = grp.data_model * self._name = name * if 'id' in kwargs: # <<<<<<<<<<<<<< * self._dimid = kwargs['id'] * else: */ - __pyx_t_3 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_id, __pyx_v_kwargs, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2752, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_id, __pyx_v_kwargs, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2775, __pyx_L1_error) __pyx_t_7 = (__pyx_t_3 != 0); if (__pyx_t_7) { - /* "netCDF4/_netCDF4.pyx":2753 + /* "netCDF4/_netCDF4.pyx":2776 * self._name = name * if 'id' in kwargs: * self._dimid = kwargs['id'] # <<<<<<<<<<<<<< * else: * bytestr = _strencode(name) */ - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_s_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2753, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_s_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2776, __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, 2753, __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, 2776, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->_dimid = __pyx_t_2; - /* "netCDF4/_netCDF4.pyx":2752 + /* "netCDF4/_netCDF4.pyx":2775 * self._data_model = grp.data_model * self._name = name * if 'id' in kwargs: # <<<<<<<<<<<<<< @@ -25849,7 +25895,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension___init__(struct __pyx_obj_7net goto __pyx_L4; } - /* "netCDF4/_netCDF4.pyx":2755 + /* "netCDF4/_netCDF4.pyx":2778 * self._dimid = kwargs['id'] * else: * bytestr = _strencode(name) # <<<<<<<<<<<<<< @@ -25857,22 +25903,22 @@ static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension___init__(struct __pyx_obj_7net * if size is not None: */ /*else*/ { - __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2755, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2778, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_bytestr = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":2756 + /* "netCDF4/_netCDF4.pyx":2779 * else: * bytestr = _strencode(name) * dimname = bytestr # <<<<<<<<<<<<<< * if size is not None: * lendim = size */ - __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 2756, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 2779, __pyx_L1_error) __pyx_v_dimname = __pyx_t_8; - /* "netCDF4/_netCDF4.pyx":2757 + /* "netCDF4/_netCDF4.pyx":2780 * bytestr = _strencode(name) * dimname = bytestr * if size is not None: # <<<<<<<<<<<<<< @@ -25883,17 +25929,17 @@ static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension___init__(struct __pyx_obj_7net __pyx_t_3 = (__pyx_t_7 != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":2758 + /* "netCDF4/_netCDF4.pyx":2781 * dimname = bytestr * if size is not None: * lendim = size # <<<<<<<<<<<<<< * else: * lendim = NC_UNLIMITED */ - __pyx_t_9 = __Pyx_PyInt_As_size_t(__pyx_v_size); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2758, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_As_size_t(__pyx_v_size); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2781, __pyx_L1_error) __pyx_v_lendim = __pyx_t_9; - /* "netCDF4/_netCDF4.pyx":2757 + /* "netCDF4/_netCDF4.pyx":2780 * bytestr = _strencode(name) * dimname = bytestr * if size is not None: # <<<<<<<<<<<<<< @@ -25903,7 +25949,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension___init__(struct __pyx_obj_7net goto __pyx_L5; } - /* "netCDF4/_netCDF4.pyx":2760 + /* "netCDF4/_netCDF4.pyx":2783 * lendim = size * else: * lendim = NC_UNLIMITED # <<<<<<<<<<<<<< @@ -25915,19 +25961,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension___init__(struct __pyx_obj_7net } __pyx_L5:; - /* "netCDF4/_netCDF4.pyx":2761 + /* "netCDF4/_netCDF4.pyx":2784 * else: * lendim = NC_UNLIMITED * if grp.data_model != 'NETCDF4': grp._redef() # <<<<<<<<<<<<<< * ierr = nc_def_dim(self._grpid, dimname, lendim, &self._dimid) * if grp.data_model != 'NETCDF4': grp._enddef() */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2761, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2784, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2761, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2784, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_redef); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2761, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_redef); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2784, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -25940,17 +25986,17 @@ static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension___init__(struct __pyx_obj_7net } } if (__pyx_t_6) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2761, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2784, __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, 2761, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2784, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "netCDF4/_netCDF4.pyx":2762 + /* "netCDF4/_netCDF4.pyx":2785 * lendim = NC_UNLIMITED * if grp.data_model != 'NETCDF4': grp._redef() * ierr = nc_def_dim(self._grpid, dimname, lendim, &self._dimid) # <<<<<<<<<<<<<< @@ -25959,19 +26005,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension___init__(struct __pyx_obj_7net */ __pyx_v_ierr = nc_def_dim(__pyx_v_self->_grpid, __pyx_v_dimname, __pyx_v_lendim, (&__pyx_v_self->_dimid)); - /* "netCDF4/_netCDF4.pyx":2763 + /* "netCDF4/_netCDF4.pyx":2786 * if grp.data_model != 'NETCDF4': grp._redef() * ierr = nc_def_dim(self._grpid, dimname, lendim, &self._dimid) * if grp.data_model != 'NETCDF4': grp._enddef() # <<<<<<<<<<<<<< * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2763, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2786, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2763, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2786, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2763, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2786, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -25984,17 +26030,17 @@ static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension___init__(struct __pyx_obj_7net } } if (__pyx_t_6) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2763, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2786, __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, 2763, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2786, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "netCDF4/_netCDF4.pyx":2764 + /* "netCDF4/_netCDF4.pyx":2787 * ierr = nc_def_dim(self._grpid, dimname, lendim, &self._dimid) * if grp.data_model != 'NETCDF4': grp._enddef() * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -26004,7 +26050,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension___init__(struct __pyx_obj_7net __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":2765 + /* "netCDF4/_netCDF4.pyx":2788 * if grp.data_model != 'NETCDF4': grp._enddef() * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -26012,22 +26058,22 @@ static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension___init__(struct __pyx_obj_7net * def _getname(self): */ __pyx_t_8 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_8, 0, strlen(__pyx_t_8), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2765, __pyx_L1_error) + __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_8, 0, strlen(__pyx_t_8), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2788, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2765, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2788, __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, 2765, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2788, __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, 2765, __pyx_L1_error) + __PYX_ERR(0, 2788, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":2764 + /* "netCDF4/_netCDF4.pyx":2787 * ierr = nc_def_dim(self._grpid, dimname, lendim, &self._dimid) * if grp.data_model != 'NETCDF4': grp._enddef() * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -26038,7 +26084,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension___init__(struct __pyx_obj_7net } __pyx_L4:; - /* "netCDF4/_netCDF4.pyx":2724 + /* "netCDF4/_netCDF4.pyx":2747 * `netCDF4.Variable` instance with `netCDF4.Dataset.createVariable`.""" * * def __init__(self, grp, name, size=None, **kwargs): # <<<<<<<<<<<<<< @@ -26062,7 +26108,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension___init__(struct __pyx_obj_7net return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2767 +/* "netCDF4/_netCDF4.pyx":2790 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * * def _getname(self): # <<<<<<<<<<<<<< @@ -26100,20 +26146,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_2_getname(struct __pyx_o PyObject *__pyx_t_9 = NULL; __Pyx_RefNannySetupContext("_getname", 0); - /* "netCDF4/_netCDF4.pyx":2771 + /* "netCDF4/_netCDF4.pyx":2794 * cdef int err, _grpid * cdef char namstring[NC_MAX_NAME+1] * _grpid = self._grp._grpid # <<<<<<<<<<<<<< * with nogil: * ierr = nc_inq_dimname(_grpid, self._dimid, namstring) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2771, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2794, __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, 2771, __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, 2794, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v__grpid = __pyx_t_2; - /* "netCDF4/_netCDF4.pyx":2772 + /* "netCDF4/_netCDF4.pyx":2795 * cdef char namstring[NC_MAX_NAME+1] * _grpid = self._grp._grpid * with nogil: # <<<<<<<<<<<<<< @@ -26127,7 +26173,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_2_getname(struct __pyx_o #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":2773 + /* "netCDF4/_netCDF4.pyx":2796 * _grpid = self._grp._grpid * with nogil: * ierr = nc_inq_dimname(_grpid, self._dimid, namstring) # <<<<<<<<<<<<<< @@ -26137,7 +26183,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_2_getname(struct __pyx_o __pyx_v_ierr = nc_inq_dimname(__pyx_v__grpid, __pyx_v_self->_dimid, __pyx_v_namstring); } - /* "netCDF4/_netCDF4.pyx":2772 + /* "netCDF4/_netCDF4.pyx":2795 * cdef char namstring[NC_MAX_NAME+1] * _grpid = self._grp._grpid * with nogil: # <<<<<<<<<<<<<< @@ -26155,7 +26201,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_2_getname(struct __pyx_o } } - /* "netCDF4/_netCDF4.pyx":2774 + /* "netCDF4/_netCDF4.pyx":2797 * with nogil: * ierr = nc_inq_dimname(_grpid, self._dimid, namstring) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -26165,7 +26211,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_2_getname(struct __pyx_o __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":2775 + /* "netCDF4/_netCDF4.pyx":2798 * ierr = nc_inq_dimname(_grpid, self._dimid, namstring) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -26173,22 +26219,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_2_getname(struct __pyx_o * */ __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, 2775, __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, 2798, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2775, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2798, __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, 2775, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2798, __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, 2775, __pyx_L1_error) + __PYX_ERR(0, 2798, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":2774 + /* "netCDF4/_netCDF4.pyx":2797 * with nogil: * ierr = nc_inq_dimname(_grpid, self._dimid, namstring) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -26197,7 +26243,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_2_getname(struct __pyx_o */ } - /* "netCDF4/_netCDF4.pyx":2776 + /* "netCDF4/_netCDF4.pyx":2799 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * return namstring.decode(default_encoding,unicode_error) # <<<<<<<<<<<<<< @@ -26205,14 +26251,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_2_getname(struct __pyx_o * property name: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2776, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2799, __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, 2776, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2799, __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, 2776, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2799, __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, 2776, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2799, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; __pyx_t_2 = 0; @@ -26229,7 +26275,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_2_getname(struct __pyx_o #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, 2776, __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, 2799, __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; @@ -26239,7 +26285,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_2_getname(struct __pyx_o #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, 2776, __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, 2799, __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; @@ -26247,7 +26293,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_2_getname(struct __pyx_o } else #endif { - __pyx_t_9 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2776, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2799, __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; @@ -26258,7 +26304,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_2_getname(struct __pyx_o 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, 2776, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2799, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -26267,7 +26313,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_2_getname(struct __pyx_o __pyx_t_1 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":2767 + /* "netCDF4/_netCDF4.pyx":2790 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * * def _getname(self): # <<<<<<<<<<<<<< @@ -26291,7 +26337,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_2_getname(struct __pyx_o return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2780 +/* "netCDF4/_netCDF4.pyx":2803 * property name: * """string name of Dimension instance""" * def __get__(self): # <<<<<<<<<<<<<< @@ -26320,7 +26366,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_4name___get__(struct __p PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "netCDF4/_netCDF4.pyx":2781 + /* "netCDF4/_netCDF4.pyx":2804 * """string name of Dimension instance""" * def __get__(self): * return self._getname() # <<<<<<<<<<<<<< @@ -26328,7 +26374,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_4name___get__(struct __p * raise AttributeError("name cannot be altered") */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2781, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2804, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -26341,10 +26387,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_4name___get__(struct __p } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2781, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2804, __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, 2781, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2804, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -26352,7 +26398,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_4name___get__(struct __p __pyx_t_1 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":2780 + /* "netCDF4/_netCDF4.pyx":2803 * property name: * """string name of Dimension instance""" * def __get__(self): # <<<<<<<<<<<<<< @@ -26373,7 +26419,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_4name___get__(struct __p return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2782 +/* "netCDF4/_netCDF4.pyx":2805 * def __get__(self): * return self._getname() * def __set__(self,value): # <<<<<<<<<<<<<< @@ -26400,20 +26446,20 @@ static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension_4name_2__set__(CYTHON_UNUSED s PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__set__", 0); - /* "netCDF4/_netCDF4.pyx":2783 + /* "netCDF4/_netCDF4.pyx":2806 * return self._getname() * def __set__(self,value): * raise AttributeError("name cannot be altered") # <<<<<<<<<<<<<< * * property size: */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2783, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2806, __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, 2783, __pyx_L1_error) + __PYX_ERR(0, 2806, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":2782 + /* "netCDF4/_netCDF4.pyx":2805 * def __get__(self): * return self._getname() * def __set__(self,value): # <<<<<<<<<<<<<< @@ -26430,7 +26476,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension_4name_2__set__(CYTHON_UNUSED s return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2787 +/* "netCDF4/_netCDF4.pyx":2810 * property size: * """current size of Dimension (calls `len` on Dimension instance)""" * def __get__(self): # <<<<<<<<<<<<<< @@ -26458,7 +26504,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_4size___get__(struct __p PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "netCDF4/_netCDF4.pyx":2788 + /* "netCDF4/_netCDF4.pyx":2811 * """current size of Dimension (calls `len` on Dimension instance)""" * def __get__(self): * return len(self) # <<<<<<<<<<<<<< @@ -26466,14 +26512,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_4size___get__(struct __p * raise AttributeError("size cannot be altered") */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 2788, __pyx_L1_error) - __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2788, __pyx_L1_error) + __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 2811, __pyx_L1_error) + __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2811, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":2787 + /* "netCDF4/_netCDF4.pyx":2810 * property size: * """current size of Dimension (calls `len` on Dimension instance)""" * def __get__(self): # <<<<<<<<<<<<<< @@ -26492,7 +26538,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_4size___get__(struct __p return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2789 +/* "netCDF4/_netCDF4.pyx":2812 * def __get__(self): * return len(self) * def __set__(self,value): # <<<<<<<<<<<<<< @@ -26519,20 +26565,20 @@ static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension_4size_2__set__(CYTHON_UNUSED s PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__set__", 0); - /* "netCDF4/_netCDF4.pyx":2790 + /* "netCDF4/_netCDF4.pyx":2813 * return len(self) * def __set__(self,value): * raise AttributeError("size cannot be altered") # <<<<<<<<<<<<<< * * def __repr__(self): */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2790, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__39, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2813, __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, 2790, __pyx_L1_error) + __PYX_ERR(0, 2813, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":2789 + /* "netCDF4/_netCDF4.pyx":2812 * def __get__(self): * return len(self) * def __set__(self,value): # <<<<<<<<<<<<<< @@ -26549,7 +26595,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension_4size_2__set__(CYTHON_UNUSED s return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2792 +/* "netCDF4/_netCDF4.pyx":2815 * raise AttributeError("size cannot be altered") * * def __repr__(self): # <<<<<<<<<<<<<< @@ -26581,20 +26627,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_4__repr__(struct __pyx_o PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - /* "netCDF4/_netCDF4.pyx":2793 + /* "netCDF4/_netCDF4.pyx":2816 * * 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, 2793, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2816, __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, 2793, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2816, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":2794 + /* "netCDF4/_netCDF4.pyx":2817 * def __repr__(self): * if python3: * return self.__unicode__() # <<<<<<<<<<<<<< @@ -26602,7 +26648,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_4__repr__(struct __pyx_o * 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, 2794, __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, 2817, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -26615,10 +26661,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_4__repr__(struct __pyx_o } } if (__pyx_t_4) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2794, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2817, __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, 2794, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2817, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -26626,7 +26672,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_4__repr__(struct __pyx_o __pyx_t_1 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":2793 + /* "netCDF4/_netCDF4.pyx":2816 * * def __repr__(self): * if python3: # <<<<<<<<<<<<<< @@ -26635,7 +26681,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_4__repr__(struct __pyx_o */ } - /* "netCDF4/_netCDF4.pyx":2796 + /* "netCDF4/_netCDF4.pyx":2819 * return self.__unicode__() * else: * return unicode(self).encode(default_encoding) # <<<<<<<<<<<<<< @@ -26644,18 +26690,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_4__repr__(struct __pyx_o */ /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2796, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2819, __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, 2796, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2819, __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, 2796, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2819, __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, 2796, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2819, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -26668,14 +26714,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_4__repr__(struct __pyx_o } } if (!__pyx_t_5) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2796, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2819, __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, 2796, __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, 2819, __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; @@ -26684,20 +26730,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_4__repr__(struct __pyx_o #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, 2796, __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, 2819, __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, 2796, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2819, __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, 2796, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2819, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -26708,7 +26754,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_4__repr__(struct __pyx_o goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":2792 + /* "netCDF4/_netCDF4.pyx":2815 * raise AttributeError("size cannot be altered") * * def __repr__(self): # <<<<<<<<<<<<<< @@ -26731,7 +26777,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_4__repr__(struct __pyx_o return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2798 +/* "netCDF4/_netCDF4.pyx":2821 * return unicode(self).encode(default_encoding) * * def __unicode__(self): # <<<<<<<<<<<<<< @@ -26763,7 +26809,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_6__unicode__(struct __py Py_ssize_t __pyx_t_6; __Pyx_RefNannySetupContext("__unicode__", 0); - /* "netCDF4/_netCDF4.pyx":2799 + /* "netCDF4/_netCDF4.pyx":2822 * * def __unicode__(self): * if not dir(self._grp): # <<<<<<<<<<<<<< @@ -26772,15 +26818,15 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_6__unicode__(struct __py */ __pyx_t_1 = __pyx_v_self->_grp; __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = PyObject_Dir(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2799, __pyx_L1_error) + __pyx_t_2 = PyObject_Dir(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2822, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2799, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2822, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = ((!__pyx_t_3) != 0); if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":2800 + /* "netCDF4/_netCDF4.pyx":2823 * def __unicode__(self): * if not dir(self._grp): * return 'Dimension object no longer valid' # <<<<<<<<<<<<<< @@ -26792,7 +26838,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_6__unicode__(struct __py __pyx_r = __pyx_kp_s_Dimension_object_no_longer_valid; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":2799 + /* "netCDF4/_netCDF4.pyx":2822 * * def __unicode__(self): * if not dir(self._grp): # <<<<<<<<<<<<<< @@ -26801,14 +26847,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_6__unicode__(struct __py */ } - /* "netCDF4/_netCDF4.pyx":2801 + /* "netCDF4/_netCDF4.pyx":2824 * if not dir(self._grp): * return 'Dimension object no longer valid' * if self.isunlimited(): # <<<<<<<<<<<<<< * return repr(type(self))+" (unlimited): name = '%s', size = %s\n" % (self._name,len(self)) * else: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_isunlimited); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2801, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_isunlimited); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2824, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -26821,18 +26867,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_6__unicode__(struct __py } } if (__pyx_t_5) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2801, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2824, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2801, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2824, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2801, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2824, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":2802 + /* "netCDF4/_netCDF4.pyx":2825 * return 'Dimension object no longer valid' * if self.isunlimited(): * return repr(type(self))+" (unlimited): name = '%s', size = %s\n" % (self._name,len(self)) # <<<<<<<<<<<<<< @@ -26840,12 +26886,12 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_6__unicode__(struct __py * return repr(type(self))+": name = '%s', size = %s\n" % (self._name,len(self)) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyObject_Repr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2802, __pyx_L1_error) + __pyx_t_2 = PyObject_Repr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2825, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = PyObject_Length(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(0, 2802, __pyx_L1_error) - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2802, __pyx_L1_error) + __pyx_t_6 = PyObject_Length(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(0, 2825, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2825, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2802, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2825, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_self->_name); __Pyx_GIVEREF(__pyx_v_self->_name); @@ -26853,10 +26899,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_6__unicode__(struct __py __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_unlimited_name_s_size_s, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2802, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_unlimited_name_s_size_s, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2825, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2802, __pyx_L1_error) + __pyx_t_5 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2825, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -26864,7 +26910,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_6__unicode__(struct __py __pyx_t_5 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":2801 + /* "netCDF4/_netCDF4.pyx":2824 * if not dir(self._grp): * return 'Dimension object no longer valid' * if self.isunlimited(): # <<<<<<<<<<<<<< @@ -26873,7 +26919,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_6__unicode__(struct __py */ } - /* "netCDF4/_netCDF4.pyx":2804 + /* "netCDF4/_netCDF4.pyx":2827 * return repr(type(self))+" (unlimited): name = '%s', size = %s\n" % (self._name,len(self)) * else: * return repr(type(self))+": name = '%s', size = %s\n" % (self._name,len(self)) # <<<<<<<<<<<<<< @@ -26882,12 +26928,12 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_6__unicode__(struct __py */ /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = PyObject_Repr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2804, __pyx_L1_error) + __pyx_t_5 = PyObject_Repr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2827, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PyObject_Length(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(0, 2804, __pyx_L1_error) - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2804, __pyx_L1_error) + __pyx_t_6 = PyObject_Length(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(0, 2827, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2827, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2804, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2827, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_self->_name); __Pyx_GIVEREF(__pyx_v_self->_name); @@ -26895,10 +26941,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_6__unicode__(struct __py __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_name_s_size_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2804, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_name_s_size_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2827, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyNumber_Add(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2804, __pyx_L1_error) + __pyx_t_2 = PyNumber_Add(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2827, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -26907,7 +26953,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_6__unicode__(struct __py goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":2798 + /* "netCDF4/_netCDF4.pyx":2821 * return unicode(self).encode(default_encoding) * * def __unicode__(self): # <<<<<<<<<<<<<< @@ -26928,7 +26974,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_6__unicode__(struct __py return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2806 +/* "netCDF4/_netCDF4.pyx":2829 * return repr(type(self))+": name = '%s', size = %s\n" % (self._name,len(self)) * * def __len__(self): # <<<<<<<<<<<<<< @@ -26960,7 +27006,7 @@ static Py_ssize_t __pyx_pf_7netCDF4_8_netCDF4_9Dimension_8__len__(struct __pyx_o PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__len__", 0); - /* "netCDF4/_netCDF4.pyx":2810 + /* "netCDF4/_netCDF4.pyx":2833 * cdef int ierr * cdef size_t lengthp * with nogil: # <<<<<<<<<<<<<< @@ -26974,7 +27020,7 @@ static Py_ssize_t __pyx_pf_7netCDF4_8_netCDF4_9Dimension_8__len__(struct __pyx_o #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":2811 + /* "netCDF4/_netCDF4.pyx":2834 * cdef size_t lengthp * with nogil: * ierr = nc_inq_dimlen(self._grpid, self._dimid, &lengthp) # <<<<<<<<<<<<<< @@ -26984,7 +27030,7 @@ static Py_ssize_t __pyx_pf_7netCDF4_8_netCDF4_9Dimension_8__len__(struct __pyx_o __pyx_v_ierr = nc_inq_dimlen(__pyx_v_self->_grpid, __pyx_v_self->_dimid, (&__pyx_v_lengthp)); } - /* "netCDF4/_netCDF4.pyx":2810 + /* "netCDF4/_netCDF4.pyx":2833 * cdef int ierr * cdef size_t lengthp * with nogil: # <<<<<<<<<<<<<< @@ -27002,7 +27048,7 @@ static Py_ssize_t __pyx_pf_7netCDF4_8_netCDF4_9Dimension_8__len__(struct __pyx_o } } - /* "netCDF4/_netCDF4.pyx":2812 + /* "netCDF4/_netCDF4.pyx":2835 * with nogil: * ierr = nc_inq_dimlen(self._grpid, self._dimid, &lengthp) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -27012,7 +27058,7 @@ static Py_ssize_t __pyx_pf_7netCDF4_8_netCDF4_9Dimension_8__len__(struct __pyx_o __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":2813 + /* "netCDF4/_netCDF4.pyx":2836 * ierr = nc_inq_dimlen(self._grpid, self._dimid, &lengthp) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -27020,22 +27066,22 @@ static Py_ssize_t __pyx_pf_7netCDF4_8_netCDF4_9Dimension_8__len__(struct __pyx_o * */ __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2813, __pyx_L1_error) + __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2836, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2813, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2836, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2813, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2836, __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, 2813, __pyx_L1_error) + __PYX_ERR(0, 2836, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":2812 + /* "netCDF4/_netCDF4.pyx":2835 * with nogil: * ierr = nc_inq_dimlen(self._grpid, self._dimid, &lengthp) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -27044,7 +27090,7 @@ static Py_ssize_t __pyx_pf_7netCDF4_8_netCDF4_9Dimension_8__len__(struct __pyx_o */ } - /* "netCDF4/_netCDF4.pyx":2814 + /* "netCDF4/_netCDF4.pyx":2837 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * return lengthp # <<<<<<<<<<<<<< @@ -27054,7 +27100,7 @@ static Py_ssize_t __pyx_pf_7netCDF4_8_netCDF4_9Dimension_8__len__(struct __pyx_o __pyx_r = __pyx_v_lengthp; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":2806 + /* "netCDF4/_netCDF4.pyx":2829 * return repr(type(self))+": name = '%s', size = %s\n" % (self._name,len(self)) * * def __len__(self): # <<<<<<<<<<<<<< @@ -27073,7 +27119,7 @@ static Py_ssize_t __pyx_pf_7netCDF4_8_netCDF4_9Dimension_8__len__(struct __pyx_o return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2816 +/* "netCDF4/_netCDF4.pyx":2839 * return lengthp * * def group(self): # <<<<<<<<<<<<<< @@ -27100,7 +27146,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_10group(struct __pyx_obj __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group", 0); - /* "netCDF4/_netCDF4.pyx":2821 + /* "netCDF4/_netCDF4.pyx":2844 * * return the group that this `netCDF4.Dimension` is a member of.""" * return self._grp # <<<<<<<<<<<<<< @@ -27112,7 +27158,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_10group(struct __pyx_obj __pyx_r = __pyx_v_self->_grp; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":2816 + /* "netCDF4/_netCDF4.pyx":2839 * return lengthp * * def group(self): # <<<<<<<<<<<<<< @@ -27127,7 +27173,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_10group(struct __pyx_obj return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2823 +/* "netCDF4/_netCDF4.pyx":2846 * return self._grp * * def isunlimited(self): # <<<<<<<<<<<<<< @@ -27171,17 +27217,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p int __pyx_t_7; __Pyx_RefNannySetupContext("isunlimited", 0); - /* "netCDF4/_netCDF4.pyx":2830 + /* "netCDF4/_netCDF4.pyx":2853 * cdef int ierr, n, numunlimdims, ndims, nvars, ngatts, xdimid * cdef int *unlimdimids * if self._data_model == 'NETCDF4': # <<<<<<<<<<<<<< * ierr = nc_inq_unlimdims(self._grpid, &numunlimdims, NULL) * if ierr != NC_NOERR: */ - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->_data_model, __pyx_n_s_NETCDF4, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2830, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->_data_model, __pyx_n_s_NETCDF4, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2853, __pyx_L1_error) if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":2831 + /* "netCDF4/_netCDF4.pyx":2854 * cdef int *unlimdimids * if self._data_model == 'NETCDF4': * ierr = nc_inq_unlimdims(self._grpid, &numunlimdims, NULL) # <<<<<<<<<<<<<< @@ -27190,7 +27236,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p */ __pyx_v_ierr = nc_inq_unlimdims(__pyx_v_self->_grpid, (&__pyx_v_numunlimdims), NULL); - /* "netCDF4/_netCDF4.pyx":2832 + /* "netCDF4/_netCDF4.pyx":2855 * if self._data_model == 'NETCDF4': * ierr = nc_inq_unlimdims(self._grpid, &numunlimdims, NULL) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -27200,7 +27246,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":2833 + /* "netCDF4/_netCDF4.pyx":2856 * ierr = nc_inq_unlimdims(self._grpid, &numunlimdims, NULL) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -27208,22 +27254,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p * return False */ __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2833, __pyx_L1_error) + __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2833, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2833, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2856, __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, 2833, __pyx_L1_error) + __PYX_ERR(0, 2856, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":2832 + /* "netCDF4/_netCDF4.pyx":2855 * if self._data_model == 'NETCDF4': * ierr = nc_inq_unlimdims(self._grpid, &numunlimdims, NULL) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -27232,7 +27278,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p */ } - /* "netCDF4/_netCDF4.pyx":2834 + /* "netCDF4/_netCDF4.pyx":2857 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * if numunlimdims == 0: # <<<<<<<<<<<<<< @@ -27242,7 +27288,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p __pyx_t_1 = ((__pyx_v_numunlimdims == 0) != 0); if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":2835 + /* "netCDF4/_netCDF4.pyx":2858 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * if numunlimdims == 0: * return False # <<<<<<<<<<<<<< @@ -27254,7 +27300,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p __pyx_r = Py_False; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":2834 + /* "netCDF4/_netCDF4.pyx":2857 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * if numunlimdims == 0: # <<<<<<<<<<<<<< @@ -27263,7 +27309,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p */ } - /* "netCDF4/_netCDF4.pyx":2837 + /* "netCDF4/_netCDF4.pyx":2860 * return False * else: * unlimdimids = malloc(sizeof(int) * numunlimdims) # <<<<<<<<<<<<<< @@ -27273,7 +27319,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p /*else*/ { __pyx_v_unlimdimids = ((int *)malloc(((sizeof(int)) * __pyx_v_numunlimdims))); - /* "netCDF4/_netCDF4.pyx":2838 + /* "netCDF4/_netCDF4.pyx":2861 * else: * unlimdimids = malloc(sizeof(int) * numunlimdims) * dimid = self._dimid # <<<<<<<<<<<<<< @@ -27283,7 +27329,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p __pyx_t_5 = __pyx_v_self->_dimid; __pyx_v_dimid = __pyx_t_5; - /* "netCDF4/_netCDF4.pyx":2839 + /* "netCDF4/_netCDF4.pyx":2862 * unlimdimids = malloc(sizeof(int) * numunlimdims) * dimid = self._dimid * with nogil: # <<<<<<<<<<<<<< @@ -27297,7 +27343,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":2840 + /* "netCDF4/_netCDF4.pyx":2863 * dimid = self._dimid * with nogil: * ierr = nc_inq_unlimdims(self._grpid, &numunlimdims, unlimdimids) # <<<<<<<<<<<<<< @@ -27307,7 +27353,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p __pyx_v_ierr = nc_inq_unlimdims(__pyx_v_self->_grpid, (&__pyx_v_numunlimdims), __pyx_v_unlimdimids); } - /* "netCDF4/_netCDF4.pyx":2839 + /* "netCDF4/_netCDF4.pyx":2862 * unlimdimids = malloc(sizeof(int) * numunlimdims) * dimid = self._dimid * with nogil: # <<<<<<<<<<<<<< @@ -27325,7 +27371,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p } } - /* "netCDF4/_netCDF4.pyx":2841 + /* "netCDF4/_netCDF4.pyx":2864 * with nogil: * ierr = nc_inq_unlimdims(self._grpid, &numunlimdims, unlimdimids) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -27335,7 +27381,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":2842 + /* "netCDF4/_netCDF4.pyx":2865 * ierr = nc_inq_unlimdims(self._grpid, &numunlimdims, unlimdimids) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -27343,22 +27389,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p * for n from 0 <= n < numunlimdims: */ __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2842, __pyx_L1_error) + __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2865, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2842, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2865, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2842, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2865, __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, 2842, __pyx_L1_error) + __PYX_ERR(0, 2865, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":2841 + /* "netCDF4/_netCDF4.pyx":2864 * with nogil: * ierr = nc_inq_unlimdims(self._grpid, &numunlimdims, unlimdimids) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -27367,19 +27413,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p */ } - /* "netCDF4/_netCDF4.pyx":2843 + /* "netCDF4/_netCDF4.pyx":2866 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * unlimdim_ids = [] # <<<<<<<<<<<<<< * for n from 0 <= n < numunlimdims: * unlimdim_ids.append(unlimdimids[n]) */ - __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2843, __pyx_L1_error) + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2866, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_unlimdim_ids = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":2844 + /* "netCDF4/_netCDF4.pyx":2867 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * unlimdim_ids = [] * for n from 0 <= n < numunlimdims: # <<<<<<<<<<<<<< @@ -27389,20 +27435,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p __pyx_t_5 = __pyx_v_numunlimdims; for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_5; __pyx_v_n++) { - /* "netCDF4/_netCDF4.pyx":2845 + /* "netCDF4/_netCDF4.pyx":2868 * unlimdim_ids = [] * for n from 0 <= n < numunlimdims: * unlimdim_ids.append(unlimdimids[n]) # <<<<<<<<<<<<<< * free(unlimdimids) * if dimid in unlimdim_ids: */ - __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_unlimdimids[__pyx_v_n])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2845, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_unlimdimids[__pyx_v_n])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2868, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_unlimdim_ids, __pyx_t_3); if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(0, 2845, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_unlimdim_ids, __pyx_t_3); if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(0, 2868, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - /* "netCDF4/_netCDF4.pyx":2846 + /* "netCDF4/_netCDF4.pyx":2869 * for n from 0 <= n < numunlimdims: * unlimdim_ids.append(unlimdimids[n]) * free(unlimdimids) # <<<<<<<<<<<<<< @@ -27411,21 +27457,21 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p */ free(__pyx_v_unlimdimids); - /* "netCDF4/_netCDF4.pyx":2847 + /* "netCDF4/_netCDF4.pyx":2870 * unlimdim_ids.append(unlimdimids[n]) * free(unlimdimids) * if dimid in unlimdim_ids: # <<<<<<<<<<<<<< * return True * else: */ - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_dimid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2847, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_dimid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2870, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_v_unlimdim_ids, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2847, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_v_unlimdim_ids, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2870, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = (__pyx_t_1 != 0); if (__pyx_t_7) { - /* "netCDF4/_netCDF4.pyx":2848 + /* "netCDF4/_netCDF4.pyx":2871 * free(unlimdimids) * if dimid in unlimdim_ids: * return True # <<<<<<<<<<<<<< @@ -27437,7 +27483,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p __pyx_r = Py_True; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":2847 + /* "netCDF4/_netCDF4.pyx":2870 * unlimdim_ids.append(unlimdimids[n]) * free(unlimdimids) * if dimid in unlimdim_ids: # <<<<<<<<<<<<<< @@ -27446,7 +27492,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p */ } - /* "netCDF4/_netCDF4.pyx":2850 + /* "netCDF4/_netCDF4.pyx":2873 * return True * else: * return False # <<<<<<<<<<<<<< @@ -27461,7 +27507,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p } } - /* "netCDF4/_netCDF4.pyx":2830 + /* "netCDF4/_netCDF4.pyx":2853 * cdef int ierr, n, numunlimdims, ndims, nvars, ngatts, xdimid * cdef int *unlimdimids * if self._data_model == 'NETCDF4': # <<<<<<<<<<<<<< @@ -27470,7 +27516,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p */ } - /* "netCDF4/_netCDF4.pyx":2853 + /* "netCDF4/_netCDF4.pyx":2876 * else: # if not NETCDF4, there is only one unlimited dimension. * # nc_inq_unlimdims only works for NETCDF4. * with nogil: # <<<<<<<<<<<<<< @@ -27485,7 +27531,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":2854 + /* "netCDF4/_netCDF4.pyx":2877 * # nc_inq_unlimdims only works for NETCDF4. * with nogil: * ierr = nc_inq(self._grpid, &ndims, &nvars, &ngatts, &xdimid) # <<<<<<<<<<<<<< @@ -27495,7 +27541,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p __pyx_v_ierr = nc_inq(__pyx_v_self->_grpid, (&__pyx_v_ndims), (&__pyx_v_nvars), (&__pyx_v_ngatts), (&__pyx_v_xdimid)); } - /* "netCDF4/_netCDF4.pyx":2853 + /* "netCDF4/_netCDF4.pyx":2876 * else: # if not NETCDF4, there is only one unlimited dimension. * # nc_inq_unlimdims only works for NETCDF4. * with nogil: # <<<<<<<<<<<<<< @@ -27513,7 +27559,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p } } - /* "netCDF4/_netCDF4.pyx":2855 + /* "netCDF4/_netCDF4.pyx":2878 * with nogil: * ierr = nc_inq(self._grpid, &ndims, &nvars, &ngatts, &xdimid) * if self._dimid == xdimid: # <<<<<<<<<<<<<< @@ -27523,7 +27569,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p __pyx_t_7 = ((__pyx_v_self->_dimid == __pyx_v_xdimid) != 0); if (__pyx_t_7) { - /* "netCDF4/_netCDF4.pyx":2856 + /* "netCDF4/_netCDF4.pyx":2879 * ierr = nc_inq(self._grpid, &ndims, &nvars, &ngatts, &xdimid) * if self._dimid == xdimid: * return True # <<<<<<<<<<<<<< @@ -27535,7 +27581,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p __pyx_r = Py_True; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":2855 + /* "netCDF4/_netCDF4.pyx":2878 * with nogil: * ierr = nc_inq(self._grpid, &ndims, &nvars, &ngatts, &xdimid) * if self._dimid == xdimid: # <<<<<<<<<<<<<< @@ -27544,7 +27590,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p */ } - /* "netCDF4/_netCDF4.pyx":2858 + /* "netCDF4/_netCDF4.pyx":2881 * return True * else: * return False # <<<<<<<<<<<<<< @@ -27559,7 +27605,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p } } - /* "netCDF4/_netCDF4.pyx":2823 + /* "netCDF4/_netCDF4.pyx":2846 * return self._grp * * def isunlimited(self): # <<<<<<<<<<<<<< @@ -27580,7 +27626,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2717 +/* "netCDF4/_netCDF4.pyx":2740 * `netCDF4.Dimension` instance). * """ * cdef public int _dimid, _grpid # <<<<<<<<<<<<<< @@ -27607,7 +27653,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_6_dimid___get__(struct _ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_dimid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2717, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_dimid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2740, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -27642,7 +27688,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension_6_dimid_2__set__(struct __pyx_ __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2717, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2740, __pyx_L1_error) __pyx_v_self->_dimid = __pyx_t_1; /* function exit code */ @@ -27675,7 +27721,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_6_grpid___get__(struct _ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2717, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2740, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -27710,7 +27756,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension_6_grpid_2__set__(struct __pyx_ __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2717, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2740, __pyx_L1_error) __pyx_v_self->_grpid = __pyx_t_1; /* function exit code */ @@ -27724,7 +27770,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension_6_grpid_2__set__(struct __pyx_ return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2718 +/* "netCDF4/_netCDF4.pyx":2741 * """ * cdef public int _dimid, _grpid * cdef public _data_model, _name, _grp # <<<<<<<<<<<<<< @@ -27993,7 +28039,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension_4_grp_4__del__(struct __pyx_ob return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2954 +/* "netCDF4/_netCDF4.pyx":2977 * """The number of stored elements.""" * * def __init__(self, grp, name, datatype, dimensions=(), zlib=False, # <<<<<<<<<<<<<< @@ -28035,7 +28081,7 @@ static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_1__init__(PyObject *__pyx_v_sel values[4] = ((PyObject *)Py_False); values[5] = ((PyObject *)__pyx_int_4); - /* "netCDF4/_netCDF4.pyx":2955 + /* "netCDF4/_netCDF4.pyx":2978 * * def __init__(self, grp, name, datatype, dimensions=(), zlib=False, * complevel=4, shuffle=True, fletcher32=False, contiguous=False, # <<<<<<<<<<<<<< @@ -28046,7 +28092,7 @@ static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_1__init__(PyObject *__pyx_v_sel values[7] = ((PyObject *)Py_False); values[8] = ((PyObject *)Py_False); - /* "netCDF4/_netCDF4.pyx":2956 + /* "netCDF4/_netCDF4.pyx":2979 * def __init__(self, grp, name, datatype, dimensions=(), zlib=False, * complevel=4, shuffle=True, fletcher32=False, contiguous=False, * chunksizes=None, endian='native', least_significant_digit=None, # <<<<<<<<<<<<<< @@ -28057,7 +28103,7 @@ static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_1__init__(PyObject *__pyx_v_sel values[10] = ((PyObject *)__pyx_n_s_native); values[11] = ((PyObject *)Py_None); - /* "netCDF4/_netCDF4.pyx":2957 + /* "netCDF4/_netCDF4.pyx":2980 * complevel=4, shuffle=True, fletcher32=False, contiguous=False, * chunksizes=None, endian='native', least_significant_digit=None, * fill_value=None, chunk_cache=None, **kwargs): # <<<<<<<<<<<<<< @@ -28095,12 +28141,12 @@ static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_1__init__(PyObject *__pyx_v_sel case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 14, 1); __PYX_ERR(0, 2954, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 14, 1); __PYX_ERR(0, 2977, __pyx_L3_error) } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_datatype)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 14, 2); __PYX_ERR(0, 2954, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 14, 2); __PYX_ERR(0, 2977, __pyx_L3_error) } case 3: if (kw_args > 0) { @@ -28159,7 +28205,7 @@ static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_1__init__(PyObject *__pyx_v_sel } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2954, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2977, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -28198,7 +28244,7 @@ static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_1__init__(PyObject *__pyx_v_sel } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 14, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2954, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 14, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2977, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_AddTraceback("netCDF4._netCDF4.Variable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -28207,7 +28253,7 @@ static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_1__init__(PyObject *__pyx_v_sel __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self), __pyx_v_grp, __pyx_v_name, __pyx_v_datatype, __pyx_v_dimensions, __pyx_v_zlib, __pyx_v_complevel, __pyx_v_shuffle, __pyx_v_fletcher32, __pyx_v_contiguous, __pyx_v_chunksizes, __pyx_v_endian, __pyx_v_least_significant_digit, __pyx_v_fill_value, __pyx_v_chunk_cache, __pyx_v_kwargs); - /* "netCDF4/_netCDF4.pyx":2954 + /* "netCDF4/_netCDF4.pyx":2977 * """The number of stored elements.""" * * def __init__(self, grp, name, datatype, dimensions=(), zlib=False, # <<<<<<<<<<<<<< @@ -28268,7 +28314,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __Pyx_INCREF(__pyx_v_dimensions); __Pyx_INCREF(__pyx_v_zlib); - /* "netCDF4/_netCDF4.pyx":3056 + /* "netCDF4/_netCDF4.pyx":3079 * cdef float preemptionp * # flag to indicate that orthogonal indexing is supported * self.__orthogonal_indexing__ = True # <<<<<<<<<<<<<< @@ -28281,18 +28327,18 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __Pyx_DECREF(__pyx_v_self->__orthogonal_indexing__); __pyx_v_self->__orthogonal_indexing__ = Py_True; - /* "netCDF4/_netCDF4.pyx":3058 + /* "netCDF4/_netCDF4.pyx":3081 * self.__orthogonal_indexing__ = True * # if complevel is set to zero, set zlib to False. * if not complevel: # <<<<<<<<<<<<<< * zlib = False * # if dimensions is a string, convert to a tuple */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_complevel); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3058, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_complevel); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3081, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":3059 + /* "netCDF4/_netCDF4.pyx":3082 * # if complevel is set to zero, set zlib to False. * if not complevel: * zlib = False # <<<<<<<<<<<<<< @@ -28302,7 +28348,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __Pyx_INCREF(Py_False); __Pyx_DECREF_SET(__pyx_v_zlib, Py_False); - /* "netCDF4/_netCDF4.pyx":3058 + /* "netCDF4/_netCDF4.pyx":3081 * self.__orthogonal_indexing__ = True * # if complevel is set to zero, set zlib to False. * if not complevel: # <<<<<<<<<<<<<< @@ -28311,44 +28357,44 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ } - /* "netCDF4/_netCDF4.pyx":3063 + /* "netCDF4/_netCDF4.pyx":3086 * # this prevents a common error that occurs when * # dimensions = 'lat' instead of ('lat',) * if type(dimensions) == str or type(dimensions) == bytes or type(dimensions) == unicode: # <<<<<<<<<<<<<< * dimensions = dimensions, * self._grpid = grp._grpid */ - __pyx_t_3 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_dimensions)), ((PyObject *)(&PyString_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3063, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3063, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_dimensions)), ((PyObject *)(&PyString_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3086, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3086, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_1) { } else { __pyx_t_2 = __pyx_t_1; goto __pyx_L5_bool_binop_done; } - __pyx_t_3 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_dimensions)), ((PyObject *)(&PyBytes_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3063, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3063, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_dimensions)), ((PyObject *)(&PyBytes_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3086, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3086, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_1) { } else { __pyx_t_2 = __pyx_t_1; goto __pyx_L5_bool_binop_done; } - __pyx_t_3 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_dimensions)), ((PyObject *)(&PyUnicode_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3063, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3063, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_dimensions)), ((PyObject *)(&PyUnicode_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3086, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3086, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __pyx_t_1; __pyx_L5_bool_binop_done:; if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":3064 + /* "netCDF4/_netCDF4.pyx":3087 * # dimensions = 'lat' instead of ('lat',) * if type(dimensions) == str or type(dimensions) == bytes or type(dimensions) == unicode: * dimensions = dimensions, # <<<<<<<<<<<<<< * self._grpid = grp._grpid * # make a weakref to group to avoid circular ref (issue 218) */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3064, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3087, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_dimensions); __Pyx_GIVEREF(__pyx_v_dimensions); @@ -28356,7 +28402,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __Pyx_DECREF_SET(__pyx_v_dimensions, __pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":3063 + /* "netCDF4/_netCDF4.pyx":3086 * # this prevents a common error that occurs when * # dimensions = 'lat' instead of ('lat',) * if type(dimensions) == str or type(dimensions) == bytes or type(dimensions) == unicode: # <<<<<<<<<<<<<< @@ -28365,42 +28411,42 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ } - /* "netCDF4/_netCDF4.pyx":3065 + /* "netCDF4/_netCDF4.pyx":3088 * if type(dimensions) == str or type(dimensions) == bytes or type(dimensions) == unicode: * dimensions = dimensions, * self._grpid = grp._grpid # <<<<<<<<<<<<<< * # make a weakref to group to avoid circular ref (issue 218) * # keep strong reference the default behaviour (issue 251) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3065, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3088, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3065, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3088, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_self->_grpid = __pyx_t_4; - /* "netCDF4/_netCDF4.pyx":3068 + /* "netCDF4/_netCDF4.pyx":3091 * # make a weakref to group to avoid circular ref (issue 218) * # keep strong reference the default behaviour (issue 251) * if grp.keepweakref: # <<<<<<<<<<<<<< * self._grp = weakref.proxy(grp) * else: */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_keepweakref); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3068, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_keepweakref); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3091, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3068, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3091, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":3069 + /* "netCDF4/_netCDF4.pyx":3092 * # keep strong reference the default behaviour (issue 251) * if grp.keepweakref: * self._grp = weakref.proxy(grp) # <<<<<<<<<<<<<< * else: * self._grp = grp */ - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_weakref); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3069, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_weakref); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_proxy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3069, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_proxy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -28414,13 +28460,13 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC } } if (!__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_grp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3069, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_grp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_grp}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3069, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3092, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -28428,19 +28474,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_grp}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3069, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3092, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3069, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_INCREF(__pyx_v_grp); __Pyx_GIVEREF(__pyx_v_grp); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_grp); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3069, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -28452,7 +28498,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __pyx_v_self->_grp = __pyx_t_3; __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":3068 + /* "netCDF4/_netCDF4.pyx":3091 * # make a weakref to group to avoid circular ref (issue 218) * # keep strong reference the default behaviour (issue 251) * if grp.keepweakref: # <<<<<<<<<<<<<< @@ -28462,7 +28508,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC goto __pyx_L8; } - /* "netCDF4/_netCDF4.pyx":3071 + /* "netCDF4/_netCDF4.pyx":3094 * self._grp = weakref.proxy(grp) * else: * self._grp = grp # <<<<<<<<<<<<<< @@ -28478,7 +28524,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC } __pyx_L8:; - /* "netCDF4/_netCDF4.pyx":3072 + /* "netCDF4/_netCDF4.pyx":3095 * else: * self._grp = grp * user_type = isinstance(datatype, CompoundType) or \ # <<<<<<<<<<<<<< @@ -28488,14 +28534,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_datatype, __pyx_ptype_7netCDF4_8_netCDF4_CompoundType); if (!__pyx_t_2) { } else { - __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3072, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3095, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L9_bool_binop_done; } - /* "netCDF4/_netCDF4.pyx":3073 + /* "netCDF4/_netCDF4.pyx":3096 * self._grp = grp * user_type = isinstance(datatype, CompoundType) or \ * isinstance(datatype, VLType) or \ # <<<<<<<<<<<<<< @@ -28505,14 +28551,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_datatype, __pyx_ptype_7netCDF4_8_netCDF4_VLType); if (!__pyx_t_2) { } else { - __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3073, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3096, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L9_bool_binop_done; } - /* "netCDF4/_netCDF4.pyx":3074 + /* "netCDF4/_netCDF4.pyx":3097 * user_type = isinstance(datatype, CompoundType) or \ * isinstance(datatype, VLType) or \ * isinstance(datatype, EnumType) or \ # <<<<<<<<<<<<<< @@ -28522,21 +28568,21 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_datatype, __pyx_ptype_7netCDF4_8_netCDF4_EnumType); if (!__pyx_t_2) { } else { - __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3074, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3097, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L9_bool_binop_done; } - /* "netCDF4/_netCDF4.pyx":3075 + /* "netCDF4/_netCDF4.pyx":3098 * isinstance(datatype, VLType) or \ * isinstance(datatype, EnumType) or \ * datatype == str # <<<<<<<<<<<<<< * # convert to a real numpy datatype object if necessary. * if not user_type and type(datatype) != numpy.dtype: */ - __pyx_t_6 = PyObject_RichCompare(__pyx_v_datatype, ((PyObject *)(&PyString_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3075, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_v_datatype, ((PyObject *)(&PyString_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3098, __pyx_L1_error) __Pyx_INCREF(__pyx_t_6); __pyx_t_3 = __pyx_t_6; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -28544,43 +28590,43 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __pyx_v_user_type = __pyx_t_3; __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":3077 + /* "netCDF4/_netCDF4.pyx":3100 * datatype == str * # convert to a real numpy datatype object if necessary. * if not user_type and type(datatype) != numpy.dtype: # <<<<<<<<<<<<<< * datatype = numpy.dtype(datatype) * # convert numpy string dtype with length > 1 */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_user_type); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3077, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_user_type); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3100, __pyx_L1_error) __pyx_t_8 = ((!__pyx_t_1) != 0); if (__pyx_t_8) { } else { __pyx_t_2 = __pyx_t_8; goto __pyx_L14_bool_binop_done; } - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3077, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3077, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_datatype)), __pyx_t_6, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3077, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_datatype)), __pyx_t_6, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3100, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3077, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3100, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __pyx_t_8; __pyx_L14_bool_binop_done:; if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":3078 + /* "netCDF4/_netCDF4.pyx":3101 * # convert to a real numpy datatype object if necessary. * if not user_type and type(datatype) != numpy.dtype: * datatype = numpy.dtype(datatype) # <<<<<<<<<<<<<< * # convert numpy string dtype with length > 1 * # or any numpy unicode dtype into str */ - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3078, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_dtype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3078, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_dtype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -28594,13 +28640,13 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC } } if (!__pyx_t_6) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_datatype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3078, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_datatype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_datatype}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3078, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3101, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -28608,19 +28654,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_datatype}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3078, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3101, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3078, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_INCREF(__pyx_v_datatype); __Pyx_GIVEREF(__pyx_v_datatype); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_datatype); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3078, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -28629,7 +28675,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __Pyx_DECREF_SET(__pyx_v_datatype, __pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":3077 + /* "netCDF4/_netCDF4.pyx":3100 * datatype == str * # convert to a real numpy datatype object if necessary. * if not user_type and type(datatype) != numpy.dtype: # <<<<<<<<<<<<<< @@ -28638,19 +28684,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ } - /* "netCDF4/_netCDF4.pyx":3081 + /* "netCDF4/_netCDF4.pyx":3104 * # convert numpy string dtype with length > 1 * # or any numpy unicode dtype into str * if (isinstance(datatype, numpy.dtype) and # <<<<<<<<<<<<<< * ((datatype.kind == 'S' and datatype.itemsize > 1) or * datatype.kind == 'U')): */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3081, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_dtype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3081, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_dtype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_8 = PyObject_IsInstance(__pyx_v_datatype, __pyx_t_7); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 3081, __pyx_L1_error) + __pyx_t_8 = PyObject_IsInstance(__pyx_v_datatype, __pyx_t_7); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 3104, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_1 = (__pyx_t_8 != 0); if (__pyx_t_1) { @@ -28659,26 +28705,26 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC goto __pyx_L17_bool_binop_done; } - /* "netCDF4/_netCDF4.pyx":3082 + /* "netCDF4/_netCDF4.pyx":3105 * # or any numpy unicode dtype into str * if (isinstance(datatype, numpy.dtype) and * ((datatype.kind == 'S' and datatype.itemsize > 1) or # <<<<<<<<<<<<<< * datatype.kind == 'U')): * datatype = str */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_datatype, __pyx_n_s_kind); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3082, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_datatype, __pyx_n_s_kind); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_S, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3082, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_S, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3105, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (!__pyx_t_1) { goto __pyx_L19_next_or; } else { } - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_datatype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3082, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_datatype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_3 = PyObject_RichCompare(__pyx_t_7, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3082, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_7, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3105, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3082, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3105, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_1) { } else { @@ -28687,21 +28733,21 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC } __pyx_L19_next_or:; - /* "netCDF4/_netCDF4.pyx":3083 + /* "netCDF4/_netCDF4.pyx":3106 * if (isinstance(datatype, numpy.dtype) and * ((datatype.kind == 'S' and datatype.itemsize > 1) or * datatype.kind == 'U')): # <<<<<<<<<<<<<< * datatype = str * user_type = True */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_datatype, __pyx_n_s_kind); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3083, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_datatype, __pyx_n_s_kind); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_U, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3083, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_U, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3106, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __pyx_t_1; __pyx_L17_bool_binop_done:; - /* "netCDF4/_netCDF4.pyx":3081 + /* "netCDF4/_netCDF4.pyx":3104 * # convert numpy string dtype with length > 1 * # or any numpy unicode dtype into str * if (isinstance(datatype, numpy.dtype) and # <<<<<<<<<<<<<< @@ -28710,7 +28756,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":3084 + /* "netCDF4/_netCDF4.pyx":3107 * ((datatype.kind == 'S' and datatype.itemsize > 1) or * datatype.kind == 'U')): * datatype = str # <<<<<<<<<<<<<< @@ -28720,7 +28766,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __Pyx_INCREF(((PyObject *)(&PyString_Type))); __Pyx_DECREF_SET(__pyx_v_datatype, ((PyObject *)(&PyString_Type))); - /* "netCDF4/_netCDF4.pyx":3085 + /* "netCDF4/_netCDF4.pyx":3108 * datatype.kind == 'U')): * datatype = str * user_type = True # <<<<<<<<<<<<<< @@ -28730,7 +28776,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __Pyx_INCREF(Py_True); __Pyx_DECREF_SET(__pyx_v_user_type, Py_True); - /* "netCDF4/_netCDF4.pyx":3081 + /* "netCDF4/_netCDF4.pyx":3104 * # convert numpy string dtype with length > 1 * # or any numpy unicode dtype into str * if (isinstance(datatype, numpy.dtype) and # <<<<<<<<<<<<<< @@ -28739,71 +28785,71 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ } - /* "netCDF4/_netCDF4.pyx":3087 + /* "netCDF4/_netCDF4.pyx":3110 * user_type = True * # check if endian keyword consistent with datatype specification. * dtype_endian = getattr(datatype,'byteorder',None) # <<<<<<<<<<<<<< * if dtype_endian == '=': dtype_endian='native' * if dtype_endian == '>': dtype_endian='big' */ - __pyx_t_3 = __Pyx_GetAttr3(__pyx_v_datatype, __pyx_n_s_byteorder, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3087, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetAttr3(__pyx_v_datatype, __pyx_n_s_byteorder, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_dtype_endian = __pyx_t_3; __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":3088 + /* "netCDF4/_netCDF4.pyx":3111 * # check if endian keyword consistent with datatype specification. * dtype_endian = getattr(datatype,'byteorder',None) * if dtype_endian == '=': dtype_endian='native' # <<<<<<<<<<<<<< * if dtype_endian == '>': dtype_endian='big' * if dtype_endian == '<': dtype_endian='little' */ - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_dtype_endian, __pyx_kp_s__36, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3088, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_dtype_endian, __pyx_kp_s__40, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3111, __pyx_L1_error) if (__pyx_t_2) { __Pyx_INCREF(__pyx_n_s_native); __Pyx_DECREF_SET(__pyx_v_dtype_endian, __pyx_n_s_native); } - /* "netCDF4/_netCDF4.pyx":3089 + /* "netCDF4/_netCDF4.pyx":3112 * dtype_endian = getattr(datatype,'byteorder',None) * if dtype_endian == '=': dtype_endian='native' * if dtype_endian == '>': dtype_endian='big' # <<<<<<<<<<<<<< * if dtype_endian == '<': dtype_endian='little' * if dtype_endian == '|': dtype_endian=None */ - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_dtype_endian, __pyx_kp_s__14, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3089, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_dtype_endian, __pyx_kp_s__14, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3112, __pyx_L1_error) if (__pyx_t_2) { __Pyx_INCREF(__pyx_n_s_big); __Pyx_DECREF_SET(__pyx_v_dtype_endian, __pyx_n_s_big); } - /* "netCDF4/_netCDF4.pyx":3090 + /* "netCDF4/_netCDF4.pyx":3113 * if dtype_endian == '=': dtype_endian='native' * if dtype_endian == '>': dtype_endian='big' * if dtype_endian == '<': dtype_endian='little' # <<<<<<<<<<<<<< * if dtype_endian == '|': dtype_endian=None * if dtype_endian is not None and dtype_endian != endian: */ - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_dtype_endian, __pyx_kp_s__13, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3090, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_dtype_endian, __pyx_kp_s__13, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3113, __pyx_L1_error) if (__pyx_t_2) { __Pyx_INCREF(__pyx_n_s_little); __Pyx_DECREF_SET(__pyx_v_dtype_endian, __pyx_n_s_little); } - /* "netCDF4/_netCDF4.pyx":3091 + /* "netCDF4/_netCDF4.pyx":3114 * if dtype_endian == '>': dtype_endian='big' * if dtype_endian == '<': dtype_endian='little' * if dtype_endian == '|': dtype_endian=None # <<<<<<<<<<<<<< * if dtype_endian is not None and dtype_endian != endian: * if dtype_endian == 'native' and endian == sys.byteorder: */ - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_dtype_endian, __pyx_kp_s__37, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3091, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_dtype_endian, __pyx_kp_s__41, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3114, __pyx_L1_error) if (__pyx_t_2) { __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_dtype_endian, Py_None); } - /* "netCDF4/_netCDF4.pyx":3092 + /* "netCDF4/_netCDF4.pyx":3115 * if dtype_endian == '<': dtype_endian='little' * if dtype_endian == '|': dtype_endian=None * if dtype_endian is not None and dtype_endian != endian: # <<<<<<<<<<<<<< @@ -28817,34 +28863,34 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __pyx_t_2 = __pyx_t_8; goto __pyx_L26_bool_binop_done; } - __pyx_t_3 = PyObject_RichCompare(__pyx_v_dtype_endian, __pyx_v_endian, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3092, __pyx_L1_error) - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3092, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_dtype_endian, __pyx_v_endian, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3115, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3115, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __pyx_t_8; __pyx_L26_bool_binop_done:; if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":3093 + /* "netCDF4/_netCDF4.pyx":3116 * if dtype_endian == '|': dtype_endian=None * if dtype_endian is not None and dtype_endian != endian: * if dtype_endian == 'native' and endian == sys.byteorder: # <<<<<<<<<<<<<< * pass * else: */ - __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_v_dtype_endian, __pyx_n_s_native, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3093, __pyx_L1_error) + __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_v_dtype_endian, __pyx_n_s_native, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3116, __pyx_L1_error) if (__pyx_t_8) { } else { __pyx_t_2 = __pyx_t_8; goto __pyx_L29_bool_binop_done; } - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3093, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_byteorder); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3093, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_byteorder); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_RichCompare(__pyx_v_endian, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3093, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_endian, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3116, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3093, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3116, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __pyx_t_8; __pyx_L29_bool_binop_done:; @@ -28852,7 +28898,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC goto __pyx_L28; } - /* "netCDF4/_netCDF4.pyx":3097 + /* "netCDF4/_netCDF4.pyx":3120 * else: * # endian keyword prevails, issue warning * msg = 'endian-ness of dtype and endian kwarg do not match, using endian kwarg' # <<<<<<<<<<<<<< @@ -28863,16 +28909,16 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __Pyx_INCREF(__pyx_kp_s_endian_ness_of_dtype_and_endian); __pyx_v_msg = __pyx_kp_s_endian_ness_of_dtype_and_endian; - /* "netCDF4/_netCDF4.pyx":3099 + /* "netCDF4/_netCDF4.pyx":3122 * msg = 'endian-ness of dtype and endian kwarg do not match, using endian kwarg' * #msg = 'endian-ness of dtype and endian kwarg do not match, dtype over-riding endian kwarg' * warnings.warn(msg) # <<<<<<<<<<<<<< * #endian = dtype_endian # dtype prevails * # check validity of datatype. */ - __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3099, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_warn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3099, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_warn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; @@ -28886,13 +28932,13 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC } } if (!__pyx_t_7) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_msg); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3099, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_msg); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_msg}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3099, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3122, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -28900,19 +28946,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_msg}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3099, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3122, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3099, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3122, __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 = NULL; __Pyx_INCREF(__pyx_v_msg); __Pyx_GIVEREF(__pyx_v_msg); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_msg); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3099, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -28922,7 +28968,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC } __pyx_L28:; - /* "netCDF4/_netCDF4.pyx":3092 + /* "netCDF4/_netCDF4.pyx":3115 * if dtype_endian == '<': dtype_endian='little' * if dtype_endian == '|': dtype_endian=None * if dtype_endian is not None and dtype_endian != endian: # <<<<<<<<<<<<<< @@ -28931,7 +28977,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ } - /* "netCDF4/_netCDF4.pyx":3102 + /* "netCDF4/_netCDF4.pyx":3125 * #endian = dtype_endian # dtype prevails * # check validity of datatype. * self._isprimitive = False # <<<<<<<<<<<<<< @@ -28944,7 +28990,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __Pyx_DECREF(__pyx_v_self->_isprimitive); __pyx_v_self->_isprimitive = Py_False; - /* "netCDF4/_netCDF4.pyx":3103 + /* "netCDF4/_netCDF4.pyx":3126 * # check validity of datatype. * self._isprimitive = False * self._iscompound = False # <<<<<<<<<<<<<< @@ -28957,7 +29003,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __Pyx_DECREF(__pyx_v_self->_iscompound); __pyx_v_self->_iscompound = Py_False; - /* "netCDF4/_netCDF4.pyx":3104 + /* "netCDF4/_netCDF4.pyx":3127 * self._isprimitive = False * self._iscompound = False * self._isvlen = False # <<<<<<<<<<<<<< @@ -28970,7 +29016,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __Pyx_DECREF(__pyx_v_self->_isvlen); __pyx_v_self->_isvlen = Py_False; - /* "netCDF4/_netCDF4.pyx":3105 + /* "netCDF4/_netCDF4.pyx":3128 * self._iscompound = False * self._isvlen = False * self._isenum = False # <<<<<<<<<<<<<< @@ -28983,17 +29029,17 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __Pyx_DECREF(__pyx_v_self->_isenum); __pyx_v_self->_isenum = Py_False; - /* "netCDF4/_netCDF4.pyx":3106 + /* "netCDF4/_netCDF4.pyx":3129 * self._isvlen = False * self._isenum = False * if user_type: # <<<<<<<<<<<<<< * if isinstance(datatype, CompoundType): * self._iscompound = True */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_user_type); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3106, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_user_type); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3129, __pyx_L1_error) if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":3107 + /* "netCDF4/_netCDF4.pyx":3130 * self._isenum = False * if user_type: * if isinstance(datatype, CompoundType): # <<<<<<<<<<<<<< @@ -29004,7 +29050,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __pyx_t_8 = (__pyx_t_2 != 0); if (__pyx_t_8) { - /* "netCDF4/_netCDF4.pyx":3108 + /* "netCDF4/_netCDF4.pyx":3131 * if user_type: * if isinstance(datatype, CompoundType): * self._iscompound = True # <<<<<<<<<<<<<< @@ -29017,7 +29063,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __Pyx_DECREF(__pyx_v_self->_iscompound); __pyx_v_self->_iscompound = Py_True; - /* "netCDF4/_netCDF4.pyx":3109 + /* "netCDF4/_netCDF4.pyx":3132 * if isinstance(datatype, CompoundType): * self._iscompound = True * self._cmptype = datatype # <<<<<<<<<<<<<< @@ -29030,7 +29076,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __Pyx_DECREF(__pyx_v_self->_cmptype); __pyx_v_self->_cmptype = __pyx_v_datatype; - /* "netCDF4/_netCDF4.pyx":3107 + /* "netCDF4/_netCDF4.pyx":3130 * self._isenum = False * if user_type: * if isinstance(datatype, CompoundType): # <<<<<<<<<<<<<< @@ -29039,7 +29085,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ } - /* "netCDF4/_netCDF4.pyx":3110 + /* "netCDF4/_netCDF4.pyx":3133 * self._iscompound = True * self._cmptype = datatype * if isinstance(datatype, VLType) or datatype==str: # <<<<<<<<<<<<<< @@ -29053,14 +29099,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __pyx_t_8 = __pyx_t_1; goto __pyx_L34_bool_binop_done; } - __pyx_t_3 = PyObject_RichCompare(__pyx_v_datatype, ((PyObject *)(&PyString_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3110, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3110, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_datatype, ((PyObject *)(&PyString_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3133, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3133, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = __pyx_t_1; __pyx_L34_bool_binop_done:; if (__pyx_t_8) { - /* "netCDF4/_netCDF4.pyx":3111 + /* "netCDF4/_netCDF4.pyx":3134 * self._cmptype = datatype * if isinstance(datatype, VLType) or datatype==str: * self._isvlen = True # <<<<<<<<<<<<<< @@ -29073,7 +29119,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __Pyx_DECREF(__pyx_v_self->_isvlen); __pyx_v_self->_isvlen = Py_True; - /* "netCDF4/_netCDF4.pyx":3112 + /* "netCDF4/_netCDF4.pyx":3135 * if isinstance(datatype, VLType) or datatype==str: * self._isvlen = True * self._vltype = datatype # <<<<<<<<<<<<<< @@ -29086,7 +29132,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __Pyx_DECREF(__pyx_v_self->_vltype); __pyx_v_self->_vltype = __pyx_v_datatype; - /* "netCDF4/_netCDF4.pyx":3110 + /* "netCDF4/_netCDF4.pyx":3133 * self._iscompound = True * self._cmptype = datatype * if isinstance(datatype, VLType) or datatype==str: # <<<<<<<<<<<<<< @@ -29095,7 +29141,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ } - /* "netCDF4/_netCDF4.pyx":3113 + /* "netCDF4/_netCDF4.pyx":3136 * self._isvlen = True * self._vltype = datatype * if isinstance(datatype, EnumType): # <<<<<<<<<<<<<< @@ -29106,7 +29152,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __pyx_t_1 = (__pyx_t_8 != 0); if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":3114 + /* "netCDF4/_netCDF4.pyx":3137 * self._vltype = datatype * if isinstance(datatype, EnumType): * self._isenum = True # <<<<<<<<<<<<<< @@ -29119,7 +29165,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __Pyx_DECREF(__pyx_v_self->_isenum); __pyx_v_self->_isenum = Py_True; - /* "netCDF4/_netCDF4.pyx":3115 + /* "netCDF4/_netCDF4.pyx":3138 * if isinstance(datatype, EnumType): * self._isenum = True * self._enumtype = datatype # <<<<<<<<<<<<<< @@ -29132,7 +29178,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __Pyx_DECREF(__pyx_v_self->_enumtype); __pyx_v_self->_enumtype = __pyx_v_datatype; - /* "netCDF4/_netCDF4.pyx":3113 + /* "netCDF4/_netCDF4.pyx":3136 * self._isvlen = True * self._vltype = datatype * if isinstance(datatype, EnumType): # <<<<<<<<<<<<<< @@ -29141,45 +29187,45 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ } - /* "netCDF4/_netCDF4.pyx":3116 + /* "netCDF4/_netCDF4.pyx":3139 * self._isenum = True * self._enumtype = datatype * if datatype==str: # <<<<<<<<<<<<<< * if grp.data_model != 'NETCDF4': * raise ValueError( */ - __pyx_t_3 = PyObject_RichCompare(__pyx_v_datatype, ((PyObject *)(&PyString_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3116, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3116, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_datatype, ((PyObject *)(&PyString_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3139, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3139, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":3117 + /* "netCDF4/_netCDF4.pyx":3140 * self._enumtype = datatype * if datatype==str: * if grp.data_model != 'NETCDF4': # <<<<<<<<<<<<<< * raise ValueError( * 'Variable length strings are only supported for the ' */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3117, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3117, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3140, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":3118 + /* "netCDF4/_netCDF4.pyx":3141 * if datatype==str: * if grp.data_model != 'NETCDF4': * raise ValueError( # <<<<<<<<<<<<<< * 'Variable length strings are only supported for the ' * 'NETCDF4 format. For other formats, consider using ' */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3118, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3141, __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, 3118, __pyx_L1_error) + __PYX_ERR(0, 3141, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3117 + /* "netCDF4/_netCDF4.pyx":3140 * self._enumtype = datatype * if datatype==str: * if grp.data_model != 'NETCDF4': # <<<<<<<<<<<<<< @@ -29188,14 +29234,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ } - /* "netCDF4/_netCDF4.pyx":3123 + /* "netCDF4/_netCDF4.pyx":3146 * 'netCDF4.stringtochar to convert string arrays into ' * 'character arrays with an additional dimension.') * datatype = VLType(self._grp, str, None) # <<<<<<<<<<<<<< * self._vltype = datatype * xtype = datatype._nc_type */ - __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3123, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_self->_grp); __Pyx_GIVEREF(__pyx_v_self->_grp); @@ -29206,13 +29252,13 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None); - __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7netCDF4_8_netCDF4_VLType), __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3123, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7netCDF4_8_netCDF4_VLType), __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_datatype, __pyx_t_5); __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":3124 + /* "netCDF4/_netCDF4.pyx":3147 * 'character arrays with an additional dimension.') * datatype = VLType(self._grp, str, None) * self._vltype = datatype # <<<<<<<<<<<<<< @@ -29225,7 +29271,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __Pyx_DECREF(__pyx_v_self->_vltype); __pyx_v_self->_vltype = __pyx_v_datatype; - /* "netCDF4/_netCDF4.pyx":3116 + /* "netCDF4/_netCDF4.pyx":3139 * self._isenum = True * self._enumtype = datatype * if datatype==str: # <<<<<<<<<<<<<< @@ -29234,27 +29280,27 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ } - /* "netCDF4/_netCDF4.pyx":3125 + /* "netCDF4/_netCDF4.pyx":3148 * datatype = VLType(self._grp, str, None) * self._vltype = datatype * xtype = datatype._nc_type # <<<<<<<<<<<<<< * # dtype variable attribute is a numpy datatype object. * self.dtype = datatype.dtype */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datatype, __pyx_n_s_nc_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3125, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datatype, __pyx_n_s_nc_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_9 = __Pyx_PyInt_As_nc_type(__pyx_t_5); if (unlikely((__pyx_t_9 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3125, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_As_nc_type(__pyx_t_5); if (unlikely((__pyx_t_9 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3148, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_xtype = __pyx_t_9; - /* "netCDF4/_netCDF4.pyx":3127 + /* "netCDF4/_netCDF4.pyx":3150 * xtype = datatype._nc_type * # dtype variable attribute is a numpy datatype object. * self.dtype = datatype.dtype # <<<<<<<<<<<<<< * elif datatype.str[1:] in _supportedtypes: * self._isprimitive = True */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datatype, __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3127, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datatype, __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_GOTREF(__pyx_v_self->dtype); @@ -29262,7 +29308,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __pyx_v_self->dtype = __pyx_t_5; __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":3106 + /* "netCDF4/_netCDF4.pyx":3129 * self._isvlen = False * self._isenum = False * if user_type: # <<<<<<<<<<<<<< @@ -29272,27 +29318,27 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC goto __pyx_L31; } - /* "netCDF4/_netCDF4.pyx":3128 + /* "netCDF4/_netCDF4.pyx":3151 * # dtype variable attribute is a numpy datatype object. * self.dtype = datatype.dtype * elif datatype.str[1:] in _supportedtypes: # <<<<<<<<<<<<<< * self._isprimitive = True * # find netCDF primitive data type corresponding to */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datatype, __pyx_n_s_str); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3128, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datatype, __pyx_n_s_str); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_5, 1, 0, NULL, NULL, &__pyx_slice__39, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3128, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_5, 1, 0, NULL, NULL, &__pyx_slice__43, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_supportedtypes); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3128, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_supportedtypes); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_t_5, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3128, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_t_5, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3151, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_8 = (__pyx_t_1 != 0); if (__pyx_t_8) { - /* "netCDF4/_netCDF4.pyx":3129 + /* "netCDF4/_netCDF4.pyx":3152 * self.dtype = datatype.dtype * elif datatype.str[1:] in _supportedtypes: * self._isprimitive = True # <<<<<<<<<<<<<< @@ -29305,29 +29351,29 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __Pyx_DECREF(__pyx_v_self->_isprimitive); __pyx_v_self->_isprimitive = Py_True; - /* "netCDF4/_netCDF4.pyx":3132 + /* "netCDF4/_netCDF4.pyx":3155 * # find netCDF primitive data type corresponding to * # specified numpy data type. * xtype = _nptonctype[datatype.str[1:]] # <<<<<<<<<<<<<< * # dtype variable attribute is a numpy datatype object. * self.dtype = datatype */ - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3132, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_datatype, __pyx_n_s_str); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3132, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_datatype, __pyx_n_s_str); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_t_3, 1, 0, NULL, NULL, &__pyx_slice__40, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3132, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_t_3, 1, 0, NULL, NULL, &__pyx_slice__44, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_GetItem(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3132, __pyx_L1_error) + __pyx_t_3 = PyObject_GetItem(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_9 = __Pyx_PyInt_As_nc_type(__pyx_t_3); if (unlikely((__pyx_t_9 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3132, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_As_nc_type(__pyx_t_3); if (unlikely((__pyx_t_9 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3155, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_xtype = __pyx_t_9; - /* "netCDF4/_netCDF4.pyx":3134 + /* "netCDF4/_netCDF4.pyx":3157 * xtype = _nptonctype[datatype.str[1:]] * # dtype variable attribute is a numpy datatype object. * self.dtype = datatype # <<<<<<<<<<<<<< @@ -29340,7 +29386,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __Pyx_DECREF(__pyx_v_self->dtype); __pyx_v_self->dtype = __pyx_v_datatype; - /* "netCDF4/_netCDF4.pyx":3128 + /* "netCDF4/_netCDF4.pyx":3151 * # dtype variable attribute is a numpy datatype object. * self.dtype = datatype.dtype * elif datatype.str[1:] in _supportedtypes: # <<<<<<<<<<<<<< @@ -29350,7 +29396,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC goto __pyx_L31; } - /* "netCDF4/_netCDF4.pyx":3136 + /* "netCDF4/_netCDF4.pyx":3159 * self.dtype = datatype * else: * raise TypeError('illegal primitive data type, must be one of %s, got %s' % (_supportedtypes,datatype)) # <<<<<<<<<<<<<< @@ -29358,9 +29404,9 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC * self._varid = kwargs['id'] */ /*else*/ { - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_supportedtypes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3136, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_supportedtypes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3136, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); @@ -29368,48 +29414,48 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __Pyx_GIVEREF(__pyx_v_datatype); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_datatype); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_illegal_primitive_data_type_must, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3136, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_illegal_primitive_data_type_must, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3136, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3159, __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 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3136, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 3136, __pyx_L1_error) + __PYX_ERR(0, 3159, __pyx_L1_error) } __pyx_L31:; - /* "netCDF4/_netCDF4.pyx":3137 + /* "netCDF4/_netCDF4.pyx":3160 * else: * raise TypeError('illegal primitive data type, must be one of %s, got %s' % (_supportedtypes,datatype)) * if 'id' in kwargs: # <<<<<<<<<<<<<< * self._varid = kwargs['id'] * else: */ - __pyx_t_8 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_id, __pyx_v_kwargs, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3137, __pyx_L1_error) + __pyx_t_8 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_id, __pyx_v_kwargs, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3160, __pyx_L1_error) __pyx_t_1 = (__pyx_t_8 != 0); if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":3138 + /* "netCDF4/_netCDF4.pyx":3161 * raise TypeError('illegal primitive data type, must be one of %s, got %s' % (_supportedtypes,datatype)) * if 'id' in kwargs: * self._varid = kwargs['id'] # <<<<<<<<<<<<<< * else: * bytestr = _strencode(name) */ - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_s_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3138, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_s_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3138, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3161, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_self->_varid = __pyx_t_4; - /* "netCDF4/_netCDF4.pyx":3137 + /* "netCDF4/_netCDF4.pyx":3160 * else: * raise TypeError('illegal primitive data type, must be one of %s, got %s' % (_supportedtypes,datatype)) * if 'id' in kwargs: # <<<<<<<<<<<<<< @@ -29419,7 +29465,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC goto __pyx_L39; } - /* "netCDF4/_netCDF4.pyx":3140 + /* "netCDF4/_netCDF4.pyx":3163 * self._varid = kwargs['id'] * else: * bytestr = _strencode(name) # <<<<<<<<<<<<<< @@ -29427,32 +29473,32 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC * ndims = len(dimensions) */ /*else*/ { - __pyx_t_3 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3140, __pyx_L1_error) + __pyx_t_3 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_bytestr = __pyx_t_3; __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":3141 + /* "netCDF4/_netCDF4.pyx":3164 * else: * bytestr = _strencode(name) * varname = bytestr # <<<<<<<<<<<<<< * ndims = len(dimensions) * # find dimension ids. */ - __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 3141, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 3164, __pyx_L1_error) __pyx_v_varname = __pyx_t_10; - /* "netCDF4/_netCDF4.pyx":3142 + /* "netCDF4/_netCDF4.pyx":3165 * bytestr = _strencode(name) * varname = bytestr * ndims = len(dimensions) # <<<<<<<<<<<<<< * # find dimension ids. * if ndims: */ - __pyx_t_11 = PyObject_Length(__pyx_v_dimensions); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 3142, __pyx_L1_error) + __pyx_t_11 = PyObject_Length(__pyx_v_dimensions); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 3165, __pyx_L1_error) __pyx_v_ndims = __pyx_t_11; - /* "netCDF4/_netCDF4.pyx":3144 + /* "netCDF4/_netCDF4.pyx":3167 * ndims = len(dimensions) * # find dimension ids. * if ndims: # <<<<<<<<<<<<<< @@ -29462,19 +29508,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __pyx_t_1 = (__pyx_v_ndims != 0); if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":3145 + /* "netCDF4/_netCDF4.pyx":3168 * # find dimension ids. * if ndims: * dims = [] # <<<<<<<<<<<<<< * dimids = malloc(sizeof(int) * ndims) * for n from 0 <= n < ndims: */ - __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3145, __pyx_L1_error) + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_dims = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":3146 + /* "netCDF4/_netCDF4.pyx":3169 * if ndims: * dims = [] * dimids = malloc(sizeof(int) * ndims) # <<<<<<<<<<<<<< @@ -29483,7 +29529,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ __pyx_v_dimids = ((int *)malloc(((sizeof(int)) * __pyx_v_ndims))); - /* "netCDF4/_netCDF4.pyx":3147 + /* "netCDF4/_netCDF4.pyx":3170 * dims = [] * dimids = malloc(sizeof(int) * ndims) * for n from 0 <= n < ndims: # <<<<<<<<<<<<<< @@ -29493,26 +29539,26 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __pyx_t_4 = __pyx_v_ndims; for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_4; __pyx_v_n++) { - /* "netCDF4/_netCDF4.pyx":3148 + /* "netCDF4/_netCDF4.pyx":3171 * dimids = malloc(sizeof(int) * ndims) * for n from 0 <= n < ndims: * dimname = dimensions[n] # <<<<<<<<<<<<<< * # look for dimension in this group, and if not * # found there, look in parent (and it's parent, etc, back to root). */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_dimensions, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3148, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_dimensions, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_dimname, __pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":3151 + /* "netCDF4/_netCDF4.pyx":3174 * # look for dimension in this group, and if not * # found there, look in parent (and it's parent, etc, back to root). * dim = _find_dim(grp, dimname) # <<<<<<<<<<<<<< * if dim is None: * raise KeyError("dimension %s not defined in group %s or any group in it's family tree" % (dimname, grp.path)) */ - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_find_dim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3151, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_find_dim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = NULL; __pyx_t_12 = 0; @@ -29529,7 +29575,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_grp, __pyx_v_dimname}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3151, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3174, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -29537,13 +29583,13 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_grp, __pyx_v_dimname}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3151, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3174, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_7 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3151, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -29554,7 +29600,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __Pyx_INCREF(__pyx_v_dimname); __Pyx_GIVEREF(__pyx_v_dimname); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_12, __pyx_v_dimname); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3151, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -29562,7 +29608,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __Pyx_XDECREF_SET(__pyx_v_dim, __pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":3152 + /* "netCDF4/_netCDF4.pyx":3175 * # found there, look in parent (and it's parent, etc, back to root). * dim = _find_dim(grp, dimname) * if dim is None: # <<<<<<<<<<<<<< @@ -29573,16 +29619,16 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __pyx_t_8 = (__pyx_t_1 != 0); if (__pyx_t_8) { - /* "netCDF4/_netCDF4.pyx":3153 + /* "netCDF4/_netCDF4.pyx":3176 * dim = _find_dim(grp, dimname) * if dim is None: * raise KeyError("dimension %s not defined in group %s or any group in it's family tree" % (dimname, grp.path)) # <<<<<<<<<<<<<< * dimids[n] = dim._dimid * dims.append(dim) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3153, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3153, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_dimname); __Pyx_GIVEREF(__pyx_v_dimname); @@ -29590,22 +29636,22 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_dimension_s_not_defined_in_group, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3153, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_dimension_s_not_defined_in_group, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3153, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3176, __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 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3153, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 3153, __pyx_L1_error) + __PYX_ERR(0, 3176, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3152 + /* "netCDF4/_netCDF4.pyx":3175 * # found there, look in parent (and it's parent, etc, back to root). * dim = _find_dim(grp, dimname) * if dim is None: # <<<<<<<<<<<<<< @@ -29614,30 +29660,30 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ } - /* "netCDF4/_netCDF4.pyx":3154 + /* "netCDF4/_netCDF4.pyx":3177 * if dim is None: * raise KeyError("dimension %s not defined in group %s or any group in it's family tree" % (dimname, grp.path)) * dimids[n] = dim._dimid # <<<<<<<<<<<<<< * dims.append(dim) * # go into define mode if it's a netCDF 3 compatible */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dim, __pyx_n_s_dimid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3154, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dim, __pyx_n_s_dimid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3154, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3177, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; (__pyx_v_dimids[__pyx_v_n]) = __pyx_t_12; - /* "netCDF4/_netCDF4.pyx":3155 + /* "netCDF4/_netCDF4.pyx":3178 * raise KeyError("dimension %s not defined in group %s or any group in it's family tree" % (dimname, grp.path)) * dimids[n] = dim._dimid * dims.append(dim) # <<<<<<<<<<<<<< * # go into define mode if it's a netCDF 3 compatible * # file format. Be careful to exit define mode before */ - __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_dims, __pyx_v_dim); if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 3155, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_dims, __pyx_v_dim); if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 3178, __pyx_L1_error) } - /* "netCDF4/_netCDF4.pyx":3144 + /* "netCDF4/_netCDF4.pyx":3167 * ndims = len(dimensions) * # find dimension ids. * if ndims: # <<<<<<<<<<<<<< @@ -29646,19 +29692,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ } - /* "netCDF4/_netCDF4.pyx":3159 + /* "netCDF4/_netCDF4.pyx":3182 * # file format. Be careful to exit define mode before * # any exceptions are raised. * if grp.data_model != 'NETCDF4': grp._redef() # <<<<<<<<<<<<<< * # define variable. * if ndims: */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3159, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3159, __pyx_L1_error) + __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3182, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_8) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_redef); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3159, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_redef); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -29671,17 +29717,17 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC } } if (__pyx_t_7) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3159, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3182, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3159, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3182, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - /* "netCDF4/_netCDF4.pyx":3161 + /* "netCDF4/_netCDF4.pyx":3184 * if grp.data_model != 'NETCDF4': grp._redef() * # define variable. * if ndims: # <<<<<<<<<<<<<< @@ -29691,7 +29737,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __pyx_t_8 = (__pyx_v_ndims != 0); if (__pyx_t_8) { - /* "netCDF4/_netCDF4.pyx":3162 + /* "netCDF4/_netCDF4.pyx":3185 * # define variable. * if ndims: * ierr = nc_def_var(self._grpid, varname, xtype, ndims, # <<<<<<<<<<<<<< @@ -29700,7 +29746,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ __pyx_v_ierr = nc_def_var(__pyx_v_self->_grpid, __pyx_v_varname, __pyx_v_xtype, __pyx_v_ndims, __pyx_v_dimids, (&__pyx_v_self->_varid)); - /* "netCDF4/_netCDF4.pyx":3164 + /* "netCDF4/_netCDF4.pyx":3187 * ierr = nc_def_var(self._grpid, varname, xtype, ndims, * dimids, &self._varid) * free(dimids) # <<<<<<<<<<<<<< @@ -29709,7 +29755,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ free(__pyx_v_dimids); - /* "netCDF4/_netCDF4.pyx":3161 + /* "netCDF4/_netCDF4.pyx":3184 * if grp.data_model != 'NETCDF4': grp._redef() * # define variable. * if ndims: # <<<<<<<<<<<<<< @@ -29719,7 +29765,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC goto __pyx_L45; } - /* "netCDF4/_netCDF4.pyx":3166 + /* "netCDF4/_netCDF4.pyx":3189 * free(dimids) * else: # a scalar variable. * ierr = nc_def_var(self._grpid, varname, xtype, ndims, # <<<<<<<<<<<<<< @@ -29728,7 +29774,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ /*else*/ { - /* "netCDF4/_netCDF4.pyx":3167 + /* "netCDF4/_netCDF4.pyx":3190 * else: # a scalar variable. * ierr = nc_def_var(self._grpid, varname, xtype, ndims, * NULL, &self._varid) # <<<<<<<<<<<<<< @@ -29739,22 +29785,22 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC } __pyx_L45:; - /* "netCDF4/_netCDF4.pyx":3172 + /* "netCDF4/_netCDF4.pyx":3195 * # of vars are created. This change only lasts as long as file is * # open. * if grp.data_model.startswith('NETCDF4') and chunk_cache is not None: # <<<<<<<<<<<<<< * ierr = nc_get_var_chunk_cache(self._grpid, self._varid, &sizep, * &nelemsp, &preemptionp) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3172, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3172, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3172, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3172, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3195, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { } else { @@ -29767,7 +29813,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __pyx_L47_bool_binop_done:; if (__pyx_t_8) { - /* "netCDF4/_netCDF4.pyx":3173 + /* "netCDF4/_netCDF4.pyx":3196 * # open. * if grp.data_model.startswith('NETCDF4') and chunk_cache is not None: * ierr = nc_get_var_chunk_cache(self._grpid, self._varid, &sizep, # <<<<<<<<<<<<<< @@ -29776,7 +29822,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ __pyx_v_ierr = nc_get_var_chunk_cache(__pyx_v_self->_grpid, __pyx_v_self->_varid, (&__pyx_v_sizep), (&__pyx_v_nelemsp), (&__pyx_v_preemptionp)); - /* "netCDF4/_netCDF4.pyx":3175 + /* "netCDF4/_netCDF4.pyx":3198 * ierr = nc_get_var_chunk_cache(self._grpid, self._varid, &sizep, * &nelemsp, &preemptionp) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -29786,7 +29832,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __pyx_t_8 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_8) { - /* "netCDF4/_netCDF4.pyx":3176 + /* "netCDF4/_netCDF4.pyx":3199 * &nelemsp, &preemptionp) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -29794,22 +29840,22 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC * sizep = chunk_cache */ __pyx_t_10 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_10, 0, strlen(__pyx_t_10), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3176, __pyx_L1_error) + __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_10, 0, strlen(__pyx_t_10), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3176, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3176, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 3176, __pyx_L1_error) + __PYX_ERR(0, 3199, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3175 + /* "netCDF4/_netCDF4.pyx":3198 * ierr = nc_get_var_chunk_cache(self._grpid, self._varid, &sizep, * &nelemsp, &preemptionp) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -29818,17 +29864,17 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ } - /* "netCDF4/_netCDF4.pyx":3178 + /* "netCDF4/_netCDF4.pyx":3201 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * # reset chunk cache size, leave other parameters unchanged. * sizep = chunk_cache # <<<<<<<<<<<<<< * ierr = nc_set_var_chunk_cache(self._grpid, self._varid, sizep, * nelemsp, preemptionp) */ - __pyx_t_14 = __Pyx_PyInt_As_size_t(__pyx_v_chunk_cache); if (unlikely((__pyx_t_14 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3178, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyInt_As_size_t(__pyx_v_chunk_cache); if (unlikely((__pyx_t_14 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3201, __pyx_L1_error) __pyx_v_sizep = __pyx_t_14; - /* "netCDF4/_netCDF4.pyx":3179 + /* "netCDF4/_netCDF4.pyx":3202 * # reset chunk cache size, leave other parameters unchanged. * sizep = chunk_cache * ierr = nc_set_var_chunk_cache(self._grpid, self._varid, sizep, # <<<<<<<<<<<<<< @@ -29837,7 +29883,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ __pyx_v_ierr = nc_set_var_chunk_cache(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_sizep, __pyx_v_nelemsp, __pyx_v_preemptionp); - /* "netCDF4/_netCDF4.pyx":3181 + /* "netCDF4/_netCDF4.pyx":3204 * ierr = nc_set_var_chunk_cache(self._grpid, self._varid, sizep, * nelemsp, preemptionp) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -29847,7 +29893,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __pyx_t_8 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_8) { - /* "netCDF4/_netCDF4.pyx":3182 + /* "netCDF4/_netCDF4.pyx":3205 * nelemsp, preemptionp) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -29855,22 +29901,22 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC * if grp.data_model != 'NETCDF4': grp._enddef() */ __pyx_t_10 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_10, 0, strlen(__pyx_t_10), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3182, __pyx_L1_error) + __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_10, 0, strlen(__pyx_t_10), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3182, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3182, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 3182, __pyx_L1_error) + __PYX_ERR(0, 3205, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3181 + /* "netCDF4/_netCDF4.pyx":3204 * ierr = nc_set_var_chunk_cache(self._grpid, self._varid, sizep, * nelemsp, preemptionp) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -29879,7 +29925,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ } - /* "netCDF4/_netCDF4.pyx":3172 + /* "netCDF4/_netCDF4.pyx":3195 * # of vars are created. This change only lasts as long as file is * # open. * if grp.data_model.startswith('NETCDF4') and chunk_cache is not None: # <<<<<<<<<<<<<< @@ -29888,7 +29934,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ } - /* "netCDF4/_netCDF4.pyx":3183 + /* "netCDF4/_netCDF4.pyx":3206 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -29898,19 +29944,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __pyx_t_8 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_8) { - /* "netCDF4/_netCDF4.pyx":3184 + /* "netCDF4/_netCDF4.pyx":3207 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * if ierr != NC_NOERR: * if grp.data_model != 'NETCDF4': grp._enddef() # <<<<<<<<<<<<<< * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * # set zlib, shuffle, chunking, fletcher32 and endian */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3184, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3184, __pyx_L1_error) + __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3207, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_8) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3184, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -29923,17 +29969,17 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC } } if (__pyx_t_7) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3184, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3207, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3184, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3207, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - /* "netCDF4/_netCDF4.pyx":3185 + /* "netCDF4/_netCDF4.pyx":3208 * if ierr != NC_NOERR: * if grp.data_model != 'NETCDF4': grp._enddef() * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -29941,22 +29987,22 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC * # variable settings. */ __pyx_t_10 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_10, 0, strlen(__pyx_t_10), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3185, __pyx_L1_error) + __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_10, 0, strlen(__pyx_t_10), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3185, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3185, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 3185, __pyx_L1_error) + __PYX_ERR(0, 3208, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3183 + /* "netCDF4/_netCDF4.pyx":3206 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -29965,36 +30011,36 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ } - /* "netCDF4/_netCDF4.pyx":3192 + /* "netCDF4/_netCDF4.pyx":3215 * # and fletcher32 are silently ignored. Only * # endian='native' allowed for NETCDF3. * if grp.data_model in ['NETCDF4','NETCDF4_CLASSIC']: # <<<<<<<<<<<<<< * # set zlib and shuffle parameters. * if zlib and ndims: # don't bother for scalar variable */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3192, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_NETCDF4, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3192, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_NETCDF4, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3215, __pyx_L1_error) if (!__pyx_t_2) { } else { __pyx_t_8 = __pyx_t_2; goto __pyx_L54_bool_binop_done; } - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_NETCDF4_CLASSIC, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3192, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_NETCDF4_CLASSIC, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3215, __pyx_L1_error) __pyx_t_8 = __pyx_t_2; __pyx_L54_bool_binop_done:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = (__pyx_t_8 != 0); if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":3194 + /* "netCDF4/_netCDF4.pyx":3217 * if grp.data_model in ['NETCDF4','NETCDF4_CLASSIC']: * # set zlib and shuffle parameters. * if zlib and ndims: # don't bother for scalar variable # <<<<<<<<<<<<<< * ideflate_level = complevel * if shuffle: */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_zlib); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3194, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_zlib); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3217, __pyx_L1_error) if (__pyx_t_8) { } else { __pyx_t_2 = __pyx_t_8; @@ -30005,27 +30051,27 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __pyx_L57_bool_binop_done:; if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":3195 + /* "netCDF4/_netCDF4.pyx":3218 * # set zlib and shuffle parameters. * if zlib and ndims: # don't bother for scalar variable * ideflate_level = complevel # <<<<<<<<<<<<<< * if shuffle: * ierr = nc_def_var_deflate(self._grpid, self._varid, 1, 1, ideflate_level) */ - __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_complevel); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3195, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_complevel); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3218, __pyx_L1_error) __pyx_v_ideflate_level = __pyx_t_4; - /* "netCDF4/_netCDF4.pyx":3196 + /* "netCDF4/_netCDF4.pyx":3219 * if zlib and ndims: # don't bother for scalar variable * ideflate_level = complevel * if shuffle: # <<<<<<<<<<<<<< * ierr = nc_def_var_deflate(self._grpid, self._varid, 1, 1, ideflate_level) * else: */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_shuffle); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3196, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_shuffle); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3219, __pyx_L1_error) if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":3197 + /* "netCDF4/_netCDF4.pyx":3220 * ideflate_level = complevel * if shuffle: * ierr = nc_def_var_deflate(self._grpid, self._varid, 1, 1, ideflate_level) # <<<<<<<<<<<<<< @@ -30034,7 +30080,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ __pyx_v_ierr = nc_def_var_deflate(__pyx_v_self->_grpid, __pyx_v_self->_varid, 1, 1, __pyx_v_ideflate_level); - /* "netCDF4/_netCDF4.pyx":3196 + /* "netCDF4/_netCDF4.pyx":3219 * if zlib and ndims: # don't bother for scalar variable * ideflate_level = complevel * if shuffle: # <<<<<<<<<<<<<< @@ -30044,7 +30090,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC goto __pyx_L59; } - /* "netCDF4/_netCDF4.pyx":3199 + /* "netCDF4/_netCDF4.pyx":3222 * ierr = nc_def_var_deflate(self._grpid, self._varid, 1, 1, ideflate_level) * else: * ierr = nc_def_var_deflate(self._grpid, self._varid, 0, 1, ideflate_level) # <<<<<<<<<<<<<< @@ -30056,7 +30102,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC } __pyx_L59:; - /* "netCDF4/_netCDF4.pyx":3200 + /* "netCDF4/_netCDF4.pyx":3223 * else: * ierr = nc_def_var_deflate(self._grpid, self._varid, 0, 1, ideflate_level) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -30066,19 +30112,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __pyx_t_2 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":3201 + /* "netCDF4/_netCDF4.pyx":3224 * ierr = nc_def_var_deflate(self._grpid, self._varid, 0, 1, ideflate_level) * if ierr != NC_NOERR: * if grp.data_model != 'NETCDF4': grp._enddef() # <<<<<<<<<<<<<< * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * # set checksum. */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3201, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3201, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3224, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3201, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -30091,17 +30137,17 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC } } if (__pyx_t_7) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3201, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3224, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3201, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3224, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - /* "netCDF4/_netCDF4.pyx":3202 + /* "netCDF4/_netCDF4.pyx":3225 * if ierr != NC_NOERR: * if grp.data_model != 'NETCDF4': grp._enddef() * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -30109,22 +30155,22 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC * if fletcher32 and ndims: # don't bother for scalar variable */ __pyx_t_10 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_10, 0, strlen(__pyx_t_10), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3202, __pyx_L1_error) + __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_10, 0, strlen(__pyx_t_10), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3202, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3202, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 3202, __pyx_L1_error) + __PYX_ERR(0, 3225, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3200 + /* "netCDF4/_netCDF4.pyx":3223 * else: * ierr = nc_def_var_deflate(self._grpid, self._varid, 0, 1, ideflate_level) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -30133,7 +30179,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ } - /* "netCDF4/_netCDF4.pyx":3194 + /* "netCDF4/_netCDF4.pyx":3217 * if grp.data_model in ['NETCDF4','NETCDF4_CLASSIC']: * # set zlib and shuffle parameters. * if zlib and ndims: # don't bother for scalar variable # <<<<<<<<<<<<<< @@ -30142,14 +30188,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ } - /* "netCDF4/_netCDF4.pyx":3204 + /* "netCDF4/_netCDF4.pyx":3227 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * # set checksum. * if fletcher32 and ndims: # don't bother for scalar variable # <<<<<<<<<<<<<< * ierr = nc_def_var_fletcher32(self._grpid, self._varid, 1) * if ierr != NC_NOERR: */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_fletcher32); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3204, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_fletcher32); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3227, __pyx_L1_error) if (__pyx_t_8) { } else { __pyx_t_2 = __pyx_t_8; @@ -30160,7 +30206,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __pyx_L63_bool_binop_done:; if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":3205 + /* "netCDF4/_netCDF4.pyx":3228 * # set checksum. * if fletcher32 and ndims: # don't bother for scalar variable * ierr = nc_def_var_fletcher32(self._grpid, self._varid, 1) # <<<<<<<<<<<<<< @@ -30169,7 +30215,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ __pyx_v_ierr = nc_def_var_fletcher32(__pyx_v_self->_grpid, __pyx_v_self->_varid, 1); - /* "netCDF4/_netCDF4.pyx":3206 + /* "netCDF4/_netCDF4.pyx":3229 * if fletcher32 and ndims: # don't bother for scalar variable * ierr = nc_def_var_fletcher32(self._grpid, self._varid, 1) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -30179,19 +30225,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __pyx_t_2 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":3207 + /* "netCDF4/_netCDF4.pyx":3230 * ierr = nc_def_var_fletcher32(self._grpid, self._varid, 1) * if ierr != NC_NOERR: * if grp.data_model != 'NETCDF4': grp._enddef() # <<<<<<<<<<<<<< * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * # set chunking stuff. */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3207, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3207, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3230, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3207, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -30204,17 +30250,17 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC } } if (__pyx_t_7) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3207, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3230, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3207, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3230, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - /* "netCDF4/_netCDF4.pyx":3208 + /* "netCDF4/_netCDF4.pyx":3231 * if ierr != NC_NOERR: * if grp.data_model != 'NETCDF4': grp._enddef() * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -30222,22 +30268,22 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC * if ndims: # don't bother for scalar variable. */ __pyx_t_10 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_10, 0, strlen(__pyx_t_10), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3208, __pyx_L1_error) + __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_10, 0, strlen(__pyx_t_10), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3231, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3208, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3231, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3208, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3231, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 3208, __pyx_L1_error) + __PYX_ERR(0, 3231, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3206 + /* "netCDF4/_netCDF4.pyx":3229 * if fletcher32 and ndims: # don't bother for scalar variable * ierr = nc_def_var_fletcher32(self._grpid, self._varid, 1) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -30246,7 +30292,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ } - /* "netCDF4/_netCDF4.pyx":3204 + /* "netCDF4/_netCDF4.pyx":3227 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * # set checksum. * if fletcher32 and ndims: # don't bother for scalar variable # <<<<<<<<<<<<<< @@ -30255,7 +30301,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ } - /* "netCDF4/_netCDF4.pyx":3210 + /* "netCDF4/_netCDF4.pyx":3233 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * # set chunking stuff. * if ndims: # don't bother for scalar variable. # <<<<<<<<<<<<<< @@ -30265,17 +30311,17 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __pyx_t_2 = (__pyx_v_ndims != 0); if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":3211 + /* "netCDF4/_netCDF4.pyx":3234 * # set chunking stuff. * if ndims: # don't bother for scalar variable. * if contiguous: # <<<<<<<<<<<<<< * icontiguous = NC_CONTIGUOUS * if chunksizes is not None: */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_contiguous); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3211, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_contiguous); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3234, __pyx_L1_error) if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":3212 + /* "netCDF4/_netCDF4.pyx":3235 * if ndims: # don't bother for scalar variable. * if contiguous: * icontiguous = NC_CONTIGUOUS # <<<<<<<<<<<<<< @@ -30284,7 +30330,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ __pyx_v_icontiguous = NC_CONTIGUOUS; - /* "netCDF4/_netCDF4.pyx":3213 + /* "netCDF4/_netCDF4.pyx":3236 * if contiguous: * icontiguous = NC_CONTIGUOUS * if chunksizes is not None: # <<<<<<<<<<<<<< @@ -30295,20 +30341,20 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __pyx_t_8 = (__pyx_t_2 != 0); if (__pyx_t_8) { - /* "netCDF4/_netCDF4.pyx":3214 + /* "netCDF4/_netCDF4.pyx":3237 * icontiguous = NC_CONTIGUOUS * if chunksizes is not None: * raise ValueError('cannot specify chunksizes for a contiguous dataset') # <<<<<<<<<<<<<< * else: * icontiguous = NC_CHUNKED */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3214, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3237, __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, 3214, __pyx_L1_error) + __PYX_ERR(0, 3237, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3213 + /* "netCDF4/_netCDF4.pyx":3236 * if contiguous: * icontiguous = NC_CONTIGUOUS * if chunksizes is not None: # <<<<<<<<<<<<<< @@ -30317,7 +30363,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ } - /* "netCDF4/_netCDF4.pyx":3211 + /* "netCDF4/_netCDF4.pyx":3234 * # set chunking stuff. * if ndims: # don't bother for scalar variable. * if contiguous: # <<<<<<<<<<<<<< @@ -30327,7 +30373,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC goto __pyx_L68; } - /* "netCDF4/_netCDF4.pyx":3216 + /* "netCDF4/_netCDF4.pyx":3239 * raise ValueError('cannot specify chunksizes for a contiguous dataset') * else: * icontiguous = NC_CHUNKED # <<<<<<<<<<<<<< @@ -30339,7 +30385,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC } __pyx_L68:; - /* "netCDF4/_netCDF4.pyx":3217 + /* "netCDF4/_netCDF4.pyx":3240 * else: * icontiguous = NC_CHUNKED * if chunksizes is None: # <<<<<<<<<<<<<< @@ -30350,7 +30396,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __pyx_t_2 = (__pyx_t_8 != 0); if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":3218 + /* "netCDF4/_netCDF4.pyx":3241 * icontiguous = NC_CHUNKED * if chunksizes is None: * chunksizesp = NULL # <<<<<<<<<<<<<< @@ -30359,7 +30405,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ __pyx_v_chunksizesp = NULL; - /* "netCDF4/_netCDF4.pyx":3217 + /* "netCDF4/_netCDF4.pyx":3240 * else: * icontiguous = NC_CHUNKED * if chunksizes is None: # <<<<<<<<<<<<<< @@ -30369,7 +30415,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC goto __pyx_L70; } - /* "netCDF4/_netCDF4.pyx":3220 + /* "netCDF4/_netCDF4.pyx":3243 * chunksizesp = NULL * else: * if len(chunksizes) != len(dimensions): # <<<<<<<<<<<<<< @@ -30377,24 +30423,24 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC * raise ValueError('chunksizes must be a sequence with the same length as dimensions') */ /*else*/ { - __pyx_t_11 = PyObject_Length(__pyx_v_chunksizes); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 3220, __pyx_L1_error) - __pyx_t_15 = PyObject_Length(__pyx_v_dimensions); if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 3220, __pyx_L1_error) + __pyx_t_11 = PyObject_Length(__pyx_v_chunksizes); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 3243, __pyx_L1_error) + __pyx_t_15 = PyObject_Length(__pyx_v_dimensions); if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 3243, __pyx_L1_error) __pyx_t_2 = ((__pyx_t_11 != __pyx_t_15) != 0); if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":3221 + /* "netCDF4/_netCDF4.pyx":3244 * else: * if len(chunksizes) != len(dimensions): * if grp.data_model != 'NETCDF4': grp._enddef() # <<<<<<<<<<<<<< * raise ValueError('chunksizes must be a sequence with the same length as dimensions') * chunksizesp = malloc(sizeof(size_t) * ndims) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3221, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3221, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3244, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3221, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -30407,30 +30453,30 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC } } if (__pyx_t_7) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3221, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3244, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3221, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3244, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - /* "netCDF4/_netCDF4.pyx":3222 + /* "netCDF4/_netCDF4.pyx":3245 * if len(chunksizes) != len(dimensions): * if grp.data_model != 'NETCDF4': grp._enddef() * raise ValueError('chunksizes must be a sequence with the same length as dimensions') # <<<<<<<<<<<<<< * chunksizesp = malloc(sizeof(size_t) * ndims) * for n from 0 <= n < ndims: */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3222, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3245, __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, 3222, __pyx_L1_error) + __PYX_ERR(0, 3245, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3220 + /* "netCDF4/_netCDF4.pyx":3243 * chunksizesp = NULL * else: * if len(chunksizes) != len(dimensions): # <<<<<<<<<<<<<< @@ -30439,7 +30485,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ } - /* "netCDF4/_netCDF4.pyx":3223 + /* "netCDF4/_netCDF4.pyx":3246 * if grp.data_model != 'NETCDF4': grp._enddef() * raise ValueError('chunksizes must be a sequence with the same length as dimensions') * chunksizesp = malloc(sizeof(size_t) * ndims) # <<<<<<<<<<<<<< @@ -30448,7 +30494,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ __pyx_v_chunksizesp = ((size_t *)malloc(((sizeof(size_t)) * __pyx_v_ndims))); - /* "netCDF4/_netCDF4.pyx":3224 + /* "netCDF4/_netCDF4.pyx":3247 * raise ValueError('chunksizes must be a sequence with the same length as dimensions') * chunksizesp = malloc(sizeof(size_t) * ndims) * for n from 0 <= n < ndims: # <<<<<<<<<<<<<< @@ -30458,17 +30504,17 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __pyx_t_4 = __pyx_v_ndims; for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_4; __pyx_v_n++) { - /* "netCDF4/_netCDF4.pyx":3225 + /* "netCDF4/_netCDF4.pyx":3248 * chunksizesp = malloc(sizeof(size_t) * ndims) * for n from 0 <= n < ndims: * if not dims[n].isunlimited() and \ # <<<<<<<<<<<<<< * chunksizes[n] > dims[n].size: * msg = 'chunksize cannot exceed dimension size' */ - if (unlikely(!__pyx_v_dims)) { __Pyx_RaiseUnboundLocalError("dims"); __PYX_ERR(0, 3225, __pyx_L1_error) } - __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_dims, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3225, __pyx_L1_error) + if (unlikely(!__pyx_v_dims)) { __Pyx_RaiseUnboundLocalError("dims"); __PYX_ERR(0, 3248, __pyx_L1_error) } + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_dims, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_isunlimited); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3225, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_isunlimited); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -30482,14 +30528,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC } } if (__pyx_t_6) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3225, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3248, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3225, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3248, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3225, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3248, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = ((!__pyx_t_8) != 0); if (__pyx_t_1) { @@ -30498,30 +30544,30 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC goto __pyx_L76_bool_binop_done; } - /* "netCDF4/_netCDF4.pyx":3226 + /* "netCDF4/_netCDF4.pyx":3249 * for n from 0 <= n < ndims: * if not dims[n].isunlimited() and \ * chunksizes[n] > dims[n].size: # <<<<<<<<<<<<<< * msg = 'chunksize cannot exceed dimension size' * raise ValueError(msg) */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_chunksizes, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3226, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_chunksizes, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (unlikely(!__pyx_v_dims)) { __Pyx_RaiseUnboundLocalError("dims"); __PYX_ERR(0, 3226, __pyx_L1_error) } - __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_dims, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3226, __pyx_L1_error) + if (unlikely(!__pyx_v_dims)) { __Pyx_RaiseUnboundLocalError("dims"); __PYX_ERR(0, 3249, __pyx_L1_error) } + __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_dims, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_size); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3226, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_size); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyObject_RichCompare(__pyx_t_3, __pyx_t_6, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3226, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(__pyx_t_3, __pyx_t_6, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3249, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3226, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3249, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_2 = __pyx_t_1; __pyx_L76_bool_binop_done:; - /* "netCDF4/_netCDF4.pyx":3225 + /* "netCDF4/_netCDF4.pyx":3248 * chunksizesp = malloc(sizeof(size_t) * ndims) * for n from 0 <= n < ndims: * if not dims[n].isunlimited() and \ # <<<<<<<<<<<<<< @@ -30530,7 +30576,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":3227 + /* "netCDF4/_netCDF4.pyx":3250 * if not dims[n].isunlimited() and \ * chunksizes[n] > dims[n].size: * msg = 'chunksize cannot exceed dimension size' # <<<<<<<<<<<<<< @@ -30540,26 +30586,26 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __Pyx_INCREF(__pyx_kp_s_chunksize_cannot_exceed_dimensio); __Pyx_XDECREF_SET(__pyx_v_msg, __pyx_kp_s_chunksize_cannot_exceed_dimensio); - /* "netCDF4/_netCDF4.pyx":3228 + /* "netCDF4/_netCDF4.pyx":3251 * chunksizes[n] > dims[n].size: * msg = 'chunksize cannot exceed dimension size' * raise ValueError(msg) # <<<<<<<<<<<<<< * chunksizesp[n] = chunksizes[n] * if chunksizes is not None or contiguous: */ - __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3228, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_msg); __Pyx_GIVEREF(__pyx_v_msg); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_msg); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3228, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 3228, __pyx_L1_error) + __PYX_ERR(0, 3251, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3225 + /* "netCDF4/_netCDF4.pyx":3248 * chunksizesp = malloc(sizeof(size_t) * ndims) * for n from 0 <= n < ndims: * if not dims[n].isunlimited() and \ # <<<<<<<<<<<<<< @@ -30568,23 +30614,23 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ } - /* "netCDF4/_netCDF4.pyx":3229 + /* "netCDF4/_netCDF4.pyx":3252 * msg = 'chunksize cannot exceed dimension size' * raise ValueError(msg) * chunksizesp[n] = chunksizes[n] # <<<<<<<<<<<<<< * if chunksizes is not None or contiguous: * ierr = nc_def_var_chunking(self._grpid, self._varid, icontiguous, chunksizesp) */ - __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_chunksizes, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3229, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_chunksizes, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_14 = __Pyx_PyInt_As_size_t(__pyx_t_6); if (unlikely((__pyx_t_14 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3229, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyInt_As_size_t(__pyx_t_6); if (unlikely((__pyx_t_14 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3252, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; (__pyx_v_chunksizesp[__pyx_v_n]) = __pyx_t_14; } } __pyx_L70:; - /* "netCDF4/_netCDF4.pyx":3230 + /* "netCDF4/_netCDF4.pyx":3253 * raise ValueError(msg) * chunksizesp[n] = chunksizes[n] * if chunksizes is not None or contiguous: # <<<<<<<<<<<<<< @@ -30598,12 +30644,12 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __pyx_t_2 = __pyx_t_8; goto __pyx_L79_bool_binop_done; } - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_contiguous); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3230, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_contiguous); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3253, __pyx_L1_error) __pyx_t_2 = __pyx_t_8; __pyx_L79_bool_binop_done:; if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":3231 + /* "netCDF4/_netCDF4.pyx":3254 * chunksizesp[n] = chunksizes[n] * if chunksizes is not None or contiguous: * ierr = nc_def_var_chunking(self._grpid, self._varid, icontiguous, chunksizesp) # <<<<<<<<<<<<<< @@ -30612,7 +30658,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ __pyx_v_ierr = nc_def_var_chunking(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_icontiguous, __pyx_v_chunksizesp); - /* "netCDF4/_netCDF4.pyx":3232 + /* "netCDF4/_netCDF4.pyx":3255 * if chunksizes is not None or contiguous: * ierr = nc_def_var_chunking(self._grpid, self._varid, icontiguous, chunksizesp) * free(chunksizesp) # <<<<<<<<<<<<<< @@ -30621,7 +30667,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ free(__pyx_v_chunksizesp); - /* "netCDF4/_netCDF4.pyx":3233 + /* "netCDF4/_netCDF4.pyx":3256 * ierr = nc_def_var_chunking(self._grpid, self._varid, icontiguous, chunksizesp) * free(chunksizesp) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -30631,19 +30677,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __pyx_t_2 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":3234 + /* "netCDF4/_netCDF4.pyx":3257 * free(chunksizesp) * if ierr != NC_NOERR: * if grp.data_model != 'NETCDF4': grp._enddef() # <<<<<<<<<<<<<< * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * # set endian-ness of variable */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3234, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3234, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3257, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_2) { - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3234, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -30656,17 +30702,17 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC } } if (__pyx_t_3) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3234, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3257, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3234, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3257, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } - /* "netCDF4/_netCDF4.pyx":3235 + /* "netCDF4/_netCDF4.pyx":3258 * if ierr != NC_NOERR: * if grp.data_model != 'NETCDF4': grp._enddef() * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -30674,22 +30720,22 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC * if endian == 'little': */ __pyx_t_10 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_6 = __Pyx_decode_c_string(__pyx_t_10, 0, strlen(__pyx_t_10), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3235, __pyx_L1_error) + __pyx_t_6 = __Pyx_decode_c_string(__pyx_t_10, 0, strlen(__pyx_t_10), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3235, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3235, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 3235, __pyx_L1_error) + __PYX_ERR(0, 3258, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3233 + /* "netCDF4/_netCDF4.pyx":3256 * ierr = nc_def_var_chunking(self._grpid, self._varid, icontiguous, chunksizesp) * free(chunksizesp) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -30698,7 +30744,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ } - /* "netCDF4/_netCDF4.pyx":3230 + /* "netCDF4/_netCDF4.pyx":3253 * raise ValueError(msg) * chunksizesp[n] = chunksizes[n] * if chunksizes is not None or contiguous: # <<<<<<<<<<<<<< @@ -30707,7 +30753,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ } - /* "netCDF4/_netCDF4.pyx":3210 + /* "netCDF4/_netCDF4.pyx":3233 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * # set chunking stuff. * if ndims: # don't bother for scalar variable. # <<<<<<<<<<<<<< @@ -30716,17 +30762,17 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ } - /* "netCDF4/_netCDF4.pyx":3237 + /* "netCDF4/_netCDF4.pyx":3260 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * # set endian-ness of variable * if endian == 'little': # <<<<<<<<<<<<<< * ierr = nc_def_var_endian(self._grpid, self._varid, NC_ENDIAN_LITTLE) * elif endian == 'big': */ - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_endian, __pyx_n_s_little, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3237, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_endian, __pyx_n_s_little, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3260, __pyx_L1_error) if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":3238 + /* "netCDF4/_netCDF4.pyx":3261 * # set endian-ness of variable * if endian == 'little': * ierr = nc_def_var_endian(self._grpid, self._varid, NC_ENDIAN_LITTLE) # <<<<<<<<<<<<<< @@ -30735,7 +30781,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ __pyx_v_ierr = nc_def_var_endian(__pyx_v_self->_grpid, __pyx_v_self->_varid, NC_ENDIAN_LITTLE); - /* "netCDF4/_netCDF4.pyx":3237 + /* "netCDF4/_netCDF4.pyx":3260 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * # set endian-ness of variable * if endian == 'little': # <<<<<<<<<<<<<< @@ -30745,17 +30791,17 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC goto __pyx_L83; } - /* "netCDF4/_netCDF4.pyx":3239 + /* "netCDF4/_netCDF4.pyx":3262 * if endian == 'little': * ierr = nc_def_var_endian(self._grpid, self._varid, NC_ENDIAN_LITTLE) * elif endian == 'big': # <<<<<<<<<<<<<< * ierr = nc_def_var_endian(self._grpid, self._varid, NC_ENDIAN_BIG) * elif endian == 'native': */ - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_endian, __pyx_n_s_big, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3239, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_endian, __pyx_n_s_big, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3262, __pyx_L1_error) if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":3240 + /* "netCDF4/_netCDF4.pyx":3263 * ierr = nc_def_var_endian(self._grpid, self._varid, NC_ENDIAN_LITTLE) * elif endian == 'big': * ierr = nc_def_var_endian(self._grpid, self._varid, NC_ENDIAN_BIG) # <<<<<<<<<<<<<< @@ -30764,7 +30810,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ __pyx_v_ierr = nc_def_var_endian(__pyx_v_self->_grpid, __pyx_v_self->_varid, NC_ENDIAN_BIG); - /* "netCDF4/_netCDF4.pyx":3239 + /* "netCDF4/_netCDF4.pyx":3262 * if endian == 'little': * ierr = nc_def_var_endian(self._grpid, self._varid, NC_ENDIAN_LITTLE) * elif endian == 'big': # <<<<<<<<<<<<<< @@ -30774,19 +30820,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC goto __pyx_L83; } - /* "netCDF4/_netCDF4.pyx":3241 + /* "netCDF4/_netCDF4.pyx":3264 * elif endian == 'big': * ierr = nc_def_var_endian(self._grpid, self._varid, NC_ENDIAN_BIG) * elif endian == 'native': # <<<<<<<<<<<<<< * pass # this is the default format. * else: */ - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_endian, __pyx_n_s_native, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3241, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_endian, __pyx_n_s_native, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3264, __pyx_L1_error) if (__pyx_t_2) { goto __pyx_L83; } - /* "netCDF4/_netCDF4.pyx":3244 + /* "netCDF4/_netCDF4.pyx":3267 * pass # this is the default format. * else: * raise ValueError("'endian' keyword argument must be 'little','big' or 'native', got '%s'" % endian) # <<<<<<<<<<<<<< @@ -30794,23 +30840,23 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC * if grp.data_model != 'NETCDF4': grp._enddef() */ /*else*/ { - __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_endian_keyword_argument_must_be, __pyx_v_endian); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3244, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_endian_keyword_argument_must_be, __pyx_v_endian); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3244, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3267, __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 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3244, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 3244, __pyx_L1_error) + __PYX_ERR(0, 3267, __pyx_L1_error) } __pyx_L83:; - /* "netCDF4/_netCDF4.pyx":3245 + /* "netCDF4/_netCDF4.pyx":3268 * else: * raise ValueError("'endian' keyword argument must be 'little','big' or 'native', got '%s'" % endian) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -30820,19 +30866,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __pyx_t_2 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":3246 + /* "netCDF4/_netCDF4.pyx":3269 * raise ValueError("'endian' keyword argument must be 'little','big' or 'native', got '%s'" % endian) * if ierr != NC_NOERR: * if grp.data_model != 'NETCDF4': grp._enddef() # <<<<<<<<<<<<<< * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * else: */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3246, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3246, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3269, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_2) { - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3246, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -30845,17 +30891,17 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC } } if (__pyx_t_3) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3246, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3269, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3246, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3269, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } - /* "netCDF4/_netCDF4.pyx":3247 + /* "netCDF4/_netCDF4.pyx":3270 * if ierr != NC_NOERR: * if grp.data_model != 'NETCDF4': grp._enddef() * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -30863,22 +30909,22 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC * if endian != 'native': */ __pyx_t_10 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_6 = __Pyx_decode_c_string(__pyx_t_10, 0, strlen(__pyx_t_10), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3247, __pyx_L1_error) + __pyx_t_6 = __Pyx_decode_c_string(__pyx_t_10, 0, strlen(__pyx_t_10), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3247, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3247, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 3247, __pyx_L1_error) + __PYX_ERR(0, 3270, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3245 + /* "netCDF4/_netCDF4.pyx":3268 * else: * raise ValueError("'endian' keyword argument must be 'little','big' or 'native', got '%s'" % endian) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -30887,7 +30933,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ } - /* "netCDF4/_netCDF4.pyx":3192 + /* "netCDF4/_netCDF4.pyx":3215 * # and fletcher32 are silently ignored. Only * # endian='native' allowed for NETCDF3. * if grp.data_model in ['NETCDF4','NETCDF4_CLASSIC']: # <<<<<<<<<<<<<< @@ -30897,7 +30943,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC goto __pyx_L53; } - /* "netCDF4/_netCDF4.pyx":3249 + /* "netCDF4/_netCDF4.pyx":3272 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * else: * if endian != 'native': # <<<<<<<<<<<<<< @@ -30905,10 +30951,10 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC * raise RuntimeError(msg) */ /*else*/ { - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_endian, __pyx_n_s_native, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3249, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_endian, __pyx_n_s_native, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3272, __pyx_L1_error) if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":3250 + /* "netCDF4/_netCDF4.pyx":3273 * else: * if endian != 'native': * msg="only endian='native' allowed for NETCDF3 files" # <<<<<<<<<<<<<< @@ -30918,26 +30964,26 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __Pyx_INCREF(__pyx_kp_s_only_endian_native_allowed_for_N); __Pyx_XDECREF_SET(__pyx_v_msg, __pyx_kp_s_only_endian_native_allowed_for_N); - /* "netCDF4/_netCDF4.pyx":3251 + /* "netCDF4/_netCDF4.pyx":3274 * if endian != 'native': * msg="only endian='native' allowed for NETCDF3 files" * raise RuntimeError(msg) # <<<<<<<<<<<<<< * # set a fill value for this variable if fill_value keyword * # given. This avoids the HDF5 overhead of deleting and */ - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3251, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3274, __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_7 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3251, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __PYX_ERR(0, 3251, __pyx_L1_error) + __PYX_ERR(0, 3274, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3249 + /* "netCDF4/_netCDF4.pyx":3272 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * else: * if endian != 'native': # <<<<<<<<<<<<<< @@ -30948,7 +30994,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC } __pyx_L53:; - /* "netCDF4/_netCDF4.pyx":3255 + /* "netCDF4/_netCDF4.pyx":3278 * # given. This avoids the HDF5 overhead of deleting and * # recreating the dataset if it is set later (after the enddef). * if fill_value is not None: # <<<<<<<<<<<<<< @@ -30959,14 +31005,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __pyx_t_8 = (__pyx_t_2 != 0); if (__pyx_t_8) { - /* "netCDF4/_netCDF4.pyx":3256 + /* "netCDF4/_netCDF4.pyx":3279 * # recreating the dataset if it is set later (after the enddef). * if fill_value is not None: * if not fill_value and isinstance(fill_value,bool): # <<<<<<<<<<<<<< * # no filling for this variable if fill_value==False. * if not self._isprimitive: */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_fill_value); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3256, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_fill_value); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3279, __pyx_L1_error) __pyx_t_1 = ((!__pyx_t_2) != 0); if (__pyx_t_1) { } else { @@ -30975,25 +31021,25 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC } __pyx_t_7 = ((PyObject*)&PyBool_Type); __Pyx_INCREF(__pyx_t_7); - __pyx_t_1 = PyObject_IsInstance(__pyx_v_fill_value, __pyx_t_7); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 3256, __pyx_L1_error) + __pyx_t_1 = PyObject_IsInstance(__pyx_v_fill_value, __pyx_t_7); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 3279, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_2 = (__pyx_t_1 != 0); __pyx_t_8 = __pyx_t_2; __pyx_L89_bool_binop_done:; if (__pyx_t_8) { - /* "netCDF4/_netCDF4.pyx":3258 + /* "netCDF4/_netCDF4.pyx":3281 * if not fill_value and isinstance(fill_value,bool): * # no filling for this variable if fill_value==False. * if not self._isprimitive: # <<<<<<<<<<<<<< * # no fill values for VLEN and compound variables * # anyway. */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3258, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3281, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_8) != 0); if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":3261 + /* "netCDF4/_netCDF4.pyx":3284 * # no fill values for VLEN and compound variables * # anyway. * ierr = 0 # <<<<<<<<<<<<<< @@ -31002,7 +31048,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ __pyx_v_ierr = 0; - /* "netCDF4/_netCDF4.pyx":3258 + /* "netCDF4/_netCDF4.pyx":3281 * if not fill_value and isinstance(fill_value,bool): * # no filling for this variable if fill_value==False. * if not self._isprimitive: # <<<<<<<<<<<<<< @@ -31012,7 +31058,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC goto __pyx_L91; } - /* "netCDF4/_netCDF4.pyx":3263 + /* "netCDF4/_netCDF4.pyx":3286 * ierr = 0 * else: * ierr = nc_def_var_fill(self._grpid, self._varid, 1, NULL) # <<<<<<<<<<<<<< @@ -31024,7 +31070,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC } __pyx_L91:; - /* "netCDF4/_netCDF4.pyx":3264 + /* "netCDF4/_netCDF4.pyx":3287 * else: * ierr = nc_def_var_fill(self._grpid, self._varid, 1, NULL) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -31034,19 +31080,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __pyx_t_2 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":3265 + /* "netCDF4/_netCDF4.pyx":3288 * ierr = nc_def_var_fill(self._grpid, self._varid, 1, NULL) * if ierr != NC_NOERR: * if grp.data_model != 'NETCDF4': grp._enddef() # <<<<<<<<<<<<<< * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * else: */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3265, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3265, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3288, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3265, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -31059,17 +31105,17 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC } } if (__pyx_t_3) { - __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3265, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3288, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3265, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3288, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } - /* "netCDF4/_netCDF4.pyx":3266 + /* "netCDF4/_netCDF4.pyx":3289 * if ierr != NC_NOERR: * if grp.data_model != 'NETCDF4': grp._enddef() * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -31077,22 +31123,22 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC * # cast fill_value to type of variable. */ __pyx_t_10 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_7 = __Pyx_decode_c_string(__pyx_t_10, 0, strlen(__pyx_t_10), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3266, __pyx_L1_error) + __pyx_t_7 = __Pyx_decode_c_string(__pyx_t_10, 0, strlen(__pyx_t_10), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3266, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3266, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __PYX_ERR(0, 3266, __pyx_L1_error) + __PYX_ERR(0, 3289, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3264 + /* "netCDF4/_netCDF4.pyx":3287 * else: * ierr = nc_def_var_fill(self._grpid, self._varid, 1, NULL) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -31101,7 +31147,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ } - /* "netCDF4/_netCDF4.pyx":3256 + /* "netCDF4/_netCDF4.pyx":3279 * # recreating the dataset if it is set later (after the enddef). * if fill_value is not None: * if not fill_value and isinstance(fill_value,bool): # <<<<<<<<<<<<<< @@ -31111,7 +31157,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC goto __pyx_L88; } - /* "netCDF4/_netCDF4.pyx":3271 + /* "netCDF4/_netCDF4.pyx":3294 * # also make sure it is written in native byte order * # (the same as the data) * if self._isprimitive or self._isenum: # <<<<<<<<<<<<<< @@ -31119,27 +31165,27 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC * if not fillval.dtype.isnative: fillval.byteswap(True) */ /*else*/ { - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3271, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3294, __pyx_L1_error) if (!__pyx_t_8) { } else { __pyx_t_2 = __pyx_t_8; goto __pyx_L95_bool_binop_done; } - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isenum); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3271, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isenum); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3294, __pyx_L1_error) __pyx_t_2 = __pyx_t_8; __pyx_L95_bool_binop_done:; if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":3272 + /* "netCDF4/_netCDF4.pyx":3295 * # (the same as the data) * if self._isprimitive or self._isenum: * fillval = numpy.array(fill_value, self.dtype) # <<<<<<<<<<<<<< * if not fillval.dtype.isnative: fillval.byteswap(True) * _set_att(self._grp, self._varid, '_FillValue',\ */ - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3272, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3272, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -31157,7 +31203,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_fill_value, __pyx_v_self->dtype}; - __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3272, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3295, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_7); } else @@ -31165,13 +31211,13 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_fill_value, __pyx_v_self->dtype}; - __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3272, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3295, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_7); } else #endif { - __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3272, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -31182,7 +31228,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __Pyx_INCREF(__pyx_v_self->dtype); __Pyx_GIVEREF(__pyx_v_self->dtype); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_self->dtype); - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3272, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -31190,31 +31236,31 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __pyx_v_fillval = __pyx_t_7; __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":3273 + /* "netCDF4/_netCDF4.pyx":3296 * if self._isprimitive or self._isenum: * fillval = numpy.array(fill_value, self.dtype) * if not fillval.dtype.isnative: fillval.byteswap(True) # <<<<<<<<<<<<<< * _set_att(self._grp, self._varid, '_FillValue',\ * fillval, xtype=xtype) */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_fillval, __pyx_n_s_dtype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3273, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_fillval, __pyx_n_s_dtype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_isnative); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3273, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_isnative); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3273, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3296, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = ((!__pyx_t_2) != 0); if (__pyx_t_8) { - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_fillval, __pyx_n_s_byteswap); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3273, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_fillval, __pyx_n_s_byteswap); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3273, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } - /* "netCDF4/_netCDF4.pyx":3274 + /* "netCDF4/_netCDF4.pyx":3297 * fillval = numpy.array(fill_value, self.dtype) * if not fillval.dtype.isnative: fillval.byteswap(True) * _set_att(self._grp, self._varid, '_FillValue',\ # <<<<<<<<<<<<<< @@ -31224,7 +31270,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __pyx_t_7 = __pyx_v_self->_grp; __Pyx_INCREF(__pyx_t_7); - /* "netCDF4/_netCDF4.pyx":3275 + /* "netCDF4/_netCDF4.pyx":3298 * if not fillval.dtype.isnative: fillval.byteswap(True) * _set_att(self._grp, self._varid, '_FillValue',\ * fillval, xtype=xtype) # <<<<<<<<<<<<<< @@ -31233,12 +31279,12 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ __pyx_t_16.__pyx_n = 1; __pyx_t_16.xtype = __pyx_v_xtype; - __pyx_t_3 = __pyx_f_7netCDF4_8_netCDF4__set_att(__pyx_t_7, __pyx_v_self->_varid, __pyx_n_s_FillValue, __pyx_v_fillval, &__pyx_t_16); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3274, __pyx_L1_error) + __pyx_t_3 = __pyx_f_7netCDF4_8_netCDF4__set_att(__pyx_t_7, __pyx_v_self->_varid, __pyx_n_s_FillValue, __pyx_v_fillval, &__pyx_t_16); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3297, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":3271 + /* "netCDF4/_netCDF4.pyx":3294 * # also make sure it is written in native byte order * # (the same as the data) * if self._isprimitive or self._isenum: # <<<<<<<<<<<<<< @@ -31248,7 +31294,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC goto __pyx_L94; } - /* "netCDF4/_netCDF4.pyx":3277 + /* "netCDF4/_netCDF4.pyx":3300 * fillval, xtype=xtype) * else: * raise AttributeError("cannot set _FillValue attribute for VLEN or compound variable") # <<<<<<<<<<<<<< @@ -31256,17 +31302,17 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC * self.least_significant_digit = least_significant_digit */ /*else*/ { - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3277, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3300, __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, 3277, __pyx_L1_error) + __PYX_ERR(0, 3300, __pyx_L1_error) } __pyx_L94:; } __pyx_L88:; - /* "netCDF4/_netCDF4.pyx":3255 + /* "netCDF4/_netCDF4.pyx":3278 * # given. This avoids the HDF5 overhead of deleting and * # recreating the dataset if it is set later (after the enddef). * if fill_value is not None: # <<<<<<<<<<<<<< @@ -31275,7 +31321,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ } - /* "netCDF4/_netCDF4.pyx":3278 + /* "netCDF4/_netCDF4.pyx":3301 * else: * raise AttributeError("cannot set _FillValue attribute for VLEN or compound variable") * if least_significant_digit is not None: # <<<<<<<<<<<<<< @@ -31286,16 +31332,16 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __pyx_t_2 = (__pyx_t_8 != 0); if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":3279 + /* "netCDF4/_netCDF4.pyx":3302 * raise AttributeError("cannot set _FillValue attribute for VLEN or compound variable") * if least_significant_digit is not None: * self.least_significant_digit = least_significant_digit # <<<<<<<<<<<<<< * # leave define mode if not a NETCDF4 format file. * if grp.data_model != 'NETCDF4': grp._enddef() */ - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_least_significant_digit, __pyx_v_least_significant_digit) < 0) __PYX_ERR(0, 3279, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_least_significant_digit, __pyx_v_least_significant_digit) < 0) __PYX_ERR(0, 3302, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3278 + /* "netCDF4/_netCDF4.pyx":3301 * else: * raise AttributeError("cannot set _FillValue attribute for VLEN or compound variable") * if least_significant_digit is not None: # <<<<<<<<<<<<<< @@ -31304,19 +31350,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ } - /* "netCDF4/_netCDF4.pyx":3281 + /* "netCDF4/_netCDF4.pyx":3304 * self.least_significant_digit = least_significant_digit * # leave define mode if not a NETCDF4 format file. * if grp.data_model != 'NETCDF4': grp._enddef() # <<<<<<<<<<<<<< * # count how many unlimited dimensions there are. * self._nunlimdim = 0 */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3281, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3281, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3304, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3281, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -31329,10 +31375,10 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC } } if (__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3281, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3304, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3281, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3304, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -31341,7 +31387,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC } __pyx_L39:; - /* "netCDF4/_netCDF4.pyx":3283 + /* "netCDF4/_netCDF4.pyx":3306 * if grp.data_model != 'NETCDF4': grp._enddef() * # count how many unlimited dimensions there are. * self._nunlimdim = 0 # <<<<<<<<<<<<<< @@ -31350,7 +31396,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ __pyx_v_self->_nunlimdim = 0; - /* "netCDF4/_netCDF4.pyx":3284 + /* "netCDF4/_netCDF4.pyx":3307 * # count how many unlimited dimensions there are. * self._nunlimdim = 0 * for dimname in dimensions: # <<<<<<<<<<<<<< @@ -31361,26 +31407,26 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __pyx_t_3 = __pyx_v_dimensions; __Pyx_INCREF(__pyx_t_3); __pyx_t_15 = 0; __pyx_t_17 = NULL; } else { - __pyx_t_15 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_dimensions); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3284, __pyx_L1_error) + __pyx_t_15 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_dimensions); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_17 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3284, __pyx_L1_error) + __pyx_t_17 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3307, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_17)) { if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_7 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_15); __Pyx_INCREF(__pyx_t_7); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 3284, __pyx_L1_error) + __pyx_t_7 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_15); __Pyx_INCREF(__pyx_t_7); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 3307, __pyx_L1_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_3, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3284, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(__pyx_t_3, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } else { if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_15); __Pyx_INCREF(__pyx_t_7); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 3284, __pyx_L1_error) + __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_15); __Pyx_INCREF(__pyx_t_7); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 3307, __pyx_L1_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_3, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3284, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(__pyx_t_3, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } @@ -31390,7 +31436,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC 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, 3284, __pyx_L1_error) + else __PYX_ERR(0, 3307, __pyx_L1_error) } break; } @@ -31399,14 +31445,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __Pyx_XDECREF_SET(__pyx_v_dimname, __pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":3286 + /* "netCDF4/_netCDF4.pyx":3309 * for dimname in dimensions: * # look in current group, and parents for dim. * dim = _find_dim(self._grp, dimname) # <<<<<<<<<<<<<< * if dim.isunlimited(): self._nunlimdim = self._nunlimdim + 1 * # set ndim attribute (number of dimensions). */ - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_find_dim); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3286, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_find_dim); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_4 = 0; @@ -31423,7 +31469,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_self->_grp, __pyx_v_dimname}; - __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3286, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3309, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_7); } else @@ -31431,13 +31477,13 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_self->_grp, __pyx_v_dimname}; - __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3286, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3309, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_7); } else #endif { - __pyx_t_18 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 3286, __pyx_L1_error) + __pyx_t_18 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 3309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_18); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -31448,7 +31494,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __Pyx_INCREF(__pyx_v_dimname); __Pyx_GIVEREF(__pyx_v_dimname); PyTuple_SET_ITEM(__pyx_t_18, 1+__pyx_t_4, __pyx_v_dimname); - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_18, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3286, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_18, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; } @@ -31456,14 +31502,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __Pyx_XDECREF_SET(__pyx_v_dim, __pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":3287 + /* "netCDF4/_netCDF4.pyx":3310 * # look in current group, and parents for dim. * dim = _find_dim(self._grp, dimname) * if dim.isunlimited(): self._nunlimdim = self._nunlimdim + 1 # <<<<<<<<<<<<<< * # set ndim attribute (number of dimensions). * with nogil: */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dim, __pyx_n_s_isunlimited); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3287, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dim, __pyx_n_s_isunlimited); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_18 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -31476,20 +31522,20 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC } } if (__pyx_t_18) { - __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_18); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3287, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_18); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3310, __pyx_L1_error) __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; } else { - __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3287, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3310, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3287, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3310, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_2) { __pyx_v_self->_nunlimdim = (__pyx_v_self->_nunlimdim + 1); } - /* "netCDF4/_netCDF4.pyx":3284 + /* "netCDF4/_netCDF4.pyx":3307 * # count how many unlimited dimensions there are. * self._nunlimdim = 0 * for dimname in dimensions: # <<<<<<<<<<<<<< @@ -31499,7 +31545,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":3289 + /* "netCDF4/_netCDF4.pyx":3312 * if dim.isunlimited(): self._nunlimdim = self._nunlimdim + 1 * # set ndim attribute (number of dimensions). * with nogil: # <<<<<<<<<<<<<< @@ -31513,7 +31559,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":3290 + /* "netCDF4/_netCDF4.pyx":3313 * # set ndim attribute (number of dimensions). * with nogil: * ierr = nc_inq_varndims(self._grpid, self._varid, &numdims) # <<<<<<<<<<<<<< @@ -31523,7 +31569,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __pyx_v_ierr = nc_inq_varndims(__pyx_v_self->_grpid, __pyx_v_self->_varid, (&__pyx_v_numdims)); } - /* "netCDF4/_netCDF4.pyx":3289 + /* "netCDF4/_netCDF4.pyx":3312 * if dim.isunlimited(): self._nunlimdim = self._nunlimdim + 1 * # set ndim attribute (number of dimensions). * with nogil: # <<<<<<<<<<<<<< @@ -31541,7 +31587,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC } } - /* "netCDF4/_netCDF4.pyx":3291 + /* "netCDF4/_netCDF4.pyx":3314 * with nogil: * ierr = nc_inq_varndims(self._grpid, self._varid, &numdims) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -31551,7 +31597,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __pyx_t_2 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":3292 + /* "netCDF4/_netCDF4.pyx":3315 * ierr = nc_inq_varndims(self._grpid, self._varid, &numdims) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -31559,22 +31605,22 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC * self._name = name */ __pyx_t_10 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_10, 0, strlen(__pyx_t_10), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3292, __pyx_L1_error) + __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_10, 0, strlen(__pyx_t_10), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3292, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3292, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 3292, __pyx_L1_error) + __PYX_ERR(0, 3315, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3291 + /* "netCDF4/_netCDF4.pyx":3314 * with nogil: * ierr = nc_inq_varndims(self._grpid, self._varid, &numdims) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -31583,14 +31629,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ } - /* "netCDF4/_netCDF4.pyx":3293 + /* "netCDF4/_netCDF4.pyx":3316 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * self.ndim = numdims # <<<<<<<<<<<<<< * self._name = name * # default for automatically applying scale_factor and */ - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_numdims); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3293, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_numdims); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->ndim); @@ -31598,7 +31644,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __pyx_v_self->ndim = __pyx_t_3; __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":3294 + /* "netCDF4/_netCDF4.pyx":3317 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * self.ndim = numdims * self._name = name # <<<<<<<<<<<<<< @@ -31611,7 +31657,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __Pyx_DECREF(__pyx_v_self->_name); __pyx_v_self->_name = __pyx_v_name; - /* "netCDF4/_netCDF4.pyx":3297 + /* "netCDF4/_netCDF4.pyx":3320 * # default for automatically applying scale_factor and * # add_offset, and converting to/from masked arrays is True. * self.scale = True # <<<<<<<<<<<<<< @@ -31624,7 +31670,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __Pyx_DECREF(__pyx_v_self->scale); __pyx_v_self->scale = Py_True; - /* "netCDF4/_netCDF4.pyx":3298 + /* "netCDF4/_netCDF4.pyx":3321 * # add_offset, and converting to/from masked arrays is True. * self.scale = True * self.mask = True # <<<<<<<<<<<<<< @@ -31637,14 +31683,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __Pyx_DECREF(__pyx_v_self->mask); __pyx_v_self->mask = Py_True; - /* "netCDF4/_netCDF4.pyx":3299 + /* "netCDF4/_netCDF4.pyx":3322 * self.scale = True * self.mask = True * if 'least_significant_digit' in self.ncattrs(): # <<<<<<<<<<<<<< * self._has_lsd = True * */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ncattrs); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3299, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ncattrs); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -31657,19 +31703,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC } } if (__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3299, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3322, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3299, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3322, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_least_significant_digit, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3299, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_least_significant_digit, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3322, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = (__pyx_t_2 != 0); if (__pyx_t_8) { - /* "netCDF4/_netCDF4.pyx":3300 + /* "netCDF4/_netCDF4.pyx":3323 * self.mask = True * if 'least_significant_digit' in self.ncattrs(): * self._has_lsd = True # <<<<<<<<<<<<<< @@ -31682,7 +31728,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC __Pyx_DECREF(__pyx_v_self->_has_lsd); __pyx_v_self->_has_lsd = Py_True; - /* "netCDF4/_netCDF4.pyx":3299 + /* "netCDF4/_netCDF4.pyx":3322 * self.scale = True * self.mask = True * if 'least_significant_digit' in self.ncattrs(): # <<<<<<<<<<<<<< @@ -31691,7 +31737,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC */ } - /* "netCDF4/_netCDF4.pyx":2954 + /* "netCDF4/_netCDF4.pyx":2977 * """The number of stored elements.""" * * def __init__(self, grp, name, datatype, dimensions=(), zlib=False, # <<<<<<<<<<<<<< @@ -31726,7 +31772,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":3302 +/* "netCDF4/_netCDF4.pyx":3325 * self._has_lsd = True * * def __array__(self): # <<<<<<<<<<<<<< @@ -31753,7 +31799,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_2__array__(struct __pyx_o PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__array__", 0); - /* "netCDF4/_netCDF4.pyx":3306 + /* "netCDF4/_netCDF4.pyx":3329 * # allows numpy ufuncs to work faster on Variable objects * # (issue 216). * return self[...] # <<<<<<<<<<<<<< @@ -31761,13 +31807,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_2__array__(struct __pyx_o * def __repr__(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_self), Py_Ellipsis); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3306, __pyx_L1_error) + __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_self), Py_Ellipsis); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":3302 + /* "netCDF4/_netCDF4.pyx":3325 * self._has_lsd = True * * def __array__(self): # <<<<<<<<<<<<<< @@ -31786,7 +31832,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_2__array__(struct __pyx_o return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":3308 +/* "netCDF4/_netCDF4.pyx":3331 * return self[...] * * def __repr__(self): # <<<<<<<<<<<<<< @@ -31818,20 +31864,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_4__repr__(struct __pyx_ob PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - /* "netCDF4/_netCDF4.pyx":3309 + /* "netCDF4/_netCDF4.pyx":3332 * * 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, 3309, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3332, __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, 3309, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3332, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":3310 + /* "netCDF4/_netCDF4.pyx":3333 * def __repr__(self): * if python3: * return self.__unicode__() # <<<<<<<<<<<<<< @@ -31839,7 +31885,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_4__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, 3310, __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, 3333, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -31852,10 +31898,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_4__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, 3310, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3333, __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, 3310, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3333, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -31863,7 +31909,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_4__repr__(struct __pyx_ob __pyx_t_1 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":3309 + /* "netCDF4/_netCDF4.pyx":3332 * * def __repr__(self): * if python3: # <<<<<<<<<<<<<< @@ -31872,7 +31918,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_4__repr__(struct __pyx_ob */ } - /* "netCDF4/_netCDF4.pyx":3312 + /* "netCDF4/_netCDF4.pyx":3335 * return self.__unicode__() * else: * return unicode(self).encode(default_encoding) # <<<<<<<<<<<<<< @@ -31881,18 +31927,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_4__repr__(struct __pyx_ob */ /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3312, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3335, __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, 3312, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3335, __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, 3312, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3335, __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, 3312, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3335, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -31905,14 +31951,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_4__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, 3312, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3335, __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, 3312, __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, 3335, __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; @@ -31921,20 +31967,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_4__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, 3312, __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, 3335, __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, 3312, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3335, __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, 3312, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3335, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -31945,7 +31991,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_4__repr__(struct __pyx_ob goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":3308 + /* "netCDF4/_netCDF4.pyx":3331 * return self[...] * * def __repr__(self): # <<<<<<<<<<<<<< @@ -31968,7 +32014,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_4__repr__(struct __pyx_ob return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":3314 +/* "netCDF4/_netCDF4.pyx":3337 * return unicode(self).encode(default_encoding) * * def __unicode__(self): # <<<<<<<<<<<<<< @@ -32021,7 +32067,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx PyObject *__pyx_t_16 = NULL; __Pyx_RefNannySetupContext("__unicode__", 0); - /* "netCDF4/_netCDF4.pyx":3316 + /* "netCDF4/_netCDF4.pyx":3339 * def __unicode__(self): * cdef int ierr, no_fill * if not dir(self._grp): # <<<<<<<<<<<<<< @@ -32030,15 +32076,15 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx */ __pyx_t_1 = __pyx_v_self->_grp; __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = PyObject_Dir(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3316, __pyx_L1_error) + __pyx_t_2 = PyObject_Dir(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3316, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3339, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = ((!__pyx_t_3) != 0); if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":3317 + /* "netCDF4/_netCDF4.pyx":3340 * cdef int ierr, no_fill * if not dir(self._grp): * return 'Variable object no longer valid' # <<<<<<<<<<<<<< @@ -32050,7 +32096,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx __pyx_r = __pyx_kp_s_Variable_object_no_longer_valid; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":3316 + /* "netCDF4/_netCDF4.pyx":3339 * def __unicode__(self): * cdef int ierr, no_fill * if not dir(self._grp): # <<<<<<<<<<<<<< @@ -32059,16 +32105,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx */ } - /* "netCDF4/_netCDF4.pyx":3318 + /* "netCDF4/_netCDF4.pyx":3341 * if not dir(self._grp): * return 'Variable object no longer valid' * ncdump_var = ['%r\n' % type(self)] # <<<<<<<<<<<<<< * dimnames = tuple([_tostr(dimname) for dimname in self.dimensions]) * attrs = [' %s: %s\n' % (name,self.getncattr(name)) for name in\ */ - __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_r_3, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3318, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_r_3, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3318, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); @@ -32076,24 +32122,24 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx __pyx_v_ncdump_var = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":3319 + /* "netCDF4/_netCDF4.pyx":3342 * return 'Variable object no longer valid' * ncdump_var = ['%r\n' % type(self)] * dimnames = tuple([_tostr(dimname) for dimname in self.dimensions]) # <<<<<<<<<<<<<< * attrs = [' %s: %s\n' % (name,self.getncattr(name)) for name in\ * self.ncattrs()] */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3319, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3319, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_5 = __pyx_t_2; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3319, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3319, __pyx_L1_error) + __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3342, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { @@ -32101,17 +32147,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx if (likely(PyList_CheckExact(__pyx_t_5))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 3319, __pyx_L1_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 3342, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3319, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 3319, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 3342, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3319, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } @@ -32121,7 +32167,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx 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, 3319, __pyx_L1_error) + else __PYX_ERR(0, 3342, __pyx_L1_error) } break; } @@ -32129,7 +32175,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx } __Pyx_XDECREF_SET(__pyx_v_dimname, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_tostr); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3319, __pyx_L1_error) + __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_tostr); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { @@ -32142,13 +32188,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx } } if (!__pyx_t_9) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_dimname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3319, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_dimname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3342, __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_9, __pyx_v_dimname}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3319, __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, 3342, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -32156,52 +32202,52 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_dimname}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3319, __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, 3342, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3319, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL; __Pyx_INCREF(__pyx_v_dimname); __Pyx_GIVEREF(__pyx_v_dimname); PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_dimname); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3319, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 3319, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 3342, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3319, __pyx_L1_error) + __pyx_t_5 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dimnames = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":3320 + /* "netCDF4/_netCDF4.pyx":3343 * ncdump_var = ['%r\n' % type(self)] * dimnames = tuple([_tostr(dimname) for dimname in self.dimensions]) * attrs = [' %s: %s\n' % (name,self.getncattr(name)) for name in\ # <<<<<<<<<<<<<< * self.ncattrs()] * if self._iscompound: */ - __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3320, __pyx_L1_error) + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - /* "netCDF4/_netCDF4.pyx":3321 + /* "netCDF4/_netCDF4.pyx":3344 * dimnames = tuple([_tostr(dimname) for dimname in self.dimensions]) * attrs = [' %s: %s\n' % (name,self.getncattr(name)) for name in\ * self.ncattrs()] # <<<<<<<<<<<<<< * if self._iscompound: * ncdump_var.append('%s %s(%s)\n' %\ */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ncattrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3321, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ncattrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -32214,10 +32260,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx } } if (__pyx_t_8) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3321, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3344, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3321, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3344, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -32225,9 +32271,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3321, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3321, __pyx_L1_error) + __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3344, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -32235,17 +32281,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 3321, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 3344, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3321, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 3321, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 3344, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3321, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -32255,7 +32301,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx 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, 3321, __pyx_L1_error) + else __PYX_ERR(0, 3344, __pyx_L1_error) } break; } @@ -32264,14 +32310,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":3320 + /* "netCDF4/_netCDF4.pyx":3343 * ncdump_var = ['%r\n' % type(self)] * dimnames = tuple([_tostr(dimname) for dimname in self.dimensions]) * attrs = [' %s: %s\n' % (name,self.getncattr(name)) for name in\ # <<<<<<<<<<<<<< * self.ncattrs()] * if self._iscompound: */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getncattr); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3320, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getncattr); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { @@ -32284,13 +32330,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx } } if (!__pyx_t_10) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3320, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_name}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3320, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3343, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -32298,25 +32344,25 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_name}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3320, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3343, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3320, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10); __pyx_t_10 = NULL; __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_name); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3320, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3320, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); @@ -32324,36 +32370,36 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3320, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 3320, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 3343, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_attrs = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":3322 + /* "netCDF4/_netCDF4.pyx":3345 * attrs = [' %s: %s\n' % (name,self.getncattr(name)) for name in\ * self.ncattrs()] * if self._iscompound: # <<<<<<<<<<<<<< * ncdump_var.append('%s %s(%s)\n' %\ * ('compound',self._name,', '.join(dimnames))) */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_iscompound); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3322, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_iscompound); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3345, __pyx_L1_error) if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":3324 + /* "netCDF4/_netCDF4.pyx":3347 * if self._iscompound: * ncdump_var.append('%s %s(%s)\n' %\ * ('compound',self._name,', '.join(dimnames))) # <<<<<<<<<<<<<< * elif self._isvlen: * ncdump_var.append('%s %s(%s)\n' %\ */ - __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__20, __pyx_v_dimnames); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3324, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__22, __pyx_v_dimnames); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3324, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_compound); __Pyx_GIVEREF(__pyx_n_s_compound); @@ -32365,20 +32411,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_5); __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":3323 + /* "netCDF4/_netCDF4.pyx":3346 * self.ncattrs()] * if self._iscompound: * ncdump_var.append('%s %s(%s)\n' %\ # <<<<<<<<<<<<<< * ('compound',self._name,', '.join(dimnames))) * elif self._isvlen: */ - __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_s_s_s, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3323, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_s_s_s, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_5); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 3323, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_5); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 3346, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":3322 + /* "netCDF4/_netCDF4.pyx":3345 * attrs = [' %s: %s\n' % (name,self.getncattr(name)) for name in\ * self.ncattrs()] * if self._iscompound: # <<<<<<<<<<<<<< @@ -32388,26 +32434,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx goto __pyx_L8; } - /* "netCDF4/_netCDF4.pyx":3325 + /* "netCDF4/_netCDF4.pyx":3348 * ncdump_var.append('%s %s(%s)\n' %\ * ('compound',self._name,', '.join(dimnames))) * elif self._isvlen: # <<<<<<<<<<<<<< * ncdump_var.append('%s %s(%s)\n' %\ * ('vlen',self._name,', '.join(dimnames))) */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3325, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3348, __pyx_L1_error) if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":3327 + /* "netCDF4/_netCDF4.pyx":3350 * elif self._isvlen: * ncdump_var.append('%s %s(%s)\n' %\ * ('vlen',self._name,', '.join(dimnames))) # <<<<<<<<<<<<<< * elif self._isenum: * ncdump_var.append('%s %s(%s)\n' %\ */ - __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__20, __pyx_v_dimnames); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3327, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__22, __pyx_v_dimnames); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3327, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_vlen); __Pyx_GIVEREF(__pyx_n_s_vlen); @@ -32419,20 +32465,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_5); __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":3326 + /* "netCDF4/_netCDF4.pyx":3349 * ('compound',self._name,', '.join(dimnames))) * elif self._isvlen: * ncdump_var.append('%s %s(%s)\n' %\ # <<<<<<<<<<<<<< * ('vlen',self._name,', '.join(dimnames))) * elif self._isenum: */ - __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_s_s_s, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3326, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_s_s_s, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_5); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 3326, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_5); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 3349, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":3325 + /* "netCDF4/_netCDF4.pyx":3348 * ncdump_var.append('%s %s(%s)\n' %\ * ('compound',self._name,', '.join(dimnames))) * elif self._isvlen: # <<<<<<<<<<<<<< @@ -32442,26 +32488,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx goto __pyx_L8; } - /* "netCDF4/_netCDF4.pyx":3328 + /* "netCDF4/_netCDF4.pyx":3351 * ncdump_var.append('%s %s(%s)\n' %\ * ('vlen',self._name,', '.join(dimnames))) * elif self._isenum: # <<<<<<<<<<<<<< * ncdump_var.append('%s %s(%s)\n' %\ * ('enum',self._name,', '.join(dimnames))) */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isenum); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3328, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isenum); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3351, __pyx_L1_error) if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":3330 + /* "netCDF4/_netCDF4.pyx":3353 * elif self._isenum: * ncdump_var.append('%s %s(%s)\n' %\ * ('enum',self._name,', '.join(dimnames))) # <<<<<<<<<<<<<< * else: * ncdump_var.append('%s %s(%s)\n' %\ */ - __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__20, __pyx_v_dimnames); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3330, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__22, __pyx_v_dimnames); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3330, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_enum); __Pyx_GIVEREF(__pyx_n_s_enum); @@ -32473,20 +32519,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_5); __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":3329 + /* "netCDF4/_netCDF4.pyx":3352 * ('vlen',self._name,', '.join(dimnames))) * elif self._isenum: * ncdump_var.append('%s %s(%s)\n' %\ # <<<<<<<<<<<<<< * ('enum',self._name,', '.join(dimnames))) * else: */ - __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_s_s_s, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3329, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_s_s_s, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_5); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 3329, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_5); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 3352, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":3328 + /* "netCDF4/_netCDF4.pyx":3351 * ncdump_var.append('%s %s(%s)\n' %\ * ('vlen',self._name,', '.join(dimnames))) * elif self._isenum: # <<<<<<<<<<<<<< @@ -32496,7 +32542,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx goto __pyx_L8; } - /* "netCDF4/_netCDF4.pyx":3332 + /* "netCDF4/_netCDF4.pyx":3355 * ('enum',self._name,', '.join(dimnames))) * else: * ncdump_var.append('%s %s(%s)\n' %\ # <<<<<<<<<<<<<< @@ -32505,16 +32551,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx */ /*else*/ { - /* "netCDF4/_netCDF4.pyx":3333 + /* "netCDF4/_netCDF4.pyx":3356 * else: * ncdump_var.append('%s %s(%s)\n' %\ * (self.dtype,self._name,', '.join(dimnames))) # <<<<<<<<<<<<<< * ncdump_var = ncdump_var + attrs * if self._iscompound: */ - __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__20, __pyx_v_dimnames); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3333, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__22, __pyx_v_dimnames); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3333, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_self->dtype); __Pyx_GIVEREF(__pyx_v_self->dtype); @@ -32526,56 +32572,56 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_5); __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":3332 + /* "netCDF4/_netCDF4.pyx":3355 * ('enum',self._name,', '.join(dimnames))) * else: * ncdump_var.append('%s %s(%s)\n' %\ # <<<<<<<<<<<<<< * (self.dtype,self._name,', '.join(dimnames))) * ncdump_var = ncdump_var + attrs */ - __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_s_s_s, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3332, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_s_s_s, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3355, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_5); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 3332, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_5); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 3355, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __pyx_L8:; - /* "netCDF4/_netCDF4.pyx":3334 + /* "netCDF4/_netCDF4.pyx":3357 * ncdump_var.append('%s %s(%s)\n' %\ * (self.dtype,self._name,', '.join(dimnames))) * ncdump_var = ncdump_var + attrs # <<<<<<<<<<<<<< * if self._iscompound: * ncdump_var.append('compound data type: %s\n' % self.dtype) */ - __pyx_t_5 = PyNumber_Add(__pyx_v_ncdump_var, __pyx_v_attrs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3334, __pyx_L1_error) + __pyx_t_5 = PyNumber_Add(__pyx_v_ncdump_var, __pyx_v_attrs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3357, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF_SET(__pyx_v_ncdump_var, ((PyObject*)__pyx_t_5)); __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":3335 + /* "netCDF4/_netCDF4.pyx":3358 * (self.dtype,self._name,', '.join(dimnames))) * ncdump_var = ncdump_var + attrs * if self._iscompound: # <<<<<<<<<<<<<< * ncdump_var.append('compound data type: %s\n' % self.dtype) * elif self._isvlen: */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_iscompound); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3335, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_iscompound); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3358, __pyx_L1_error) if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":3336 + /* "netCDF4/_netCDF4.pyx":3359 * ncdump_var = ncdump_var + attrs * if self._iscompound: * ncdump_var.append('compound data type: %s\n' % self.dtype) # <<<<<<<<<<<<<< * elif self._isvlen: * ncdump_var.append('vlen data type: %s\n' % self.dtype) */ - __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_compound_data_type_s, __pyx_v_self->dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3336, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_compound_data_type_s, __pyx_v_self->dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_5); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 3336, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_5); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 3359, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":3335 + /* "netCDF4/_netCDF4.pyx":3358 * (self.dtype,self._name,', '.join(dimnames))) * ncdump_var = ncdump_var + attrs * if self._iscompound: # <<<<<<<<<<<<<< @@ -32585,29 +32631,29 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx goto __pyx_L9; } - /* "netCDF4/_netCDF4.pyx":3337 + /* "netCDF4/_netCDF4.pyx":3360 * if self._iscompound: * ncdump_var.append('compound data type: %s\n' % self.dtype) * elif self._isvlen: # <<<<<<<<<<<<<< * ncdump_var.append('vlen data type: %s\n' % self.dtype) * elif self._isenum: */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3337, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3360, __pyx_L1_error) if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":3338 + /* "netCDF4/_netCDF4.pyx":3361 * ncdump_var.append('compound data type: %s\n' % self.dtype) * elif self._isvlen: * ncdump_var.append('vlen data type: %s\n' % self.dtype) # <<<<<<<<<<<<<< * elif self._isenum: * ncdump_var.append('enum data type: %s\n' % self.dtype) */ - __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_vlen_data_type_s, __pyx_v_self->dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3338, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_vlen_data_type_s, __pyx_v_self->dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_5); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 3338, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_5); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 3361, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":3337 + /* "netCDF4/_netCDF4.pyx":3360 * if self._iscompound: * ncdump_var.append('compound data type: %s\n' % self.dtype) * elif self._isvlen: # <<<<<<<<<<<<<< @@ -32617,29 +32663,29 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx goto __pyx_L9; } - /* "netCDF4/_netCDF4.pyx":3339 + /* "netCDF4/_netCDF4.pyx":3362 * elif self._isvlen: * ncdump_var.append('vlen data type: %s\n' % self.dtype) * elif self._isenum: # <<<<<<<<<<<<<< * ncdump_var.append('enum data type: %s\n' % self.dtype) * unlimdims = [] */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isenum); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3339, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isenum); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3362, __pyx_L1_error) if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":3340 + /* "netCDF4/_netCDF4.pyx":3363 * ncdump_var.append('vlen data type: %s\n' % self.dtype) * elif self._isenum: * ncdump_var.append('enum data type: %s\n' % self.dtype) # <<<<<<<<<<<<<< * unlimdims = [] * for dimname in self.dimensions: */ - __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_enum_data_type_s, __pyx_v_self->dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3340, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_enum_data_type_s, __pyx_v_self->dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3363, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_5); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 3340, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_5); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 3363, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":3339 + /* "netCDF4/_netCDF4.pyx":3362 * elif self._isvlen: * ncdump_var.append('vlen data type: %s\n' % self.dtype) * elif self._isenum: # <<<<<<<<<<<<<< @@ -32649,34 +32695,34 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx } __pyx_L9:; - /* "netCDF4/_netCDF4.pyx":3341 + /* "netCDF4/_netCDF4.pyx":3364 * elif self._isenum: * ncdump_var.append('enum data type: %s\n' % self.dtype) * unlimdims = [] # <<<<<<<<<<<<<< * for dimname in self.dimensions: * dim = _find_dim(self._grp, dimname) */ - __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3341, __pyx_L1_error) + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_unlimdims = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":3342 + /* "netCDF4/_netCDF4.pyx":3365 * ncdump_var.append('enum data type: %s\n' % self.dtype) * unlimdims = [] * for dimname in self.dimensions: # <<<<<<<<<<<<<< * dim = _find_dim(self._grp, dimname) * if dim.isunlimited(): */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3342, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3365, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { __pyx_t_2 = __pyx_t_5; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3342, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3365, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3342, __pyx_L1_error) + __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3365, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { @@ -32684,17 +32730,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 3342, __pyx_L1_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 3365, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3342, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3365, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 3342, __pyx_L1_error) + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 3365, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3342, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3365, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } @@ -32704,7 +32750,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx 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, 3342, __pyx_L1_error) + else __PYX_ERR(0, 3365, __pyx_L1_error) } break; } @@ -32713,14 +32759,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx __Pyx_XDECREF_SET(__pyx_v_dimname, __pyx_t_5); __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":3343 + /* "netCDF4/_netCDF4.pyx":3366 * unlimdims = [] * for dimname in self.dimensions: * dim = _find_dim(self._grp, dimname) # <<<<<<<<<<<<<< * if dim.isunlimited(): * unlimdims.append(dimname) */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_find_dim); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3343, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_find_dim); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3366, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = NULL; __pyx_t_12 = 0; @@ -32737,7 +32783,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_self->_grp, __pyx_v_dimname}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3343, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3366, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_5); } else @@ -32745,13 +32791,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_self->_grp, __pyx_v_dimname}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3343, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3366, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { - __pyx_t_9 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3343, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3366, __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; @@ -32762,7 +32808,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx __Pyx_INCREF(__pyx_v_dimname); __Pyx_GIVEREF(__pyx_v_dimname); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_12, __pyx_v_dimname); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3343, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3366, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -32770,14 +32816,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx __Pyx_XDECREF_SET(__pyx_v_dim, __pyx_t_5); __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":3344 + /* "netCDF4/_netCDF4.pyx":3367 * for dimname in self.dimensions: * dim = _find_dim(self._grp, dimname) * if dim.isunlimited(): # <<<<<<<<<<<<<< * unlimdims.append(dimname) * if (self._grp.path != '/'): ncdump_var.append('path = %s\n' % self._grp.path) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dim, __pyx_n_s_isunlimited); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3344, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dim, __pyx_n_s_isunlimited); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3367, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -32790,27 +32836,27 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx } } if (__pyx_t_9) { - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3344, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3367, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else { - __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3344, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3367, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3344, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3367, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":3345 + /* "netCDF4/_netCDF4.pyx":3368 * dim = _find_dim(self._grp, dimname) * if dim.isunlimited(): * unlimdims.append(dimname) # <<<<<<<<<<<<<< * if (self._grp.path != '/'): ncdump_var.append('path = %s\n' % self._grp.path) * ncdump_var.append('unlimited dimensions: %s\n' % ', '.join(unlimdims)) */ - __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_unlimdims, __pyx_v_dimname); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 3345, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_unlimdims, __pyx_v_dimname); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 3368, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3344 + /* "netCDF4/_netCDF4.pyx":3367 * for dimname in self.dimensions: * dim = _find_dim(self._grp, dimname) * if dim.isunlimited(): # <<<<<<<<<<<<<< @@ -32819,7 +32865,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx */ } - /* "netCDF4/_netCDF4.pyx":3342 + /* "netCDF4/_netCDF4.pyx":3365 * ncdump_var.append('enum data type: %s\n' % self.dtype) * unlimdims = [] * for dimname in self.dimensions: # <<<<<<<<<<<<<< @@ -32829,61 +32875,61 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":3346 + /* "netCDF4/_netCDF4.pyx":3369 * if dim.isunlimited(): * unlimdims.append(dimname) * if (self._grp.path != '/'): ncdump_var.append('path = %s\n' % self._grp.path) # <<<<<<<<<<<<<< * ncdump_var.append('unlimited dimensions: %s\n' % ', '.join(unlimdims)) * ncdump_var.append('current shape = %s\n' % repr(self.shape)) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3346, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__15, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3346, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__17, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3369, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3346, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_path_s, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3346, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_path_s, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_5); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 3346, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_5); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 3369, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } - /* "netCDF4/_netCDF4.pyx":3347 + /* "netCDF4/_netCDF4.pyx":3370 * unlimdims.append(dimname) * if (self._grp.path != '/'): ncdump_var.append('path = %s\n' % self._grp.path) * ncdump_var.append('unlimited dimensions: %s\n' % ', '.join(unlimdims)) # <<<<<<<<<<<<<< * ncdump_var.append('current shape = %s\n' % repr(self.shape)) * with nogil: */ - __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__20, __pyx_v_unlimdims); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3347, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__22, __pyx_v_unlimdims); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_unlimited_dimensions_s, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3347, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_unlimited_dimensions_s, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_2); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 3347, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_2); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 3370, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":3348 + /* "netCDF4/_netCDF4.pyx":3371 * if (self._grp.path != '/'): ncdump_var.append('path = %s\n' % self._grp.path) * ncdump_var.append('unlimited dimensions: %s\n' % ', '.join(unlimdims)) * ncdump_var.append('current shape = %s\n' % repr(self.shape)) # <<<<<<<<<<<<<< * with nogil: * ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3348, __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, 3371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = PyObject_Repr(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3348, __pyx_L1_error) + __pyx_t_5 = PyObject_Repr(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_current_shape_s, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3348, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_current_shape_s, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_2); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 3348, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_2); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 3371, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":3349 + /* "netCDF4/_netCDF4.pyx":3372 * ncdump_var.append('unlimited dimensions: %s\n' % ', '.join(unlimdims)) * ncdump_var.append('current shape = %s\n' % repr(self.shape)) * with nogil: # <<<<<<<<<<<<<< @@ -32897,7 +32943,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":3350 + /* "netCDF4/_netCDF4.pyx":3373 * ncdump_var.append('current shape = %s\n' % repr(self.shape)) * with nogil: * ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL) # <<<<<<<<<<<<<< @@ -32907,7 +32953,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx __pyx_v_ierr = nc_inq_var_fill(__pyx_v_self->_grpid, __pyx_v_self->_varid, (&__pyx_v_no_fill), NULL); } - /* "netCDF4/_netCDF4.pyx":3349 + /* "netCDF4/_netCDF4.pyx":3372 * ncdump_var.append('unlimited dimensions: %s\n' % ', '.join(unlimdims)) * ncdump_var.append('current shape = %s\n' % repr(self.shape)) * with nogil: # <<<<<<<<<<<<<< @@ -32925,7 +32971,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx } } - /* "netCDF4/_netCDF4.pyx":3351 + /* "netCDF4/_netCDF4.pyx":3374 * with nogil: * ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -32935,7 +32981,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx __pyx_t_4 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":3352 + /* "netCDF4/_netCDF4.pyx":3375 * ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -32943,22 +32989,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx * if no_fill != 1: */ __pyx_t_13 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_13, 0, strlen(__pyx_t_13), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3352, __pyx_L1_error) + __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_13, 0, strlen(__pyx_t_13), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3375, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3352, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3375, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3352, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3375, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 3352, __pyx_L1_error) + __PYX_ERR(0, 3375, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3351 + /* "netCDF4/_netCDF4.pyx":3374 * with nogil: * ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -32967,17 +33013,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx */ } - /* "netCDF4/_netCDF4.pyx":3353 + /* "netCDF4/_netCDF4.pyx":3376 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * if self._isprimitive: # <<<<<<<<<<<<<< * if no_fill != 1: * try: */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3353, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3376, __pyx_L1_error) if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":3354 + /* "netCDF4/_netCDF4.pyx":3377 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * if self._isprimitive: * if no_fill != 1: # <<<<<<<<<<<<<< @@ -32987,7 +33033,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx __pyx_t_4 = ((__pyx_v_no_fill != 1) != 0); if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":3355 + /* "netCDF4/_netCDF4.pyx":3378 * if self._isprimitive: * if no_fill != 1: * try: # <<<<<<<<<<<<<< @@ -33003,19 +33049,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx __Pyx_XGOTREF(__pyx_t_16); /*try:*/ { - /* "netCDF4/_netCDF4.pyx":3356 + /* "netCDF4/_netCDF4.pyx":3379 * if no_fill != 1: * try: * fillval = self._FillValue # <<<<<<<<<<<<<< * msg = 'filling on' * except AttributeError: */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_FillValue); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3356, __pyx_L20_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_FillValue); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3379, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_fillval = __pyx_t_2; __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":3357 + /* "netCDF4/_netCDF4.pyx":3380 * try: * fillval = self._FillValue * msg = 'filling on' # <<<<<<<<<<<<<< @@ -33025,7 +33071,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx __Pyx_INCREF(__pyx_kp_s_filling_on); __pyx_v_msg = __pyx_kp_s_filling_on; - /* "netCDF4/_netCDF4.pyx":3355 + /* "netCDF4/_netCDF4.pyx":3378 * if self._isprimitive: * if no_fill != 1: * try: # <<<<<<<<<<<<<< @@ -33046,7 +33092,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":3358 + /* "netCDF4/_netCDF4.pyx":3381 * fillval = self._FillValue * msg = 'filling on' * except AttributeError: # <<<<<<<<<<<<<< @@ -33056,70 +33102,70 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_12) { __Pyx_AddTraceback("netCDF4._netCDF4.Variable.__unicode__", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(0, 3358, __pyx_L22_except_error) + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(0, 3381, __pyx_L22_except_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_1); - /* "netCDF4/_netCDF4.pyx":3359 + /* "netCDF4/_netCDF4.pyx":3382 * msg = 'filling on' * except AttributeError: * fillval = default_fillvals[self.dtype.str[1:]] # <<<<<<<<<<<<<< * if self.dtype.str[1:] in ['u1','i1']: * msg = 'filling on, default _FillValue of %s ignored\n' % fillval */ - __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_fillvals); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3359, __pyx_L22_except_error) + __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_fillvals); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3382, __pyx_L22_except_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_str); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3359, __pyx_L22_except_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_str); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3382, __pyx_L22_except_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_10 = __Pyx_PyObject_GetSlice(__pyx_t_8, 1, 0, NULL, NULL, &__pyx_slice__46, 1, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3359, __pyx_L22_except_error) + __pyx_t_10 = __Pyx_PyObject_GetSlice(__pyx_t_8, 1, 0, NULL, NULL, &__pyx_slice__50, 1, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3382, __pyx_L22_except_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = PyObject_GetItem(__pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3359, __pyx_L22_except_error) + __pyx_t_8 = PyObject_GetItem(__pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3382, __pyx_L22_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF_SET(__pyx_v_fillval, __pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":3360 + /* "netCDF4/_netCDF4.pyx":3383 * except AttributeError: * fillval = default_fillvals[self.dtype.str[1:]] * if self.dtype.str[1:] in ['u1','i1']: # <<<<<<<<<<<<<< * msg = 'filling on, default _FillValue of %s ignored\n' % fillval * else: */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_str); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3360, __pyx_L22_except_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_str); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3383, __pyx_L22_except_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_10 = __Pyx_PyObject_GetSlice(__pyx_t_8, 1, 0, NULL, NULL, &__pyx_slice__47, 1, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3360, __pyx_L22_except_error) + __pyx_t_10 = __Pyx_PyObject_GetSlice(__pyx_t_8, 1, 0, NULL, NULL, &__pyx_slice__51, 1, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3383, __pyx_L22_except_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_10, __pyx_n_s_u1, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3360, __pyx_L22_except_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_10, __pyx_n_s_u1, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3383, __pyx_L22_except_error) if (!__pyx_t_3) { } else { __pyx_t_4 = __pyx_t_3; goto __pyx_L31_bool_binop_done; } - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_10, __pyx_n_s_i1, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3360, __pyx_L22_except_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_10, __pyx_n_s_i1, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3383, __pyx_L22_except_error) __pyx_t_4 = __pyx_t_3; __pyx_L31_bool_binop_done:; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_3 = (__pyx_t_4 != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":3361 + /* "netCDF4/_netCDF4.pyx":3384 * fillval = default_fillvals[self.dtype.str[1:]] * if self.dtype.str[1:] in ['u1','i1']: * msg = 'filling on, default _FillValue of %s ignored\n' % fillval # <<<<<<<<<<<<<< * else: * msg = 'filling on, default _FillValue of %s used\n' % fillval */ - __pyx_t_10 = __Pyx_PyString_Format(__pyx_kp_s_filling_on_default__FillValue_of, __pyx_v_fillval); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3361, __pyx_L22_except_error) + __pyx_t_10 = __Pyx_PyString_Format(__pyx_kp_s_filling_on_default__FillValue_of, __pyx_v_fillval); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3384, __pyx_L22_except_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_XDECREF_SET(__pyx_v_msg, __pyx_t_10); __pyx_t_10 = 0; - /* "netCDF4/_netCDF4.pyx":3360 + /* "netCDF4/_netCDF4.pyx":3383 * except AttributeError: * fillval = default_fillvals[self.dtype.str[1:]] * if self.dtype.str[1:] in ['u1','i1']: # <<<<<<<<<<<<<< @@ -33129,7 +33175,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx goto __pyx_L30; } - /* "netCDF4/_netCDF4.pyx":3363 + /* "netCDF4/_netCDF4.pyx":3386 * msg = 'filling on, default _FillValue of %s ignored\n' % fillval * else: * msg = 'filling on, default _FillValue of %s used\n' % fillval # <<<<<<<<<<<<<< @@ -33137,7 +33183,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx * else: */ /*else*/ { - __pyx_t_10 = __Pyx_PyString_Format(__pyx_kp_s_filling_on_default__FillValue_of_2, __pyx_v_fillval); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3363, __pyx_L22_except_error) + __pyx_t_10 = __Pyx_PyString_Format(__pyx_kp_s_filling_on_default__FillValue_of_2, __pyx_v_fillval); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3386, __pyx_L22_except_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_XDECREF_SET(__pyx_v_msg, __pyx_t_10); __pyx_t_10 = 0; @@ -33151,7 +33197,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx goto __pyx_L22_except_error; __pyx_L22_except_error:; - /* "netCDF4/_netCDF4.pyx":3355 + /* "netCDF4/_netCDF4.pyx":3378 * if self._isprimitive: * if no_fill != 1: * try: # <<<<<<<<<<<<<< @@ -33173,16 +33219,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx __pyx_L27_try_end:; } - /* "netCDF4/_netCDF4.pyx":3364 + /* "netCDF4/_netCDF4.pyx":3387 * else: * msg = 'filling on, default _FillValue of %s used\n' % fillval * ncdump_var.append(msg) # <<<<<<<<<<<<<< * else: * ncdump_var.append('filling off\n') */ - __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_v_msg); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 3364, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_v_msg); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 3387, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3354 + /* "netCDF4/_netCDF4.pyx":3377 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * if self._isprimitive: * if no_fill != 1: # <<<<<<<<<<<<<< @@ -33192,7 +33238,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx goto __pyx_L19; } - /* "netCDF4/_netCDF4.pyx":3366 + /* "netCDF4/_netCDF4.pyx":3389 * ncdump_var.append(msg) * else: * ncdump_var.append('filling off\n') # <<<<<<<<<<<<<< @@ -33200,11 +33246,11 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx * */ /*else*/ { - __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_kp_s_filling_off); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 3366, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_kp_s_filling_off); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 3389, __pyx_L1_error) } __pyx_L19:; - /* "netCDF4/_netCDF4.pyx":3353 + /* "netCDF4/_netCDF4.pyx":3376 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * if self._isprimitive: # <<<<<<<<<<<<<< @@ -33213,7 +33259,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx */ } - /* "netCDF4/_netCDF4.pyx":3369 + /* "netCDF4/_netCDF4.pyx":3392 * * * return ''.join(ncdump_var) # <<<<<<<<<<<<<< @@ -33221,13 +33267,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx * def _getdims(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__2, __pyx_v_ncdump_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3369, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__2, __pyx_v_ncdump_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":3314 + /* "netCDF4/_netCDF4.pyx":3337 * return unicode(self).encode(default_encoding) * * def __unicode__(self): # <<<<<<<<<<<<<< @@ -33260,7 +33306,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":3371 +/* "netCDF4/_netCDF4.pyx":3394 * return ''.join(ncdump_var) * * def _getdims(self): # <<<<<<<<<<<<<< @@ -33303,7 +33349,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob PyObject *__pyx_t_10 = NULL; __Pyx_RefNannySetupContext("_getdims", 0); - /* "netCDF4/_netCDF4.pyx":3377 + /* "netCDF4/_netCDF4.pyx":3400 * cdef int *dimids * # get number of dimensions for this variable. * with nogil: # <<<<<<<<<<<<<< @@ -33317,7 +33363,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":3378 + /* "netCDF4/_netCDF4.pyx":3401 * # get number of dimensions for this variable. * with nogil: * ierr = nc_inq_varndims(self._grpid, self._varid, &numdims) # <<<<<<<<<<<<<< @@ -33327,7 +33373,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob __pyx_v_ierr = nc_inq_varndims(__pyx_v_self->_grpid, __pyx_v_self->_varid, (&__pyx_v_numdims)); } - /* "netCDF4/_netCDF4.pyx":3377 + /* "netCDF4/_netCDF4.pyx":3400 * cdef int *dimids * # get number of dimensions for this variable. * with nogil: # <<<<<<<<<<<<<< @@ -33345,7 +33391,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob } } - /* "netCDF4/_netCDF4.pyx":3379 + /* "netCDF4/_netCDF4.pyx":3402 * with nogil: * ierr = nc_inq_varndims(self._grpid, self._varid, &numdims) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -33355,7 +33401,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":3380 + /* "netCDF4/_netCDF4.pyx":3403 * ierr = nc_inq_varndims(self._grpid, self._varid, &numdims) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -33363,22 +33409,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob * # get dimension ids. */ __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3380, __pyx_L1_error) + __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3380, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3380, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3403, __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, 3380, __pyx_L1_error) + __PYX_ERR(0, 3403, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3379 + /* "netCDF4/_netCDF4.pyx":3402 * with nogil: * ierr = nc_inq_varndims(self._grpid, self._varid, &numdims) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -33387,7 +33433,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob */ } - /* "netCDF4/_netCDF4.pyx":3381 + /* "netCDF4/_netCDF4.pyx":3404 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * dimids = malloc(sizeof(int) * numdims) # <<<<<<<<<<<<<< @@ -33396,7 +33442,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob */ __pyx_v_dimids = ((int *)malloc(((sizeof(int)) * __pyx_v_numdims))); - /* "netCDF4/_netCDF4.pyx":3383 + /* "netCDF4/_netCDF4.pyx":3406 * dimids = malloc(sizeof(int) * numdims) * # get dimension ids. * with nogil: # <<<<<<<<<<<<<< @@ -33410,7 +33456,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":3384 + /* "netCDF4/_netCDF4.pyx":3407 * # get dimension ids. * with nogil: * ierr = nc_inq_vardimid(self._grpid, self._varid, dimids) # <<<<<<<<<<<<<< @@ -33420,7 +33466,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob __pyx_v_ierr = nc_inq_vardimid(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_dimids); } - /* "netCDF4/_netCDF4.pyx":3383 + /* "netCDF4/_netCDF4.pyx":3406 * dimids = malloc(sizeof(int) * numdims) * # get dimension ids. * with nogil: # <<<<<<<<<<<<<< @@ -33438,7 +33484,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob } } - /* "netCDF4/_netCDF4.pyx":3385 + /* "netCDF4/_netCDF4.pyx":3408 * with nogil: * ierr = nc_inq_vardimid(self._grpid, self._varid, dimids) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -33448,7 +33494,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":3386 + /* "netCDF4/_netCDF4.pyx":3409 * ierr = nc_inq_vardimid(self._grpid, self._varid, dimids) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -33456,22 +33502,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob * dimensions = () */ __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3386, __pyx_L1_error) + __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3386, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3386, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3409, __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, 3386, __pyx_L1_error) + __PYX_ERR(0, 3409, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3385 + /* "netCDF4/_netCDF4.pyx":3408 * with nogil: * ierr = nc_inq_vardimid(self._grpid, self._varid, dimids) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -33480,7 +33526,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob */ } - /* "netCDF4/_netCDF4.pyx":3388 + /* "netCDF4/_netCDF4.pyx":3411 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * # loop over dimensions, retrieve names. * dimensions = () # <<<<<<<<<<<<<< @@ -33490,7 +33536,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob __Pyx_INCREF(__pyx_empty_tuple); __pyx_v_dimensions = __pyx_empty_tuple; - /* "netCDF4/_netCDF4.pyx":3389 + /* "netCDF4/_netCDF4.pyx":3412 * # loop over dimensions, retrieve names. * dimensions = () * for nn from 0 <= nn < numdims: # <<<<<<<<<<<<<< @@ -33500,7 +33546,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob __pyx_t_5 = __pyx_v_numdims; for (__pyx_v_nn = 0; __pyx_v_nn < __pyx_t_5; __pyx_v_nn++) { - /* "netCDF4/_netCDF4.pyx":3390 + /* "netCDF4/_netCDF4.pyx":3413 * dimensions = () * for nn from 0 <= nn < numdims: * with nogil: # <<<<<<<<<<<<<< @@ -33514,7 +33560,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":3391 + /* "netCDF4/_netCDF4.pyx":3414 * for nn from 0 <= nn < numdims: * with nogil: * ierr = nc_inq_dimname(self._grpid, dimids[nn], namstring) # <<<<<<<<<<<<<< @@ -33524,7 +33570,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob __pyx_v_ierr = nc_inq_dimname(__pyx_v_self->_grpid, (__pyx_v_dimids[__pyx_v_nn]), __pyx_v_namstring); } - /* "netCDF4/_netCDF4.pyx":3390 + /* "netCDF4/_netCDF4.pyx":3413 * dimensions = () * for nn from 0 <= nn < numdims: * with nogil: # <<<<<<<<<<<<<< @@ -33542,7 +33588,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob } } - /* "netCDF4/_netCDF4.pyx":3392 + /* "netCDF4/_netCDF4.pyx":3415 * with nogil: * ierr = nc_inq_dimname(self._grpid, dimids[nn], namstring) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -33552,7 +33598,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":3393 + /* "netCDF4/_netCDF4.pyx":3416 * ierr = nc_inq_dimname(self._grpid, dimids[nn], namstring) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -33560,22 +33606,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob * dimensions = dimensions + (name,) */ __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3393, __pyx_L1_error) + __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3393, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3393, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3416, __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, 3393, __pyx_L1_error) + __PYX_ERR(0, 3416, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3392 + /* "netCDF4/_netCDF4.pyx":3415 * with nogil: * ierr = nc_inq_dimname(self._grpid, dimids[nn], namstring) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -33584,21 +33630,21 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob */ } - /* "netCDF4/_netCDF4.pyx":3394 + /* "netCDF4/_netCDF4.pyx":3417 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * name = namstring.decode(default_encoding,unicode_error) # <<<<<<<<<<<<<< * dimensions = dimensions + (name,) * free(dimids) */ - __pyx_t_4 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3394, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3394, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __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, 3394, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3394, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; __pyx_t_9 = 0; @@ -33615,7 +33661,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_4, __pyx_t_7}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3394, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3417, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -33625,7 +33671,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_4, __pyx_t_7}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3394, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3417, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -33633,7 +33679,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob } else #endif { - __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3394, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; @@ -33644,7 +33690,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_7); __pyx_t_4 = 0; __pyx_t_7 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3394, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -33652,26 +33698,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":3395 + /* "netCDF4/_netCDF4.pyx":3418 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * name = namstring.decode(default_encoding,unicode_error) * dimensions = dimensions + (name,) # <<<<<<<<<<<<<< * free(dimids) * return dimensions */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3395, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_name); - __pyx_t_6 = PyNumber_Add(__pyx_v_dimensions, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3395, __pyx_L1_error) + __pyx_t_6 = PyNumber_Add(__pyx_v_dimensions, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_dimensions, ((PyObject*)__pyx_t_6)); __pyx_t_6 = 0; } - /* "netCDF4/_netCDF4.pyx":3396 + /* "netCDF4/_netCDF4.pyx":3419 * name = namstring.decode(default_encoding,unicode_error) * dimensions = dimensions + (name,) * free(dimids) # <<<<<<<<<<<<<< @@ -33680,7 +33726,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob */ free(__pyx_v_dimids); - /* "netCDF4/_netCDF4.pyx":3397 + /* "netCDF4/_netCDF4.pyx":3420 * dimensions = dimensions + (name,) * free(dimids) * return dimensions # <<<<<<<<<<<<<< @@ -33692,7 +33738,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob __pyx_r = __pyx_v_dimensions; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":3371 + /* "netCDF4/_netCDF4.pyx":3394 * return ''.join(ncdump_var) * * def _getdims(self): # <<<<<<<<<<<<<< @@ -33718,7 +33764,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":3399 +/* "netCDF4/_netCDF4.pyx":3422 * return dimensions * * def _getname(self): # <<<<<<<<<<<<<< @@ -33756,20 +33802,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_10_getname(struct __pyx_o PyObject *__pyx_t_9 = NULL; __Pyx_RefNannySetupContext("_getname", 0); - /* "netCDF4/_netCDF4.pyx":3403 + /* "netCDF4/_netCDF4.pyx":3426 * cdef int err, _grpid * cdef char namstring[NC_MAX_NAME+1] * _grpid = self._grp._grpid # <<<<<<<<<<<<<< * with nogil: * ierr = nc_inq_varname(_grpid, self._varid, namstring) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3403, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3426, __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, 3403, __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, 3426, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v__grpid = __pyx_t_2; - /* "netCDF4/_netCDF4.pyx":3404 + /* "netCDF4/_netCDF4.pyx":3427 * cdef char namstring[NC_MAX_NAME+1] * _grpid = self._grp._grpid * with nogil: # <<<<<<<<<<<<<< @@ -33783,7 +33829,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_10_getname(struct __pyx_o #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":3405 + /* "netCDF4/_netCDF4.pyx":3428 * _grpid = self._grp._grpid * with nogil: * ierr = nc_inq_varname(_grpid, self._varid, namstring) # <<<<<<<<<<<<<< @@ -33793,7 +33839,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_10_getname(struct __pyx_o __pyx_v_ierr = nc_inq_varname(__pyx_v__grpid, __pyx_v_self->_varid, __pyx_v_namstring); } - /* "netCDF4/_netCDF4.pyx":3404 + /* "netCDF4/_netCDF4.pyx":3427 * cdef char namstring[NC_MAX_NAME+1] * _grpid = self._grp._grpid * with nogil: # <<<<<<<<<<<<<< @@ -33811,7 +33857,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_10_getname(struct __pyx_o } } - /* "netCDF4/_netCDF4.pyx":3406 + /* "netCDF4/_netCDF4.pyx":3429 * with nogil: * ierr = nc_inq_varname(_grpid, self._varid, namstring) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -33821,7 +33867,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_10_getname(struct __pyx_o __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":3407 + /* "netCDF4/_netCDF4.pyx":3430 * ierr = nc_inq_varname(_grpid, self._varid, namstring) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -33829,22 +33875,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_10_getname(struct __pyx_o * */ __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, 3407, __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, 3430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3407, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3430, __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, 3407, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3430, __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, 3407, __pyx_L1_error) + __PYX_ERR(0, 3430, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3406 + /* "netCDF4/_netCDF4.pyx":3429 * with nogil: * ierr = nc_inq_varname(_grpid, self._varid, namstring) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -33853,7 +33899,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_10_getname(struct __pyx_o */ } - /* "netCDF4/_netCDF4.pyx":3408 + /* "netCDF4/_netCDF4.pyx":3431 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * return namstring.decode(default_encoding,unicode_error) # <<<<<<<<<<<<<< @@ -33861,14 +33907,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_10_getname(struct __pyx_o * property name: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3408, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3431, __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, 3408, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3431, __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, 3408, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3431, __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, 3408, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; __pyx_t_2 = 0; @@ -33885,7 +33931,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_10_getname(struct __pyx_o #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, 3408, __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, 3431, __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; @@ -33895,7 +33941,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_10_getname(struct __pyx_o #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, 3408, __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, 3431, __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; @@ -33903,7 +33949,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_10_getname(struct __pyx_o } else #endif { - __pyx_t_9 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3408, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3431, __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; @@ -33914,7 +33960,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_10_getname(struct __pyx_o 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, 3408, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -33923,7 +33969,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_10_getname(struct __pyx_o __pyx_t_1 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":3399 + /* "netCDF4/_netCDF4.pyx":3422 * return dimensions * * def _getname(self): # <<<<<<<<<<<<<< @@ -33947,7 +33993,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_10_getname(struct __pyx_o return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":3412 +/* "netCDF4/_netCDF4.pyx":3435 * property name: * """string name of Variable instance""" * def __get__(self): # <<<<<<<<<<<<<< @@ -33976,7 +34022,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_4name___get__(struct __py PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "netCDF4/_netCDF4.pyx":3413 + /* "netCDF4/_netCDF4.pyx":3436 * """string name of Variable instance""" * def __get__(self): * return self._getname() # <<<<<<<<<<<<<< @@ -33984,7 +34030,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_4name___get__(struct __py * raise AttributeError("name cannot be altered") */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3413, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3436, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -33997,10 +34043,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_4name___get__(struct __py } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3413, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3436, __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, 3413, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3436, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -34008,7 +34054,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_4name___get__(struct __py __pyx_t_1 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":3412 + /* "netCDF4/_netCDF4.pyx":3435 * property name: * """string name of Variable instance""" * def __get__(self): # <<<<<<<<<<<<<< @@ -34029,7 +34075,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_4name___get__(struct __py return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":3414 +/* "netCDF4/_netCDF4.pyx":3437 * def __get__(self): * return self._getname() * def __set__(self,value): # <<<<<<<<<<<<<< @@ -34056,20 +34102,20 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_4name_2__set__(CYTHON_UNUSED st PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__set__", 0); - /* "netCDF4/_netCDF4.pyx":3415 + /* "netCDF4/_netCDF4.pyx":3438 * return self._getname() * def __set__(self,value): * raise AttributeError("name cannot be altered") # <<<<<<<<<<<<<< * * property datatype: */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3415, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3438, __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, 3415, __pyx_L1_error) + __PYX_ERR(0, 3438, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3414 + /* "netCDF4/_netCDF4.pyx":3437 * def __get__(self): * return self._getname() * def __set__(self,value): # <<<<<<<<<<<<<< @@ -34086,7 +34132,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_4name_2__set__(CYTHON_UNUSED st return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":3421 +/* "netCDF4/_netCDF4.pyx":3444 * VLType/CompoundType/EnumType instance * (for compound, vlen or enum data types)""" * def __get__(self): # <<<<<<<<<<<<<< @@ -34113,17 +34159,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8datatype___get__(struct int __pyx_t_1; __Pyx_RefNannySetupContext("__get__", 0); - /* "netCDF4/_netCDF4.pyx":3422 + /* "netCDF4/_netCDF4.pyx":3445 * (for compound, vlen or enum data types)""" * def __get__(self): * if self._iscompound: # <<<<<<<<<<<<<< * return self._cmptype * elif self._isvlen: */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_iscompound); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3422, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_iscompound); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3445, __pyx_L1_error) if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":3423 + /* "netCDF4/_netCDF4.pyx":3446 * def __get__(self): * if self._iscompound: * return self._cmptype # <<<<<<<<<<<<<< @@ -34135,7 +34181,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8datatype___get__(struct __pyx_r = __pyx_v_self->_cmptype; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":3422 + /* "netCDF4/_netCDF4.pyx":3445 * (for compound, vlen or enum data types)""" * def __get__(self): * if self._iscompound: # <<<<<<<<<<<<<< @@ -34144,17 +34190,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8datatype___get__(struct */ } - /* "netCDF4/_netCDF4.pyx":3424 + /* "netCDF4/_netCDF4.pyx":3447 * if self._iscompound: * return self._cmptype * elif self._isvlen: # <<<<<<<<<<<<<< * return self._vltype * elif self._isenum: */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3424, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3447, __pyx_L1_error) if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":3425 + /* "netCDF4/_netCDF4.pyx":3448 * return self._cmptype * elif self._isvlen: * return self._vltype # <<<<<<<<<<<<<< @@ -34166,7 +34212,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8datatype___get__(struct __pyx_r = __pyx_v_self->_vltype; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":3424 + /* "netCDF4/_netCDF4.pyx":3447 * if self._iscompound: * return self._cmptype * elif self._isvlen: # <<<<<<<<<<<<<< @@ -34175,17 +34221,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8datatype___get__(struct */ } - /* "netCDF4/_netCDF4.pyx":3426 + /* "netCDF4/_netCDF4.pyx":3449 * elif self._isvlen: * return self._vltype * elif self._isenum: # <<<<<<<<<<<<<< * return self._enumtype * elif self._isprimitive: */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isenum); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3426, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isenum); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3449, __pyx_L1_error) if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":3427 + /* "netCDF4/_netCDF4.pyx":3450 * return self._vltype * elif self._isenum: * return self._enumtype # <<<<<<<<<<<<<< @@ -34197,7 +34243,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8datatype___get__(struct __pyx_r = __pyx_v_self->_enumtype; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":3426 + /* "netCDF4/_netCDF4.pyx":3449 * elif self._isvlen: * return self._vltype * elif self._isenum: # <<<<<<<<<<<<<< @@ -34206,17 +34252,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8datatype___get__(struct */ } - /* "netCDF4/_netCDF4.pyx":3428 + /* "netCDF4/_netCDF4.pyx":3451 * elif self._isenum: * return self._enumtype * elif self._isprimitive: # <<<<<<<<<<<<<< * return self.dtype * */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3428, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3451, __pyx_L1_error) if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":3429 + /* "netCDF4/_netCDF4.pyx":3452 * return self._enumtype * elif self._isprimitive: * return self.dtype # <<<<<<<<<<<<<< @@ -34228,7 +34274,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8datatype___get__(struct __pyx_r = __pyx_v_self->dtype; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":3428 + /* "netCDF4/_netCDF4.pyx":3451 * elif self._isenum: * return self._enumtype * elif self._isprimitive: # <<<<<<<<<<<<<< @@ -34237,7 +34283,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8datatype___get__(struct */ } - /* "netCDF4/_netCDF4.pyx":3421 + /* "netCDF4/_netCDF4.pyx":3444 * VLType/CompoundType/EnumType instance * (for compound, vlen or enum data types)""" * def __get__(self): # <<<<<<<<<<<<<< @@ -34257,7 +34303,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8datatype___get__(struct return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":3433 +/* "netCDF4/_netCDF4.pyx":3456 * property shape: * """find current sizes of all variable dimensions""" * def __get__(self): # <<<<<<<<<<<<<< @@ -34295,7 +34341,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_5shape___get__(struct __p Py_ssize_t __pyx_t_9; __Pyx_RefNannySetupContext("__get__", 0); - /* "netCDF4/_netCDF4.pyx":3434 + /* "netCDF4/_netCDF4.pyx":3457 * """find current sizes of all variable dimensions""" * def __get__(self): * shape = () # <<<<<<<<<<<<<< @@ -34305,14 +34351,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_5shape___get__(struct __p __Pyx_INCREF(__pyx_empty_tuple); __pyx_v_shape = __pyx_empty_tuple; - /* "netCDF4/_netCDF4.pyx":3435 + /* "netCDF4/_netCDF4.pyx":3458 * def __get__(self): * shape = () * for dimname in self._getdims(): # <<<<<<<<<<<<<< * # look in current group, and parents for dim. * dim = _find_dim(self._grp,dimname) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getdims); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3435, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getdims); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3458, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -34325,10 +34371,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_5shape___get__(struct __p } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3435, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3458, __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, 3435, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3458, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -34336,9 +34382,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_5shape___get__(struct __p __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3435, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3458, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3435, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3458, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -34346,17 +34392,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_5shape___get__(struct __p if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 3435, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 3458, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3435, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3458, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 3435, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 3458, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3435, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3458, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -34366,7 +34412,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_5shape___get__(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, 3435, __pyx_L1_error) + else __PYX_ERR(0, 3458, __pyx_L1_error) } break; } @@ -34375,14 +34421,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_5shape___get__(struct __p __Pyx_XDECREF_SET(__pyx_v_dimname, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":3437 + /* "netCDF4/_netCDF4.pyx":3460 * for dimname in self._getdims(): * # look in current group, and parents for dim. * dim = _find_dim(self._grp,dimname) # <<<<<<<<<<<<<< * shape = shape + (len(dim),) * return shape */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_find_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3437, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_find_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3460, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; __pyx_t_7 = 0; @@ -34399,7 +34445,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_5shape___get__(struct __p #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_self->_grp, __pyx_v_dimname}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3437, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3460, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -34407,13 +34453,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_5shape___get__(struct __p #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_self->_grp, __pyx_v_dimname}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3437, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3460, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3437, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3460, __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; @@ -34424,7 +34470,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_5shape___get__(struct __p __Pyx_INCREF(__pyx_v_dimname); __Pyx_GIVEREF(__pyx_v_dimname); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_dimname); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3437, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3460, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -34432,28 +34478,28 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_5shape___get__(struct __p __Pyx_XDECREF_SET(__pyx_v_dim, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":3438 + /* "netCDF4/_netCDF4.pyx":3461 * # look in current group, and parents for dim. * dim = _find_dim(self._grp,dimname) * shape = shape + (len(dim),) # <<<<<<<<<<<<<< * return shape * def __set__(self,value): */ - __pyx_t_9 = PyObject_Length(__pyx_v_dim); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 3438, __pyx_L1_error) - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3438, __pyx_L1_error) + __pyx_t_9 = PyObject_Length(__pyx_v_dim); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 3461, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3438, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Add(__pyx_v_shape, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3438, __pyx_L1_error) + __pyx_t_1 = PyNumber_Add(__pyx_v_shape, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_shape, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":3435 + /* "netCDF4/_netCDF4.pyx":3458 * def __get__(self): * shape = () * for dimname in self._getdims(): # <<<<<<<<<<<<<< @@ -34463,7 +34509,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_5shape___get__(struct __p } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":3439 + /* "netCDF4/_netCDF4.pyx":3462 * dim = _find_dim(self._grp,dimname) * shape = shape + (len(dim),) * return shape # <<<<<<<<<<<<<< @@ -34475,7 +34521,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_5shape___get__(struct __p __pyx_r = __pyx_v_shape; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":3433 + /* "netCDF4/_netCDF4.pyx":3456 * property shape: * """find current sizes of all variable dimensions""" * def __get__(self): # <<<<<<<<<<<<<< @@ -34501,7 +34547,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_5shape___get__(struct __p return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":3440 +/* "netCDF4/_netCDF4.pyx":3463 * shape = shape + (len(dim),) * return shape * def __set__(self,value): # <<<<<<<<<<<<<< @@ -34528,20 +34574,20 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_5shape_2__set__(CYTHON_UNUSED s PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__set__", 0); - /* "netCDF4/_netCDF4.pyx":3441 + /* "netCDF4/_netCDF4.pyx":3464 * return shape * def __set__(self,value): * raise AttributeError("shape cannot be altered") # <<<<<<<<<<<<<< * * property size: */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3441, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3464, __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, 3441, __pyx_L1_error) + __PYX_ERR(0, 3464, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3440 + /* "netCDF4/_netCDF4.pyx":3463 * shape = shape + (len(dim),) * return shape * def __set__(self,value): # <<<<<<<<<<<<<< @@ -34558,7 +34604,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_5shape_2__set__(CYTHON_UNUSED s return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":3445 +/* "netCDF4/_netCDF4.pyx":3468 * property size: * """Return the number of stored elements.""" * def __get__(self): # <<<<<<<<<<<<<< @@ -34589,7 +34635,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_4size___get__(struct __py PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "netCDF4/_netCDF4.pyx":3446 + /* "netCDF4/_netCDF4.pyx":3469 * """Return the number of stored elements.""" * def __get__(self): * return numpy.prod(self.shape) # <<<<<<<<<<<<<< @@ -34597,12 +34643,12 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_4size___get__(struct __py * property dimensions: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3446, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_prod); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3446, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_prod); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3446, __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, 3469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -34615,14 +34661,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_4size___get__(struct __py } } if (!__pyx_t_4) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3446, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3469, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3446, __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, 3469, __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; @@ -34631,20 +34677,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_4size___get__(struct __py #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3446, __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, 3469, __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; } else #endif { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3446, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3446, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -34654,7 +34700,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_4size___get__(struct __py __pyx_t_1 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":3445 + /* "netCDF4/_netCDF4.pyx":3468 * property size: * """Return the number of stored elements.""" * def __get__(self): # <<<<<<<<<<<<<< @@ -34677,7 +34723,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_4size___get__(struct __py return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":3450 +/* "netCDF4/_netCDF4.pyx":3473 * property dimensions: * """get variables's dimension names""" * def __get__(self): # <<<<<<<<<<<<<< @@ -34706,7 +34752,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_10dimensions___get__(stru PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "netCDF4/_netCDF4.pyx":3451 + /* "netCDF4/_netCDF4.pyx":3474 * """get variables's dimension names""" * def __get__(self): * return self._getdims() # <<<<<<<<<<<<<< @@ -34714,7 +34760,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_10dimensions___get__(stru * raise AttributeError("dimensions cannot be altered") */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getdims); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3451, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getdims); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3474, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -34727,10 +34773,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_10dimensions___get__(stru } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3451, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3474, __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, 3451, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3474, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -34738,7 +34784,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_10dimensions___get__(stru __pyx_t_1 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":3450 + /* "netCDF4/_netCDF4.pyx":3473 * property dimensions: * """get variables's dimension names""" * def __get__(self): # <<<<<<<<<<<<<< @@ -34759,7 +34805,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_10dimensions___get__(stru return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":3452 +/* "netCDF4/_netCDF4.pyx":3475 * def __get__(self): * return self._getdims() * def __set__(self,value): # <<<<<<<<<<<<<< @@ -34786,20 +34832,20 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_10dimensions_2__set__(CYTHON_UN PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__set__", 0); - /* "netCDF4/_netCDF4.pyx":3453 + /* "netCDF4/_netCDF4.pyx":3476 * return self._getdims() * def __set__(self,value): * raise AttributeError("dimensions cannot be altered") # <<<<<<<<<<<<<< * * */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__50, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3453, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3476, __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, 3453, __pyx_L1_error) + __PYX_ERR(0, 3476, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3452 + /* "netCDF4/_netCDF4.pyx":3475 * def __get__(self): * return self._getdims() * def __set__(self,value): # <<<<<<<<<<<<<< @@ -34816,7 +34862,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_10dimensions_2__set__(CYTHON_UN return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":3456 +/* "netCDF4/_netCDF4.pyx":3479 * * * def group(self): # <<<<<<<<<<<<<< @@ -34843,7 +34889,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_12group(struct __pyx_obj_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("group", 0); - /* "netCDF4/_netCDF4.pyx":3461 + /* "netCDF4/_netCDF4.pyx":3484 * * return the group that this `netCDF4.Variable` is a member of.""" * return self._grp # <<<<<<<<<<<<<< @@ -34855,7 +34901,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_12group(struct __pyx_obj_ __pyx_r = __pyx_v_self->_grp; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":3456 + /* "netCDF4/_netCDF4.pyx":3479 * * * def group(self): # <<<<<<<<<<<<<< @@ -34870,7 +34916,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_12group(struct __pyx_obj_ return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":3463 +/* "netCDF4/_netCDF4.pyx":3486 * return self._grp * * def ncattrs(self): # <<<<<<<<<<<<<< @@ -34898,7 +34944,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_14ncattrs(struct __pyx_ob PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("ncattrs", 0); - /* "netCDF4/_netCDF4.pyx":3468 + /* "netCDF4/_netCDF4.pyx":3491 * * return netCDF attribute names for this `netCDF4.Variable` in a list.""" * return _get_att_names(self._grpid, self._varid) # <<<<<<<<<<<<<< @@ -34906,13 +34952,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_14ncattrs(struct __pyx_ob * def setncattr(self,name,value): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__get_att_names(__pyx_v_self->_grpid, __pyx_v_self->_varid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3468, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__get_att_names(__pyx_v_self->_grpid, __pyx_v_self->_varid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3491, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":3463 + /* "netCDF4/_netCDF4.pyx":3486 * return self._grp * * def ncattrs(self): # <<<<<<<<<<<<<< @@ -34931,7 +34977,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_14ncattrs(struct __pyx_ob return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":3470 +/* "netCDF4/_netCDF4.pyx":3493 * return _get_att_names(self._grpid, self._varid) * * def setncattr(self,name,value): # <<<<<<<<<<<<<< @@ -34968,11 +35014,11 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_17setncattr(PyObject *__p case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("setncattr", 1, 2, 2, 1); __PYX_ERR(0, 3470, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("setncattr", 1, 2, 2, 1); __PYX_ERR(0, 3493, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setncattr") < 0)) __PYX_ERR(0, 3470, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setncattr") < 0)) __PYX_ERR(0, 3493, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -34985,7 +35031,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_17setncattr(PyObject *__p } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("setncattr", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3470, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("setncattr", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3493, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("netCDF4._netCDF4.Variable.setncattr", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -35007,19 +35053,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_16setncattr(struct __pyx_ PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("setncattr", 0); - /* "netCDF4/_netCDF4.pyx":3477 + /* "netCDF4/_netCDF4.pyx":3500 * netCDF attribute with the same name as one of the reserved python * attributes.""" * if self._grp.data_model != 'NETCDF4': self._grp._redef() # <<<<<<<<<<<<<< * _set_att(self._grp, self._varid, name, value) * if self._grp.data_model != 'NETCDF4': self._grp._enddef() */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3477, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3477, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3500, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_redef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3477, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_redef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -35032,17 +35078,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_16setncattr(struct __pyx_ } } if (__pyx_t_4) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3477, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3500, __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, 3477, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3500, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "netCDF4/_netCDF4.pyx":3478 + /* "netCDF4/_netCDF4.pyx":3501 * attributes.""" * if self._grp.data_model != 'NETCDF4': self._grp._redef() * _set_att(self._grp, self._varid, name, value) # <<<<<<<<<<<<<< @@ -35051,24 +35097,24 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_16setncattr(struct __pyx_ */ __pyx_t_1 = __pyx_v_self->_grp; __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = __pyx_f_7netCDF4_8_netCDF4__set_att(__pyx_t_1, __pyx_v_self->_varid, __pyx_v_name, __pyx_v_value, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3478, __pyx_L1_error) + __pyx_t_3 = __pyx_f_7netCDF4_8_netCDF4__set_att(__pyx_t_1, __pyx_v_self->_varid, __pyx_v_name, __pyx_v_value, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3501, __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; - /* "netCDF4/_netCDF4.pyx":3479 + /* "netCDF4/_netCDF4.pyx":3502 * if self._grp.data_model != 'NETCDF4': self._grp._redef() * _set_att(self._grp, self._varid, name, value) * if self._grp.data_model != 'NETCDF4': self._grp._enddef() # <<<<<<<<<<<<<< * * def setncattr_string(self,name,value): */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3479, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3479, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3502, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3479, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -35081,17 +35127,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_16setncattr(struct __pyx_ } } if (__pyx_t_4) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3479, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3502, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3479, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3502, __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; } - /* "netCDF4/_netCDF4.pyx":3470 + /* "netCDF4/_netCDF4.pyx":3493 * return _get_att_names(self._grpid, self._varid) * * def setncattr(self,name,value): # <<<<<<<<<<<<<< @@ -35114,7 +35160,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_16setncattr(struct __pyx_ return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":3481 +/* "netCDF4/_netCDF4.pyx":3504 * if self._grp.data_model != 'NETCDF4': self._grp._enddef() * * def setncattr_string(self,name,value): # <<<<<<<<<<<<<< @@ -35151,11 +35197,11 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_19setncattr_string(PyObje case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("setncattr_string", 1, 2, 2, 1); __PYX_ERR(0, 3481, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("setncattr_string", 1, 2, 2, 1); __PYX_ERR(0, 3504, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setncattr_string") < 0)) __PYX_ERR(0, 3481, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setncattr_string") < 0)) __PYX_ERR(0, 3504, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -35168,7 +35214,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_19setncattr_string(PyObje } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("setncattr_string", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3481, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("setncattr_string", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3504, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("netCDF4._netCDF4.Variable.setncattr_string", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -35192,7 +35238,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_18setncattr_string(struct struct __pyx_opt_args_7netCDF4_8_netCDF4__set_att __pyx_t_4; __Pyx_RefNannySetupContext("setncattr_string", 0); - /* "netCDF4/_netCDF4.pyx":3490 + /* "netCDF4/_netCDF4.pyx":3513 * Use if you need to set an attribute to an array of variable-length strings.""" * cdef nc_type xtype * xtype=-99 # <<<<<<<<<<<<<< @@ -35201,20 +35247,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_18setncattr_string(struct */ __pyx_v_xtype = -99; - /* "netCDF4/_netCDF4.pyx":3491 + /* "netCDF4/_netCDF4.pyx":3514 * cdef nc_type xtype * xtype=-99 * if self._grp.data_model != 'NETCDF4': # <<<<<<<<<<<<<< * msg='file format does not support NC_STRING attributes' * raise IOError(msg) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3491, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3491, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3514, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":3492 + /* "netCDF4/_netCDF4.pyx":3515 * xtype=-99 * if self._grp.data_model != 'NETCDF4': * msg='file format does not support NC_STRING attributes' # <<<<<<<<<<<<<< @@ -35224,26 +35270,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_18setncattr_string(struct __Pyx_INCREF(__pyx_kp_s_file_format_does_not_support_NC); __pyx_v_msg = __pyx_kp_s_file_format_does_not_support_NC; - /* "netCDF4/_netCDF4.pyx":3493 + /* "netCDF4/_netCDF4.pyx":3516 * if self._grp.data_model != 'NETCDF4': * msg='file format does not support NC_STRING attributes' * raise IOError(msg) # <<<<<<<<<<<<<< * _set_att(self._grp, self._varid, name, value, xtype=xtype, force_ncstring=True) * */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3493, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3516, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_msg); __Pyx_GIVEREF(__pyx_v_msg); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_msg); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3493, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3516, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 3493, __pyx_L1_error) + __PYX_ERR(0, 3516, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3491 + /* "netCDF4/_netCDF4.pyx":3514 * cdef nc_type xtype * xtype=-99 * if self._grp.data_model != 'NETCDF4': # <<<<<<<<<<<<<< @@ -35252,7 +35298,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_18setncattr_string(struct */ } - /* "netCDF4/_netCDF4.pyx":3494 + /* "netCDF4/_netCDF4.pyx":3517 * msg='file format does not support NC_STRING attributes' * raise IOError(msg) * _set_att(self._grp, self._varid, name, value, xtype=xtype, force_ncstring=True) # <<<<<<<<<<<<<< @@ -35264,12 +35310,12 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_18setncattr_string(struct __pyx_t_4.__pyx_n = 2; __pyx_t_4.xtype = __pyx_v_xtype; __pyx_t_4.force_ncstring = Py_True; - __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__set_att(__pyx_t_3, __pyx_v_self->_varid, __pyx_v_name, __pyx_v_value, &__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3494, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__set_att(__pyx_t_3, __pyx_v_self->_varid, __pyx_v_name, __pyx_v_value, &__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":3481 + /* "netCDF4/_netCDF4.pyx":3504 * if self._grp.data_model != 'NETCDF4': self._grp._enddef() * * def setncattr_string(self,name,value): # <<<<<<<<<<<<<< @@ -35292,7 +35338,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_18setncattr_string(struct return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":3496 +/* "netCDF4/_netCDF4.pyx":3519 * _set_att(self._grp, self._varid, name, value, xtype=xtype, force_ncstring=True) * * def setncatts(self,attdict): # <<<<<<<<<<<<<< @@ -35330,19 +35376,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_20setncatts(struct __pyx_ PyObject *(*__pyx_t_9)(PyObject *); __Pyx_RefNannySetupContext("setncatts", 0); - /* "netCDF4/_netCDF4.pyx":3504 + /* "netCDF4/_netCDF4.pyx":3527 * formatted file, since nc_redef/nc_enddef is not called in between setting * each attribute""" * if self._grp.data_model != 'NETCDF4': self._grp._redef() # <<<<<<<<<<<<<< * for name, value in attdict.items(): * _set_att(self._grp, self._varid, name, value) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3504, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3527, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3504, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3527, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_redef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3504, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_redef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3527, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -35355,24 +35401,24 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_20setncatts(struct __pyx_ } } if (__pyx_t_4) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3504, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3527, __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, 3504, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3527, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "netCDF4/_netCDF4.pyx":3505 + /* "netCDF4/_netCDF4.pyx":3528 * each attribute""" * if self._grp.data_model != 'NETCDF4': self._grp._redef() * for name, value in attdict.items(): # <<<<<<<<<<<<<< * _set_att(self._grp, self._varid, name, value) * if self._grp.data_model != 'NETCDF4': self._grp._enddef() */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_attdict, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3505, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_attdict, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -35385,10 +35431,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_20setncatts(struct __pyx_ } } if (__pyx_t_4) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3505, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3528, __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, 3505, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3528, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -35396,9 +35442,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_20setncatts(struct __pyx_ __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3505, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3505, __pyx_L1_error) + __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3528, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -35406,17 +35452,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_20setncatts(struct __pyx_ if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_5 >= 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_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 3505, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 3528, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3505, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_5 >= 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_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 3505, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 3528, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3505, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -35426,7 +35472,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_20setncatts(struct __pyx_ 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, 3505, __pyx_L1_error) + else __PYX_ERR(0, 3528, __pyx_L1_error) } break; } @@ -35442,7 +35488,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_20setncatts(struct __pyx_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 3505, __pyx_L1_error) + __PYX_ERR(0, 3528, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -35455,15 +35501,15 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_20setncatts(struct __pyx_ __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); #else - __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3505, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3505, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3505, __pyx_L1_error) + __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; @@ -35471,7 +35517,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_20setncatts(struct __pyx_ __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 3505, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 3528, __pyx_L1_error) __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L7_unpacking_done; @@ -35479,7 +35525,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_20setncatts(struct __pyx_ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 3505, __pyx_L1_error) + __PYX_ERR(0, 3528, __pyx_L1_error) __pyx_L7_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_4); @@ -35487,7 +35533,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_20setncatts(struct __pyx_ __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":3506 + /* "netCDF4/_netCDF4.pyx":3529 * if self._grp.data_model != 'NETCDF4': self._grp._redef() * for name, value in attdict.items(): * _set_att(self._grp, self._varid, name, value) # <<<<<<<<<<<<<< @@ -35496,12 +35542,12 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_20setncatts(struct __pyx_ */ __pyx_t_1 = __pyx_v_self->_grp; __Pyx_INCREF(__pyx_t_1); - __pyx_t_7 = __pyx_f_7netCDF4_8_netCDF4__set_att(__pyx_t_1, __pyx_v_self->_varid, __pyx_v_name, __pyx_v_value, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3506, __pyx_L1_error) + __pyx_t_7 = __pyx_f_7netCDF4_8_netCDF4__set_att(__pyx_t_1, __pyx_v_self->_varid, __pyx_v_name, __pyx_v_value, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":3505 + /* "netCDF4/_netCDF4.pyx":3528 * each attribute""" * if self._grp.data_model != 'NETCDF4': self._grp._redef() * for name, value in attdict.items(): # <<<<<<<<<<<<<< @@ -35511,19 +35557,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_20setncatts(struct __pyx_ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":3507 + /* "netCDF4/_netCDF4.pyx":3530 * for name, value in attdict.items(): * _set_att(self._grp, self._varid, name, value) * if self._grp.data_model != 'NETCDF4': self._grp._enddef() # <<<<<<<<<<<<<< * * def getncattr(self,name): */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3507, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3507, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3530, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3507, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -35536,17 +35582,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_20setncatts(struct __pyx_ } } if (__pyx_t_1) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3507, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3530, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3507, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3530, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - /* "netCDF4/_netCDF4.pyx":3496 + /* "netCDF4/_netCDF4.pyx":3519 * _set_att(self._grp, self._varid, name, value, xtype=xtype, force_ncstring=True) * * def setncatts(self,attdict): # <<<<<<<<<<<<<< @@ -35573,7 +35619,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_20setncatts(struct __pyx_ return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":3509 +/* "netCDF4/_netCDF4.pyx":3532 * if self._grp.data_model != 'NETCDF4': self._grp._enddef() * * def getncattr(self,name): # <<<<<<<<<<<<<< @@ -35602,7 +35648,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_22getncattr(struct __pyx_ PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("getncattr", 0); - /* "netCDF4/_netCDF4.pyx":3516 + /* "netCDF4/_netCDF4.pyx":3539 * netCDF attribute with the same name as one of the reserved python * attributes.""" * return _get_att(self._grp, self._varid, name) # <<<<<<<<<<<<<< @@ -35612,14 +35658,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_22getncattr(struct __pyx_ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_v_self->_grp; __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_7netCDF4_8_netCDF4__get_att(__pyx_t_1, __pyx_v_self->_varid, __pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3516, __pyx_L1_error) + __pyx_t_2 = __pyx_f_7netCDF4_8_netCDF4__get_att(__pyx_t_1, __pyx_v_self->_varid, __pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3539, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":3509 + /* "netCDF4/_netCDF4.pyx":3532 * if self._grp.data_model != 'NETCDF4': self._grp._enddef() * * def getncattr(self,name): # <<<<<<<<<<<<<< @@ -35639,7 +35685,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_22getncattr(struct __pyx_ return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":3518 +/* "netCDF4/_netCDF4.pyx":3541 * return _get_att(self._grp, self._varid, name) * * def delncattr(self, name): # <<<<<<<<<<<<<< @@ -35674,41 +35720,41 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_24delncattr(struct __pyx_ PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("delncattr", 0); - /* "netCDF4/_netCDF4.pyx":3526 + /* "netCDF4/_netCDF4.pyx":3549 * attributes.""" * cdef char *attname * bytestr = _strencode(name) # <<<<<<<<<<<<<< * attname = bytestr * if self._grp.data_model != 'NETCDF4': self._grp._redef() */ - __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3526, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_bytestr = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":3527 + /* "netCDF4/_netCDF4.pyx":3550 * cdef char *attname * bytestr = _strencode(name) * attname = bytestr # <<<<<<<<<<<<<< * if self._grp.data_model != 'NETCDF4': self._grp._redef() * ierr = nc_del_att(self._grpid, self._varid, attname) */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 3527, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 3550, __pyx_L1_error) __pyx_v_attname = __pyx_t_2; - /* "netCDF4/_netCDF4.pyx":3528 + /* "netCDF4/_netCDF4.pyx":3551 * bytestr = _strencode(name) * attname = bytestr * if self._grp.data_model != 'NETCDF4': self._grp._redef() # <<<<<<<<<<<<<< * ierr = nc_del_att(self._grpid, self._varid, attname) * if self._grp.data_model != 'NETCDF4': self._grp._enddef() */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3528, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3528, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3551, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_redef); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3528, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_redef); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -35721,17 +35767,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_24delncattr(struct __pyx_ } } if (__pyx_t_5) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3528, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3551, __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, 3528, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3551, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "netCDF4/_netCDF4.pyx":3529 + /* "netCDF4/_netCDF4.pyx":3552 * attname = bytestr * if self._grp.data_model != 'NETCDF4': self._grp._redef() * ierr = nc_del_att(self._grpid, self._varid, attname) # <<<<<<<<<<<<<< @@ -35740,19 +35786,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_24delncattr(struct __pyx_ */ __pyx_v_ierr = nc_del_att(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_attname); - /* "netCDF4/_netCDF4.pyx":3530 + /* "netCDF4/_netCDF4.pyx":3553 * if self._grp.data_model != 'NETCDF4': self._grp._redef() * ierr = nc_del_att(self._grpid, self._varid, attname) * if self._grp.data_model != 'NETCDF4': self._grp._enddef() # <<<<<<<<<<<<<< * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3530, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3553, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3530, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3553, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3530, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3553, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -35765,17 +35811,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_24delncattr(struct __pyx_ } } if (__pyx_t_5) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3530, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3553, __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, 3530, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3553, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "netCDF4/_netCDF4.pyx":3531 + /* "netCDF4/_netCDF4.pyx":3554 * ierr = nc_del_att(self._grpid, self._varid, attname) * if self._grp.data_model != 'NETCDF4': self._grp._enddef() * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -35785,7 +35831,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_24delncattr(struct __pyx_ __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":3532 + /* "netCDF4/_netCDF4.pyx":3555 * if self._grp.data_model != 'NETCDF4': self._grp._enddef() * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -35793,22 +35839,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_24delncattr(struct __pyx_ * def filters(self): */ __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, 3532, __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, 3555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3532, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3555, __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, 3532, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3555, __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, 3532, __pyx_L1_error) + __PYX_ERR(0, 3555, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3531 + /* "netCDF4/_netCDF4.pyx":3554 * ierr = nc_del_att(self._grpid, self._varid, attname) * if self._grp.data_model != 'NETCDF4': self._grp._enddef() * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -35817,7 +35863,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_24delncattr(struct __pyx_ */ } - /* "netCDF4/_netCDF4.pyx":3518 + /* "netCDF4/_netCDF4.pyx":3541 * return _get_att(self._grp, self._varid, name) * * def delncattr(self, name): # <<<<<<<<<<<<<< @@ -35841,7 +35887,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_24delncattr(struct __pyx_ return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":3534 +/* "netCDF4/_netCDF4.pyx":3557 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * * def filters(self): # <<<<<<<<<<<<<< @@ -35879,38 +35925,38 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_26filters(struct __pyx_ob PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("filters", 0); - /* "netCDF4/_netCDF4.pyx":3540 + /* "netCDF4/_netCDF4.pyx":3563 * return dictionary containing HDF5 filter parameters.""" * cdef int ierr,ideflate,ishuffle,ideflate_level,ifletcher32 * filtdict = {'zlib':False,'shuffle':False,'complevel':0,'fletcher32':False} # <<<<<<<<<<<<<< * if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']: return * with nogil: */ - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3540, __pyx_L1_error) + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_zlib, Py_False) < 0) __PYX_ERR(0, 3540, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_shuffle, Py_False) < 0) __PYX_ERR(0, 3540, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_complevel, __pyx_int_0) < 0) __PYX_ERR(0, 3540, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_fletcher32, Py_False) < 0) __PYX_ERR(0, 3540, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_zlib, Py_False) < 0) __PYX_ERR(0, 3563, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_shuffle, Py_False) < 0) __PYX_ERR(0, 3563, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_complevel, __pyx_int_0) < 0) __PYX_ERR(0, 3563, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_fletcher32, Py_False) < 0) __PYX_ERR(0, 3563, __pyx_L1_error) __pyx_v_filtdict = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":3541 + /* "netCDF4/_netCDF4.pyx":3564 * cdef int ierr,ideflate,ishuffle,ideflate_level,ifletcher32 * filtdict = {'zlib':False,'shuffle':False,'complevel':0,'fletcher32':False} * if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']: return # <<<<<<<<<<<<<< * with nogil: * ierr = nc_inq_var_deflate(self._grpid, self._varid, &ishuffle, &ideflate, &ideflate_level) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3541, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3564, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4_CLASSIC, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3541, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4_CLASSIC, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3564, __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_NETCDF4, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3541, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3564, __pyx_L1_error) __pyx_t_2 = __pyx_t_3; __pyx_L4_bool_binop_done:; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -35921,7 +35967,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_26filters(struct __pyx_ob goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":3542 + /* "netCDF4/_netCDF4.pyx":3565 * filtdict = {'zlib':False,'shuffle':False,'complevel':0,'fletcher32':False} * if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']: return * with nogil: # <<<<<<<<<<<<<< @@ -35935,7 +35981,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_26filters(struct __pyx_ob #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":3543 + /* "netCDF4/_netCDF4.pyx":3566 * if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']: return * with nogil: * ierr = nc_inq_var_deflate(self._grpid, self._varid, &ishuffle, &ideflate, &ideflate_level) # <<<<<<<<<<<<<< @@ -35945,7 +35991,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_26filters(struct __pyx_ob __pyx_v_ierr = nc_inq_var_deflate(__pyx_v_self->_grpid, __pyx_v_self->_varid, (&__pyx_v_ishuffle), (&__pyx_v_ideflate), (&__pyx_v_ideflate_level)); } - /* "netCDF4/_netCDF4.pyx":3542 + /* "netCDF4/_netCDF4.pyx":3565 * filtdict = {'zlib':False,'shuffle':False,'complevel':0,'fletcher32':False} * if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']: return * with nogil: # <<<<<<<<<<<<<< @@ -35963,7 +36009,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_26filters(struct __pyx_ob } } - /* "netCDF4/_netCDF4.pyx":3544 + /* "netCDF4/_netCDF4.pyx":3567 * with nogil: * ierr = nc_inq_var_deflate(self._grpid, self._varid, &ishuffle, &ideflate, &ideflate_level) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -35973,7 +36019,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_26filters(struct __pyx_ob __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":3545 + /* "netCDF4/_netCDF4.pyx":3568 * ierr = nc_inq_var_deflate(self._grpid, self._varid, &ishuffle, &ideflate, &ideflate_level) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -35981,22 +36027,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_26filters(struct __pyx_ob * ierr = nc_inq_var_fletcher32(self._grpid, self._varid, &ifletcher32) */ __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, 3545, __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, 3568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3545, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3568, __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, 3545, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3568, __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, 3545, __pyx_L1_error) + __PYX_ERR(0, 3568, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3544 + /* "netCDF4/_netCDF4.pyx":3567 * with nogil: * ierr = nc_inq_var_deflate(self._grpid, self._varid, &ishuffle, &ideflate, &ideflate_level) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -36005,7 +36051,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_26filters(struct __pyx_ob */ } - /* "netCDF4/_netCDF4.pyx":3546 + /* "netCDF4/_netCDF4.pyx":3569 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * with nogil: # <<<<<<<<<<<<<< @@ -36019,7 +36065,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_26filters(struct __pyx_ob #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":3547 + /* "netCDF4/_netCDF4.pyx":3570 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * with nogil: * ierr = nc_inq_var_fletcher32(self._grpid, self._varid, &ifletcher32) # <<<<<<<<<<<<<< @@ -36029,7 +36075,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_26filters(struct __pyx_ob __pyx_v_ierr = nc_inq_var_fletcher32(__pyx_v_self->_grpid, __pyx_v_self->_varid, (&__pyx_v_ifletcher32)); } - /* "netCDF4/_netCDF4.pyx":3546 + /* "netCDF4/_netCDF4.pyx":3569 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * with nogil: # <<<<<<<<<<<<<< @@ -36047,7 +36093,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_26filters(struct __pyx_ob } } - /* "netCDF4/_netCDF4.pyx":3548 + /* "netCDF4/_netCDF4.pyx":3571 * with nogil: * ierr = nc_inq_var_fletcher32(self._grpid, self._varid, &ifletcher32) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -36057,7 +36103,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_26filters(struct __pyx_ob __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":3549 + /* "netCDF4/_netCDF4.pyx":3572 * ierr = nc_inq_var_fletcher32(self._grpid, self._varid, &ifletcher32) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -36065,22 +36111,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_26filters(struct __pyx_ob * filtdict['zlib']=True */ __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, 3549, __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, 3572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3549, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3572, __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, 3549, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3572, __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, 3549, __pyx_L1_error) + __PYX_ERR(0, 3572, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3548 + /* "netCDF4/_netCDF4.pyx":3571 * with nogil: * ierr = nc_inq_var_fletcher32(self._grpid, self._varid, &ifletcher32) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -36089,7 +36135,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_26filters(struct __pyx_ob */ } - /* "netCDF4/_netCDF4.pyx":3550 + /* "netCDF4/_netCDF4.pyx":3573 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * if ideflate: # <<<<<<<<<<<<<< @@ -36099,28 +36145,28 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_26filters(struct __pyx_ob __pyx_t_3 = (__pyx_v_ideflate != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":3551 + /* "netCDF4/_netCDF4.pyx":3574 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * if ideflate: * filtdict['zlib']=True # <<<<<<<<<<<<<< * filtdict['complevel']=ideflate_level * if ishuffle: */ - if (unlikely(PyDict_SetItem(__pyx_v_filtdict, __pyx_n_s_zlib, Py_True) < 0)) __PYX_ERR(0, 3551, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_filtdict, __pyx_n_s_zlib, Py_True) < 0)) __PYX_ERR(0, 3574, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3552 + /* "netCDF4/_netCDF4.pyx":3575 * if ideflate: * filtdict['zlib']=True * filtdict['complevel']=ideflate_level # <<<<<<<<<<<<<< * if ishuffle: * filtdict['shuffle']=True */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ideflate_level); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3552, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ideflate_level); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (unlikely(PyDict_SetItem(__pyx_v_filtdict, __pyx_n_s_complevel, __pyx_t_1) < 0)) __PYX_ERR(0, 3552, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_filtdict, __pyx_n_s_complevel, __pyx_t_1) < 0)) __PYX_ERR(0, 3575, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":3550 + /* "netCDF4/_netCDF4.pyx":3573 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * if ideflate: # <<<<<<<<<<<<<< @@ -36129,7 +36175,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_26filters(struct __pyx_ob */ } - /* "netCDF4/_netCDF4.pyx":3553 + /* "netCDF4/_netCDF4.pyx":3576 * filtdict['zlib']=True * filtdict['complevel']=ideflate_level * if ishuffle: # <<<<<<<<<<<<<< @@ -36139,16 +36185,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_26filters(struct __pyx_ob __pyx_t_3 = (__pyx_v_ishuffle != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":3554 + /* "netCDF4/_netCDF4.pyx":3577 * filtdict['complevel']=ideflate_level * if ishuffle: * filtdict['shuffle']=True # <<<<<<<<<<<<<< * if ifletcher32: * filtdict['fletcher32']=True */ - if (unlikely(PyDict_SetItem(__pyx_v_filtdict, __pyx_n_s_shuffle, Py_True) < 0)) __PYX_ERR(0, 3554, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_filtdict, __pyx_n_s_shuffle, Py_True) < 0)) __PYX_ERR(0, 3577, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3553 + /* "netCDF4/_netCDF4.pyx":3576 * filtdict['zlib']=True * filtdict['complevel']=ideflate_level * if ishuffle: # <<<<<<<<<<<<<< @@ -36157,7 +36203,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_26filters(struct __pyx_ob */ } - /* "netCDF4/_netCDF4.pyx":3555 + /* "netCDF4/_netCDF4.pyx":3578 * if ishuffle: * filtdict['shuffle']=True * if ifletcher32: # <<<<<<<<<<<<<< @@ -36167,16 +36213,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_26filters(struct __pyx_ob __pyx_t_3 = (__pyx_v_ifletcher32 != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":3556 + /* "netCDF4/_netCDF4.pyx":3579 * filtdict['shuffle']=True * if ifletcher32: * filtdict['fletcher32']=True # <<<<<<<<<<<<<< * return filtdict * */ - if (unlikely(PyDict_SetItem(__pyx_v_filtdict, __pyx_n_s_fletcher32, Py_True) < 0)) __PYX_ERR(0, 3556, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_filtdict, __pyx_n_s_fletcher32, Py_True) < 0)) __PYX_ERR(0, 3579, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3555 + /* "netCDF4/_netCDF4.pyx":3578 * if ishuffle: * filtdict['shuffle']=True * if ifletcher32: # <<<<<<<<<<<<<< @@ -36185,7 +36231,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_26filters(struct __pyx_ob */ } - /* "netCDF4/_netCDF4.pyx":3557 + /* "netCDF4/_netCDF4.pyx":3580 * if ifletcher32: * filtdict['fletcher32']=True * return filtdict # <<<<<<<<<<<<<< @@ -36197,7 +36243,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_26filters(struct __pyx_ob __pyx_r = __pyx_v_filtdict; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":3534 + /* "netCDF4/_netCDF4.pyx":3557 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * * def filters(self): # <<<<<<<<<<<<<< @@ -36218,7 +36264,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_26filters(struct __pyx_ob return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":3559 +/* "netCDF4/_netCDF4.pyx":3582 * return filtdict * * def endian(self): # <<<<<<<<<<<<<< @@ -36252,29 +36298,29 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_28endian(struct __pyx_obj PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("endian", 0); - /* "netCDF4/_netCDF4.pyx":3565 + /* "netCDF4/_netCDF4.pyx":3588 * return endian-ness (`little,big,native`) of variable (as stored in HDF5 file).""" * cdef int ierr, iendian * if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']: # <<<<<<<<<<<<<< * return 'native' * with nogil: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3565, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4_CLASSIC, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3565, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4_CLASSIC, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3588, __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_NETCDF4, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3565, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3588, __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":3566 + /* "netCDF4/_netCDF4.pyx":3589 * cdef int ierr, iendian * if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']: * return 'native' # <<<<<<<<<<<<<< @@ -36286,7 +36332,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_28endian(struct __pyx_obj __pyx_r = __pyx_n_s_native; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":3565 + /* "netCDF4/_netCDF4.pyx":3588 * return endian-ness (`little,big,native`) of variable (as stored in HDF5 file).""" * cdef int ierr, iendian * if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']: # <<<<<<<<<<<<<< @@ -36295,7 +36341,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_28endian(struct __pyx_obj */ } - /* "netCDF4/_netCDF4.pyx":3567 + /* "netCDF4/_netCDF4.pyx":3590 * if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']: * return 'native' * with nogil: # <<<<<<<<<<<<<< @@ -36309,7 +36355,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_28endian(struct __pyx_obj #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":3568 + /* "netCDF4/_netCDF4.pyx":3591 * return 'native' * with nogil: * ierr = nc_inq_var_endian(self._grpid, self._varid, &iendian) # <<<<<<<<<<<<<< @@ -36319,7 +36365,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_28endian(struct __pyx_obj __pyx_v_ierr = nc_inq_var_endian(__pyx_v_self->_grpid, __pyx_v_self->_varid, (&__pyx_v_iendian)); } - /* "netCDF4/_netCDF4.pyx":3567 + /* "netCDF4/_netCDF4.pyx":3590 * if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']: * return 'native' * with nogil: # <<<<<<<<<<<<<< @@ -36337,7 +36383,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_28endian(struct __pyx_obj } } - /* "netCDF4/_netCDF4.pyx":3569 + /* "netCDF4/_netCDF4.pyx":3592 * with nogil: * ierr = nc_inq_var_endian(self._grpid, self._varid, &iendian) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -36347,7 +36393,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_28endian(struct __pyx_obj __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":3570 + /* "netCDF4/_netCDF4.pyx":3593 * ierr = nc_inq_var_endian(self._grpid, self._varid, &iendian) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -36355,22 +36401,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_28endian(struct __pyx_obj * return 'little' */ __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, 3570, __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, 3593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3570, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3593, __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, 3570, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3593, __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, 3570, __pyx_L1_error) + __PYX_ERR(0, 3593, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3569 + /* "netCDF4/_netCDF4.pyx":3592 * with nogil: * ierr = nc_inq_var_endian(self._grpid, self._varid, &iendian) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -36379,7 +36425,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_28endian(struct __pyx_obj */ } - /* "netCDF4/_netCDF4.pyx":3571 + /* "netCDF4/_netCDF4.pyx":3594 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * if iendian == NC_ENDIAN_LITTLE: # <<<<<<<<<<<<<< @@ -36389,7 +36435,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_28endian(struct __pyx_obj switch (__pyx_v_iendian) { case NC_ENDIAN_LITTLE: - /* "netCDF4/_netCDF4.pyx":3572 + /* "netCDF4/_netCDF4.pyx":3595 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * if iendian == NC_ENDIAN_LITTLE: * return 'little' # <<<<<<<<<<<<<< @@ -36401,7 +36447,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_28endian(struct __pyx_obj __pyx_r = __pyx_n_s_little; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":3571 + /* "netCDF4/_netCDF4.pyx":3594 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * if iendian == NC_ENDIAN_LITTLE: # <<<<<<<<<<<<<< @@ -36410,7 +36456,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_28endian(struct __pyx_obj */ break; - /* "netCDF4/_netCDF4.pyx":3573 + /* "netCDF4/_netCDF4.pyx":3596 * if iendian == NC_ENDIAN_LITTLE: * return 'little' * elif iendian == NC_ENDIAN_BIG: # <<<<<<<<<<<<<< @@ -36419,7 +36465,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_28endian(struct __pyx_obj */ case NC_ENDIAN_BIG: - /* "netCDF4/_netCDF4.pyx":3574 + /* "netCDF4/_netCDF4.pyx":3597 * return 'little' * elif iendian == NC_ENDIAN_BIG: * return 'big' # <<<<<<<<<<<<<< @@ -36431,7 +36477,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_28endian(struct __pyx_obj __pyx_r = __pyx_n_s_big; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":3573 + /* "netCDF4/_netCDF4.pyx":3596 * if iendian == NC_ENDIAN_LITTLE: * return 'little' * elif iendian == NC_ENDIAN_BIG: # <<<<<<<<<<<<<< @@ -36441,7 +36487,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_28endian(struct __pyx_obj break; default: - /* "netCDF4/_netCDF4.pyx":3576 + /* "netCDF4/_netCDF4.pyx":3599 * return 'big' * else: * return 'native' # <<<<<<<<<<<<<< @@ -36455,7 +36501,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_28endian(struct __pyx_obj break; } - /* "netCDF4/_netCDF4.pyx":3559 + /* "netCDF4/_netCDF4.pyx":3582 * return filtdict * * def endian(self): # <<<<<<<<<<<<<< @@ -36475,7 +36521,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_28endian(struct __pyx_obj return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":3578 +/* "netCDF4/_netCDF4.pyx":3601 * return 'native' * * def chunking(self): # <<<<<<<<<<<<<< @@ -36515,22 +36561,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_30chunking(struct __pyx_o int __pyx_t_7; __Pyx_RefNannySetupContext("chunking", 0); - /* "netCDF4/_netCDF4.pyx":3588 + /* "netCDF4/_netCDF4.pyx":3611 * cdef int ierr, icontiguous, ndims * cdef size_t *chunksizesp * if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']: return None # <<<<<<<<<<<<<< * ndims = self.ndim * chunksizesp = malloc(sizeof(size_t) * ndims) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3588, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3611, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4_CLASSIC, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3588, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4_CLASSIC, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3611, __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_NETCDF4, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3588, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3611, __pyx_L1_error) __pyx_t_2 = __pyx_t_3; __pyx_L4_bool_binop_done:; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -36542,17 +36588,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_30chunking(struct __pyx_o goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":3589 + /* "netCDF4/_netCDF4.pyx":3612 * cdef size_t *chunksizesp * if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']: return None * ndims = self.ndim # <<<<<<<<<<<<<< * chunksizesp = malloc(sizeof(size_t) * ndims) * with nogil: */ - __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_self->ndim); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3589, __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, 3612, __pyx_L1_error) __pyx_v_ndims = __pyx_t_4; - /* "netCDF4/_netCDF4.pyx":3590 + /* "netCDF4/_netCDF4.pyx":3613 * if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']: return None * ndims = self.ndim * chunksizesp = malloc(sizeof(size_t) * ndims) # <<<<<<<<<<<<<< @@ -36561,7 +36607,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_30chunking(struct __pyx_o */ __pyx_v_chunksizesp = ((size_t *)malloc(((sizeof(size_t)) * __pyx_v_ndims))); - /* "netCDF4/_netCDF4.pyx":3591 + /* "netCDF4/_netCDF4.pyx":3614 * ndims = self.ndim * chunksizesp = malloc(sizeof(size_t) * ndims) * with nogil: # <<<<<<<<<<<<<< @@ -36575,7 +36621,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_30chunking(struct __pyx_o #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":3592 + /* "netCDF4/_netCDF4.pyx":3615 * chunksizesp = malloc(sizeof(size_t) * ndims) * with nogil: * ierr = nc_inq_var_chunking(self._grpid, self._varid, &icontiguous, chunksizesp) # <<<<<<<<<<<<<< @@ -36585,7 +36631,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_30chunking(struct __pyx_o __pyx_v_ierr = nc_inq_var_chunking(__pyx_v_self->_grpid, __pyx_v_self->_varid, (&__pyx_v_icontiguous), __pyx_v_chunksizesp); } - /* "netCDF4/_netCDF4.pyx":3591 + /* "netCDF4/_netCDF4.pyx":3614 * ndims = self.ndim * chunksizesp = malloc(sizeof(size_t) * ndims) * with nogil: # <<<<<<<<<<<<<< @@ -36603,7 +36649,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_30chunking(struct __pyx_o } } - /* "netCDF4/_netCDF4.pyx":3593 + /* "netCDF4/_netCDF4.pyx":3616 * with nogil: * ierr = nc_inq_var_chunking(self._grpid, self._varid, &icontiguous, chunksizesp) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -36613,7 +36659,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_30chunking(struct __pyx_o __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":3594 + /* "netCDF4/_netCDF4.pyx":3617 * ierr = nc_inq_var_chunking(self._grpid, self._varid, &icontiguous, chunksizesp) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -36621,22 +36667,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_30chunking(struct __pyx_o * for n from 0 <= n < ndims: */ __pyx_t_5 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_5, 0, strlen(__pyx_t_5), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3594, __pyx_L1_error) + __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_5, 0, strlen(__pyx_t_5), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3617, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3594, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3617, __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, 3594, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3617, __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, 3594, __pyx_L1_error) + __PYX_ERR(0, 3617, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3593 + /* "netCDF4/_netCDF4.pyx":3616 * with nogil: * ierr = nc_inq_var_chunking(self._grpid, self._varid, &icontiguous, chunksizesp) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -36645,19 +36691,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_30chunking(struct __pyx_o */ } - /* "netCDF4/_netCDF4.pyx":3595 + /* "netCDF4/_netCDF4.pyx":3618 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * chunksizes=[] # <<<<<<<<<<<<<< * for n from 0 <= n < ndims: * chunksizes.append(chunksizesp[n]) */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3595, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_chunksizes = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":3596 + /* "netCDF4/_netCDF4.pyx":3619 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * chunksizes=[] * for n from 0 <= n < ndims: # <<<<<<<<<<<<<< @@ -36667,20 +36713,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_30chunking(struct __pyx_o __pyx_t_4 = __pyx_v_ndims; for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_4; __pyx_v_n++) { - /* "netCDF4/_netCDF4.pyx":3597 + /* "netCDF4/_netCDF4.pyx":3620 * chunksizes=[] * for n from 0 <= n < ndims: * chunksizes.append(chunksizesp[n]) # <<<<<<<<<<<<<< * free(chunksizesp) * if icontiguous: */ - __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_chunksizesp[__pyx_v_n])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3597, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_chunksizesp[__pyx_v_n])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3620, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_chunksizes, __pyx_t_1); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 3597, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_chunksizes, __pyx_t_1); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 3620, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "netCDF4/_netCDF4.pyx":3598 + /* "netCDF4/_netCDF4.pyx":3621 * for n from 0 <= n < ndims: * chunksizes.append(chunksizesp[n]) * free(chunksizesp) # <<<<<<<<<<<<<< @@ -36689,7 +36735,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_30chunking(struct __pyx_o */ free(__pyx_v_chunksizesp); - /* "netCDF4/_netCDF4.pyx":3599 + /* "netCDF4/_netCDF4.pyx":3622 * chunksizes.append(chunksizesp[n]) * free(chunksizesp) * if icontiguous: # <<<<<<<<<<<<<< @@ -36699,7 +36745,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_30chunking(struct __pyx_o __pyx_t_3 = (__pyx_v_icontiguous != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":3600 + /* "netCDF4/_netCDF4.pyx":3623 * free(chunksizesp) * if icontiguous: * return 'contiguous' # <<<<<<<<<<<<<< @@ -36711,7 +36757,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_30chunking(struct __pyx_o __pyx_r = __pyx_n_s_contiguous; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":3599 + /* "netCDF4/_netCDF4.pyx":3622 * chunksizes.append(chunksizesp[n]) * free(chunksizesp) * if icontiguous: # <<<<<<<<<<<<<< @@ -36720,7 +36766,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_30chunking(struct __pyx_o */ } - /* "netCDF4/_netCDF4.pyx":3602 + /* "netCDF4/_netCDF4.pyx":3625 * return 'contiguous' * else: * return chunksizes # <<<<<<<<<<<<<< @@ -36734,7 +36780,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_30chunking(struct __pyx_o goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":3578 + /* "netCDF4/_netCDF4.pyx":3601 * return 'native' * * def chunking(self): # <<<<<<<<<<<<<< @@ -36755,7 +36801,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_30chunking(struct __pyx_o return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":3604 +/* "netCDF4/_netCDF4.pyx":3627 * return chunksizes * * def get_var_chunk_cache(self): # <<<<<<<<<<<<<< @@ -36794,7 +36840,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_32get_var_chunk_cache(str PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("get_var_chunk_cache", 0); - /* "netCDF4/_netCDF4.pyx":3614 + /* "netCDF4/_netCDF4.pyx":3637 * cdef size_t sizep, nelemsp * cdef float preemptionp * with nogil: # <<<<<<<<<<<<<< @@ -36808,7 +36854,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_32get_var_chunk_cache(str #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":3615 + /* "netCDF4/_netCDF4.pyx":3638 * cdef float preemptionp * with nogil: * ierr = nc_get_var_chunk_cache(self._grpid, self._varid, &sizep, # <<<<<<<<<<<<<< @@ -36818,7 +36864,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_32get_var_chunk_cache(str __pyx_v_ierr = nc_get_var_chunk_cache(__pyx_v_self->_grpid, __pyx_v_self->_varid, (&__pyx_v_sizep), (&__pyx_v_nelemsp), (&__pyx_v_preemptionp)); } - /* "netCDF4/_netCDF4.pyx":3614 + /* "netCDF4/_netCDF4.pyx":3637 * cdef size_t sizep, nelemsp * cdef float preemptionp * with nogil: # <<<<<<<<<<<<<< @@ -36836,7 +36882,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_32get_var_chunk_cache(str } } - /* "netCDF4/_netCDF4.pyx":3617 + /* "netCDF4/_netCDF4.pyx":3640 * ierr = nc_get_var_chunk_cache(self._grpid, self._varid, &sizep, * &nelemsp, &preemptionp) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -36846,7 +36892,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_32get_var_chunk_cache(str __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":3618 + /* "netCDF4/_netCDF4.pyx":3641 * &nelemsp, &preemptionp) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -36854,22 +36900,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_32get_var_chunk_cache(str * return (size,nelems,preemption) */ __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3618, __pyx_L1_error) + __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3641, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3618, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3641, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3618, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3641, __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, 3618, __pyx_L1_error) + __PYX_ERR(0, 3641, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3617 + /* "netCDF4/_netCDF4.pyx":3640 * ierr = nc_get_var_chunk_cache(self._grpid, self._varid, &sizep, * &nelemsp, &preemptionp) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -36878,7 +36924,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_32get_var_chunk_cache(str */ } - /* "netCDF4/_netCDF4.pyx":3619 + /* "netCDF4/_netCDF4.pyx":3642 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * size = sizep; nelems = nelemsp; preemption = preemptionp # <<<<<<<<<<<<<< @@ -36887,12 +36933,12 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_32get_var_chunk_cache(str */ __pyx_v_size = __pyx_v_sizep; __pyx_v_nelems = __pyx_v_nelemsp; - __pyx_t_3 = PyFloat_FromDouble(__pyx_v_preemptionp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3619, __pyx_L1_error) + __pyx_t_3 = PyFloat_FromDouble(__pyx_v_preemptionp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_preemption = __pyx_t_3; __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":3620 + /* "netCDF4/_netCDF4.pyx":3643 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * size = sizep; nelems = nelemsp; preemption = preemptionp * return (size,nelems,preemption) # <<<<<<<<<<<<<< @@ -36900,11 +36946,11 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_32get_var_chunk_cache(str * def set_var_chunk_cache(self,size=None,nelems=None,preemption=None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3620, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_v_nelems); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3620, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_v_nelems); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3620, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); @@ -36919,7 +36965,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_32get_var_chunk_cache(str __pyx_t_5 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":3604 + /* "netCDF4/_netCDF4.pyx":3627 * return chunksizes * * def get_var_chunk_cache(self): # <<<<<<<<<<<<<< @@ -36941,7 +36987,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_32get_var_chunk_cache(str return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":3622 +/* "netCDF4/_netCDF4.pyx":3645 * return (size,nelems,preemption) * * def set_var_chunk_cache(self,size=None,nelems=None,preemption=None): # <<<<<<<<<<<<<< @@ -36994,7 +37040,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_35set_var_chunk_cache(PyO } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_var_chunk_cache") < 0)) __PYX_ERR(0, 3622, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_var_chunk_cache") < 0)) __PYX_ERR(0, 3645, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -37011,7 +37057,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_35set_var_chunk_cache(PyO } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("set_var_chunk_cache", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3622, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_var_chunk_cache", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3645, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("netCDF4._netCDF4.Variable.set_var_chunk_cache", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -37047,14 +37093,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_34set_var_chunk_cache(str char *__pyx_t_11; __Pyx_RefNannySetupContext("set_var_chunk_cache", 0); - /* "netCDF4/_netCDF4.pyx":3633 + /* "netCDF4/_netCDF4.pyx":3656 * cdef float preemptionp * # reset chunk cache size, leave other parameters unchanged. * size_orig, nelems_orig, preemption_orig = self.get_var_chunk_cache() # <<<<<<<<<<<<<< * if size is not None: * sizep = size */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_var_chunk_cache); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3633, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_var_chunk_cache); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -37067,10 +37113,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_34set_var_chunk_cache(str } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3633, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3656, __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, 3633, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3656, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -37084,7 +37130,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_34set_var_chunk_cache(str if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 3633, __pyx_L1_error) + __PYX_ERR(0, 3656, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -37100,17 +37146,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_34set_var_chunk_cache(str __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); #else - __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3633, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3633, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3633, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3633, __pyx_L1_error) + __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext; @@ -37120,7 +37166,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_34set_var_chunk_cache(str __Pyx_GOTREF(__pyx_t_3); index = 2; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 3) < 0) __PYX_ERR(0, 3633, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 3) < 0) __PYX_ERR(0, 3656, __pyx_L1_error) __pyx_t_6 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L4_unpacking_done; @@ -37128,7 +37174,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_34set_var_chunk_cache(str __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 3633, __pyx_L1_error) + __PYX_ERR(0, 3656, __pyx_L1_error) __pyx_L4_unpacking_done:; } __pyx_v_size_orig = __pyx_t_2; @@ -37138,7 +37184,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_34set_var_chunk_cache(str __pyx_v_preemption_orig = __pyx_t_4; __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":3634 + /* "netCDF4/_netCDF4.pyx":3657 * # reset chunk cache size, leave other parameters unchanged. * size_orig, nelems_orig, preemption_orig = self.get_var_chunk_cache() * if size is not None: # <<<<<<<<<<<<<< @@ -37149,17 +37195,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_34set_var_chunk_cache(str __pyx_t_8 = (__pyx_t_7 != 0); if (__pyx_t_8) { - /* "netCDF4/_netCDF4.pyx":3635 + /* "netCDF4/_netCDF4.pyx":3658 * size_orig, nelems_orig, preemption_orig = self.get_var_chunk_cache() * if size is not None: * sizep = size # <<<<<<<<<<<<<< * else: * sizep = size_orig */ - __pyx_t_9 = __Pyx_PyInt_As_size_t(__pyx_v_size); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3635, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_As_size_t(__pyx_v_size); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3658, __pyx_L1_error) __pyx_v_sizep = __pyx_t_9; - /* "netCDF4/_netCDF4.pyx":3634 + /* "netCDF4/_netCDF4.pyx":3657 * # reset chunk cache size, leave other parameters unchanged. * size_orig, nelems_orig, preemption_orig = self.get_var_chunk_cache() * if size is not None: # <<<<<<<<<<<<<< @@ -37169,7 +37215,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_34set_var_chunk_cache(str goto __pyx_L5; } - /* "netCDF4/_netCDF4.pyx":3637 + /* "netCDF4/_netCDF4.pyx":3660 * sizep = size * else: * sizep = size_orig # <<<<<<<<<<<<<< @@ -37177,12 +37223,12 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_34set_var_chunk_cache(str * nelemsp = nelems */ /*else*/ { - __pyx_t_9 = __Pyx_PyInt_As_size_t(__pyx_v_size_orig); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3637, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_As_size_t(__pyx_v_size_orig); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3660, __pyx_L1_error) __pyx_v_sizep = __pyx_t_9; } __pyx_L5:; - /* "netCDF4/_netCDF4.pyx":3638 + /* "netCDF4/_netCDF4.pyx":3661 * else: * sizep = size_orig * if nelems is not None: # <<<<<<<<<<<<<< @@ -37193,17 +37239,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_34set_var_chunk_cache(str __pyx_t_7 = (__pyx_t_8 != 0); if (__pyx_t_7) { - /* "netCDF4/_netCDF4.pyx":3639 + /* "netCDF4/_netCDF4.pyx":3662 * sizep = size_orig * if nelems is not None: * nelemsp = nelems # <<<<<<<<<<<<<< * else: * nelemsp = nelems_orig */ - __pyx_t_9 = __Pyx_PyInt_As_size_t(__pyx_v_nelems); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3639, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_As_size_t(__pyx_v_nelems); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3662, __pyx_L1_error) __pyx_v_nelemsp = __pyx_t_9; - /* "netCDF4/_netCDF4.pyx":3638 + /* "netCDF4/_netCDF4.pyx":3661 * else: * sizep = size_orig * if nelems is not None: # <<<<<<<<<<<<<< @@ -37213,7 +37259,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_34set_var_chunk_cache(str goto __pyx_L6; } - /* "netCDF4/_netCDF4.pyx":3641 + /* "netCDF4/_netCDF4.pyx":3664 * nelemsp = nelems * else: * nelemsp = nelems_orig # <<<<<<<<<<<<<< @@ -37221,12 +37267,12 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_34set_var_chunk_cache(str * preemptionp = preemption */ /*else*/ { - __pyx_t_9 = __Pyx_PyInt_As_size_t(__pyx_v_nelems_orig); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3641, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_As_size_t(__pyx_v_nelems_orig); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3664, __pyx_L1_error) __pyx_v_nelemsp = __pyx_t_9; } __pyx_L6:; - /* "netCDF4/_netCDF4.pyx":3642 + /* "netCDF4/_netCDF4.pyx":3665 * else: * nelemsp = nelems_orig * if preemption is not None: # <<<<<<<<<<<<<< @@ -37237,17 +37283,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_34set_var_chunk_cache(str __pyx_t_8 = (__pyx_t_7 != 0); if (__pyx_t_8) { - /* "netCDF4/_netCDF4.pyx":3643 + /* "netCDF4/_netCDF4.pyx":3666 * nelemsp = nelems_orig * if preemption is not None: * preemptionp = preemption # <<<<<<<<<<<<<< * else: * preemptionp = preemption_orig */ - __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_v_preemption); if (unlikely((__pyx_t_10 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3643, __pyx_L1_error) + __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_v_preemption); if (unlikely((__pyx_t_10 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3666, __pyx_L1_error) __pyx_v_preemptionp = __pyx_t_10; - /* "netCDF4/_netCDF4.pyx":3642 + /* "netCDF4/_netCDF4.pyx":3665 * else: * nelemsp = nelems_orig * if preemption is not None: # <<<<<<<<<<<<<< @@ -37257,7 +37303,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_34set_var_chunk_cache(str goto __pyx_L7; } - /* "netCDF4/_netCDF4.pyx":3645 + /* "netCDF4/_netCDF4.pyx":3668 * preemptionp = preemption * else: * preemptionp = preemption_orig # <<<<<<<<<<<<<< @@ -37265,12 +37311,12 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_34set_var_chunk_cache(str * nelemsp, preemptionp) */ /*else*/ { - __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_v_preemption_orig); if (unlikely((__pyx_t_10 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3645, __pyx_L1_error) + __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_v_preemption_orig); if (unlikely((__pyx_t_10 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3668, __pyx_L1_error) __pyx_v_preemptionp = __pyx_t_10; } __pyx_L7:; - /* "netCDF4/_netCDF4.pyx":3646 + /* "netCDF4/_netCDF4.pyx":3669 * else: * preemptionp = preemption_orig * ierr = nc_set_var_chunk_cache(self._grpid, self._varid, sizep, # <<<<<<<<<<<<<< @@ -37279,7 +37325,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_34set_var_chunk_cache(str */ __pyx_v_ierr = nc_set_var_chunk_cache(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_sizep, __pyx_v_nelemsp, __pyx_v_preemptionp); - /* "netCDF4/_netCDF4.pyx":3648 + /* "netCDF4/_netCDF4.pyx":3671 * ierr = nc_set_var_chunk_cache(self._grpid, self._varid, sizep, * nelemsp, preemptionp) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -37289,7 +37335,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_34set_var_chunk_cache(str __pyx_t_8 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_8) { - /* "netCDF4/_netCDF4.pyx":3649 + /* "netCDF4/_netCDF4.pyx":3672 * nelemsp, preemptionp) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -37297,22 +37343,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_34set_var_chunk_cache(str * def __delattr__(self,name): */ __pyx_t_11 = ((char *)nc_strerror(__pyx_v_ierr)); - __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_11, 0, strlen(__pyx_t_11), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3649, __pyx_L1_error) + __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_11, 0, strlen(__pyx_t_11), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3672, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3649, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3672, __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, 3649, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3672, __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, 3649, __pyx_L1_error) + __PYX_ERR(0, 3672, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3648 + /* "netCDF4/_netCDF4.pyx":3671 * ierr = nc_set_var_chunk_cache(self._grpid, self._varid, sizep, * nelemsp, preemptionp) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -37321,7 +37367,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_34set_var_chunk_cache(str */ } - /* "netCDF4/_netCDF4.pyx":3622 + /* "netCDF4/_netCDF4.pyx":3645 * return (size,nelems,preemption) * * def set_var_chunk_cache(self,size=None,nelems=None,preemption=None): # <<<<<<<<<<<<<< @@ -37349,7 +37395,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_34set_var_chunk_cache(str return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":3651 +/* "netCDF4/_netCDF4.pyx":3674 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * * def __delattr__(self,name): # <<<<<<<<<<<<<< @@ -37381,28 +37427,28 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_36__delattr__(struct __pyx_obj_ PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("__delattr__", 0); - /* "netCDF4/_netCDF4.pyx":3653 + /* "netCDF4/_netCDF4.pyx":3676 * def __delattr__(self,name): * # if it's a netCDF attribute, remove it * if name not in _private_atts: # <<<<<<<<<<<<<< * self.delncattr(name) * else: */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3653, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_name, __pyx_t_1, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3653, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_name, __pyx_t_1, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3676, __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":3654 + /* "netCDF4/_netCDF4.pyx":3677 * # if it's a netCDF attribute, remove it * if name not in _private_atts: * self.delncattr(name) # <<<<<<<<<<<<<< * else: * raise AttributeError( */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_delncattr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3654, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_delncattr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3677, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -37415,13 +37461,13 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_36__delattr__(struct __pyx_obj_ } } if (!__pyx_t_5) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3654, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3677, __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_5, __pyx_v_name}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3654, __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, 3677, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -37429,19 +37475,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_36__delattr__(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_name}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3654, __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, 3677, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3654, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3677, __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_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_name); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3654, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3677, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -37449,7 +37495,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_36__delattr__(struct __pyx_obj_ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":3653 + /* "netCDF4/_netCDF4.pyx":3676 * def __delattr__(self,name): * # if it's a netCDF attribute, remove it * if name not in _private_atts: # <<<<<<<<<<<<<< @@ -37459,7 +37505,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_36__delattr__(struct __pyx_obj_ goto __pyx_L3; } - /* "netCDF4/_netCDF4.pyx":3656 + /* "netCDF4/_netCDF4.pyx":3679 * self.delncattr(name) * else: * raise AttributeError( # <<<<<<<<<<<<<< @@ -37468,19 +37514,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_36__delattr__(struct __pyx_obj_ */ /*else*/ { - /* "netCDF4/_netCDF4.pyx":3657 + /* "netCDF4/_netCDF4.pyx":3680 * else: * raise AttributeError( * "'%s' is one of the reserved attributes %s, cannot delete. Use delncattr instead." % (name, tuple(_private_atts))) # <<<<<<<<<<<<<< * * def __setattr__(self,name,value): */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3657, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3657, __pyx_L1_error) + __pyx_t_4 = PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3657, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); @@ -37488,32 +37534,32 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_36__delattr__(struct __pyx_obj_ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_s_is_one_of_the_reserved_attrib, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3657, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_s_is_one_of_the_reserved_attrib, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":3656 + /* "netCDF4/_netCDF4.pyx":3679 * self.delncattr(name) * else: * raise AttributeError( # <<<<<<<<<<<<<< * "'%s' is one of the reserved attributes %s, cannot delete. Use delncattr instead." % (name, tuple(_private_atts))) * */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3656, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3656, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(0, 3656, __pyx_L1_error) + __PYX_ERR(0, 3679, __pyx_L1_error) } __pyx_L3:; - /* "netCDF4/_netCDF4.pyx":3651 + /* "netCDF4/_netCDF4.pyx":3674 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * * def __delattr__(self,name): # <<<<<<<<<<<<<< @@ -37536,7 +37582,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_36__delattr__(struct __pyx_obj_ return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":3659 +/* "netCDF4/_netCDF4.pyx":3682 * "'%s' is one of the reserved attributes %s, cannot delete. Use delncattr instead." % (name, tuple(_private_atts))) * * def __setattr__(self,name,value): # <<<<<<<<<<<<<< @@ -37572,62 +37618,62 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_38__setattr__(struct __pyx_obj_ __Pyx_RefNannySetupContext("__setattr__", 0); __Pyx_INCREF(__pyx_v_value); - /* "netCDF4/_netCDF4.pyx":3662 + /* "netCDF4/_netCDF4.pyx":3685 * # if name in _private_atts, it is stored at the python * # level and not in the netCDF file. * if name not in _private_atts: # <<<<<<<<<<<<<< * # if setting _FillValue or missing_value, make sure value * # has same type and byte order as variable. */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3662, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_name, __pyx_t_1, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3662, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_name, __pyx_t_1, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3685, __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":3665 + /* "netCDF4/_netCDF4.pyx":3688 * # if setting _FillValue or missing_value, make sure value * # has same type and byte order as variable. * if name == '_FillValue': # <<<<<<<<<<<<<< * msg='_FillValue attribute must be set when variable is '+\ * 'created (using fill_value keyword to createVariable)' */ - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_FillValue, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3665, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_FillValue, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3688, __pyx_L1_error) if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":3666 + /* "netCDF4/_netCDF4.pyx":3689 * # has same type and byte order as variable. * if name == '_FillValue': * msg='_FillValue attribute must be set when variable is '+\ # <<<<<<<<<<<<<< * 'created (using fill_value keyword to createVariable)' * raise AttributeError(msg) */ - __pyx_t_1 = PyNumber_Add(__pyx_kp_s_FillValue_attribute_must_be_set, __pyx_kp_s_created_using_fill_value_keyword); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3666, __pyx_L1_error) + __pyx_t_1 = PyNumber_Add(__pyx_kp_s_FillValue_attribute_must_be_set, __pyx_kp_s_created_using_fill_value_keyword); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_msg = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":3668 + /* "netCDF4/_netCDF4.pyx":3691 * msg='_FillValue attribute must be set when variable is '+\ * 'created (using fill_value keyword to createVariable)' * raise AttributeError(msg) # <<<<<<<<<<<<<< * #if self._isprimitive: * # value = numpy.array(value, self.dtype) */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3668, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_msg); __Pyx_GIVEREF(__pyx_v_msg); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_msg); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3668, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(0, 3668, __pyx_L1_error) + __PYX_ERR(0, 3691, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3665 + /* "netCDF4/_netCDF4.pyx":3688 * # if setting _FillValue or missing_value, make sure value * # has same type and byte order as variable. * if name == '_FillValue': # <<<<<<<<<<<<<< @@ -37636,7 +37682,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_38__setattr__(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":3675 + /* "netCDF4/_netCDF4.pyx":3698 * # "VLEN or compound variable" * # raise AttributeError(msg) * elif name in ['valid_min','valid_max','valid_range','missing_value'] and self._isprimitive: # <<<<<<<<<<<<<< @@ -37645,25 +37691,25 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_38__setattr__(struct __pyx_obj_ */ __Pyx_INCREF(__pyx_v_name); __pyx_t_4 = __pyx_v_name; - __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_valid_min, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3675, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_valid_min, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3698, __pyx_L1_error) if (!__pyx_t_5) { } else { __pyx_t_2 = __pyx_t_5; goto __pyx_L7_bool_binop_done; } - __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_valid_max, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3675, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_valid_max, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3698, __pyx_L1_error) if (!__pyx_t_5) { } else { __pyx_t_2 = __pyx_t_5; goto __pyx_L7_bool_binop_done; } - __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_valid_range, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3675, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_valid_range, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3698, __pyx_L1_error) if (!__pyx_t_5) { } else { __pyx_t_2 = __pyx_t_5; goto __pyx_L7_bool_binop_done; } - __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_missing_value, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3675, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_missing_value, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3698, __pyx_L1_error) __pyx_t_2 = __pyx_t_5; __pyx_L7_bool_binop_done:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -37673,21 +37719,21 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_38__setattr__(struct __pyx_obj_ __pyx_t_3 = __pyx_t_5; goto __pyx_L5_bool_binop_done; } - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3675, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3698, __pyx_L1_error) __pyx_t_3 = __pyx_t_5; __pyx_L5_bool_binop_done:; if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":3679 + /* "netCDF4/_netCDF4.pyx":3702 * # also make sure it is written in native byte order * # (the same as the data) * value = numpy.array(value, self.dtype) # <<<<<<<<<<<<<< * if not value.dtype.isnative: value.byteswap(True) * self.setncattr(name, value) */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3679, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3702, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3679, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3702, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -37705,7 +37751,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_38__setattr__(struct __pyx_obj_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_value, __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, 3679, __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, 3702, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_4); } else @@ -37713,13 +37759,13 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_38__setattr__(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_value, __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, 3679, __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, 3702, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { - __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3679, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3702, __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; @@ -37730,7 +37776,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_38__setattr__(struct __pyx_obj_ __Pyx_INCREF(__pyx_v_self->dtype); __Pyx_GIVEREF(__pyx_v_self->dtype); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_self->dtype); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3679, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3702, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -37738,31 +37784,31 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_38__setattr__(struct __pyx_obj_ __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":3680 + /* "netCDF4/_netCDF4.pyx":3703 * # (the same as the data) * value = numpy.array(value, self.dtype) * if not value.dtype.isnative: value.byteswap(True) # <<<<<<<<<<<<<< * self.setncattr(name, value) * elif not name.endswith('__'): */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3680, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3703, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_isnative); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3680, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_isnative); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3703, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3680, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3703, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_5 = ((!__pyx_t_3) != 0); if (__pyx_t_5) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_byteswap); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3680, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_byteswap); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3703, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3680, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__55, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3703, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - /* "netCDF4/_netCDF4.pyx":3675 + /* "netCDF4/_netCDF4.pyx":3698 * # "VLEN or compound variable" * # raise AttributeError(msg) * elif name in ['valid_min','valid_max','valid_range','missing_value'] and self._isprimitive: # <<<<<<<<<<<<<< @@ -37771,14 +37817,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_38__setattr__(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":3681 + /* "netCDF4/_netCDF4.pyx":3704 * value = numpy.array(value, self.dtype) * if not value.dtype.isnative: value.byteswap(True) * self.setncattr(name, value) # <<<<<<<<<<<<<< * elif not name.endswith('__'): * if hasattr(self,name): */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setncattr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3681, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setncattr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3704, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; __pyx_t_7 = 0; @@ -37795,7 +37841,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_38__setattr__(struct __pyx_obj_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_name, __pyx_v_value}; - __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, 3681, __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, 3704, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_4); } else @@ -37803,13 +37849,13 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_38__setattr__(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_name, __pyx_v_value}; - __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, 3681, __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, 3704, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 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, 3681, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3704, __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; @@ -37820,14 +37866,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_38__setattr__(struct __pyx_obj_ __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_7, __pyx_v_value); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3681, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3704, __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; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":3662 + /* "netCDF4/_netCDF4.pyx":3685 * # if name in _private_atts, it is stored at the python * # level and not in the netCDF file. * if name not in _private_atts: # <<<<<<<<<<<<<< @@ -37837,47 +37883,47 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_38__setattr__(struct __pyx_obj_ goto __pyx_L3; } - /* "netCDF4/_netCDF4.pyx":3682 + /* "netCDF4/_netCDF4.pyx":3705 * if not value.dtype.isnative: value.byteswap(True) * self.setncattr(name, value) * elif not name.endswith('__'): # <<<<<<<<<<<<<< * if hasattr(self,name): * raise AttributeError( */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_endswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3682, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_endswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3705, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3682, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3705, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3682, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3705, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_3 = ((!__pyx_t_5) != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":3683 + /* "netCDF4/_netCDF4.pyx":3706 * self.setncattr(name, value) * elif not name.endswith('__'): * if hasattr(self,name): # <<<<<<<<<<<<<< * raise AttributeError( * "'%s' is one of the reserved attributes %s, cannot rebind. Use setncattr instead." % (name, tuple(_private_atts))) */ - __pyx_t_3 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_v_name); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(0, 3683, __pyx_L1_error) + __pyx_t_3 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_v_name); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(0, 3706, __pyx_L1_error) __pyx_t_5 = (__pyx_t_3 != 0); if (__pyx_t_5) { - /* "netCDF4/_netCDF4.pyx":3685 + /* "netCDF4/_netCDF4.pyx":3708 * if hasattr(self,name): * raise AttributeError( * "'%s' is one of the reserved attributes %s, cannot rebind. Use setncattr instead." % (name, tuple(_private_atts))) # <<<<<<<<<<<<<< * else: * self.__dict__[name]=value */ - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3685, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = PySequence_Tuple(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3685, __pyx_L1_error) + __pyx_t_4 = PySequence_Tuple(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3685, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); @@ -37885,30 +37931,30 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_38__setattr__(struct __pyx_obj_ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_s_is_one_of_the_reserved_attrib_2, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3685, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_s_is_one_of_the_reserved_attrib_2, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":3684 + /* "netCDF4/_netCDF4.pyx":3707 * elif not name.endswith('__'): * if hasattr(self,name): * raise AttributeError( # <<<<<<<<<<<<<< * "'%s' is one of the reserved attributes %s, cannot rebind. Use setncattr instead." % (name, tuple(_private_atts))) * else: */ - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3684, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3707, __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 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3684, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3707, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(0, 3684, __pyx_L1_error) + __PYX_ERR(0, 3707, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3683 + /* "netCDF4/_netCDF4.pyx":3706 * self.setncattr(name, value) * elif not name.endswith('__'): * if hasattr(self,name): # <<<<<<<<<<<<<< @@ -37917,7 +37963,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_38__setattr__(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":3687 + /* "netCDF4/_netCDF4.pyx":3710 * "'%s' is one of the reserved attributes %s, cannot rebind. Use setncattr instead." % (name, tuple(_private_atts))) * else: * self.__dict__[name]=value # <<<<<<<<<<<<<< @@ -37925,13 +37971,13 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_38__setattr__(struct __pyx_obj_ * def __getattr__(self,name): */ /*else*/ { - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3687, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3710, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(0, 3687, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(0, 3710, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - /* "netCDF4/_netCDF4.pyx":3682 + /* "netCDF4/_netCDF4.pyx":3705 * if not value.dtype.isnative: value.byteswap(True) * self.setncattr(name, value) * elif not name.endswith('__'): # <<<<<<<<<<<<<< @@ -37941,7 +37987,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_38__setattr__(struct __pyx_obj_ } __pyx_L3:; - /* "netCDF4/_netCDF4.pyx":3659 + /* "netCDF4/_netCDF4.pyx":3682 * "'%s' is one of the reserved attributes %s, cannot delete. Use delncattr instead." % (name, tuple(_private_atts))) * * def __setattr__(self,name,value): # <<<<<<<<<<<<<< @@ -37966,7 +38012,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_38__setattr__(struct __pyx_obj_ return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":3689 +/* "netCDF4/_netCDF4.pyx":3712 * self.__dict__[name]=value * * def __getattr__(self,name): # <<<<<<<<<<<<<< @@ -38007,54 +38053,54 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_40__getattr__(struct __py __Pyx_RefNannySetupContext("__getattr__", 0); __Pyx_INCREF(__pyx_v_name); - /* "netCDF4/_netCDF4.pyx":3692 + /* "netCDF4/_netCDF4.pyx":3715 * # if name in _private_atts, it is stored at the python * # level and not in the netCDF file. * if name.startswith('__') and name.endswith('__'): # <<<<<<<<<<<<<< * # if __dict__ requested, return a dict with netCDF attributes. * if name == '__dict__': */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_startswith); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3692, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_startswith); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3715, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3692, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__57, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3715, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3692, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3715, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_4) { } else { __pyx_t_1 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_endswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3692, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_endswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3715, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3692, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__58, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3715, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3692, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3715, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":3694 + /* "netCDF4/_netCDF4.pyx":3717 * if name.startswith('__') and name.endswith('__'): * # if __dict__ requested, return a dict with netCDF attributes. * if name == '__dict__': # <<<<<<<<<<<<<< * names = self.ncattrs() * values = [] */ - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_dict, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3694, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_dict, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3717, __pyx_L1_error) if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":3695 + /* "netCDF4/_netCDF4.pyx":3718 * # if __dict__ requested, return a dict with netCDF attributes. * if name == '__dict__': * names = self.ncattrs() # <<<<<<<<<<<<<< * values = [] * for name in names: */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ncattrs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3695, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ncattrs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -38067,29 +38113,29 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_40__getattr__(struct __py } } if (__pyx_t_5) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3695, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3718, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3695, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3718, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_names = __pyx_t_2; __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":3696 + /* "netCDF4/_netCDF4.pyx":3719 * if name == '__dict__': * names = self.ncattrs() * values = [] # <<<<<<<<<<<<<< * for name in names: * values.append(_get_att(self._grp, self._varid, name)) */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3696, __pyx_L1_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3719, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_values = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":3697 + /* "netCDF4/_netCDF4.pyx":3720 * names = self.ncattrs() * values = [] * for name in names: # <<<<<<<<<<<<<< @@ -38100,26 +38146,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_40__getattr__(struct __py __pyx_t_2 = __pyx_v_names; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_names); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3697, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_names); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3720, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3697, __pyx_L1_error) + __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3720, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 3697, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 3720, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3697, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3720, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 3697, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 3720, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3697, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3720, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } @@ -38129,7 +38175,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_40__getattr__(struct __py 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, 3697, __pyx_L1_error) + else __PYX_ERR(0, 3720, __pyx_L1_error) } break; } @@ -38138,7 +38184,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_40__getattr__(struct __py __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":3698 + /* "netCDF4/_netCDF4.pyx":3721 * values = [] * for name in names: * values.append(_get_att(self._grp, self._varid, name)) # <<<<<<<<<<<<<< @@ -38147,13 +38193,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_40__getattr__(struct __py */ __pyx_t_3 = __pyx_v_self->_grp; __Pyx_INCREF(__pyx_t_3); - __pyx_t_5 = __pyx_f_7netCDF4_8_netCDF4__get_att(__pyx_t_3, __pyx_v_self->_varid, __pyx_v_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3698, __pyx_L1_error) + __pyx_t_5 = __pyx_f_7netCDF4_8_netCDF4__get_att(__pyx_t_3, __pyx_v_self->_varid, __pyx_v_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_values, __pyx_t_5); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 3698, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_values, __pyx_t_5); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 3721, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":3697 + /* "netCDF4/_netCDF4.pyx":3720 * names = self.ncattrs() * values = [] * for name in names: # <<<<<<<<<<<<<< @@ -38163,7 +38209,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_40__getattr__(struct __py } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":3699 + /* "netCDF4/_netCDF4.pyx":3722 * for name in names: * values.append(_get_att(self._grp, self._varid, name)) * return OrderedDict(zip(names,values)) # <<<<<<<<<<<<<< @@ -38171,9 +38217,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_40__getattr__(struct __py * raise AttributeError */ __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3699, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3699, __pyx_L1_error) + __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; __pyx_t_11 = 0; @@ -38190,7 +38236,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_40__getattr__(struct __py #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_9)) { PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_names, __pyx_v_values}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3699, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3722, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -38198,13 +38244,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_40__getattr__(struct __py #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) { PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_names, __pyx_v_values}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3699, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3722, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3699, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); if (__pyx_t_10) { __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL; @@ -38215,7 +38261,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_40__getattr__(struct __py __Pyx_INCREF(__pyx_v_values); __Pyx_GIVEREF(__pyx_v_values); PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_v_values); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_12, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3699, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_12, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } @@ -38231,14 +38277,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_40__getattr__(struct __py } } if (!__pyx_t_9) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3699, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3722, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_3}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3699, __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, 3722, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -38247,20 +38293,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_40__getattr__(struct __py #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_3}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3699, __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, 3722, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { - __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3699, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_9); __pyx_t_9 = NULL; __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3699, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } @@ -38270,7 +38316,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_40__getattr__(struct __py __pyx_t_2 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":3694 + /* "netCDF4/_netCDF4.pyx":3717 * if name.startswith('__') and name.endswith('__'): * # if __dict__ requested, return a dict with netCDF attributes. * if name == '__dict__': # <<<<<<<<<<<<<< @@ -38279,7 +38325,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_40__getattr__(struct __py */ } - /* "netCDF4/_netCDF4.pyx":3701 + /* "netCDF4/_netCDF4.pyx":3724 * return OrderedDict(zip(names,values)) * else: * raise AttributeError # <<<<<<<<<<<<<< @@ -38288,10 +38334,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_40__getattr__(struct __py */ /*else*/ { __Pyx_Raise(__pyx_builtin_AttributeError, 0, 0, 0); - __PYX_ERR(0, 3701, __pyx_L1_error) + __PYX_ERR(0, 3724, __pyx_L1_error) } - /* "netCDF4/_netCDF4.pyx":3692 + /* "netCDF4/_netCDF4.pyx":3715 * # if name in _private_atts, it is stored at the python * # level and not in the netCDF file. * if name.startswith('__') and name.endswith('__'): # <<<<<<<<<<<<<< @@ -38300,21 +38346,21 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_40__getattr__(struct __py */ } - /* "netCDF4/_netCDF4.pyx":3702 + /* "netCDF4/_netCDF4.pyx":3725 * else: * raise AttributeError * elif name in _private_atts: # <<<<<<<<<<<<<< * return self.__dict__[name] * else: */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3702, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3725, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_name, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3702, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_name, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3725, __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":3703 + /* "netCDF4/_netCDF4.pyx":3726 * raise AttributeError * elif name in _private_atts: * return self.__dict__[name] # <<<<<<<<<<<<<< @@ -38322,16 +38368,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_40__getattr__(struct __py * return self.getncattr(name) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3703, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3726, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = PyObject_GetItem(__pyx_t_2, __pyx_v_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3703, __pyx_L1_error) + __pyx_t_5 = PyObject_GetItem(__pyx_t_2, __pyx_v_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3726, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":3702 + /* "netCDF4/_netCDF4.pyx":3725 * else: * raise AttributeError * elif name in _private_atts: # <<<<<<<<<<<<<< @@ -38340,7 +38386,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_40__getattr__(struct __py */ } - /* "netCDF4/_netCDF4.pyx":3705 + /* "netCDF4/_netCDF4.pyx":3728 * return self.__dict__[name] * else: * return self.getncattr(name) # <<<<<<<<<<<<<< @@ -38349,7 +38395,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_40__getattr__(struct __py */ /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getncattr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3705, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getncattr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3728, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -38362,13 +38408,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_40__getattr__(struct __py } } if (!__pyx_t_12) { - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3705, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3728, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v_name}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3705, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3728, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_5); } else @@ -38376,19 +38422,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_40__getattr__(struct __py #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v_name}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3705, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3728, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { - __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3705, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3728, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL; __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_name); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3705, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3728, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -38399,7 +38445,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_40__getattr__(struct __py goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":3689 + /* "netCDF4/_netCDF4.pyx":3712 * self.__dict__[name]=value * * def __getattr__(self,name): # <<<<<<<<<<<<<< @@ -38426,7 +38472,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_40__getattr__(struct __py return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":3707 +/* "netCDF4/_netCDF4.pyx":3730 * return self.getncattr(name) * * def renameAttribute(self, oldname, newname): # <<<<<<<<<<<<<< @@ -38463,11 +38509,11 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_43renameAttribute(PyObjec case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_newname)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("renameAttribute", 1, 2, 2, 1); __PYX_ERR(0, 3707, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("renameAttribute", 1, 2, 2, 1); __PYX_ERR(0, 3730, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "renameAttribute") < 0)) __PYX_ERR(0, 3707, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "renameAttribute") < 0)) __PYX_ERR(0, 3730, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -38480,7 +38526,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_43renameAttribute(PyObjec } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("renameAttribute", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3707, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("renameAttribute", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3730, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("netCDF4._netCDF4.Variable.renameAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -38506,51 +38552,51 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_42renameAttribute(struct PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("renameAttribute", 0); - /* "netCDF4/_netCDF4.pyx":3715 + /* "netCDF4/_netCDF4.pyx":3738 * cdef char *oldnamec * cdef char *newnamec * bytestr = _strencode(oldname) # <<<<<<<<<<<<<< * oldnamec = bytestr * bytestr = _strencode(newname) */ - __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_oldname, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3715, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_oldname, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3738, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_bytestr = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":3716 + /* "netCDF4/_netCDF4.pyx":3739 * cdef char *newnamec * bytestr = _strencode(oldname) * oldnamec = bytestr # <<<<<<<<<<<<<< * bytestr = _strencode(newname) * newnamec = bytestr */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 3716, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 3739, __pyx_L1_error) __pyx_v_oldnamec = __pyx_t_2; - /* "netCDF4/_netCDF4.pyx":3717 + /* "netCDF4/_netCDF4.pyx":3740 * bytestr = _strencode(oldname) * oldnamec = bytestr * bytestr = _strencode(newname) # <<<<<<<<<<<<<< * newnamec = bytestr * ierr = nc_rename_att(self._grpid, self._varid, oldnamec, newnamec) */ - __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_newname, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3717, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_newname, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3740, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_bytestr, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":3718 + /* "netCDF4/_netCDF4.pyx":3741 * oldnamec = bytestr * bytestr = _strencode(newname) * newnamec = bytestr # <<<<<<<<<<<<<< * ierr = nc_rename_att(self._grpid, self._varid, oldnamec, newnamec) * if ierr != NC_NOERR: */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 3718, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 3741, __pyx_L1_error) __pyx_v_newnamec = __pyx_t_2; - /* "netCDF4/_netCDF4.pyx":3719 + /* "netCDF4/_netCDF4.pyx":3742 * bytestr = _strencode(newname) * newnamec = bytestr * ierr = nc_rename_att(self._grpid, self._varid, oldnamec, newnamec) # <<<<<<<<<<<<<< @@ -38559,7 +38605,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_42renameAttribute(struct */ __pyx_v_ierr = nc_rename_att(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_oldnamec, __pyx_v_newnamec); - /* "netCDF4/_netCDF4.pyx":3720 + /* "netCDF4/_netCDF4.pyx":3743 * newnamec = bytestr * ierr = nc_rename_att(self._grpid, self._varid, oldnamec, newnamec) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -38569,7 +38615,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_42renameAttribute(struct __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0); if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":3721 + /* "netCDF4/_netCDF4.pyx":3744 * ierr = nc_rename_att(self._grpid, self._varid, oldnamec, newnamec) * if ierr != NC_NOERR: * raise AttributeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -38577,22 +38623,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_42renameAttribute(struct * def __getitem__(self, elem): */ __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, 3721, __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, 3744, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3721, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3744, __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_AttributeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3721, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3744, __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, 3721, __pyx_L1_error) + __PYX_ERR(0, 3744, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3720 + /* "netCDF4/_netCDF4.pyx":3743 * newnamec = bytestr * ierr = nc_rename_att(self._grpid, self._varid, oldnamec, newnamec) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -38601,7 +38647,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_42renameAttribute(struct */ } - /* "netCDF4/_netCDF4.pyx":3707 + /* "netCDF4/_netCDF4.pyx":3730 * return self.getncattr(name) * * def renameAttribute(self, oldname, newname): # <<<<<<<<<<<<<< @@ -38624,7 +38670,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_42renameAttribute(struct return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":3723 +/* "netCDF4/_netCDF4.pyx":3746 * raise AttributeError((nc_strerror(ierr)).decode('ascii')) * * def __getitem__(self, elem): # <<<<<<<<<<<<<< @@ -38685,16 +38731,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py double __pyx_t_19; __Pyx_RefNannySetupContext("__getitem__", 0); - /* "netCDF4/_netCDF4.pyx":3729 + /* "netCDF4/_netCDF4.pyx":3752 * # arguments to the nc_get_var() function, and is much more easy * # to use. * start, count, stride, put_ind = _StartCountStride(elem,self.shape) # <<<<<<<<<<<<<< * datashape = _out_array_shape(count) * if self._isvlen: */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_StartCountStride); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3729, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_StartCountStride); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3752, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3729, __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, 3752, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -38711,7 +38757,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_elem, __pyx_t_3}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3729, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3752, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -38720,14 +38766,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_elem, __pyx_t_3}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3729, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3752, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3729, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3752, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -38738,7 +38784,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __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, 3729, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3752, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -38753,7 +38799,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py if (unlikely(size != 4)) { if (size > 4) __Pyx_RaiseTooManyValuesError(4); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 3729, __pyx_L1_error) + __PYX_ERR(0, 3752, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -38776,7 +38822,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py Py_ssize_t i; PyObject** temps[4] = {&__pyx_t_2,&__pyx_t_6,&__pyx_t_3,&__pyx_t_4}; for (i=0; i < 4; i++) { - PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 3729, __pyx_L1_error) + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 3752, __pyx_L1_error) __Pyx_GOTREF(item); *(temps[i]) = item; } @@ -38786,7 +38832,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py } else { Py_ssize_t index = -1; PyObject** temps[4] = {&__pyx_t_2,&__pyx_t_6,&__pyx_t_3,&__pyx_t_4}; - __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3729, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3752, __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; @@ -38795,7 +38841,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py __Pyx_GOTREF(item); *(temps[index]) = item; } - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 4) < 0) __PYX_ERR(0, 3729, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 4) < 0) __PYX_ERR(0, 3752, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4_unpacking_done; @@ -38803,7 +38849,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 3729, __pyx_L1_error) + __PYX_ERR(0, 3752, __pyx_L1_error) __pyx_L4_unpacking_done:; } __pyx_v_start = __pyx_t_2; @@ -38815,14 +38861,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py __pyx_v_put_ind = __pyx_t_4; __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":3730 + /* "netCDF4/_netCDF4.pyx":3753 * # to use. * start, count, stride, put_ind = _StartCountStride(elem,self.shape) * datashape = _out_array_shape(count) # <<<<<<<<<<<<<< * if self._isvlen: * data = numpy.empty(datashape, dtype='O') */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_out_array_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3730, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_out_array_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3753, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -38835,13 +38881,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py } } if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_count); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3730, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_count); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3753, __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_count}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3730, __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, 3753, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -38849,19 +38895,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_count}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3730, __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, 3753, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3730, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3753, __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_count); __Pyx_GIVEREF(__pyx_v_count); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_count); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3730, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3753, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -38870,37 +38916,37 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py __pyx_v_datashape = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":3731 + /* "netCDF4/_netCDF4.pyx":3754 * start, count, stride, put_ind = _StartCountStride(elem,self.shape) * datashape = _out_array_shape(count) * if self._isvlen: # <<<<<<<<<<<<<< * data = numpy.empty(datashape, dtype='O') * else: */ - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3731, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3754, __pyx_L1_error) if (__pyx_t_9) { - /* "netCDF4/_netCDF4.pyx":3732 + /* "netCDF4/_netCDF4.pyx":3755 * datashape = _out_array_shape(count) * if self._isvlen: * data = numpy.empty(datashape, dtype='O') # <<<<<<<<<<<<<< * else: * data = numpy.empty(datashape, dtype=self.dtype) */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3732, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3755, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3732, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3755, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3732, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3755, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_datashape); __Pyx_GIVEREF(__pyx_v_datashape); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_datashape); - __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3732, __pyx_L1_error) + __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3755, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_n_s_O) < 0) __PYX_ERR(0, 3732, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3732, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_n_s_O) < 0) __PYX_ERR(0, 3755, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3755, __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; @@ -38908,7 +38954,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py __pyx_v_data = __pyx_t_3; __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":3731 + /* "netCDF4/_netCDF4.pyx":3754 * start, count, stride, put_ind = _StartCountStride(elem,self.shape) * datashape = _out_array_shape(count) * if self._isvlen: # <<<<<<<<<<<<<< @@ -38918,7 +38964,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py goto __pyx_L5; } - /* "netCDF4/_netCDF4.pyx":3734 + /* "netCDF4/_netCDF4.pyx":3757 * data = numpy.empty(datashape, dtype='O') * else: * data = numpy.empty(datashape, dtype=self.dtype) # <<<<<<<<<<<<<< @@ -38926,20 +38972,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py * # Determine which dimensions need to be */ /*else*/ { - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3734, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3757, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3734, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3757, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3734, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3757, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_datashape); __Pyx_GIVEREF(__pyx_v_datashape); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_datashape); - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3734, __pyx_L1_error) + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3757, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_v_self->dtype) < 0) __PYX_ERR(0, 3734, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3734, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_v_self->dtype) < 0) __PYX_ERR(0, 3757, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3757, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -38949,28 +38995,28 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py } __pyx_L5:; - /* "netCDF4/_netCDF4.pyx":3740 + /* "netCDF4/_netCDF4.pyx":3763 * # The convention used is that for those cases, * # put_ind for this dimension is set to -1 by _StartCountStride. * squeeze = data.ndim * [slice(None),] # <<<<<<<<<<<<<< * for i,n in enumerate(put_ind.shape[:-1]): * if n == 1 and put_ind[...,i].ravel()[0] == -1: */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_ndim); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3740, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_ndim); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3763, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3740, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3763, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_slice__55); - __Pyx_GIVEREF(__pyx_slice__55); - PyList_SET_ITEM(__pyx_t_1, 0, __pyx_slice__55); - __pyx_t_3 = PyNumber_Multiply(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3740, __pyx_L1_error) + __Pyx_INCREF(__pyx_slice__59); + __Pyx_GIVEREF(__pyx_slice__59); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_slice__59); + __pyx_t_3 = PyNumber_Multiply(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3763, __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_v_squeeze = __pyx_t_3; __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":3741 + /* "netCDF4/_netCDF4.pyx":3764 * # put_ind for this dimension is set to -1 by _StartCountStride. * squeeze = data.ndim * [slice(None),] * for i,n in enumerate(put_ind.shape[:-1]): # <<<<<<<<<<<<<< @@ -38979,18 +39025,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py */ __Pyx_INCREF(__pyx_int_0); __pyx_t_3 = __pyx_int_0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_put_ind, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3741, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_put_ind, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3764, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, -1L, NULL, NULL, &__pyx_slice__56, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3741, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, -1L, NULL, NULL, &__pyx_slice__60, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3764, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_1 = __pyx_t_4; __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_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3741, __pyx_L1_error) + __pyx_t_10 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3764, __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, 3741, __pyx_L1_error) + __pyx_t_11 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3764, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -38998,17 +39044,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py 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_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_4); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 3741, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_4); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 3764, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3741, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3764, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_10 >= 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_10); __Pyx_INCREF(__pyx_t_4); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 3741, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_4); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 3764, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3741, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3764, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -39018,7 +39064,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py 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, 3741, __pyx_L1_error) + else __PYX_ERR(0, 3764, __pyx_L1_error) } break; } @@ -39028,29 +39074,29 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py __pyx_t_4 = 0; __Pyx_INCREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3); - __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3741, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3764, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = __pyx_t_4; __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":3742 + /* "netCDF4/_netCDF4.pyx":3765 * squeeze = data.ndim * [slice(None),] * for i,n in enumerate(put_ind.shape[:-1]): * if n == 1 and put_ind[...,i].ravel()[0] == -1: # <<<<<<<<<<<<<< * squeeze[i] = 0 * */ - __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_v_n, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3742, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_v_n, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3765, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 3742, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 3765, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_12) { } else { __pyx_t_9 = __pyx_t_12; goto __pyx_L9_bool_binop_done; } - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3742, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3765, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(Py_Ellipsis); __Pyx_GIVEREF(Py_Ellipsis); @@ -39058,10 +39104,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py __Pyx_INCREF(__pyx_v_i); __Pyx_GIVEREF(__pyx_v_i); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_i); - __pyx_t_2 = PyObject_GetItem(__pyx_v_put_ind, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3742, __pyx_L1_error) + __pyx_t_2 = PyObject_GetItem(__pyx_v_put_ind, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3765, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ravel); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3742, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ravel); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3765, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -39075,35 +39121,35 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py } } if (__pyx_t_2) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3742, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3765, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3742, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3765, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3742, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3765, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_t_6, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3742, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_t_6, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3765, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 3742, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 3765, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_9 = __pyx_t_12; __pyx_L9_bool_binop_done:; if (__pyx_t_9) { - /* "netCDF4/_netCDF4.pyx":3743 + /* "netCDF4/_netCDF4.pyx":3766 * for i,n in enumerate(put_ind.shape[:-1]): * if n == 1 and put_ind[...,i].ravel()[0] == -1: * squeeze[i] = 0 # <<<<<<<<<<<<<< * * # Reshape the arrays so we can iterate over them. */ - if (unlikely(PyObject_SetItem(__pyx_v_squeeze, __pyx_v_i, __pyx_int_0) < 0)) __PYX_ERR(0, 3743, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v_squeeze, __pyx_v_i, __pyx_int_0) < 0)) __PYX_ERR(0, 3766, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3742 + /* "netCDF4/_netCDF4.pyx":3765 * squeeze = data.ndim * [slice(None),] * for i,n in enumerate(put_ind.shape[:-1]): * if n == 1 and put_ind[...,i].ravel()[0] == -1: # <<<<<<<<<<<<<< @@ -39112,7 +39158,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py */ } - /* "netCDF4/_netCDF4.pyx":3741 + /* "netCDF4/_netCDF4.pyx":3764 * # put_ind for this dimension is set to -1 by _StartCountStride. * squeeze = data.ndim * [slice(None),] * for i,n in enumerate(put_ind.shape[:-1]): # <<<<<<<<<<<<<< @@ -39123,28 +39169,28 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":3746 + /* "netCDF4/_netCDF4.pyx":3769 * * # Reshape the 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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_start, __pyx_n_s_reshape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3746, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_start, __pyx_n_s_reshape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3769, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3746, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3769, __pyx_L1_error) if (!__pyx_t_9) { } else { __Pyx_INCREF(__pyx_v_self->ndim); __pyx_t_4 = __pyx_v_self->ndim; goto __pyx_L11_bool_binop_done; } - __pyx_t_6 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3746, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3769, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __pyx_t_6; __pyx_t_6 = 0; __pyx_L11_bool_binop_done:; - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3746, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3769, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); @@ -39163,14 +39209,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py } } if (!__pyx_t_4) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3746, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3769, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_6}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3746, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3769, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -39179,20 +39225,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_6}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3746, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3769, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { - __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3746, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3769, __pyx_L1_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_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_6); __pyx_t_6 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3746, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3769, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -39201,28 +39247,28 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py __Pyx_DECREF_SET(__pyx_v_start, __pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":3747 + /* "netCDF4/_netCDF4.pyx":3770 * # Reshape the 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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_count, __pyx_n_s_reshape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3747, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_count, __pyx_n_s_reshape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3770, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3747, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3770, __pyx_L1_error) if (!__pyx_t_9) { } else { __Pyx_INCREF(__pyx_v_self->ndim); __pyx_t_2 = __pyx_v_self->ndim; goto __pyx_L13_bool_binop_done; } - __pyx_t_6 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3747, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3770, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __pyx_t_6; __pyx_t_6 = 0; __pyx_L13_bool_binop_done:; - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3747, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3770, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); @@ -39241,14 +39287,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py } } if (!__pyx_t_2) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3747, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3770, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_6}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3747, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3770, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -39257,20 +39303,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_6}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3747, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3770, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3747, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3770, __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_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_6); __pyx_t_6 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3747, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3770, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -39279,28 +39325,28 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py __Pyx_DECREF_SET(__pyx_v_count, __pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":3748 + /* "netCDF4/_netCDF4.pyx":3771 * 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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_stride, __pyx_n_s_reshape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3748, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_stride, __pyx_n_s_reshape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3771, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3748, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3771, __pyx_L1_error) if (!__pyx_t_9) { } else { __Pyx_INCREF(__pyx_v_self->ndim); __pyx_t_4 = __pyx_v_self->ndim; goto __pyx_L15_bool_binop_done; } - __pyx_t_6 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3748, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3771, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __pyx_t_6; __pyx_t_6 = 0; __pyx_L15_bool_binop_done:; - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3748, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3771, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); @@ -39319,14 +39365,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py } } if (!__pyx_t_4) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3748, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3771, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_6}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3748, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3771, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -39335,20 +39381,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_6}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3748, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3771, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { - __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3748, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3771, __pyx_L1_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_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_6); __pyx_t_6 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3748, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3771, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -39357,28 +39403,28 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py __Pyx_DECREF_SET(__pyx_v_stride, __pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":3749 + /* "netCDF4/_netCDF4.pyx":3772 * 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)) # <<<<<<<<<<<<<< * * # Fill output array with data chunks. */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_put_ind, __pyx_n_s_reshape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3749, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_put_ind, __pyx_n_s_reshape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3772, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3749, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3772, __pyx_L1_error) if (!__pyx_t_9) { } else { __Pyx_INCREF(__pyx_v_self->ndim); __pyx_t_2 = __pyx_v_self->ndim; goto __pyx_L17_bool_binop_done; } - __pyx_t_6 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3749, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3772, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __pyx_t_6; __pyx_t_6 = 0; __pyx_L17_bool_binop_done:; - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3749, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3772, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); @@ -39397,14 +39443,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py } } if (!__pyx_t_2) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3749, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3772, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_6}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3749, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3772, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -39413,20 +39459,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_6}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3749, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3772, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3749, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3772, __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_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_6); __pyx_t_6 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3749, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3772, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -39435,14 +39481,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py __Pyx_DECREF_SET(__pyx_v_put_ind, __pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":3752 + /* "netCDF4/_netCDF4.pyx":3775 * * # Fill output array with data chunks. * for (a,b,c,i) in zip(start, count, stride, put_ind): # <<<<<<<<<<<<<< * datout = self._get(a,b,c) * if not hasattr(datout,'shape') or data.shape == datout.shape: */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3752, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -39459,7 +39505,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[5] = {__pyx_t_4, __pyx_v_start, __pyx_v_count, __pyx_v_stride, __pyx_v_put_ind}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3752, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3775, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -39467,13 +39513,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[5] = {__pyx_t_4, __pyx_v_start, __pyx_v_count, __pyx_v_stride, __pyx_v_put_ind}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3752, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3775, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_6 = PyTuple_New(4+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3752, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(4+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -39490,7 +39536,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py __Pyx_INCREF(__pyx_v_put_ind); __Pyx_GIVEREF(__pyx_v_put_ind); PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_5, __pyx_v_put_ind); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3752, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -39499,9 +39545,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py __pyx_t_1 = __pyx_t_3; __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_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3752, __pyx_L1_error) + __pyx_t_10 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3775, __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, 3752, __pyx_L1_error) + __pyx_t_11 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3775, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -39509,17 +39555,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py 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_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_3); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 3752, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_3); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 3775, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3752, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_3); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 3752, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_3); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 3775, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3752, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } @@ -39529,7 +39575,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py 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, 3752, __pyx_L1_error) + else __PYX_ERR(0, 3775, __pyx_L1_error) } break; } @@ -39545,7 +39591,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py if (unlikely(size != 4)) { if (size > 4) __Pyx_RaiseTooManyValuesError(4); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 3752, __pyx_L1_error) + __PYX_ERR(0, 3775, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -39568,7 +39614,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py Py_ssize_t i; PyObject** temps[4] = {&__pyx_t_6,&__pyx_t_4,&__pyx_t_2,&__pyx_t_7}; for (i=0; i < 4; i++) { - PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 3752, __pyx_L1_error) + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 3775, __pyx_L1_error) __Pyx_GOTREF(item); *(temps[i]) = item; } @@ -39578,7 +39624,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py } else { Py_ssize_t index = -1; PyObject** temps[4] = {&__pyx_t_6,&__pyx_t_4,&__pyx_t_2,&__pyx_t_7}; - __pyx_t_13 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3752, __pyx_L1_error) + __pyx_t_13 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_13)->tp_iternext; @@ -39587,7 +39633,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py __Pyx_GOTREF(item); *(temps[index]) = item; } - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_13), 4) < 0) __PYX_ERR(0, 3752, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_13), 4) < 0) __PYX_ERR(0, 3775, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L22_unpacking_done; @@ -39595,7 +39641,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 3752, __pyx_L1_error) + __PYX_ERR(0, 3775, __pyx_L1_error) __pyx_L22_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_a, __pyx_t_6); @@ -39607,14 +39653,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":3753 + /* "netCDF4/_netCDF4.pyx":3776 * # Fill output array with data chunks. * for (a,b,c,i) in zip(start, count, stride, put_ind): * datout = self._get(a,b,c) # <<<<<<<<<<<<<< * if not hasattr(datout,'shape') or data.shape == datout.shape: * data = datout */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3753, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3776, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_2 = NULL; __pyx_t_5 = 0; @@ -39631,7 +39677,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_v_a, __pyx_v_b, __pyx_v_c}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3753, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3776, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -39639,13 +39685,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_v_a, __pyx_v_b, __pyx_v_c}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3753, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3776, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_4 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3753, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3776, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_2) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL; @@ -39659,7 +39705,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py __Pyx_INCREF(__pyx_v_c); __Pyx_GIVEREF(__pyx_v_c); PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_5, __pyx_v_c); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3753, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3776, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -39667,34 +39713,34 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py __Pyx_XDECREF_SET(__pyx_v_datout, __pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":3754 + /* "netCDF4/_netCDF4.pyx":3777 * for (a,b,c,i) in zip(start, count, stride, put_ind): * datout = self._get(a,b,c) * if not hasattr(datout,'shape') or data.shape == datout.shape: # <<<<<<<<<<<<<< * data = datout * else: */ - __pyx_t_12 = PyObject_HasAttr(__pyx_v_datout, __pyx_n_s_shape); if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 3754, __pyx_L1_error) + __pyx_t_12 = PyObject_HasAttr(__pyx_v_datout, __pyx_n_s_shape); if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 3777, __pyx_L1_error) __pyx_t_14 = ((!(__pyx_t_12 != 0)) != 0); if (!__pyx_t_14) { } else { __pyx_t_9 = __pyx_t_14; goto __pyx_L24_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3754, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3777, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_datout, __pyx_n_s_shape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3754, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_datout, __pyx_n_s_shape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3777, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3754, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3777, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 3754, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 3777, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_9 = __pyx_t_14; __pyx_L24_bool_binop_done:; if (__pyx_t_9) { - /* "netCDF4/_netCDF4.pyx":3755 + /* "netCDF4/_netCDF4.pyx":3778 * datout = self._get(a,b,c) * if not hasattr(datout,'shape') or data.shape == datout.shape: * data = datout # <<<<<<<<<<<<<< @@ -39704,7 +39750,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py __Pyx_INCREF(__pyx_v_datout); __Pyx_DECREF_SET(__pyx_v_data, __pyx_v_datout); - /* "netCDF4/_netCDF4.pyx":3754 + /* "netCDF4/_netCDF4.pyx":3777 * for (a,b,c,i) in zip(start, count, stride, put_ind): * datout = self._get(a,b,c) * if not hasattr(datout,'shape') or data.shape == datout.shape: # <<<<<<<<<<<<<< @@ -39714,7 +39760,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py goto __pyx_L23; } - /* "netCDF4/_netCDF4.pyx":3757 + /* "netCDF4/_netCDF4.pyx":3780 * data = datout * else: * shape = getattr(data[tuple(i)], 'shape', ()) # <<<<<<<<<<<<<< @@ -39722,49 +39768,49 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py * # special case of scalar VLEN */ /*else*/ { - __pyx_t_4 = PySequence_Tuple(__pyx_v_i); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3757, __pyx_L1_error) + __pyx_t_4 = PySequence_Tuple(__pyx_v_i); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3780, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = PyObject_GetItem(__pyx_v_data, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3757, __pyx_L1_error) + __pyx_t_7 = PyObject_GetItem(__pyx_v_data, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3780, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_GetAttr3(__pyx_t_7, __pyx_n_s_shape, __pyx_empty_tuple); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3757, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetAttr3(__pyx_t_7, __pyx_n_s_shape, __pyx_empty_tuple); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3780, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF_SET(__pyx_v_shape, __pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":3758 + /* "netCDF4/_netCDF4.pyx":3781 * else: * shape = getattr(data[tuple(i)], 'shape', ()) * if self._isvlen and not len(self.dimensions): # <<<<<<<<<<<<<< * # special case of scalar VLEN * data[0] = datout */ - __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 3758, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 3781, __pyx_L1_error) if (__pyx_t_14) { } else { __pyx_t_9 = __pyx_t_14; goto __pyx_L27_bool_binop_done; } - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3758, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3781, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_15 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 3758, __pyx_L1_error) + __pyx_t_15 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 3781, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_14 = ((!(__pyx_t_15 != 0)) != 0); __pyx_t_9 = __pyx_t_14; __pyx_L27_bool_binop_done:; if (__pyx_t_9) { - /* "netCDF4/_netCDF4.pyx":3760 + /* "netCDF4/_netCDF4.pyx":3783 * if self._isvlen and not len(self.dimensions): * # special case of scalar VLEN * data[0] = datout # <<<<<<<<<<<<<< * else: * data[tuple(i)] = datout.reshape(shape) */ - if (unlikely(__Pyx_SetItemInt(__pyx_v_data, 0, __pyx_v_datout, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) __PYX_ERR(0, 3760, __pyx_L1_error) + if (unlikely(__Pyx_SetItemInt(__pyx_v_data, 0, __pyx_v_datout, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) __PYX_ERR(0, 3783, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3758 + /* "netCDF4/_netCDF4.pyx":3781 * else: * shape = getattr(data[tuple(i)], 'shape', ()) * if self._isvlen and not len(self.dimensions): # <<<<<<<<<<<<<< @@ -39774,7 +39820,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py goto __pyx_L26; } - /* "netCDF4/_netCDF4.pyx":3762 + /* "netCDF4/_netCDF4.pyx":3785 * data[0] = datout * else: * data[tuple(i)] = datout.reshape(shape) # <<<<<<<<<<<<<< @@ -39782,7 +39828,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py * # Remove extra singleton dimensions. */ /*else*/ { - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_datout, __pyx_n_s_reshape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3762, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_datout, __pyx_n_s_reshape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3785, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -39795,13 +39841,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py } } if (!__pyx_t_3) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3762, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3785, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_shape}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3762, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3785, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_4); } else @@ -39809,27 +39855,27 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_shape}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3762, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3785, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { - __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3762, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3785, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_INCREF(__pyx_v_shape); __Pyx_GIVEREF(__pyx_v_shape); PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_shape); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3762, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3785, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PySequence_Tuple(__pyx_v_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3762, __pyx_L1_error) + __pyx_t_7 = PySequence_Tuple(__pyx_v_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3785, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (unlikely(PyObject_SetItem(__pyx_v_data, __pyx_t_7, __pyx_t_4) < 0)) __PYX_ERR(0, 3762, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v_data, __pyx_t_7, __pyx_t_4) < 0)) __PYX_ERR(0, 3785, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -39837,7 +39883,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py } __pyx_L23:; - /* "netCDF4/_netCDF4.pyx":3752 + /* "netCDF4/_netCDF4.pyx":3775 * * # Fill output array with data chunks. * for (a,b,c,i) in zip(start, count, stride, put_ind): # <<<<<<<<<<<<<< @@ -39847,33 +39893,33 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":3765 + /* "netCDF4/_netCDF4.pyx":3788 * * # Remove extra singleton dimensions. * if hasattr(data,'shape'): # <<<<<<<<<<<<<< * data = data[tuple(squeeze)] * if hasattr(data,'ndim') and self.ndim == 0: */ - __pyx_t_9 = PyObject_HasAttr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 3765, __pyx_L1_error) + __pyx_t_9 = PyObject_HasAttr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 3788, __pyx_L1_error) __pyx_t_14 = (__pyx_t_9 != 0); if (__pyx_t_14) { - /* "netCDF4/_netCDF4.pyx":3766 + /* "netCDF4/_netCDF4.pyx":3789 * # Remove extra singleton dimensions. * if hasattr(data,'shape'): * data = data[tuple(squeeze)] # <<<<<<<<<<<<<< * if hasattr(data,'ndim') and self.ndim == 0: * # Make sure a numpy scalar array is returned instead of a 1-d array of */ - __pyx_t_1 = PySequence_Tuple(__pyx_v_squeeze); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3766, __pyx_L1_error) + __pyx_t_1 = PySequence_Tuple(__pyx_v_squeeze); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3789, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyObject_GetItem(__pyx_v_data, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3766, __pyx_L1_error) + __pyx_t_4 = PyObject_GetItem(__pyx_v_data, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3789, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":3765 + /* "netCDF4/_netCDF4.pyx":3788 * * # Remove extra singleton dimensions. * if hasattr(data,'shape'): # <<<<<<<<<<<<<< @@ -39882,48 +39928,48 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py */ } - /* "netCDF4/_netCDF4.pyx":3767 + /* "netCDF4/_netCDF4.pyx":3790 * if hasattr(data,'shape'): * data = data[tuple(squeeze)] * if hasattr(data,'ndim') and self.ndim == 0: # <<<<<<<<<<<<<< * # Make sure a numpy scalar array is returned instead of a 1-d array of * # length 1. */ - __pyx_t_9 = PyObject_HasAttr(__pyx_v_data, __pyx_n_s_ndim); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 3767, __pyx_L1_error) + __pyx_t_9 = PyObject_HasAttr(__pyx_v_data, __pyx_n_s_ndim); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 3790, __pyx_L1_error) __pyx_t_12 = (__pyx_t_9 != 0); if (__pyx_t_12) { } else { __pyx_t_14 = __pyx_t_12; goto __pyx_L31_bool_binop_done; } - __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_v_self->ndim, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3767, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_v_self->ndim, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3790, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 3767, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 3790, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_14 = __pyx_t_12; __pyx_L31_bool_binop_done:; if (__pyx_t_14) { - /* "netCDF4/_netCDF4.pyx":3770 + /* "netCDF4/_netCDF4.pyx":3793 * # Make sure a numpy scalar array is returned instead of a 1-d array of * # length 1. * if data.ndim != 0: data = numpy.asarray(data[0]) # <<<<<<<<<<<<<< * * # if auto_scale mode set to True, (through */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_ndim); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3770, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_ndim); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3793, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3770, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3793, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 3770, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 3793, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_14) { - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3770, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3793, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_asarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3770, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_asarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3793, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_data, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3770, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_data, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3793, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { @@ -39936,14 +39982,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py } } if (!__pyx_t_2) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3770, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3793, __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_7)) { PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3770, __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, 3793, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -39952,20 +39998,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3770, __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, 3793, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { - __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3770, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3793, __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_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3770, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3793, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -39975,7 +40021,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py __pyx_t_1 = 0; } - /* "netCDF4/_netCDF4.pyx":3767 + /* "netCDF4/_netCDF4.pyx":3790 * if hasattr(data,'shape'): * data = data[tuple(squeeze)] * if hasattr(data,'ndim') and self.ndim == 0: # <<<<<<<<<<<<<< @@ -39984,7 +40030,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py */ } - /* "netCDF4/_netCDF4.pyx":3780 + /* "netCDF4/_netCDF4.pyx":3803 * # missing_value/_Fill_Value. * # ignore for compound, vlen or enum datatypes. * try: # check to see if scale_factor and add_offset is valid (issue 176). # <<<<<<<<<<<<<< @@ -40000,39 +40046,39 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py __Pyx_XGOTREF(__pyx_t_18); /*try:*/ { - /* "netCDF4/_netCDF4.pyx":3781 + /* "netCDF4/_netCDF4.pyx":3804 * # ignore for compound, vlen or enum datatypes. * try: # check to see if scale_factor and add_offset is valid (issue 176). * if hasattr(self,'scale_factor'): float(self.scale_factor) # <<<<<<<<<<<<<< * if hasattr(self,'add_offset'): float(self.add_offset) * valid_scaleoffset = True */ - __pyx_t_14 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 3781, __pyx_L34_error) + __pyx_t_14 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 3804, __pyx_L34_error) __pyx_t_12 = (__pyx_t_14 != 0); if (__pyx_t_12) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3781, __pyx_L34_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3804, __pyx_L34_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_19 = __Pyx_PyObject_AsDouble(__pyx_t_1); if (unlikely(__pyx_t_19 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3781, __pyx_L34_error) + __pyx_t_19 = __Pyx_PyObject_AsDouble(__pyx_t_1); if (unlikely(__pyx_t_19 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3804, __pyx_L34_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "netCDF4/_netCDF4.pyx":3782 + /* "netCDF4/_netCDF4.pyx":3805 * try: # check to see if scale_factor and add_offset is valid (issue 176). * if hasattr(self,'scale_factor'): float(self.scale_factor) * if hasattr(self,'add_offset'): float(self.add_offset) # <<<<<<<<<<<<<< * valid_scaleoffset = True * except: */ - __pyx_t_12 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 3782, __pyx_L34_error) + __pyx_t_12 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 3805, __pyx_L34_error) __pyx_t_14 = (__pyx_t_12 != 0); if (__pyx_t_14) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3782, __pyx_L34_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3805, __pyx_L34_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_19 = __Pyx_PyObject_AsDouble(__pyx_t_1); if (unlikely(__pyx_t_19 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3782, __pyx_L34_error) + __pyx_t_19 = __Pyx_PyObject_AsDouble(__pyx_t_1); if (unlikely(__pyx_t_19 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3805, __pyx_L34_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "netCDF4/_netCDF4.pyx":3783 + /* "netCDF4/_netCDF4.pyx":3806 * if hasattr(self,'scale_factor'): float(self.scale_factor) * if hasattr(self,'add_offset'): float(self.add_offset) * valid_scaleoffset = True # <<<<<<<<<<<<<< @@ -40041,7 +40087,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py */ __pyx_v_valid_scaleoffset = 1; - /* "netCDF4/_netCDF4.pyx":3780 + /* "netCDF4/_netCDF4.pyx":3803 * # missing_value/_Fill_Value. * # ignore for compound, vlen or enum datatypes. * try: # check to see if scale_factor and add_offset is valid (issue 176). # <<<<<<<<<<<<<< @@ -40063,7 +40109,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":3784 + /* "netCDF4/_netCDF4.pyx":3807 * if hasattr(self,'add_offset'): float(self.add_offset) * valid_scaleoffset = True * except: # <<<<<<<<<<<<<< @@ -40072,12 +40118,12 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py */ /*except:*/ { __Pyx_AddTraceback("netCDF4._netCDF4.Variable.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_7, &__pyx_t_3) < 0) __PYX_ERR(0, 3784, __pyx_L36_except_error) + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_7, &__pyx_t_3) < 0) __PYX_ERR(0, 3807, __pyx_L36_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_3); - /* "netCDF4/_netCDF4.pyx":3785 + /* "netCDF4/_netCDF4.pyx":3808 * valid_scaleoffset = True * except: * valid_scaleoffset = False # <<<<<<<<<<<<<< @@ -40086,17 +40132,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py */ __pyx_v_valid_scaleoffset = 0; - /* "netCDF4/_netCDF4.pyx":3786 + /* "netCDF4/_netCDF4.pyx":3809 * except: * valid_scaleoffset = False * if self.scale: # <<<<<<<<<<<<<< * msg = 'invalid scale_factor or add_offset attribute, no unpacking done...' * warnings.warn(msg) */ - __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_self->scale); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 3786, __pyx_L36_except_error) + __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_self->scale); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 3809, __pyx_L36_except_error) if (__pyx_t_14) { - /* "netCDF4/_netCDF4.pyx":3787 + /* "netCDF4/_netCDF4.pyx":3810 * valid_scaleoffset = False * if self.scale: * msg = 'invalid scale_factor or add_offset attribute, no unpacking done...' # <<<<<<<<<<<<<< @@ -40106,16 +40152,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py __Pyx_INCREF(__pyx_kp_s_invalid_scale_factor_or_add_offs); __pyx_v_msg = __pyx_kp_s_invalid_scale_factor_or_add_offs; - /* "netCDF4/_netCDF4.pyx":3788 + /* "netCDF4/_netCDF4.pyx":3811 * if self.scale: * msg = 'invalid scale_factor or add_offset attribute, no unpacking done...' * warnings.warn(msg) # <<<<<<<<<<<<<< * if self.mask and (self._isprimitive or self._isenum): * data = self._toma(data) */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3788, __pyx_L36_except_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3811, __pyx_L36_except_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_warn); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3788, __pyx_L36_except_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_warn); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3811, __pyx_L36_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -40129,13 +40175,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py } } if (!__pyx_t_2) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_msg); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3788, __pyx_L36_except_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_msg); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3811, __pyx_L36_except_error) __Pyx_GOTREF(__pyx_t_4); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_msg}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3788, __pyx_L36_except_error) + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3811, __pyx_L36_except_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_4); } else @@ -40143,19 +40189,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_msg}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3788, __pyx_L36_except_error) + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3811, __pyx_L36_except_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { - __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3788, __pyx_L36_except_error) + __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3811, __pyx_L36_except_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_2); __pyx_t_2 = NULL; __Pyx_INCREF(__pyx_v_msg); __Pyx_GIVEREF(__pyx_v_msg); PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_v_msg); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_13, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3788, __pyx_L36_except_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_13, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3811, __pyx_L36_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } @@ -40163,7 +40209,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":3786 + /* "netCDF4/_netCDF4.pyx":3809 * except: * valid_scaleoffset = False * if self.scale: # <<<<<<<<<<<<<< @@ -40178,7 +40224,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py } __pyx_L36_except_error:; - /* "netCDF4/_netCDF4.pyx":3780 + /* "netCDF4/_netCDF4.pyx":3803 * # missing_value/_Fill_Value. * # ignore for compound, vlen or enum datatypes. * try: # check to see if scale_factor and add_offset is valid (issue 176). # <<<<<<<<<<<<<< @@ -40200,38 +40246,38 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py __pyx_L41_try_end:; } - /* "netCDF4/_netCDF4.pyx":3789 + /* "netCDF4/_netCDF4.pyx":3812 * msg = 'invalid scale_factor or add_offset attribute, no unpacking done...' * warnings.warn(msg) * if self.mask and (self._isprimitive or self._isenum): # <<<<<<<<<<<<<< * data = self._toma(data) * if self.scale and self._isprimitive and valid_scaleoffset: */ - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->mask); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 3789, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->mask); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 3812, __pyx_L1_error) if (__pyx_t_12) { } else { __pyx_t_14 = __pyx_t_12; goto __pyx_L48_bool_binop_done; } - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 3789, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 3812, __pyx_L1_error) if (!__pyx_t_12) { } else { __pyx_t_14 = __pyx_t_12; goto __pyx_L48_bool_binop_done; } - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isenum); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 3789, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isenum); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 3812, __pyx_L1_error) __pyx_t_14 = __pyx_t_12; __pyx_L48_bool_binop_done:; if (__pyx_t_14) { - /* "netCDF4/_netCDF4.pyx":3790 + /* "netCDF4/_netCDF4.pyx":3813 * warnings.warn(msg) * if self.mask and (self._isprimitive or self._isenum): * data = self._toma(data) # <<<<<<<<<<<<<< * if self.scale and self._isprimitive and valid_scaleoffset: * # if variable has scale_factor and add_offset attributes, rescale. */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_toma); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3790, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_toma); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3813, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -40244,13 +40290,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py } } if (!__pyx_t_1) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3790, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3813, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_data}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3790, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3813, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -40258,19 +40304,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_data}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3790, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3813, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3790, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3813, __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_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3790, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3813, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -40279,7 +40325,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":3789 + /* "netCDF4/_netCDF4.pyx":3812 * msg = 'invalid scale_factor or add_offset attribute, no unpacking done...' * warnings.warn(msg) * if self.mask and (self._isprimitive or self._isenum): # <<<<<<<<<<<<<< @@ -40288,20 +40334,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py */ } - /* "netCDF4/_netCDF4.pyx":3791 + /* "netCDF4/_netCDF4.pyx":3814 * if self.mask and (self._isprimitive or self._isenum): * data = self._toma(data) * if self.scale and self._isprimitive and valid_scaleoffset: # <<<<<<<<<<<<<< * # if variable has scale_factor and add_offset attributes, rescale. * if hasattr(self, 'scale_factor') and hasattr(self, 'add_offset') and\ */ - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->scale); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 3791, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->scale); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 3814, __pyx_L1_error) if (__pyx_t_12) { } else { __pyx_t_14 = __pyx_t_12; goto __pyx_L52_bool_binop_done; } - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 3791, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 3814, __pyx_L1_error) if (__pyx_t_12) { } else { __pyx_t_14 = __pyx_t_12; @@ -40312,21 +40358,21 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py __pyx_L52_bool_binop_done:; if (__pyx_t_14) { - /* "netCDF4/_netCDF4.pyx":3793 + /* "netCDF4/_netCDF4.pyx":3816 * if self.scale and self._isprimitive and valid_scaleoffset: * # if variable has scale_factor and add_offset attributes, rescale. * if hasattr(self, 'scale_factor') and hasattr(self, 'add_offset') and\ # <<<<<<<<<<<<<< * (self.add_offset != 0.0 or self.scale_factor != 1.0): * data = data*self.scale_factor + self.add_offset */ - __pyx_t_12 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 3793, __pyx_L1_error) + __pyx_t_12 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 3816, __pyx_L1_error) __pyx_t_9 = (__pyx_t_12 != 0); if (__pyx_t_9) { } else { __pyx_t_14 = __pyx_t_9; goto __pyx_L56_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, 3793, __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, 3816, __pyx_L1_error) __pyx_t_12 = (__pyx_t_9 != 0); if (__pyx_t_12) { } else { @@ -40334,34 +40380,34 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py goto __pyx_L56_bool_binop_done; } - /* "netCDF4/_netCDF4.pyx":3794 + /* "netCDF4/_netCDF4.pyx":3817 * # if variable has scale_factor and add_offset attributes, rescale. * if hasattr(self, 'scale_factor') and hasattr(self, 'add_offset') and\ * (self.add_offset != 0.0 or self.scale_factor != 1.0): # <<<<<<<<<<<<<< * data = data*self.scale_factor + self.add_offset * # else if variable has only scale_factor attributes, rescale. */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3794, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3817, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = PyObject_RichCompare(__pyx_t_3, __pyx_float_0_0, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3794, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(__pyx_t_3, __pyx_float_0_0, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3817, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 3794, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 3817, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (!__pyx_t_12) { } else { __pyx_t_14 = __pyx_t_12; goto __pyx_L56_bool_binop_done; } - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3794, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3817, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_3 = PyObject_RichCompare(__pyx_t_7, __pyx_float_1_0, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3794, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_7, __pyx_float_1_0, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3817, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 3794, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 3817, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_14 = __pyx_t_12; __pyx_L56_bool_binop_done:; - /* "netCDF4/_netCDF4.pyx":3793 + /* "netCDF4/_netCDF4.pyx":3816 * if self.scale and self._isprimitive and valid_scaleoffset: * # if variable has scale_factor and add_offset attributes, rescale. * if hasattr(self, 'scale_factor') and hasattr(self, 'add_offset') and\ # <<<<<<<<<<<<<< @@ -40370,28 +40416,28 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py */ if (__pyx_t_14) { - /* "netCDF4/_netCDF4.pyx":3795 + /* "netCDF4/_netCDF4.pyx":3818 * if hasattr(self, 'scale_factor') and hasattr(self, 'add_offset') and\ * (self.add_offset != 0.0 or self.scale_factor != 1.0): * data = data*self.scale_factor + self.add_offset # <<<<<<<<<<<<<< * # else if variable has only scale_factor attributes, rescale. * elif hasattr(self, 'scale_factor') and self.scale_factor != 1.0: */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3795, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3818, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = PyNumber_Multiply(__pyx_v_data, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3795, __pyx_L1_error) + __pyx_t_7 = PyNumber_Multiply(__pyx_v_data, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3818, __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_add_offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3795, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3818, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyNumber_Add(__pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3795, __pyx_L1_error) + __pyx_t_4 = PyNumber_Add(__pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3818, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":3793 + /* "netCDF4/_netCDF4.pyx":3816 * if self.scale and self._isprimitive and valid_scaleoffset: * # if variable has scale_factor and add_offset attributes, rescale. * if hasattr(self, 'scale_factor') and hasattr(self, 'add_offset') and\ # <<<<<<<<<<<<<< @@ -40401,46 +40447,46 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py goto __pyx_L55; } - /* "netCDF4/_netCDF4.pyx":3797 + /* "netCDF4/_netCDF4.pyx":3820 * data = data*self.scale_factor + self.add_offset * # else if variable has only scale_factor attributes, rescale. * elif hasattr(self, 'scale_factor') and self.scale_factor != 1.0: # <<<<<<<<<<<<<< * data = data*self.scale_factor * # else if variable has only add_offset attributes, rescale. */ - __pyx_t_12 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 3797, __pyx_L1_error) + __pyx_t_12 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 3820, __pyx_L1_error) __pyx_t_9 = (__pyx_t_12 != 0); if (__pyx_t_9) { } else { __pyx_t_14 = __pyx_t_9; goto __pyx_L60_bool_binop_done; } - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3797, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3820, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_float_1_0, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3797, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_float_1_0, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3820, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3797, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3820, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_14 = __pyx_t_9; __pyx_L60_bool_binop_done:; if (__pyx_t_14) { - /* "netCDF4/_netCDF4.pyx":3798 + /* "netCDF4/_netCDF4.pyx":3821 * # else if variable has only scale_factor attributes, rescale. * elif hasattr(self, 'scale_factor') and self.scale_factor != 1.0: * data = data*self.scale_factor # <<<<<<<<<<<<<< * # else if variable has only add_offset attributes, rescale. * elif hasattr(self, 'add_offset') and self.add_offset != 0.0: */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3798, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3821, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyNumber_Multiply(__pyx_v_data, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3798, __pyx_L1_error) + __pyx_t_4 = PyNumber_Multiply(__pyx_v_data, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3821, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":3797 + /* "netCDF4/_netCDF4.pyx":3820 * data = data*self.scale_factor + self.add_offset * # else if variable has only scale_factor attributes, rescale. * elif hasattr(self, 'scale_factor') and self.scale_factor != 1.0: # <<<<<<<<<<<<<< @@ -40450,46 +40496,46 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py goto __pyx_L55; } - /* "netCDF4/_netCDF4.pyx":3800 + /* "netCDF4/_netCDF4.pyx":3823 * data = data*self.scale_factor * # 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, 3800, __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, 3823, __pyx_L1_error) __pyx_t_12 = (__pyx_t_9 != 0); if (__pyx_t_12) { } else { __pyx_t_14 = __pyx_t_12; goto __pyx_L62_bool_binop_done; } - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3800, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3823, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_float_0_0, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3800, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_float_0_0, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3823, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 3800, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 3823, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_14 = __pyx_t_12; __pyx_L62_bool_binop_done:; if (__pyx_t_14) { - /* "netCDF4/_netCDF4.pyx":3801 + /* "netCDF4/_netCDF4.pyx":3824 * # 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_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3801, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3824, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyNumber_Add(__pyx_v_data, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3801, __pyx_L1_error) + __pyx_t_4 = PyNumber_Add(__pyx_v_data, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3824, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":3800 + /* "netCDF4/_netCDF4.pyx":3823 * data = data*self.scale_factor * # else if variable has only add_offset attributes, rescale. * elif hasattr(self, 'add_offset') and self.add_offset != 0.0: # <<<<<<<<<<<<<< @@ -40499,7 +40545,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py } __pyx_L55:; - /* "netCDF4/_netCDF4.pyx":3791 + /* "netCDF4/_netCDF4.pyx":3814 * if self.mask and (self._isprimitive or self._isenum): * data = self._toma(data) * if self.scale and self._isprimitive and valid_scaleoffset: # <<<<<<<<<<<<<< @@ -40508,7 +40554,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py */ } - /* "netCDF4/_netCDF4.pyx":3802 + /* "netCDF4/_netCDF4.pyx":3825 * elif hasattr(self, 'add_offset') and self.add_offset != 0.0: * data = data + self.add_offset * return data # <<<<<<<<<<<<<< @@ -40520,7 +40566,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py __pyx_r = __pyx_v_data; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":3723 + /* "netCDF4/_netCDF4.pyx":3746 * raise AttributeError((nc_strerror(ierr)).decode('ascii')) * * def __getitem__(self, elem): # <<<<<<<<<<<<<< @@ -40560,7 +40606,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":3804 +/* "netCDF4/_netCDF4.pyx":3827 * return data * * def _toma(self,data): # <<<<<<<<<<<<<< @@ -40619,23 +40665,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":3808 + /* "netCDF4/_netCDF4.pyx":3831 * # 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, 3808, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3831, __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, 3808, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3831, __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, 3808, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3831, __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, 3808, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3831, __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, 3808, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_bool); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3831, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -40653,7 +40699,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, 3808, __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, 3831, __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; @@ -40663,7 +40709,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, 3808, __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, 3831, __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; @@ -40671,7 +40717,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, 3808, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3831, __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; @@ -40682,7 +40728,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, 3808, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3831, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -40690,7 +40736,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":3809 + /* "netCDF4/_netCDF4.pyx":3832 * # and/or _FillValues. * totalmask = numpy.zeros(data.shape, numpy.bool) * fill_value = None # <<<<<<<<<<<<<< @@ -40700,30 +40746,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":3810 + /* "netCDF4/_netCDF4.pyx":3833 * 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, 3810, __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, 3833, __pyx_L1_error) __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { - /* "netCDF4/_netCDF4.pyx":3811 + /* "netCDF4/_netCDF4.pyx":3834 * 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, 3811, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3834, __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, 3811, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3834, __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, 3811, __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, 3834, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -40740,7 +40786,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, 3811, __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, 3834, __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; @@ -40749,14 +40795,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, 3811, __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, 3834, __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, 3811, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3834, __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; @@ -40767,7 +40813,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, 3811, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3834, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -40775,23 +40821,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":3813 + /* "netCDF4/_netCDF4.pyx":3836 * 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, 3813, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3836, __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, 3813, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3836, __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, 3813, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3836, __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, 3813, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3836, __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, 3813, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_bool); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3836, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -40809,7 +40855,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, 3813, __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, 3836, __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; @@ -40819,7 +40865,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, 3813, __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, 3836, __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; @@ -40827,7 +40873,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, 3813, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3836, __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; @@ -40838,7 +40884,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, 3813, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3836, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -40846,7 +40892,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":3816 + /* "netCDF4/_netCDF4.pyx":3839 * # set mask=True for data outside valid_min,valid_max. * # (issue #576) * validmin = None; validmax = None # <<<<<<<<<<<<<< @@ -40858,44 +40904,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":3821 + /* "netCDF4/_netCDF4.pyx":3844 * # 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, 3821, __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, 3844, __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, 3821, __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, 3844, __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, 3821, __pyx_L1_error) + __pyx_t_11 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 3844, __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":3822 + /* "netCDF4/_netCDF4.pyx":3845 * # 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, 3822, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3845, __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, 3822, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3845, __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, 3822, __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, 3845, __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, 3822, __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, 3845, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -40913,7 +40959,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, 3822, __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, 3845, __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; @@ -40922,14 +40968,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, 3822, __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, 3845, __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, 3822, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3845, __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; @@ -40940,7 +40986,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, 3822, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3845, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -40948,21 +40994,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":3823 + /* "netCDF4/_netCDF4.pyx":3846 * 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, 3823, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3846, __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, 3823, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3846, __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, 3823, __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, 3846, __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, 3823, __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, 3846, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -40980,7 +41026,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, 3823, __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, 3846, __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; @@ -40989,14 +41035,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, 3823, __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, 3846, __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, 3823, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3846, __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; @@ -41007,7 +41053,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, 3823, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3846, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -41015,7 +41061,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":3821 + /* "netCDF4/_netCDF4.pyx":3844 * # 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: # <<<<<<<<<<<<<< @@ -41025,7 +41071,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ goto __pyx_L4; } - /* "netCDF4/_netCDF4.pyx":3825 + /* "netCDF4/_netCDF4.pyx":3848 * validmax = numpy.array(self.valid_range[1], self.dtype) * else: * if hasattr(self, 'valid_min'): # <<<<<<<<<<<<<< @@ -41033,23 +41079,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, 3825, __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, 3848, __pyx_L1_error) __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { - /* "netCDF4/_netCDF4.pyx":3826 + /* "netCDF4/_netCDF4.pyx":3849 * 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, 3826, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3849, __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, 3826, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3849, __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, 3826, __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, 3849, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -41066,7 +41112,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, 3826, __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, 3849, __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; @@ -41075,14 +41121,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, 3826, __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, 3849, __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, 3826, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3849, __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; @@ -41093,7 +41139,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, 3826, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3849, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -41101,7 +41147,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":3825 + /* "netCDF4/_netCDF4.pyx":3848 * validmax = numpy.array(self.valid_range[1], self.dtype) * else: * if hasattr(self, 'valid_min'): # <<<<<<<<<<<<<< @@ -41110,30 +41156,30 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":3827 + /* "netCDF4/_netCDF4.pyx":3850 * 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, 3827, __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, 3850, __pyx_L1_error) __pyx_t_9 = (__pyx_t_10 != 0); if (__pyx_t_9) { - /* "netCDF4/_netCDF4.pyx":3828 + /* "netCDF4/_netCDF4.pyx":3851 * 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, 3828, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3851, __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, 3828, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3851, __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, 3828, __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, 3851, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = NULL; __pyx_t_6 = 0; @@ -41150,7 +41196,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, 3828, __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, 3851, __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; @@ -41159,14 +41205,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, 3828, __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, 3851, __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, 3828, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3851, __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; @@ -41177,7 +41223,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, 3828, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3851, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -41185,7 +41231,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":3827 + /* "netCDF4/_netCDF4.pyx":3850 * if hasattr(self, 'valid_min'): * validmin = numpy.array(self.valid_min, self.dtype) * if hasattr(self, 'valid_max'): # <<<<<<<<<<<<<< @@ -41196,54 +41242,54 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ } __pyx_L4:; - /* "netCDF4/_netCDF4.pyx":3837 + /* "netCDF4/_netCDF4.pyx":3860 * # 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, 3837, __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, 3860, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_t_1, 1, 0, NULL, NULL, &__pyx_slice__57, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3837, __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, 3860, __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, 3837, __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, 3860, __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, 3837, __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, 3860, __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":3838 + /* "netCDF4/_netCDF4.pyx":3861 * # 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, 3838, __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, 3861, __pyx_L1_error) __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { - /* "netCDF4/_netCDF4.pyx":3839 + /* "netCDF4/_netCDF4.pyx":3862 * 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, 3839, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3862, __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, 3839, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3862, __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, 3839, __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, 3862, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = NULL; __pyx_t_6 = 0; @@ -41260,7 +41306,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, 3839, __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, 3862, __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; @@ -41269,14 +41315,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, 3839, __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, 3862, __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, 3839, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3862, __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; @@ -41287,7 +41333,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, 3839, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3862, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -41295,7 +41341,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":3838 + /* "netCDF4/_netCDF4.pyx":3861 * # otherwise it defines a valid minimum." * byte_type = self.dtype.str[1:] in ['u1','i1'] * if hasattr(self, '_FillValue'): # <<<<<<<<<<<<<< @@ -41305,7 +41351,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ goto __pyx_L11; } - /* "netCDF4/_netCDF4.pyx":3841 + /* "netCDF4/_netCDF4.pyx":3864 * fval = numpy.array(self._FillValue, self.dtype) * else: * fval = numpy.array(default_fillvals[self.dtype.str[1:]],self.dtype) # <<<<<<<<<<<<<< @@ -41313,19 +41359,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, 3841, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3864, __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, 3841, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3864, __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, 3841, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_fillvals); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3864, __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, 3841, __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, 3864, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_t_1, 1, 0, NULL, NULL, &__pyx_slice__58, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3841, __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, 3864, __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, 3841, __pyx_L1_error) + __pyx_t_1 = PyObject_GetItem(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3864, __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; @@ -41344,7 +41390,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, 3841, __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, 3864, __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; @@ -41353,14 +41399,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, 3841, __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, 3864, __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, 3841, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3864, __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; @@ -41371,7 +41417,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, 3841, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3864, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -41379,7 +41425,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":3842 + /* "netCDF4/_netCDF4.pyx":3865 * else: * fval = numpy.array(default_fillvals[self.dtype.str[1:]],self.dtype) * if byte_type: fval = None # <<<<<<<<<<<<<< @@ -41394,7 +41440,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ } __pyx_L11:; - /* "netCDF4/_netCDF4.pyx":3843 + /* "netCDF4/_netCDF4.pyx":3866 * 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): # <<<<<<<<<<<<<< @@ -41415,14 +41461,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, 3843, __pyx_L1_error) - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3843, __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, 3866, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3866, __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":3844 + /* "netCDF4/_netCDF4.pyx":3867 * if byte_type: fval = None * if validmin is None and (fval is not None and fval <= 0): * validmin = fval # <<<<<<<<<<<<<< @@ -41432,7 +41478,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":3843 + /* "netCDF4/_netCDF4.pyx":3866 * 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): # <<<<<<<<<<<<<< @@ -41442,7 +41488,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ goto __pyx_L13; } - /* "netCDF4/_netCDF4.pyx":3845 + /* "netCDF4/_netCDF4.pyx":3868 * 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): # <<<<<<<<<<<<<< @@ -41463,14 +41509,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, 3845, __pyx_L1_error) - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3845, __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, 3868, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3868, __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":3846 + /* "netCDF4/_netCDF4.pyx":3869 * validmin = fval * elif validmax is None and (fval is not None and fval > 0): * validmax = fval # <<<<<<<<<<<<<< @@ -41480,7 +41526,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":3845 + /* "netCDF4/_netCDF4.pyx":3868 * 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): # <<<<<<<<<<<<<< @@ -41490,7 +41536,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ } __pyx_L13:; - /* "netCDF4/_netCDF4.pyx":3847 + /* "netCDF4/_netCDF4.pyx":3870 * elif validmax is None and (fval is not None and fval > 0): * validmax = fval * if validmin is not None: # <<<<<<<<<<<<<< @@ -41501,21 +41547,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":3848 + /* "netCDF4/_netCDF4.pyx":3871 * 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, 3848, __pyx_L1_error) - __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_mvalmask, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3848, __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, 3871, __pyx_L1_error) + __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_mvalmask, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3871, __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":3847 + /* "netCDF4/_netCDF4.pyx":3870 * elif validmax is None and (fval is not None and fval > 0): * validmax = fval * if validmin is not None: # <<<<<<<<<<<<<< @@ -41524,7 +41570,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":3849 + /* "netCDF4/_netCDF4.pyx":3872 * if validmin is not None: * mvalmask += data < validmin * if validmax is not None: # <<<<<<<<<<<<<< @@ -41535,21 +41581,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":3850 + /* "netCDF4/_netCDF4.pyx":3873 * 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, 3850, __pyx_L1_error) - __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_mvalmask, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3850, __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, 3873, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_mvalmask, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3873, __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":3849 + /* "netCDF4/_netCDF4.pyx":3872 * if validmin is not None: * mvalmask += data < validmin * if validmax is not None: # <<<<<<<<<<<<<< @@ -41558,29 +41604,29 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":3851 + /* "netCDF4/_netCDF4.pyx":3874 * 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, 3851, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_mval, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3874, __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, 3851, __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, 3874, __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, 3851, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 3874, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_10) { - /* "netCDF4/_netCDF4.pyx":3852 + /* "netCDF4/_netCDF4.pyx":3875 * 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, 3852, __pyx_L1_error) + __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3875, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_mval); __Pyx_GIVEREF(__pyx_v_mval); @@ -41588,7 +41634,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":3851 + /* "netCDF4/_netCDF4.pyx":3874 * if validmax is not None: * mvalmask += data > validmax * if mval.shape == (): # mval a scalar. # <<<<<<<<<<<<<< @@ -41597,7 +41643,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":3853 + /* "netCDF4/_netCDF4.pyx":3876 * if mval.shape == (): # mval a scalar. * mval = [mval] # make into iterable. * for m in mval: # <<<<<<<<<<<<<< @@ -41608,26 +41654,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, 3853, __pyx_L1_error) + __pyx_t_11 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_mval); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3876, __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, 3853, __pyx_L1_error) + __pyx_t_12 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3876, __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, 3853, __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, 3876, __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, 3853, __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, 3876, __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, 3853, __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, 3876, __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, 3853, __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, 3876, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -41637,7 +41683,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, 3853, __pyx_L1_error) + else __PYX_ERR(0, 3876, __pyx_L1_error) } break; } @@ -41646,7 +41692,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":3855 + /* "netCDF4/_netCDF4.pyx":3878 * for m in mval: * # is scalar missing value a NaN? * try: # <<<<<<<<<<<<<< @@ -41662,16 +41708,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __Pyx_XGOTREF(__pyx_t_15); /*try:*/ { - /* "netCDF4/_netCDF4.pyx":3856 + /* "netCDF4/_netCDF4.pyx":3879 * # 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, 3856, __pyx_L25_error) + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3879, __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, 3856, __pyx_L25_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_isnan); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3879, __pyx_L25_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -41685,13 +41731,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, 3856, __pyx_L25_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_m); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3879, __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, 3856, __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, 3879, __pyx_L25_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_4); } else @@ -41699,19 +41745,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, 3856, __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, 3879, __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, 3856, __pyx_L25_error) + __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3879, __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, 3856, __pyx_L25_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3879, __pyx_L25_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -41720,7 +41766,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":3855 + /* "netCDF4/_netCDF4.pyx":3878 * for m in mval: * # is scalar missing value a NaN? * try: # <<<<<<<<<<<<<< @@ -41740,7 +41786,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":3857 + /* "netCDF4/_netCDF4.pyx":3880 * try: * mvalisnan = numpy.isnan(m) * except TypeError: # isnan fails on some dtypes (issue 206) # <<<<<<<<<<<<<< @@ -41750,12 +41796,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, 3857, __pyx_L27_except_error) + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_1, &__pyx_t_2) < 0) __PYX_ERR(0, 3880, __pyx_L27_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_2); - /* "netCDF4/_netCDF4.pyx":3858 + /* "netCDF4/_netCDF4.pyx":3881 * mvalisnan = numpy.isnan(m) * except TypeError: # isnan fails on some dtypes (issue 206) * mvalisnan = False # <<<<<<<<<<<<<< @@ -41772,7 +41818,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":3855 + /* "netCDF4/_netCDF4.pyx":3878 * for m in mval: * # is scalar missing value a NaN? * try: # <<<<<<<<<<<<<< @@ -41794,26 +41840,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __pyx_L32_try_end:; } - /* "netCDF4/_netCDF4.pyx":3859 + /* "netCDF4/_netCDF4.pyx":3882 * 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, 3859, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_mvalisnan); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 3882, __pyx_L1_error) if (__pyx_t_10) { - /* "netCDF4/_netCDF4.pyx":3860 + /* "netCDF4/_netCDF4.pyx":3883 * 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, 3860, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3883, __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, 3860, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_isnan); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3883, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -41827,13 +41873,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, 3860, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3883, __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, 3860, __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, 3883, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -41841,31 +41887,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, 3860, __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, 3883, __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, 3860, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3883, __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, 3860, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3883, __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, 3860, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_mvalmask, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3883, __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":3859 + /* "netCDF4/_netCDF4.pyx":3882 * except TypeError: # isnan fails on some dtypes (issue 206) * mvalisnan = False * if mvalisnan: # <<<<<<<<<<<<<< @@ -41875,7 +41921,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ goto __pyx_L35; } - /* "netCDF4/_netCDF4.pyx":3862 + /* "netCDF4/_netCDF4.pyx":3885 * mvalmask += numpy.isnan(data) * else: * mvalmask += data==m # <<<<<<<<<<<<<< @@ -41883,8 +41929,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, 3862, __pyx_L1_error) - __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_mvalmask, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3862, __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, 3885, __pyx_L1_error) + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_mvalmask, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3885, __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); @@ -41892,7 +41938,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ } __pyx_L35:; - /* "netCDF4/_netCDF4.pyx":3853 + /* "netCDF4/_netCDF4.pyx":3876 * if mval.shape == (): # mval a scalar. * mval = [mval] # make into iterable. * for m in mval: # <<<<<<<<<<<<<< @@ -41902,14 +41948,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":3863 + /* "netCDF4/_netCDF4.pyx":3886 * 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, 3863, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_mvalmask, __pyx_n_s_any); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3886, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -41922,42 +41968,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, 3863, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3886, __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, 3863, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3886, __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, 3863, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 3886, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_10) { - /* "netCDF4/_netCDF4.pyx":3867 + /* "netCDF4/_netCDF4.pyx":3890 * # 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, 3867, __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, 3890, __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":3868 + /* "netCDF4/_netCDF4.pyx":3891 * # 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, 3868, __pyx_L1_error) + __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_totalmask, __pyx_v_mvalmask); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3891, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF_SET(__pyx_v_totalmask, __pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":3863 + /* "netCDF4/_netCDF4.pyx":3886 * else: * mvalmask += data==m * if mvalmask.any(): # <<<<<<<<<<<<<< @@ -41966,7 +42012,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":3810 + /* "netCDF4/_netCDF4.pyx":3833 * totalmask = numpy.zeros(data.shape, numpy.bool) * fill_value = None * if hasattr(self, 'missing_value'): # <<<<<<<<<<<<<< @@ -41975,30 +42021,30 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":3870 + /* "netCDF4/_netCDF4.pyx":3893 * 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, 3870, __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, 3893, __pyx_L1_error) __pyx_t_9 = (__pyx_t_10 != 0); if (__pyx_t_9) { - /* "netCDF4/_netCDF4.pyx":3871 + /* "netCDF4/_netCDF4.pyx":3894 * # 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, 3871, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3894, __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, 3871, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3894, __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, 3871, __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, 3894, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -42015,7 +42061,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, 3871, __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, 3894, __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; @@ -42024,14 +42070,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, 3871, __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, 3894, __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, 3871, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3894, __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; @@ -42042,7 +42088,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, 3871, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3894, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } @@ -42050,7 +42096,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":3873 + /* "netCDF4/_netCDF4.pyx":3896 * fval = numpy.array(self._FillValue, self.dtype) * # is _FillValue a NaN? * try: # <<<<<<<<<<<<<< @@ -42066,16 +42112,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __Pyx_XGOTREF(__pyx_t_13); /*try:*/ { - /* "netCDF4/_netCDF4.pyx":3874 + /* "netCDF4/_netCDF4.pyx":3897 * # 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, 3874, __pyx_L38_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3897, __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, 3874, __pyx_L38_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_isnan); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3897, __pyx_L38_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -42089,13 +42135,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, 3874, __pyx_L38_error) + __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_fval); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3897, __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, 3874, __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, 3897, __pyx_L38_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_7); } else @@ -42103,19 +42149,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, 3874, __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, 3897, __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, 3874, __pyx_L38_error) + __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3897, __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, 3874, __pyx_L38_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3897, __pyx_L38_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -42124,7 +42170,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":3873 + /* "netCDF4/_netCDF4.pyx":3896 * fval = numpy.array(self._FillValue, self.dtype) * # is _FillValue a NaN? * try: # <<<<<<<<<<<<<< @@ -42145,7 +42191,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":3875 + /* "netCDF4/_netCDF4.pyx":3898 * try: * fvalisnan = numpy.isnan(fval) * except: # isnan fails on some dtypes (issue 202) # <<<<<<<<<<<<<< @@ -42154,12 +42200,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, 3875, __pyx_L40_except_error) + if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_1, &__pyx_t_2) < 0) __PYX_ERR(0, 3898, __pyx_L40_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_2); - /* "netCDF4/_netCDF4.pyx":3876 + /* "netCDF4/_netCDF4.pyx":3899 * fvalisnan = numpy.isnan(fval) * except: # isnan fails on some dtypes (issue 202) * fvalisnan = False # <<<<<<<<<<<<<< @@ -42175,7 +42221,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ } __pyx_L40_except_error:; - /* "netCDF4/_netCDF4.pyx":3873 + /* "netCDF4/_netCDF4.pyx":3896 * fval = numpy.array(self._FillValue, self.dtype) * # is _FillValue a NaN? * try: # <<<<<<<<<<<<<< @@ -42197,26 +42243,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __pyx_L45_try_end:; } - /* "netCDF4/_netCDF4.pyx":3877 + /* "netCDF4/_netCDF4.pyx":3900 * 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, 3877, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_fvalisnan); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3900, __pyx_L1_error) if (__pyx_t_9) { - /* "netCDF4/_netCDF4.pyx":3878 + /* "netCDF4/_netCDF4.pyx":3901 * 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, 3878, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3901, __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, 3878, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_isnan); 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; __pyx_t_1 = NULL; @@ -42230,13 +42276,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, 3878, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3901, __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, 3878, __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, 3901, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -42244,19 +42290,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, 3878, __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, 3901, __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, 3878, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3901, __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, 3878, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3901, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -42265,7 +42311,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":3877 + /* "netCDF4/_netCDF4.pyx":3900 * except: # isnan fails on some dtypes (issue 202) * fvalisnan = False * if fvalisnan: # <<<<<<<<<<<<<< @@ -42275,15 +42321,15 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ goto __pyx_L48; } - /* "netCDF4/_netCDF4.pyx":3879 + /* "netCDF4/_netCDF4.pyx":3902 * 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, 3879, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_any); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3879, __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, 3902, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_any); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; @@ -42297,29 +42343,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, 3879, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3902, __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, 3879, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3902, __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, 3879, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3902, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_9) { - /* "netCDF4/_netCDF4.pyx":3880 + /* "netCDF4/_netCDF4.pyx":3903 * 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, 3880, __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, 3903, __pyx_L1_error) __pyx_v_mask = __pyx_t_2; __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":3879 + /* "netCDF4/_netCDF4.pyx":3902 * if fvalisnan: * mask = numpy.isnan(data) * elif (data == fval).any(): # <<<<<<<<<<<<<< @@ -42329,7 +42375,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ goto __pyx_L48; } - /* "netCDF4/_netCDF4.pyx":3882 + /* "netCDF4/_netCDF4.pyx":3905 * mask = data==fval * else: * mask = None # <<<<<<<<<<<<<< @@ -42342,7 +42388,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ } __pyx_L48:; - /* "netCDF4/_netCDF4.pyx":3883 + /* "netCDF4/_netCDF4.pyx":3906 * else: * mask = None * if mask is not None: # <<<<<<<<<<<<<< @@ -42353,7 +42399,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":3884 + /* "netCDF4/_netCDF4.pyx":3907 * mask = None * if mask is not None: * if fill_value is None: # <<<<<<<<<<<<<< @@ -42364,7 +42410,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":3885 + /* "netCDF4/_netCDF4.pyx":3908 * if mask is not None: * if fill_value is None: * fill_value = fval # <<<<<<<<<<<<<< @@ -42374,7 +42420,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":3884 + /* "netCDF4/_netCDF4.pyx":3907 * mask = None * if mask is not None: * if fill_value is None: # <<<<<<<<<<<<<< @@ -42383,19 +42429,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":3886 + /* "netCDF4/_netCDF4.pyx":3909 * 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, 3886, __pyx_L1_error) + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_totalmask, __pyx_v_mask); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3909, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_totalmask, __pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":3883 + /* "netCDF4/_netCDF4.pyx":3906 * else: * mask = None * if mask is not None: # <<<<<<<<<<<<<< @@ -42404,7 +42450,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":3870 + /* "netCDF4/_netCDF4.pyx":3893 * totalmask += mvalmask * # set mask=True for missing data * if hasattr(self, '_FillValue'): # <<<<<<<<<<<<<< @@ -42414,7 +42460,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ goto __pyx_L37; } - /* "netCDF4/_netCDF4.pyx":3890 + /* "netCDF4/_netCDF4.pyx":3913 * # is disabled. * else: * with nogil: # <<<<<<<<<<<<<< @@ -42429,7 +42475,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":3891 + /* "netCDF4/_netCDF4.pyx":3914 * else: * with nogil: * ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL) # <<<<<<<<<<<<<< @@ -42439,7 +42485,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":3890 + /* "netCDF4/_netCDF4.pyx":3913 * # is disabled. * else: * with nogil: # <<<<<<<<<<<<<< @@ -42457,7 +42503,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ } } - /* "netCDF4/_netCDF4.pyx":3892 + /* "netCDF4/_netCDF4.pyx":3915 * with nogil: * ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -42467,7 +42513,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":3893 + /* "netCDF4/_netCDF4.pyx":3916 * ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -42475,22 +42521,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, 3893, __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, 3916, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3893, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3916, __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, 3893, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3916, __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, 3893, __pyx_L1_error) + __PYX_ERR(0, 3916, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3892 + /* "netCDF4/_netCDF4.pyx":3915 * with nogil: * ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -42499,7 +42545,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":3906 + /* "netCDF4/_netCDF4.pyx":3929 * # 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']: # <<<<<<<<<<<<<< @@ -42512,18 +42558,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, 3906, __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, 3929, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_t_2, 1, 0, NULL, NULL, &__pyx_slice__59, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3906, __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, 3929, __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, 3906, __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, 3929, __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, 3906, __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, 3929, __pyx_L1_error) __pyx_t_10 = __pyx_t_8; __pyx_L58_bool_binop_done:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -42532,26 +42578,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":3907 + /* "netCDF4/_netCDF4.pyx":3930 * # 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, 3907, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3930, __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, 3907, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3930, __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, 3907, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_fillvals); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3930, __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, 3907, __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, 3930, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_1, 1, 0, NULL, NULL, &__pyx_slice__60, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3907, __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, 3930, __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, 3907, __pyx_L1_error) + __pyx_t_1 = PyObject_GetItem(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3930, __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; @@ -42570,7 +42616,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, 3907, __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, 3930, __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; @@ -42579,14 +42625,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, 3907, __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, 3930, __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, 3907, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3930, __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; @@ -42597,7 +42643,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, 3907, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3930, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -42605,31 +42651,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":3908 + /* "netCDF4/_netCDF4.pyx":3931 * 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, 3908, __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, 3931, __pyx_L1_error) __pyx_v_has_fillval = __pyx_t_4; __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":3911 + /* "netCDF4/_netCDF4.pyx":3934 * # 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, 3911, __pyx_L1_error) - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3911, __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, 3934, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3934, __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, 3911, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3934, __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, 3911, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3934, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; @@ -42643,13 +42689,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, 3911, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_has_fillval); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3934, __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, 3911, __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, 3934, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_4); } else @@ -42657,19 +42703,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, 3911, __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, 3934, __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, 3911, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3934, __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, 3911, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3934, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } @@ -42679,14 +42725,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ __pyx_t_4 = 0; } - /* "netCDF4/_netCDF4.pyx":3912 + /* "netCDF4/_netCDF4.pyx":3935 * # 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, 3912, __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, 3935, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -42699,29 +42745,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, 3912, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3935, __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, 3912, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3935, __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, 3912, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3935, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_9) { - /* "netCDF4/_netCDF4.pyx":3913 + /* "netCDF4/_netCDF4.pyx":3936 * 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, 3913, __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, 3936, __pyx_L1_error) __pyx_v_mask = __pyx_t_4; __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":3914 + /* "netCDF4/_netCDF4.pyx":3937 * if has_fillval.any(): * mask=data==fillval * if fill_value is None: # <<<<<<<<<<<<<< @@ -42732,7 +42778,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":3915 + /* "netCDF4/_netCDF4.pyx":3938 * mask=data==fillval * if fill_value is None: * fill_value = fillval # <<<<<<<<<<<<<< @@ -42742,7 +42788,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":3914 + /* "netCDF4/_netCDF4.pyx":3937 * if has_fillval.any(): * mask=data==fillval * if fill_value is None: # <<<<<<<<<<<<<< @@ -42751,19 +42797,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":3916 + /* "netCDF4/_netCDF4.pyx":3939 * 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, 3916, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_totalmask, __pyx_v_mask); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3939, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_totalmask, __pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":3912 + /* "netCDF4/_netCDF4.pyx":3935 * # in that case convert to an array. * if type(has_fillval) == bool: has_fillval=numpy.asarray(has_fillval) * if has_fillval.any(): # <<<<<<<<<<<<<< @@ -42772,7 +42818,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":3906 + /* "netCDF4/_netCDF4.pyx":3929 * # 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']: # <<<<<<<<<<<<<< @@ -42783,7 +42829,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ } __pyx_L37:; - /* "netCDF4/_netCDF4.pyx":3920 + /* "netCDF4/_netCDF4.pyx":3943 * # masked. fill_value set to missing_value if it exists, * # otherwise _FillValue. * if fill_value is not None: # <<<<<<<<<<<<<< @@ -42794,28 +42840,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":3921 + /* "netCDF4/_netCDF4.pyx":3944 * # 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, 3921, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3944, __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, 3921, __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, 3944, __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, 3921, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3944, __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, 3921, __pyx_L1_error) + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3944, __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, 3921, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_fill_value, __pyx_v_fill_value) < 0) __PYX_ERR(0, 3921, __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, 3921, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_mask, __pyx_v_totalmask) < 0) __PYX_ERR(0, 3944, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_fill_value, __pyx_v_fill_value) < 0) __PYX_ERR(0, 3944, __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, 3944, __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; @@ -42823,27 +42869,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":3925 + /* "netCDF4/_netCDF4.pyx":3948 * # 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, 3925, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3948, __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, 3925, __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, 3948, __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, 3925, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3948, __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, 3925, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_mask); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3948, __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, 3925, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_all); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3948, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; @@ -42857,32 +42903,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, 3925, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3948, __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, 3925, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3948, __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, 3925, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3948, __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":3926 + /* "netCDF4/_netCDF4.pyx":3949 * # 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, 3926, __pyx_L1_error) + __pyx_t_1 = PyObject_GetItem(__pyx_v_data, Py_Ellipsis); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3949, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":3925 + /* "netCDF4/_netCDF4.pyx":3948 * # to numpy.ma.MaskedConstant to be consistent with slicing * # behavior of masked arrays. * if data.shape == () and data.mask.all(): # <<<<<<<<<<<<<< @@ -42891,7 +42937,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":3920 + /* "netCDF4/_netCDF4.pyx":3943 * # masked. fill_value set to missing_value if it exists, * # otherwise _FillValue. * if fill_value is not None: # <<<<<<<<<<<<<< @@ -42900,7 +42946,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":3927 + /* "netCDF4/_netCDF4.pyx":3950 * if data.shape == () and data.mask.all(): * data = data[...] * return data # <<<<<<<<<<<<<< @@ -42912,7 +42958,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":3804 + /* "netCDF4/_netCDF4.pyx":3827 * return data * * def _toma(self,data): # <<<<<<<<<<<<<< @@ -42950,7 +42996,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_ return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":3929 +/* "netCDF4/_netCDF4.pyx":3952 * return data * * def _assign_vlen(self, elem, data): # <<<<<<<<<<<<<< @@ -42987,11 +43033,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, 3929, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_assign_vlen", 1, 2, 2, 1); __PYX_ERR(0, 3952, __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, 3929, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_assign_vlen") < 0)) __PYX_ERR(0, 3952, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -43004,7 +43050,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, 3929, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_assign_vlen", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3952, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("netCDF4._netCDF4.Variable._assign_vlen", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -43049,31 +43095,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":3937 + /* "netCDF4/_netCDF4.pyx":3960 * 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, 3937, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3960, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":3938 + /* "netCDF4/_netCDF4.pyx":3961 * 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__61, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3938, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3961, __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, 3938, __pyx_L1_error) + __PYX_ERR(0, 3961, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3937 + /* "netCDF4/_netCDF4.pyx":3960 * cdef char **strdata * cdef ndarray data2 * if not self._isvlen: # <<<<<<<<<<<<<< @@ -43082,17 +43128,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p */ } - /* "netCDF4/_netCDF4.pyx":3939 + /* "netCDF4/_netCDF4.pyx":3962 * 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, 3939, __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, 3962, __pyx_L1_error) __pyx_v_ndims = __pyx_t_4; - /* "netCDF4/_netCDF4.pyx":3940 + /* "netCDF4/_netCDF4.pyx":3963 * 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" # <<<<<<<<<<<<<< @@ -43102,7 +43148,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":3943 + /* "netCDF4/_netCDF4.pyx":3966 * # check to see that elem is a tuple of integers. * # handle negative integers. * if isinstance(elem, int): # <<<<<<<<<<<<<< @@ -43113,7 +43159,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":3944 + /* "netCDF4/_netCDF4.pyx":3967 * # handle negative integers. * if isinstance(elem, int): * if ndims > 1: # <<<<<<<<<<<<<< @@ -43123,26 +43169,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":3945 + /* "netCDF4/_netCDF4.pyx":3968 * 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, 3945, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3968, __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, 3945, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3968, __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, 3945, __pyx_L1_error) + __PYX_ERR(0, 3968, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3944 + /* "netCDF4/_netCDF4.pyx":3967 * # handle negative integers. * if isinstance(elem, int): * if ndims > 1: # <<<<<<<<<<<<<< @@ -43151,58 +43197,58 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p */ } - /* "netCDF4/_netCDF4.pyx":3946 + /* "netCDF4/_netCDF4.pyx":3969 * 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, 3946, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3946, __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, 3969, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3969, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":3947 + /* "netCDF4/_netCDF4.pyx":3970 * 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, 3947, __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, 3970, __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, 3947, __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, 3970, __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, 3947, __pyx_L1_error) + __pyx_t_5 = PyNumber_Add(__pyx_t_3, __pyx_v_elem); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3970, __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, 3947, __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, 3970, __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, 3947, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3970, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":3948 + /* "netCDF4/_netCDF4.pyx":3971 * 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, 3948, __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, 3971, __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, 3948, __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, 3971, __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, 3948, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_t_5, __pyx_v_elem); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3971, __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":3947 + /* "netCDF4/_netCDF4.pyx":3970 * raise IndexError(msg) * if elem < 0: * if self.shape[0]+elem >= 0: # <<<<<<<<<<<<<< @@ -43212,7 +43258,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p goto __pyx_L7; } - /* "netCDF4/_netCDF4.pyx":3950 + /* "netCDF4/_netCDF4.pyx":3973 * elem = self.shape[0]+elem * else: * raise IndexError("Illegal index") # <<<<<<<<<<<<<< @@ -43220,15 +43266,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__62, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3950, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3973, __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, 3950, __pyx_L1_error) + __PYX_ERR(0, 3973, __pyx_L1_error) } __pyx_L7:; - /* "netCDF4/_netCDF4.pyx":3946 + /* "netCDF4/_netCDF4.pyx":3969 * if ndims > 1: * raise IndexError(msg) * if elem < 0: # <<<<<<<<<<<<<< @@ -43237,7 +43283,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p */ } - /* "netCDF4/_netCDF4.pyx":3943 + /* "netCDF4/_netCDF4.pyx":3966 * # check to see that elem is a tuple of integers. * # handle negative integers. * if isinstance(elem, int): # <<<<<<<<<<<<<< @@ -43247,7 +43293,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p goto __pyx_L4; } - /* "netCDF4/_netCDF4.pyx":3951 + /* "netCDF4/_netCDF4.pyx":3974 * else: * raise IndexError("Illegal index") * elif isinstance(elem, tuple): # <<<<<<<<<<<<<< @@ -43258,31 +43304,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":3952 + /* "netCDF4/_netCDF4.pyx":3975 * 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, 3952, __pyx_L1_error) + __pyx_t_6 = PyObject_Length(__pyx_v_elem); if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(0, 3975, __pyx_L1_error) __pyx_t_2 = ((__pyx_t_6 != __pyx_v_ndims) != 0); if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":3953 + /* "netCDF4/_netCDF4.pyx":3976 * 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__63, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3953, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__67, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3976, __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, 3953, __pyx_L1_error) + __PYX_ERR(0, 3976, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3952 + /* "netCDF4/_netCDF4.pyx":3975 * raise IndexError("Illegal index") * elif isinstance(elem, tuple): * if len(elem) != ndims: # <<<<<<<<<<<<<< @@ -43291,19 +43337,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p */ } - /* "netCDF4/_netCDF4.pyx":3954 + /* "netCDF4/_netCDF4.pyx":3977 * 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, 3954, __pyx_L1_error) + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3977, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_elemnew = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":3955 + /* "netCDF4/_netCDF4.pyx":3978 * raise IndexError("Illegal index") * elemnew = [] * for n,e in enumerate(elem): # <<<<<<<<<<<<<< @@ -43315,26 +43361,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, 3955, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_elem); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3978, __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, 3955, __pyx_L1_error) + __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3978, __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, 3955, __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, 3978, __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, 3955, __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, 3978, __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, 3955, __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, 3978, __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, 3955, __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, 3978, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } @@ -43344,7 +43390,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, 3955, __pyx_L1_error) + else __PYX_ERR(0, 3978, __pyx_L1_error) } break; } @@ -43355,7 +43401,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":3956 + /* "netCDF4/_netCDF4.pyx":3979 * elemnew = [] * for n,e in enumerate(elem): * if not isinstance(e, int): # <<<<<<<<<<<<<< @@ -43366,26 +43412,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":3957 + /* "netCDF4/_netCDF4.pyx":3980 * 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, 3957, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3980, __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, 3957, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3980, __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, 3957, __pyx_L1_error) + __PYX_ERR(0, 3980, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3956 + /* "netCDF4/_netCDF4.pyx":3979 * elemnew = [] * for n,e in enumerate(elem): * if not isinstance(e, int): # <<<<<<<<<<<<<< @@ -43394,62 +43440,62 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p */ } - /* "netCDF4/_netCDF4.pyx":3958 + /* "netCDF4/_netCDF4.pyx":3981 * 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, 3958, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3958, __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, 3981, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3981, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":3959 + /* "netCDF4/_netCDF4.pyx":3982 * 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, 3959, __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, 3982, __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, 3959, __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, 3982, __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, 3959, __pyx_L1_error) + __pyx_t_8 = PyNumber_Add(__pyx_t_5, __pyx_v_e); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3982, __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":3960 + /* "netCDF4/_netCDF4.pyx":3983 * 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, 3960, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3960, __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, 3983, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3983, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":3961 + /* "netCDF4/_netCDF4.pyx":3984 * 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__64, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3961, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__68, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3984, __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, 3961, __pyx_L1_error) + __PYX_ERR(0, 3984, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3960 + /* "netCDF4/_netCDF4.pyx":3983 * elif e < 0: * enew = self.shape[n]+e * if enew < 0: # <<<<<<<<<<<<<< @@ -43458,7 +43504,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p */ } - /* "netCDF4/_netCDF4.pyx":3963 + /* "netCDF4/_netCDF4.pyx":3986 * raise IndexError("Illegal index") * else: * elemnew.append(self.shape[n]+e) # <<<<<<<<<<<<<< @@ -43466,19 +43512,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, 3963, __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, 3986, __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, 3963, __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, 3986, __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, 3963, __pyx_L1_error) + __pyx_t_8 = PyNumber_Add(__pyx_t_5, __pyx_v_e); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3986, __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, 3963, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_elemnew, __pyx_t_8); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 3986, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } - /* "netCDF4/_netCDF4.pyx":3958 + /* "netCDF4/_netCDF4.pyx":3981 * if not isinstance(e, int): * raise IndexError(msg) * elif e < 0: # <<<<<<<<<<<<<< @@ -43488,7 +43534,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p goto __pyx_L11; } - /* "netCDF4/_netCDF4.pyx":3965 + /* "netCDF4/_netCDF4.pyx":3988 * elemnew.append(self.shape[n]+e) * else: * elemnew.append(e) # <<<<<<<<<<<<<< @@ -43496,11 +43542,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, 3965, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_elemnew, __pyx_v_e); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 3988, __pyx_L1_error) } __pyx_L11:; - /* "netCDF4/_netCDF4.pyx":3955 + /* "netCDF4/_netCDF4.pyx":3978 * raise IndexError("Illegal index") * elemnew = [] * for n,e in enumerate(elem): # <<<<<<<<<<<<<< @@ -43510,19 +43556,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":3966 + /* "netCDF4/_netCDF4.pyx":3989 * 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, 3966, __pyx_L1_error) + __pyx_t_3 = PyList_AsTuple(__pyx_v_elemnew); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3989, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_elem, __pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":3951 + /* "netCDF4/_netCDF4.pyx":3974 * else: * raise IndexError("Illegal index") * elif isinstance(elem, tuple): # <<<<<<<<<<<<<< @@ -43532,7 +43578,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p goto __pyx_L4; } - /* "netCDF4/_netCDF4.pyx":3968 + /* "netCDF4/_netCDF4.pyx":3991 * elem = tuple(elemnew) * else: * raise IndexError(msg) # <<<<<<<<<<<<<< @@ -43540,21 +43586,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, 3968, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3991, __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, 3968, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3991, __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, 3968, __pyx_L1_error) + __PYX_ERR(0, 3991, __pyx_L1_error) } __pyx_L4:; - /* "netCDF4/_netCDF4.pyx":3970 + /* "netCDF4/_netCDF4.pyx":3993 * raise IndexError(msg) * # set start, count * if isinstance(elem, tuple): # <<<<<<<<<<<<<< @@ -43565,19 +43611,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":3971 + /* "netCDF4/_netCDF4.pyx":3994 * # 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, 3971, __pyx_L1_error) + __pyx_t_8 = PySequence_List(__pyx_v_elem); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3994, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_v_start = ((PyObject*)__pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":3970 + /* "netCDF4/_netCDF4.pyx":3993 * raise IndexError(msg) * # set start, count * if isinstance(elem, tuple): # <<<<<<<<<<<<<< @@ -43587,7 +43633,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p goto __pyx_L13; } - /* "netCDF4/_netCDF4.pyx":3973 + /* "netCDF4/_netCDF4.pyx":3996 * start = list(elem) * else: * start = [elem] # <<<<<<<<<<<<<< @@ -43595,7 +43641,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, 3973, __pyx_L1_error) + __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3996, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_elem); __Pyx_GIVEREF(__pyx_v_elem); @@ -43605,14 +43651,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p } __pyx_L13:; - /* "netCDF4/_netCDF4.pyx":3974 + /* "netCDF4/_netCDF4.pyx":3997 * 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, 3974, __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, 3997, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < __pyx_v_ndims; __pyx_temp++) { @@ -43624,7 +43670,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":3975 + /* "netCDF4/_netCDF4.pyx":3998 * start = [elem] * count = [1]*ndims * startp = malloc(sizeof(size_t) * ndims) # <<<<<<<<<<<<<< @@ -43633,7 +43679,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":3976 + /* "netCDF4/_netCDF4.pyx":3999 * count = [1]*ndims * startp = malloc(sizeof(size_t) * ndims) * countp = malloc(sizeof(size_t) * ndims) # <<<<<<<<<<<<<< @@ -43642,7 +43688,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":3977 + /* "netCDF4/_netCDF4.pyx":4000 * startp = malloc(sizeof(size_t) * ndims) * countp = malloc(sizeof(size_t) * ndims) * for n from 0 <= n < ndims: # <<<<<<<<<<<<<< @@ -43652,46 +43698,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":3978 + /* "netCDF4/_netCDF4.pyx":4001 * 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, 3978, __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, 4001, __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, 3978, __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, 4001, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; (__pyx_v_startp[__pyx_v_n]) = __pyx_t_10; - /* "netCDF4/_netCDF4.pyx":3979 + /* "netCDF4/_netCDF4.pyx":4002 * 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, 3979, __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, 4002, __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, 3979, __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, 4002, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; (__pyx_v_countp[__pyx_v_n]) = __pyx_t_10; } - /* "netCDF4/_netCDF4.pyx":3980 + /* "netCDF4/_netCDF4.pyx":4003 * 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, 3980, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3980, __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, 4003, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4003, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":3981 + /* "netCDF4/_netCDF4.pyx":4004 * countp[n] = count[n] * if self.dtype == str: # VLEN string * strdata = malloc(sizeof(char *)) # <<<<<<<<<<<<<< @@ -43700,29 +43746,29 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p */ __pyx_v_strdata = ((char **)malloc((sizeof(char *)))); - /* "netCDF4/_netCDF4.pyx":3982 + /* "netCDF4/_netCDF4.pyx":4005 * 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, 3982, __pyx_L1_error) + __pyx_t_8 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_data, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4005, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_v_bytestr = __pyx_t_8; __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":3983 + /* "netCDF4/_netCDF4.pyx":4006 * 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, 3983, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(0, 4006, __pyx_L1_error) (__pyx_v_strdata[0]) = __pyx_t_11; - /* "netCDF4/_netCDF4.pyx":3984 + /* "netCDF4/_netCDF4.pyx":4007 * bytestr = _strencode(data) * strdata[0] = bytestr * ierr = nc_put_vara(self._grpid, self._varid, # <<<<<<<<<<<<<< @@ -43731,7 +43777,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":3986 + /* "netCDF4/_netCDF4.pyx":4009 * ierr = nc_put_vara(self._grpid, self._varid, * startp, countp, strdata) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -43741,7 +43787,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":3987 + /* "netCDF4/_netCDF4.pyx":4010 * startp, countp, strdata) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -43749,22 +43795,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, 3987, __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, 4010, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3987, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4010, __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, 3987, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4010, __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, 3987, __pyx_L1_error) + __PYX_ERR(0, 4010, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3986 + /* "netCDF4/_netCDF4.pyx":4009 * ierr = nc_put_vara(self._grpid, self._varid, * startp, countp, strdata) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -43773,7 +43819,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p */ } - /* "netCDF4/_netCDF4.pyx":3988 + /* "netCDF4/_netCDF4.pyx":4011 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * free(strdata) # <<<<<<<<<<<<<< @@ -43782,7 +43828,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p */ free(__pyx_v_strdata); - /* "netCDF4/_netCDF4.pyx":3980 + /* "netCDF4/_netCDF4.pyx":4003 * startp[n] = start[n] * countp[n] = count[n] * if self.dtype == str: # VLEN string # <<<<<<<<<<<<<< @@ -43792,7 +43838,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p goto __pyx_L16; } - /* "netCDF4/_netCDF4.pyx":3990 + /* "netCDF4/_netCDF4.pyx":4013 * free(strdata) * else: # regular VLEN * if data.dtype != self.dtype: # <<<<<<<<<<<<<< @@ -43800,24 +43846,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, 3990, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4013, __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, 3990, __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, 4013, __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, 3990, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4013, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":3991 + /* "netCDF4/_netCDF4.pyx":4014 * 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, 3991, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4014, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3991, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4014, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_self->dtype); __Pyx_GIVEREF(__pyx_v_self->dtype); @@ -43825,22 +43871,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, 3991, __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, 4014, __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, 3991, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4014, __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, 3991, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4014, __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, 3991, __pyx_L1_error) + __PYX_ERR(0, 4014, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3990 + /* "netCDF4/_netCDF4.pyx":4013 * free(strdata) * else: # regular VLEN * if data.dtype != self.dtype: # <<<<<<<<<<<<<< @@ -43849,20 +43895,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p */ } - /* "netCDF4/_netCDF4.pyx":3992 + /* "netCDF4/_netCDF4.pyx":4015 * 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, 3992, __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, 4015, __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":3993 + /* "netCDF4/_netCDF4.pyx":4016 * raise TypeError("wrong data type: should be %s, got %s" % (self.dtype,data.dtype)) * data2 = data * vldata = malloc(sizeof(nc_vlen_t)) # <<<<<<<<<<<<<< @@ -43871,7 +43917,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":3994 + /* "netCDF4/_netCDF4.pyx":4017 * data2 = data * vldata = malloc(sizeof(nc_vlen_t)) * vldata[0].len = PyArray_SIZE(data2) # <<<<<<<<<<<<<< @@ -43880,7 +43926,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":3995 + /* "netCDF4/_netCDF4.pyx":4018 * vldata = malloc(sizeof(nc_vlen_t)) * vldata[0].len = PyArray_SIZE(data2) * vldata[0].p = data2.data # <<<<<<<<<<<<<< @@ -43890,7 +43936,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":3996 + /* "netCDF4/_netCDF4.pyx":4019 * vldata[0].len = PyArray_SIZE(data2) * vldata[0].p = data2.data * ierr = nc_put_vara(self._grpid, self._varid, # <<<<<<<<<<<<<< @@ -43899,7 +43945,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":3998 + /* "netCDF4/_netCDF4.pyx":4021 * ierr = nc_put_vara(self._grpid, self._varid, * startp, countp, vldata) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -43909,7 +43955,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":3999 + /* "netCDF4/_netCDF4.pyx":4022 * startp, countp, vldata) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -43917,22 +43963,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, 3999, __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, 4022, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3999, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4022, __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, 3999, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4022, __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, 3999, __pyx_L1_error) + __PYX_ERR(0, 4022, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":3998 + /* "netCDF4/_netCDF4.pyx":4021 * ierr = nc_put_vara(self._grpid, self._varid, * startp, countp, vldata) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -43941,7 +43987,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p */ } - /* "netCDF4/_netCDF4.pyx":4000 + /* "netCDF4/_netCDF4.pyx":4023 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * free(vldata) # <<<<<<<<<<<<<< @@ -43952,7 +43998,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p } __pyx_L16:; - /* "netCDF4/_netCDF4.pyx":4001 + /* "netCDF4/_netCDF4.pyx":4024 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * free(vldata) * free(startp) # <<<<<<<<<<<<<< @@ -43961,7 +44007,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p */ free(__pyx_v_startp); - /* "netCDF4/_netCDF4.pyx":4002 + /* "netCDF4/_netCDF4.pyx":4025 * free(vldata) * free(startp) * free(countp) # <<<<<<<<<<<<<< @@ -43970,7 +44016,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p */ free(__pyx_v_countp); - /* "netCDF4/_netCDF4.pyx":3929 + /* "netCDF4/_netCDF4.pyx":3952 * return data * * def _assign_vlen(self, elem, data): # <<<<<<<<<<<<<< @@ -44002,7 +44048,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4004 +/* "netCDF4/_netCDF4.pyx":4027 * free(countp) * * def __setitem__(self, elem, data): # <<<<<<<<<<<<<< @@ -44061,54 +44107,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":4011 + /* "netCDF4/_netCDF4.pyx":4034 * # 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, 4011, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4034, __pyx_L1_error) if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":4012 + /* "netCDF4/_netCDF4.pyx":4035 * * 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, 4012, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4012, __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, 4035, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4035, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":4016 + /* "netCDF4/_netCDF4.pyx":4039 * # 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, 4016, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4039, __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, 4016, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ndarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4039, __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, 4016, __pyx_L1_error) + __pyx_t_1 = PyObject_IsInstance(__pyx_v_data, __pyx_t_3); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 4039, __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":4018 + /* "netCDF4/_netCDF4.pyx":4041 * 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, 4018, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4018, __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, 4041, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4041, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { } else { @@ -44116,19 +44162,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ goto __pyx_L7_bool_binop_done; } - /* "netCDF4/_netCDF4.pyx":4019 + /* "netCDF4/_netCDF4.pyx":4042 * # 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, 4019, __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, 4042, __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, 4019, __pyx_L1_error) + __pyx_t_5 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(0, 4042, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":4018 + /* "netCDF4/_netCDF4.pyx":4041 * if not isinstance(data, numpy.ndarray): * # issue 458, allow Ellipsis to be used for scalar var * if type(elem) == type(Ellipsis) and not\ # <<<<<<<<<<<<<< @@ -44140,7 +44186,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":4019 + /* "netCDF4/_netCDF4.pyx":4042 * # issue 458, allow Ellipsis to be used for scalar var * if type(elem) == type(Ellipsis) and not\ * len(self.dimensions): elem = 0 # <<<<<<<<<<<<<< @@ -44150,7 +44196,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":4018 + /* "netCDF4/_netCDF4.pyx":4041 * if not isinstance(data, numpy.ndarray): * # issue 458, allow Ellipsis to be used for scalar var * if type(elem) == type(Ellipsis) and not\ # <<<<<<<<<<<<<< @@ -44159,14 +44205,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":4020 + /* "netCDF4/_netCDF4.pyx":4043 * 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, 4020, __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, 4043, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = NULL; __pyx_t_7 = 0; @@ -44183,7 +44229,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, 4020, __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, 4043, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -44191,13 +44237,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, 4020, __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, 4043, __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, 4020, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4043, __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; @@ -44208,14 +44254,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, 4020, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4043, __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":4021 + /* "netCDF4/_netCDF4.pyx":4044 * len(self.dimensions): elem = 0 * self._assign_vlen(elem, data) * return # <<<<<<<<<<<<<< @@ -44225,7 +44271,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __pyx_r = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":4016 + /* "netCDF4/_netCDF4.pyx":4039 * # 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): # <<<<<<<<<<<<<< @@ -44234,41 +44280,41 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":4022 + /* "netCDF4/_netCDF4.pyx":4045 * 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, 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, 4045, __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, 4022, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_kind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4045, __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, 4022, __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, 4045, __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, 4022, __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, 4045, __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":4023 + /* "netCDF4/_netCDF4.pyx":4046 * 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, 4023, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4046, __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, 4023, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_isMA); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4046, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -44282,13 +44328,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, 4023, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4046, __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, 4023, __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, 4046, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -44296,29 +44342,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, 4023, __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, 4046, __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, 4023, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4046, __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, 4023, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4046, __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, 4023, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4046, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":4024 + /* "netCDF4/_netCDF4.pyx":4047 * elif data.dtype.kind in ['S', 'U']: * if ma.isMA(data): * msg='masked arrays cannot be assigned by VLEN str slices' # <<<<<<<<<<<<<< @@ -44328,26 +44374,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":4025 + /* "netCDF4/_netCDF4.pyx":4048 * 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, 4025, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4048, __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, 4025, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4048, __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, 4025, __pyx_L1_error) + __PYX_ERR(0, 4048, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4023 + /* "netCDF4/_netCDF4.pyx":4046 * return * elif data.dtype.kind in ['S', 'U']: * if ma.isMA(data): # <<<<<<<<<<<<<< @@ -44356,14 +44402,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":4026 + /* "netCDF4/_netCDF4.pyx":4049 * 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, 4026, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_astype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -44376,13 +44422,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, 4026, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_builtin_object); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4049, __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, 4026, __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, 4049, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_8); } else @@ -44390,19 +44436,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, 4026, __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, 4049, __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, 4026, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4049, __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, 4026, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -44411,7 +44457,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":4022 + /* "netCDF4/_netCDF4.pyx":4045 * self._assign_vlen(elem, data) * return * elif data.dtype.kind in ['S', 'U']: # <<<<<<<<<<<<<< @@ -44421,23 +44467,23 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ goto __pyx_L5; } - /* "netCDF4/_netCDF4.pyx":4027 + /* "netCDF4/_netCDF4.pyx":4050 * 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, 4027, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4050, __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, 4027, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_kind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4050, __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, 4027, __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, 4050, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":4028 + /* "netCDF4/_netCDF4.pyx":4051 * data = data.astype(object) * elif data.dtype.kind != 'O': * msg = ('only numpy string, unicode or object arrays can ' # <<<<<<<<<<<<<< @@ -44447,26 +44493,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":4030 + /* "netCDF4/_netCDF4.pyx":4053 * 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, 4030, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4053, __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, 4030, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4053, __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, 4030, __pyx_L1_error) + __PYX_ERR(0, 4053, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4027 + /* "netCDF4/_netCDF4.pyx":4050 * raise TypeError(msg) * data = data.astype(object) * elif data.dtype.kind != 'O': # <<<<<<<<<<<<<< @@ -44476,7 +44522,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ } __pyx_L5:; - /* "netCDF4/_netCDF4.pyx":4012 + /* "netCDF4/_netCDF4.pyx":4035 * * if self._isvlen: # if vlen, should be object array (don't try casting) * if self.dtype == str: # <<<<<<<<<<<<<< @@ -44486,7 +44532,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ goto __pyx_L4; } - /* "netCDF4/_netCDF4.pyx":4035 + /* "netCDF4/_netCDF4.pyx":4058 * # 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': # <<<<<<<<<<<<<< @@ -44494,12 +44540,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, 4035, __pyx_L1_error) + __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4058, __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, 4035, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_ndarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4058, __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, 4035, __pyx_L1_error) + __pyx_t_4 = PyObject_IsInstance(__pyx_v_data, __pyx_t_2); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 4058, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9 = ((!(__pyx_t_4 != 0)) != 0); if (!__pyx_t_9) { @@ -44507,26 +44553,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, 4035, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4058, __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, 4035, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_kind); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4058, __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, 4035, __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, 4058, __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":4037 + /* "netCDF4/_netCDF4.pyx":4060 * 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, 4037, __pyx_L1_error) - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 4037, __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, 4060, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 4060, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_9) { } else { @@ -44534,19 +44580,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ goto __pyx_L16_bool_binop_done; } - /* "netCDF4/_netCDF4.pyx":4038 + /* "netCDF4/_netCDF4.pyx":4061 * # 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, 4038, __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, 4061, __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, 4038, __pyx_L1_error) + __pyx_t_5 = PyObject_Length(__pyx_t_8); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(0, 4061, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":4037 + /* "netCDF4/_netCDF4.pyx":4060 * 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\ # <<<<<<<<<<<<<< @@ -44558,7 +44604,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":4038 + /* "netCDF4/_netCDF4.pyx":4061 * # issue 458, allow Ellipsis to be used for scalar var * if type(elem) == type(Ellipsis) and not\ * len(self.dimensions): elem = 0 # <<<<<<<<<<<<<< @@ -44568,7 +44614,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":4037 + /* "netCDF4/_netCDF4.pyx":4060 * 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\ # <<<<<<<<<<<<<< @@ -44577,14 +44623,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":4039 + /* "netCDF4/_netCDF4.pyx":4062 * 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, 4039, __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, 4062, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_7 = 0; @@ -44601,7 +44647,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, 4039, __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, 4062, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_8); } else @@ -44609,13 +44655,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, 4039, __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, 4062, __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, 4039, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4062, __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; @@ -44626,14 +44672,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, 4039, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4062, __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":4040 + /* "netCDF4/_netCDF4.pyx":4063 * len(self.dimensions): elem = 0 * self._assign_vlen(elem, data) * return # <<<<<<<<<<<<<< @@ -44643,7 +44689,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __pyx_r = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":4035 + /* "netCDF4/_netCDF4.pyx":4058 * # 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': # <<<<<<<<<<<<<< @@ -44654,7 +44700,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ } __pyx_L4:; - /* "netCDF4/_netCDF4.pyx":4011 + /* "netCDF4/_netCDF4.pyx":4034 * # to use. * * if self._isvlen: # if vlen, should be object array (don't try casting) # <<<<<<<<<<<<<< @@ -44663,16 +44709,16 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":4044 + /* "netCDF4/_netCDF4.pyx":4067 * # 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, 4044, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4067, __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, 4044, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_isMA); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4067, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -44686,13 +44732,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, 4044, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_data); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4067, __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, 4044, __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, 4067, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_8); } else @@ -44700,25 +44746,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, 4044, __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, 4067, __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, 4044, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4067, __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, 4044, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4067, __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, 4044, __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; __pyx_t_4 = ((!__pyx_t_9) != 0); if (__pyx_t_4) { @@ -44726,18 +44772,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, 4044, __pyx_L1_error) + __pyx_t_9 = PyObject_HasAttr(__pyx_v_data, __pyx_n_s_data); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 4067, __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, 4044, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_data); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4067, __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, 4044, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_buffer); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4067, __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, 4044, __pyx_L1_error) + __pyx_t_10 = PyObject_IsInstance(__pyx_t_8, __pyx_t_6); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 4067, __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); @@ -44748,21 +44794,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":4046 + /* "netCDF4/_netCDF4.pyx":4069 * 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, 4046, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_self->scale); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 4069, __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, 4046, __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, 4069, __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, 4046, __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, 4069, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (__pyx_t_9 != 0); if (!__pyx_t_4) { @@ -44770,14 +44816,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ } else { } - /* "netCDF4/_netCDF4.pyx":4047 + /* "netCDF4/_netCDF4.pyx":4070 * # 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, 4047, __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, 4070, __pyx_L1_error) __pyx_t_9 = (__pyx_t_4 != 0); if (!__pyx_t_9) { } else { @@ -44785,12 +44831,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, 4047, __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, 4070, __pyx_L1_error) __pyx_t_4 = (__pyx_t_9 != 0); __pyx_t_1 = __pyx_t_4; __pyx_L24_bool_binop_done:; - /* "netCDF4/_netCDF4.pyx":4046 + /* "netCDF4/_netCDF4.pyx":4069 * 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 \ # <<<<<<<<<<<<<< @@ -44799,21 +44845,21 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ */ if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":4048 + /* "netCDF4/_netCDF4.pyx":4071 * 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, 4048, __pyx_L1_error) + __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4071, __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, 4048, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4071, __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, 4048, __pyx_L1_error) + __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4071, __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, 4048, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_float); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4071, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = NULL; @@ -44831,7 +44877,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, 4048, __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, 4071, __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; @@ -44840,14 +44886,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, 4048, __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, 4071, __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, 4048, __pyx_L1_error) + __pyx_t_11 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4071, __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; @@ -44858,7 +44904,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, 4048, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4071, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } @@ -44866,7 +44912,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":4046 + /* "netCDF4/_netCDF4.pyx":4069 * 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 \ # <<<<<<<<<<<<<< @@ -44876,7 +44922,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ goto __pyx_L23; } - /* "netCDF4/_netCDF4.pyx":4050 + /* "netCDF4/_netCDF4.pyx":4073 * data = numpy.array(data,numpy.float) * else: * data = numpy.array(data,self.dtype) # <<<<<<<<<<<<<< @@ -44884,9 +44930,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, 4050, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4073, __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, 4050, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4073, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -44904,7 +44950,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, 4050, __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, 4073, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_6); } else @@ -44912,13 +44958,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, 4050, __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, 4073, __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, 4050, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4073, __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; @@ -44929,7 +44975,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, 4050, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4073, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -44939,7 +44985,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ } __pyx_L23:; - /* "netCDF4/_netCDF4.pyx":4044 + /* "netCDF4/_netCDF4.pyx":4067 * # 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)): # <<<<<<<<<<<<<< @@ -44948,33 +44994,33 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":4053 + /* "netCDF4/_netCDF4.pyx":4076 * * # 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, 4053, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isenum); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4076, __pyx_L1_error) if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":4054 + /* "netCDF4/_netCDF4.pyx":4077 * # 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, 4054, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4077, __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, 4054, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4077, __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, 4054, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4077, __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, 4054, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4077, __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, 4054, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_bool); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4077, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -44992,7 +45038,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, 4054, __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, 4077, __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; @@ -45002,7 +45048,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, 4054, __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, 4077, __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; @@ -45010,7 +45056,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, 4054, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4077, __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; @@ -45021,7 +45067,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, 4054, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4077, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } @@ -45029,19 +45075,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":4055 + /* "netCDF4/_netCDF4.pyx":4078 * 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, 4055, __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, 4078, __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, 4055, __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, 4078, __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, 4055, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4078, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = NULL; @@ -45055,10 +45101,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, 4055, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4078, __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, 4055, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4078, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -45066,9 +45112,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, 4055, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4078, __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, 4055, __pyx_L1_error) + __pyx_t_13 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4078, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; for (;;) { @@ -45076,17 +45122,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, 4055, __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, 4078, __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, 4055, __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, 4078, __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, 4055, __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, 4078, __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, 4055, __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, 4078, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } @@ -45096,7 +45142,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, 4055, __pyx_L1_error) + else __PYX_ERR(0, 4078, __pyx_L1_error) } break; } @@ -45105,21 +45151,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":4056 + /* "netCDF4/_netCDF4.pyx":4079 * 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, 4056, __pyx_L1_error) - __pyx_t_12 = PyNumber_InPlaceAdd(__pyx_v_test, __pyx_t_6); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4056, __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, 4079, __pyx_L1_error) + __pyx_t_12 = PyNumber_InPlaceAdd(__pyx_v_test, __pyx_t_6); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4079, __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":4055 + /* "netCDF4/_netCDF4.pyx":4078 * if self._isenum: * test = numpy.zeros(data.shape,numpy.bool) * for val in self.datatype.enum_dict.values(): # <<<<<<<<<<<<<< @@ -45129,16 +45175,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":4057 + /* "netCDF4/_netCDF4.pyx":4080 * 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, 4057, __pyx_L1_error) + __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4080, __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, 4057, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_all); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4080, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = NULL; @@ -45152,13 +45198,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, 4057, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_test); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4080, __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, 4057, __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, 4080, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -45166,30 +45212,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, 4057, __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, 4080, __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, 4057, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4080, __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, 4057, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4080, __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, 4057, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4080, __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":4058 + /* "netCDF4/_netCDF4.pyx":4081 * test += data == val * if not numpy.all(test): * msg="trying to assign illegal value to Enum variable" # <<<<<<<<<<<<<< @@ -45199,26 +45245,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":4059 + /* "netCDF4/_netCDF4.pyx":4082 * 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, 4059, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4082, __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, 4059, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4082, __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, 4059, __pyx_L1_error) + __PYX_ERR(0, 4082, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4057 + /* "netCDF4/_netCDF4.pyx":4080 * for val in self.datatype.enum_dict.values(): * test += data == val * if not numpy.all(test): # <<<<<<<<<<<<<< @@ -45227,7 +45273,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":4053 + /* "netCDF4/_netCDF4.pyx":4076 * * # for Enum variable, make sure data is valid. * if self._isenum: # <<<<<<<<<<<<<< @@ -45236,20 +45282,20 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":4062 + /* "netCDF4/_netCDF4.pyx":4085 * * 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, 4062, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_StartCountStride); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4085, __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, 4062, __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, 4085, __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, 4062, __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, 4085, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_12 = PyTuple_New(4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4062, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4085, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_INCREF(__pyx_v_elem); __Pyx_GIVEREF(__pyx_v_elem); @@ -45263,14 +45309,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, 4062, __pyx_L1_error) + __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4085, __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, 4062, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4085, __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, 4062, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_datashape, __pyx_t_2) < 0) __PYX_ERR(0, 4085, __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, 4062, __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, 4062, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_put, Py_True) < 0) __PYX_ERR(0, 4085, __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, 4085, __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; @@ -45285,7 +45331,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, 4061, __pyx_L1_error) + __PYX_ERR(0, 4084, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -45308,7 +45354,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, 4061, __pyx_L1_error) + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 4084, __pyx_L1_error) __Pyx_GOTREF(item); *(temps[i]) = item; } @@ -45318,7 +45364,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, 4061, __pyx_L1_error) + __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4084, __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; @@ -45327,7 +45373,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, 4061, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_3), 4) < 0) __PYX_ERR(0, 4084, __pyx_L1_error) __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L33_unpacking_done; @@ -45335,11 +45381,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, 4061, __pyx_L1_error) + __PYX_ERR(0, 4084, __pyx_L1_error) __pyx_L33_unpacking_done:; } - /* "netCDF4/_netCDF4.pyx":4061 + /* "netCDF4/_netCDF4.pyx":4084 * raise ValueError(msg) * * start, count, stride, put_ind =\ # <<<<<<<<<<<<<< @@ -45355,14 +45401,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":4063 + /* "netCDF4/_netCDF4.pyx":4086 * 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, 4063, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_out_array_shape); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4086, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) { @@ -45375,13 +45421,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, 4063, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_count); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4086, __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, 4063, __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, 4086, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -45389,19 +45435,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, 4063, __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, 4086, __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, 4063, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4086, __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, 4063, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4086, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } @@ -45410,31 +45456,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":4067 + /* "netCDF4/_netCDF4.pyx":4090 * # 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, 4067, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4090, __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, 4067, __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, 4090, __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, 4067, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4090, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":4068 + /* "netCDF4/_netCDF4.pyx":4091 * # 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, 4068, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4091, __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, 4068, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_tile); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4091, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -45452,7 +45498,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, 4068, __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, 4091, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_11); } else @@ -45460,13 +45506,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, 4068, __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, 4091, __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, 4068, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4091, __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; @@ -45477,7 +45523,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, 4068, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_6, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4091, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -45485,7 +45531,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":4067 + /* "netCDF4/_netCDF4.pyx":4090 * # if a numpy scalar, create an array of the right size * # and fill with scalar values. * if data.shape == (): # <<<<<<<<<<<<<< @@ -45494,29 +45540,29 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":4071 + /* "netCDF4/_netCDF4.pyx":4094 * # 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, 4071, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4094, __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, 4071, __pyx_L1_error) + __pyx_t_5 = PyObject_Length(__pyx_t_11); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(0, 4094, __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, 4071, __pyx_L1_error) + __pyx_t_15 = PyObject_Length(__pyx_v_datashape); if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 4094, __pyx_L1_error) __pyx_t_4 = ((__pyx_t_5 != __pyx_t_15) != 0); if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":4073 + /* "netCDF4/_netCDF4.pyx":4096 * 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, 4073, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_view); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4096, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) { @@ -45529,29 +45575,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, 4073, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4096, __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, 4073, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_CallNoArg(__pyx_t_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4096, __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":4074 + /* "netCDF4/_netCDF4.pyx":4097 * # 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, 4074, __pyx_L1_error) + __pyx_t_11 = PySequence_Tuple(__pyx_v_datashape); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4097, __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, 4074, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_data, __pyx_n_s_shape, __pyx_t_11) < 0) __PYX_ERR(0, 4097, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":4071 + /* "netCDF4/_netCDF4.pyx":4094 * # reshape data array by adding extra singleton dimensions * # if needed to conform with start,count,stride. * if len(data.shape) != len(datashape): # <<<<<<<<<<<<<< @@ -45560,28 +45606,28 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":4077 + /* "netCDF4/_netCDF4.pyx":4100 * * # 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, 4077, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_start, __pyx_n_s_reshape); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4100, __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, 4077, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4100, __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, 4077, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4100, __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, 4077, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); @@ -45600,14 +45646,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, 4077, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4100, __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, 4077, __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, 4100, __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; @@ -45616,20 +45662,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, 4077, __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, 4100, __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, 4077, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4100, __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, 4077, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_8, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -45638,28 +45684,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":4078 + /* "netCDF4/_netCDF4.pyx":4101 * # 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, 4078, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_count, __pyx_n_s_reshape); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4101, __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, 4078, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4101, __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, 4078, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4101, __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, 4078, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); @@ -45678,14 +45724,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, 4078, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4101, __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, 4078, __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, 4101, __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; @@ -45694,20 +45740,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, 4078, __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, 4101, __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, 4078, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4101, __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, 4078, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_6, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -45716,28 +45762,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":4079 + /* "netCDF4/_netCDF4.pyx":4102 * 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, 4079, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_stride, __pyx_n_s_reshape); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4102, __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, 4079, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4102, __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, 4079, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4102, __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, 4079, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); @@ -45756,14 +45802,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, 4079, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4102, __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, 4079, __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, 4102, __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; @@ -45772,20 +45818,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, 4079, __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, 4102, __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, 4079, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4102, __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, 4079, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_8, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -45794,28 +45840,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":4080 + /* "netCDF4/_netCDF4.pyx":4103 * 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, 4080, __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, 4103, __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, 4080, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4103, __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, 4080, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4103, __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, 4080, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); @@ -45834,14 +45880,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, 4080, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4103, __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, 4080, __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, 4103, __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; @@ -45850,20 +45896,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, 4080, __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, 4103, __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, 4080, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4103, __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, 4080, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_6, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -45872,26 +45918,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":4084 + /* "netCDF4/_netCDF4.pyx":4107 * # 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, 4084, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_has_lsd); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4107, __pyx_L1_error) if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":4085 + /* "netCDF4/_netCDF4.pyx":4108 * # 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, 4085, __pyx_L1_error) + __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_quantize); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4108, __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, 4085, __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, 4108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = NULL; __pyx_t_7 = 0; @@ -45908,7 +45954,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, 4085, __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, 4108, __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; @@ -45917,14 +45963,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, 4085, __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, 4108, __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, 4085, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4108, __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; @@ -45935,7 +45981,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, 4085, __pyx_L1_error) + __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_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -45943,7 +45989,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":4084 + /* "netCDF4/_netCDF4.pyx":4107 * # quantize data if least_significant_digit attribute * # exists (improves compression). * if self._has_lsd: # <<<<<<<<<<<<<< @@ -45952,60 +45998,60 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":4094 + /* "netCDF4/_netCDF4.pyx":4117 * # 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, 4094, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->mask); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4117, __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, 4094, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4117, __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, 4094, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isenum); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4117, __pyx_L1_error) __pyx_t_4 = __pyx_t_1; __pyx_L46_bool_binop_done:; if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":4097 + /* "netCDF4/_netCDF4.pyx":4120 * # 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, 4097, __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, 4120, __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, 4097, __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, 4120, __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":4099 + /* "netCDF4/_netCDF4.pyx":4122 * 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, 4099, __pyx_L1_error) + __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4122, __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, 4099, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_isMA); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = NULL; @@ -46019,13 +46065,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, 4099, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_data); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4122, __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, 4099, __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, 4122, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_11); } else @@ -46033,29 +46079,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, 4099, __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, 4122, __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, 4099, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4122, __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, 4099, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4122, __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, 4099, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4122, __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, 4099, __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, 4122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { @@ -46068,13 +46114,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, 4099, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_data); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4122, __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, 4099, __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, 4122, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_11); } else @@ -46082,19 +46128,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, 4099, __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, 4122, __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, 4099, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4122, __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, 4099, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_12, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } @@ -46104,7 +46150,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __pyx_t_11 = 0; } - /* "netCDF4/_netCDF4.pyx":4097 + /* "netCDF4/_netCDF4.pyx":4120 * # use missing_value as fill value. * # if no missing value set, use _FillValue. * if hasattr(self, 'scale_factor') or hasattr(self, 'add_offset'): # <<<<<<<<<<<<<< @@ -46113,7 +46159,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":4094 + /* "netCDF4/_netCDF4.pyx":4117 * # 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): # <<<<<<<<<<<<<< @@ -46122,81 +46168,81 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":4100 + /* "netCDF4/_netCDF4.pyx":4123 * # 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, 4100, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->scale); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4123, __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, 4100, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4123, __pyx_L1_error) __pyx_t_1 = __pyx_t_4; __pyx_L54_bool_binop_done:; if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":4102 + /* "netCDF4/_netCDF4.pyx":4125 * 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, 4102, __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, 4125, __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, 4102, __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, 4125, __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":4103 + /* "netCDF4/_netCDF4.pyx":4126 * # 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, 4103, __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, 4126, __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, 4103, __pyx_L1_error) + __pyx_t_8 = PyNumber_Subtract(__pyx_v_data, __pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4126, __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, 4103, __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, 4126, __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, 4103, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyNumber_Divide(__pyx_t_8, __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4126, __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":4104 + /* "netCDF4/_netCDF4.pyx":4127 * 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, 4104, __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, 4127, __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, 4104, __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, 4127, __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, 4104, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4127, __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, 4104, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_around); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = NULL; @@ -46210,13 +46256,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, 4104, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_data); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4127, __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, 4104, __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, 4127, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_12); } else @@ -46224,19 +46270,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, 4104, __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, 4127, __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, 4104, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4127, __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, 4104, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -46246,7 +46292,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __pyx_t_12 = 0; } - /* "netCDF4/_netCDF4.pyx":4102 + /* "netCDF4/_netCDF4.pyx":4125 * 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'): # <<<<<<<<<<<<<< @@ -46256,48 +46302,48 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ goto __pyx_L56; } - /* "netCDF4/_netCDF4.pyx":4105 + /* "netCDF4/_netCDF4.pyx":4128 * 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, 4105, __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, 4128, __pyx_L1_error) __pyx_t_1 = (__pyx_t_4 != 0); if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":4106 + /* "netCDF4/_netCDF4.pyx":4129 * 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, 4106, __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, 4129, __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, 4106, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyNumber_Divide(__pyx_v_data, __pyx_t_12); 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_DECREF_SET(__pyx_v_data, __pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":4107 + /* "netCDF4/_netCDF4.pyx":4130 * 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, 4107, __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, 4130, __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, 4107, __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, 4130, __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, 4107, __pyx_L1_error) + __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4130, __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, 4107, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_around); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = NULL; @@ -46311,13 +46357,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, 4107, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_data); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4130, __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, 4107, __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, 4130, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_8); } else @@ -46325,19 +46371,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, 4107, __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, 4130, __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, 4107, __pyx_L1_error) + __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4130, __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, 4107, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } @@ -46347,7 +46393,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __pyx_t_8 = 0; } - /* "netCDF4/_netCDF4.pyx":4105 + /* "netCDF4/_netCDF4.pyx":4128 * data = (data - self.add_offset)/self.scale_factor * if self.dtype.kind in 'iu': data = numpy.around(data) * elif hasattr(self, 'scale_factor'): # <<<<<<<<<<<<<< @@ -46357,48 +46403,48 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ goto __pyx_L56; } - /* "netCDF4/_netCDF4.pyx":4108 + /* "netCDF4/_netCDF4.pyx":4131 * 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, 4108, __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, 4131, __pyx_L1_error) __pyx_t_1 = (__pyx_t_4 != 0); if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":4109 + /* "netCDF4/_netCDF4.pyx":4132 * 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, 4109, __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, 4132, __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, 4109, __pyx_L1_error) + __pyx_t_6 = PyNumber_Subtract(__pyx_v_data, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4132, __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":4110 + /* "netCDF4/_netCDF4.pyx":4133 * 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, 4110, __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, 4133, __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, 4110, __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, 4133, __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, 4110, __pyx_L1_error) + __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4133, __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, 4110, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_around); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = NULL; @@ -46412,13 +46458,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, 4110, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_data); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4133, __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, 4110, __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, 4133, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_6); } else @@ -46426,19 +46472,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, 4110, __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, 4133, __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, 4110, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4133, __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, 4110, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } @@ -46448,7 +46494,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ __pyx_t_6 = 0; } - /* "netCDF4/_netCDF4.pyx":4108 + /* "netCDF4/_netCDF4.pyx":4131 * data = data/self.scale_factor * if self.dtype.kind in 'iu': data = numpy.around(data) * elif hasattr(self, 'add_offset'): # <<<<<<<<<<<<<< @@ -46458,16 +46504,16 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ } __pyx_L56:; - /* "netCDF4/_netCDF4.pyx":4111 + /* "netCDF4/_netCDF4.pyx":4134 * 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, 4111, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4134, __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, 4111, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_isMA); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = NULL; @@ -46481,13 +46527,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, 4111, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_v_data); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4134, __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, 4111, __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, 4134, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_6); } else @@ -46495,36 +46541,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, 4111, __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, 4134, __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, 4111, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4134, __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, 4111, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4134, __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, 4111, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4134, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":4115 + /* "netCDF4/_netCDF4.pyx":4138 * # 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, 4115, __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, 4138, __pyx_L1_error) __pyx_t_9 = (__pyx_t_1 != 0); if (__pyx_t_9) { } else { @@ -46532,32 +46578,32 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ goto __pyx_L64_bool_binop_done; } - /* "netCDF4/_netCDF4.pyx":4116 + /* "netCDF4/_netCDF4.pyx":4139 * # 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, 4116, __pyx_L1_error) + __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4139, __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, 4116, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_all); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4139, __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, 4116, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4139, __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, 4116, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_in1d); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4139, __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, 4116, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_data); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4139, __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, 4116, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_mask); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4139, __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, 4116, __pyx_L1_error) + __pyx_t_16 = PyObject_GetItem(__pyx_t_11, __pyx_t_3); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4139, __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, 4116, __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, 4139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_11 = NULL; __pyx_t_7 = 0; @@ -46574,7 +46620,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, 4116, __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, 4139, __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; @@ -46584,7 +46630,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, 4116, __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, 4139, __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; @@ -46592,7 +46638,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, 4116, __pyx_L1_error) + __pyx_t_17 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4139, __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; @@ -46603,7 +46649,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, 4116, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_17, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; } @@ -46619,14 +46665,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, 4116, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4139, __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, 4116, __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, 4139, __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; @@ -46635,31 +46681,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, 4116, __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, 4139, __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, 4116, __pyx_L1_error) + __pyx_t_17 = PyTuple_New(1+1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4139, __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, 4116, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_17, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4139, __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, 4116, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 4139, __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":4115 + /* "netCDF4/_netCDF4.pyx":4138 * # corresponds to missing values, don't fill masked array - * # just use underlying data instead * if hasattr(self, 'missing_value') and \ # <<<<<<<<<<<<<< @@ -46668,19 +46714,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ */ if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":4117 + /* "netCDF4/_netCDF4.pyx":4140 * 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, 4117, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_data); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":4115 + /* "netCDF4/_netCDF4.pyx":4138 * # corresponds to missing values, don't fill masked array - * # just use underlying data instead * if hasattr(self, 'missing_value') and \ # <<<<<<<<<<<<<< @@ -46690,7 +46736,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ goto __pyx_L63; } - /* "netCDF4/_netCDF4.pyx":4119 + /* "netCDF4/_netCDF4.pyx":4142 * data = data.data * else: * if hasattr(self, 'missing_value'): # <<<<<<<<<<<<<< @@ -46698,23 +46744,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, 4119, __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, 4142, __pyx_L1_error) __pyx_t_9 = (__pyx_t_4 != 0); if (__pyx_t_9) { - /* "netCDF4/_netCDF4.pyx":4123 + /* "netCDF4/_netCDF4.pyx":4146 * # 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, 4123, __pyx_L1_error) + __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4146, __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, 4123, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_array); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4146, __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, 4123, __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, 4146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_17))) { @@ -46727,14 +46773,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, 4123, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_17, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4146, __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, 4123, __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, 4146, __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; @@ -46743,47 +46789,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, 4123, __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, 4146, __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, 4123, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4146, __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, 4123, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_17, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4146, __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, 4123, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_shape); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4146, __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, 4123, __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, 4146, __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, 4123, __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; if (__pyx_t_9) { - /* "netCDF4/_netCDF4.pyx":4124 + /* "netCDF4/_netCDF4.pyx":4147 * # 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, 4124, __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, 4147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_fillval = __pyx_t_6; __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":4123 + /* "netCDF4/_netCDF4.pyx":4146 * # 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 == (): # <<<<<<<<<<<<<< @@ -46793,7 +46839,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ goto __pyx_L67; } - /* "netCDF4/_netCDF4.pyx":4126 + /* "netCDF4/_netCDF4.pyx":4149 * fillval = self.missing_value * else: * msg="cannot assign fill_value for masked array when missing_value attribute is not a scalar" # <<<<<<<<<<<<<< @@ -46804,37 +46850,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":4127 + /* "netCDF4/_netCDF4.pyx":4150 * 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, 4127, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4150, __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, 4127, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4150, __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, 4127, __pyx_L1_error) + __PYX_ERR(0, 4150, __pyx_L1_error) } __pyx_L67:; - /* "netCDF4/_netCDF4.pyx":4128 + /* "netCDF4/_netCDF4.pyx":4151 * 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, 4128, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4151, __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, 4128, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -46848,13 +46894,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, 4128, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_fillval); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4151, __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, 4128, __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, 4151, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_17); } else @@ -46862,46 +46908,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, 4128, __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, 4151, __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, 4128, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4151, __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, 4128, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4151, __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, 4128, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4151, __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, 4128, __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, 4151, __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, 4128, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_17); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 4151, __pyx_L1_error) __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; if (__pyx_t_9) { - /* "netCDF4/_netCDF4.pyx":4129 + /* "netCDF4/_netCDF4.pyx":4152 * 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, 4129, __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, 4152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF_SET(__pyx_v_fillval, __pyx_t_17); __pyx_t_17 = 0; - /* "netCDF4/_netCDF4.pyx":4128 + /* "netCDF4/_netCDF4.pyx":4151 * msg="cannot assign fill_value for masked array when missing_value attribute is not a scalar" * raise RuntimeError(msg) * if numpy.array(fillval).shape != (): # <<<<<<<<<<<<<< @@ -46910,7 +46956,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":4119 + /* "netCDF4/_netCDF4.pyx":4142 * data = data.data * else: * if hasattr(self, 'missing_value'): # <<<<<<<<<<<<<< @@ -46920,30 +46966,30 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ goto __pyx_L66; } - /* "netCDF4/_netCDF4.pyx":4130 + /* "netCDF4/_netCDF4.pyx":4153 * 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, 4130, __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, 4153, __pyx_L1_error) __pyx_t_4 = (__pyx_t_9 != 0); if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":4131 + /* "netCDF4/_netCDF4.pyx":4154 * 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, 4131, __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, 4154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); __pyx_v_fillval = __pyx_t_17; __pyx_t_17 = 0; - /* "netCDF4/_netCDF4.pyx":4130 + /* "netCDF4/_netCDF4.pyx":4153 * if numpy.array(fillval).shape != (): * fillval = fillval[0] * elif hasattr(self, '_FillValue'): # <<<<<<<<<<<<<< @@ -46953,7 +46999,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ goto __pyx_L66; } - /* "netCDF4/_netCDF4.pyx":4133 + /* "netCDF4/_netCDF4.pyx":4156 * fillval = self._FillValue * else: * fillval = default_fillvals[self.dtype.str[1:]] # <<<<<<<<<<<<<< @@ -46961,14 +47007,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, 4133, __pyx_L1_error) + __pyx_t_17 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_fillvals); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4156, __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, 4133, __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, 4156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_t_2, 1, 0, NULL, NULL, &__pyx_slice__65, 1, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4133, __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, 4156, __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, 4133, __pyx_L1_error) + __pyx_t_2 = PyObject_GetItem(__pyx_t_17, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4156, __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; @@ -46977,19 +47023,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ } __pyx_L66:; - /* "netCDF4/_netCDF4.pyx":4134 + /* "netCDF4/_netCDF4.pyx":4157 * 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, 4134, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_filled); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4134, __pyx_L1_error) + __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4157, __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, 4134, __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, 4134, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_fill_value, __pyx_v_fillval) < 0) __PYX_ERR(0, 4157, __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, 4157, __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; @@ -46998,7 +47044,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ } __pyx_L63:; - /* "netCDF4/_netCDF4.pyx":4111 + /* "netCDF4/_netCDF4.pyx":4134 * data = data - self.add_offset * if self.dtype.kind in 'iu': data = numpy.around(data) * if ma.isMA(data): # <<<<<<<<<<<<<< @@ -47007,7 +47053,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":4100 + /* "netCDF4/_netCDF4.pyx":4123 * # if not masked, create a masked array. * if not ma.isMA(data): data = self._toma(data) * if self.scale and self._isprimitive: # <<<<<<<<<<<<<< @@ -47016,14 +47062,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":4137 + /* "netCDF4/_netCDF4.pyx":4160 * * # 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, 4137, __pyx_L1_error) + __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_2 = NULL; __pyx_t_7 = 0; @@ -47040,7 +47086,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, 4137, __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, 4160, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_17); } else @@ -47048,13 +47094,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, 4137, __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, 4160, __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, 4137, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(4+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4160, __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; @@ -47071,7 +47117,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, 4137, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -47080,9 +47126,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, 4137, __pyx_L1_error) + __pyx_t_15 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_17); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4160, __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, 4137, __pyx_L1_error) + __pyx_t_13 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4160, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; for (;;) { @@ -47090,17 +47136,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, 4137, __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, 4160, __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, 4137, __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, 4160, __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, 4137, __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, 4160, __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, 4137, __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, 4160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); #endif } @@ -47110,7 +47156,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, 4137, __pyx_L1_error) + else __PYX_ERR(0, 4160, __pyx_L1_error) } break; } @@ -47126,7 +47172,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, 4137, __pyx_L1_error) + __PYX_ERR(0, 4160, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -47149,7 +47195,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, 4137, __pyx_L1_error) + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 4160, __pyx_L1_error) __Pyx_GOTREF(item); *(temps[i]) = item; } @@ -47159,7 +47205,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, 4137, __pyx_L1_error) + __pyx_t_16 = PyObject_GetIter(__pyx_t_17); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4160, __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; @@ -47168,7 +47214,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, 4137, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_16), 4) < 0) __PYX_ERR(0, 4160, __pyx_L1_error) __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; goto __pyx_L72_unpacking_done; @@ -47176,7 +47222,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, 4137, __pyx_L1_error) + __PYX_ERR(0, 4160, __pyx_L1_error) __pyx_L72_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_a, __pyx_t_6); @@ -47188,74 +47234,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":4138 + /* "netCDF4/_netCDF4.pyx":4161 * # 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, 4138, __pyx_L1_error) + __pyx_t_17 = PySequence_Tuple(__pyx_v_i); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4161, __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, 4138, __pyx_L1_error) + __pyx_t_3 = PyObject_GetItem(__pyx_v_data, __pyx_t_17); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4161, __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":4139 + /* "netCDF4/_netCDF4.pyx":4162 * 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, 4139, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dataput, __pyx_n_s_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4162, __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, 4139, __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, 4162, __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, 4139, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_17); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4162, __pyx_L1_error) __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; if (__pyx_t_4) { goto __pyx_L69_continue; } - /* "netCDF4/_netCDF4.pyx":4141 + /* "netCDF4/_netCDF4.pyx":4164 * 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, 4141, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_dataput, __pyx_n_s_shape); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4164, __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, 4141, __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, 4164, __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, 4141, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4164, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":4142 + /* "netCDF4/_netCDF4.pyx":4165 * # 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, 4142, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4165, __pyx_L1_error) if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":4143 + /* "netCDF4/_netCDF4.pyx":4166 * 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, 4143, __pyx_L1_error) + __pyx_t_17 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4166, __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, 4143, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_array); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_17 = NULL; @@ -47273,7 +47319,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, 4143, __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, 4166, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -47281,13 +47327,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, 4143, __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, 4166, __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, 4143, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4166, __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; @@ -47298,7 +47344,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, 4143, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -47306,7 +47352,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":4142 + /* "netCDF4/_netCDF4.pyx":4165 * # convert array scalar to regular array with one element. * if dataput.shape == (): * if self._isvlen: # <<<<<<<<<<<<<< @@ -47316,7 +47362,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ goto __pyx_L75; } - /* "netCDF4/_netCDF4.pyx":4145 + /* "netCDF4/_netCDF4.pyx":4168 * dataput=numpy.array(dataput,'O') * else: * dataput=numpy.array(dataput,dataput.dtype) # <<<<<<<<<<<<<< @@ -47324,12 +47370,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, 4145, __pyx_L1_error) + __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4168, __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, 4145, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4168, __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, 4145, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_dataput, __pyx_n_s_dtype); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_17 = NULL; __pyx_t_7 = 0; @@ -47346,7 +47392,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, 4145, __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, 4168, __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; @@ -47355,14 +47401,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, 4145, __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, 4168, __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, 4145, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4168, __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; @@ -47373,7 +47419,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, 4145, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -47383,7 +47429,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ } __pyx_L75:; - /* "netCDF4/_netCDF4.pyx":4141 + /* "netCDF4/_netCDF4.pyx":4164 * if dataput.size == 0: continue # nothing to write * # convert array scalar to regular array with one element. * if dataput.shape == (): # <<<<<<<<<<<<<< @@ -47392,14 +47438,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":4146 + /* "netCDF4/_netCDF4.pyx":4169 * 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, 4146, __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, 4169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = NULL; __pyx_t_7 = 0; @@ -47416,7 +47462,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, 4146, __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, 4169, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -47424,13 +47470,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, 4146, __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, 4169, __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, 4146, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(4+__pyx_t_7); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4169, __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; @@ -47447,14 +47493,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, 4146, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_12, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4169, __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":4137 + /* "netCDF4/_netCDF4.pyx":4160 * * # Fill output array with data chunks. * for (a,b,c,i) in zip(start, count, stride, put_ind): # <<<<<<<<<<<<<< @@ -47465,7 +47511,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":4004 + /* "netCDF4/_netCDF4.pyx":4027 * free(countp) * * def __setitem__(self, elem, data): # <<<<<<<<<<<<<< @@ -47508,7 +47554,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_ return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4149 +/* "netCDF4/_netCDF4.pyx":4172 * * * def __len__(self): # <<<<<<<<<<<<<< @@ -47539,34 +47585,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":4150 + /* "netCDF4/_netCDF4.pyx":4173 * * 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, 4150, __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, 4173, __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, 4150, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4173, __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":4151 + /* "netCDF4/_netCDF4.pyx":4174 * 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__66, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4151, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__70, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4174, __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, 4151, __pyx_L1_error) + __PYX_ERR(0, 4174, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4150 + /* "netCDF4/_netCDF4.pyx":4173 * * def __len__(self): * if not self.shape: # <<<<<<<<<<<<<< @@ -47575,7 +47621,7 @@ static Py_ssize_t __pyx_pf_7netCDF4_8_netCDF4_8Variable_52__len__(struct __pyx_o */ } - /* "netCDF4/_netCDF4.pyx":4153 + /* "netCDF4/_netCDF4.pyx":4176 * raise TypeError('len() of unsized object') * else: * return self.shape[0] # <<<<<<<<<<<<<< @@ -47583,18 +47629,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, 4153, __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, 4176, __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, 4153, __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, 4176, __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, 4153, __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, 4176, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":4149 + /* "netCDF4/_netCDF4.pyx":4172 * * * def __len__(self): # <<<<<<<<<<<<<< @@ -47613,7 +47659,7 @@ static Py_ssize_t __pyx_pf_7netCDF4_8_netCDF4_8Variable_52__len__(struct __pyx_o return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4156 +/* "netCDF4/_netCDF4.pyx":4179 * * * def assignValue(self,val): # <<<<<<<<<<<<<< @@ -47643,34 +47689,34 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_54assignValue(struct __py int __pyx_t_3; __Pyx_RefNannySetupContext("assignValue", 0); - /* "netCDF4/_netCDF4.pyx":4162 + /* "netCDF4/_netCDF4.pyx":4185 * 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, 4162, __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, 4185, __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, 4162, __pyx_L1_error) + __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 4185, __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":4163 + /* "netCDF4/_netCDF4.pyx":4186 * 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__67, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4163, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4186, __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, 4163, __pyx_L1_error) + __PYX_ERR(0, 4186, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4162 + /* "netCDF4/_netCDF4.pyx":4185 * 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): # <<<<<<<<<<<<<< @@ -47679,16 +47725,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_54assignValue(struct __py */ } - /* "netCDF4/_netCDF4.pyx":4164 + /* "netCDF4/_netCDF4.pyx":4187 * 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__68, 0, 0, 1) < 0) __PYX_ERR(0, 4164, __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, 4187, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4156 + /* "netCDF4/_netCDF4.pyx":4179 * * * def assignValue(self,val): # <<<<<<<<<<<<<< @@ -47709,7 +47755,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_54assignValue(struct __py return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4166 +/* "netCDF4/_netCDF4.pyx":4189 * self[:]=val * * def getValue(self): # <<<<<<<<<<<<<< @@ -47739,34 +47785,34 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_56getValue(struct __pyx_o int __pyx_t_3; __Pyx_RefNannySetupContext("getValue", 0); - /* "netCDF4/_netCDF4.pyx":4172 + /* "netCDF4/_netCDF4.pyx":4195 * 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, 4172, __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, 4195, __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, 4172, __pyx_L1_error) + __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 4195, __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":4173 + /* "netCDF4/_netCDF4.pyx":4196 * 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__69, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4173, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4196, __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, 4173, __pyx_L1_error) + __PYX_ERR(0, 4196, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4172 + /* "netCDF4/_netCDF4.pyx":4195 * 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): # <<<<<<<<<<<<<< @@ -47775,7 +47821,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_56getValue(struct __pyx_o */ } - /* "netCDF4/_netCDF4.pyx":4174 + /* "netCDF4/_netCDF4.pyx":4197 * if len(self.dimensions): * raise IndexError('to retrieve values from a non-scalar variable, use slicing') * return self[slice(None)] # <<<<<<<<<<<<<< @@ -47783,13 +47829,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__70); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4174, __pyx_L1_error) + __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_slice__74); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":4166 + /* "netCDF4/_netCDF4.pyx":4189 * self[:]=val * * def getValue(self): # <<<<<<<<<<<<<< @@ -47808,7 +47854,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_56getValue(struct __pyx_o return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4176 +/* "netCDF4/_netCDF4.pyx":4199 * return self[slice(None)] * * def set_auto_maskandscale(self,maskandscale): # <<<<<<<<<<<<<< @@ -47836,17 +47882,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":4218 + /* "netCDF4/_netCDF4.pyx":4241 * (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, 4218, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_maskandscale); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4241, __pyx_L1_error) if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":4219 + /* "netCDF4/_netCDF4.pyx":4242 * """ * if maskandscale: * self.scale = True # <<<<<<<<<<<<<< @@ -47859,7 +47905,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":4220 + /* "netCDF4/_netCDF4.pyx":4243 * if maskandscale: * self.scale = True * self.mask = True # <<<<<<<<<<<<<< @@ -47872,7 +47918,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":4218 + /* "netCDF4/_netCDF4.pyx":4241 * (automatic conversions are performed). * """ * if maskandscale: # <<<<<<<<<<<<<< @@ -47882,7 +47928,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_58set_auto_maskandscale(s goto __pyx_L3; } - /* "netCDF4/_netCDF4.pyx":4222 + /* "netCDF4/_netCDF4.pyx":4245 * self.mask = True * else: * self.scale = False # <<<<<<<<<<<<<< @@ -47896,7 +47942,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":4223 + /* "netCDF4/_netCDF4.pyx":4246 * else: * self.scale = False * self.mask = False # <<<<<<<<<<<<<< @@ -47911,7 +47957,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_58set_auto_maskandscale(s } __pyx_L3:; - /* "netCDF4/_netCDF4.pyx":4176 + /* "netCDF4/_netCDF4.pyx":4199 * return self[slice(None)] * * def set_auto_maskandscale(self,maskandscale): # <<<<<<<<<<<<<< @@ -47931,7 +47977,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_58set_auto_maskandscale(s return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4225 +/* "netCDF4/_netCDF4.pyx":4248 * self.mask = False * * def set_auto_scale(self,scale): # <<<<<<<<<<<<<< @@ -47959,17 +48005,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":4252 + /* "netCDF4/_netCDF4.pyx":4275 * (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, 4252, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_scale); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4275, __pyx_L1_error) if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":4253 + /* "netCDF4/_netCDF4.pyx":4276 * """ * if scale: * self.scale = True # <<<<<<<<<<<<<< @@ -47982,7 +48028,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":4252 + /* "netCDF4/_netCDF4.pyx":4275 * (automatic conversions are performed). * """ * if scale: # <<<<<<<<<<<<<< @@ -47992,7 +48038,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_60set_auto_scale(struct _ goto __pyx_L3; } - /* "netCDF4/_netCDF4.pyx":4255 + /* "netCDF4/_netCDF4.pyx":4278 * self.scale = True * else: * self.scale = False # <<<<<<<<<<<<<< @@ -48008,7 +48054,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_60set_auto_scale(struct _ } __pyx_L3:; - /* "netCDF4/_netCDF4.pyx":4225 + /* "netCDF4/_netCDF4.pyx":4248 * self.mask = False * * def set_auto_scale(self,scale): # <<<<<<<<<<<<<< @@ -48028,7 +48074,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_60set_auto_scale(struct _ return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4257 +/* "netCDF4/_netCDF4.pyx":4280 * self.scale = False * * def set_auto_mask(self,mask): # <<<<<<<<<<<<<< @@ -48056,17 +48102,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":4281 + /* "netCDF4/_netCDF4.pyx":4304 * (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, 4281, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_mask); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4304, __pyx_L1_error) if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":4282 + /* "netCDF4/_netCDF4.pyx":4305 * """ * if mask: * self.mask = True # <<<<<<<<<<<<<< @@ -48079,7 +48125,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":4281 + /* "netCDF4/_netCDF4.pyx":4304 * (automatic conversions are performed). * """ * if mask: # <<<<<<<<<<<<<< @@ -48089,7 +48135,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_62set_auto_mask(struct __ goto __pyx_L3; } - /* "netCDF4/_netCDF4.pyx":4284 + /* "netCDF4/_netCDF4.pyx":4307 * self.mask = True * else: * self.mask = False # <<<<<<<<<<<<<< @@ -48105,7 +48151,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_62set_auto_mask(struct __ } __pyx_L3:; - /* "netCDF4/_netCDF4.pyx":4257 + /* "netCDF4/_netCDF4.pyx":4280 * self.scale = False * * def set_auto_mask(self,mask): # <<<<<<<<<<<<<< @@ -48125,7 +48171,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_62set_auto_mask(struct __ return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4287 +/* "netCDF4/_netCDF4.pyx":4310 * * * def _put(self,ndarray data,start,count,stride): # <<<<<<<<<<<<<< @@ -48166,21 +48212,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, 4287, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_put", 1, 4, 4, 1); __PYX_ERR(0, 4310, __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, 4287, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_put", 1, 4, 4, 2); __PYX_ERR(0, 4310, __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, 4287, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_put", 1, 4, 4, 3); __PYX_ERR(0, 4310, __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, 4287, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_put") < 0)) __PYX_ERR(0, 4310, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; @@ -48197,13 +48243,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, 4287, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_put", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4310, __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, 4287, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), __pyx_ptype_7netCDF4_8_netCDF4_ndarray, 1, "data", 0))) __PYX_ERR(0, 4310, __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 */ @@ -48252,20 +48298,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":4300 + /* "netCDF4/_netCDF4.pyx":4323 * 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, 4300, __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, 4323, __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, 4300, __pyx_L1_error) + __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 4323, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_ndims = __pyx_t_2; - /* "netCDF4/_netCDF4.pyx":4303 + /* "netCDF4/_netCDF4.pyx":4326 * # make sure data is contiguous. * # if not, make a local copy. * if not PyArray_ISCONTIGUOUS(data): # <<<<<<<<<<<<<< @@ -48275,14 +48321,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":4304 + /* "netCDF4/_netCDF4.pyx":4327 * # 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, 4304, __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, 4327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -48295,18 +48341,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, 4304, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4327, __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, 4304, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4327, __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, 4304, __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, 4327, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":4303 + /* "netCDF4/_netCDF4.pyx":4326 * # make sure data is contiguous. * # if not, make a local copy. * if not PyArray_ISCONTIGUOUS(data): # <<<<<<<<<<<<<< @@ -48315,7 +48361,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ } - /* "netCDF4/_netCDF4.pyx":4306 + /* "netCDF4/_netCDF4.pyx":4329 * data = data.copy() * # fill up startp,countp,stridep. * totelem = 1 # <<<<<<<<<<<<<< @@ -48324,7 +48370,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ __pyx_v_totelem = 1; - /* "netCDF4/_netCDF4.pyx":4307 + /* "netCDF4/_netCDF4.pyx":4330 * # fill up startp,countp,stridep. * totelem = 1 * negstride = 0 # <<<<<<<<<<<<<< @@ -48333,19 +48379,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ __pyx_v_negstride = 0; - /* "netCDF4/_netCDF4.pyx":4308 + /* "netCDF4/_netCDF4.pyx":4331 * 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, 4308, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_sl = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":4309 + /* "netCDF4/_netCDF4.pyx":4332 * negstride = 0 * sl = [] * startp = malloc(sizeof(size_t) * ndims) # <<<<<<<<<<<<<< @@ -48354,7 +48400,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":4310 + /* "netCDF4/_netCDF4.pyx":4333 * sl = [] * startp = malloc(sizeof(size_t) * ndims) * countp = malloc(sizeof(size_t) * ndims) # <<<<<<<<<<<<<< @@ -48363,7 +48409,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":4311 + /* "netCDF4/_netCDF4.pyx":4334 * startp = malloc(sizeof(size_t) * ndims) * countp = malloc(sizeof(size_t) * ndims) * stridep = malloc(sizeof(ptrdiff_t) * ndims) # <<<<<<<<<<<<<< @@ -48372,7 +48418,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":4312 + /* "netCDF4/_netCDF4.pyx":4335 * countp = malloc(sizeof(size_t) * ndims) * stridep = malloc(sizeof(ptrdiff_t) * ndims) * for n from 0 <= n < ndims: # <<<<<<<<<<<<<< @@ -48381,56 +48427,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, 4312, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4335, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":4313 + /* "netCDF4/_netCDF4.pyx":4336 * 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, 4313, __pyx_L1_error) + __pyx_t_1 = PyObject_GetItem(__pyx_v_count, __pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyNumber_Absolute(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4313, __pyx_L1_error) + __pyx_t_4 = PyNumber_Absolute(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4336, __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, 4313, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v_count, __pyx_v_n, __pyx_t_4) < 0)) __PYX_ERR(0, 4336, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":4314 + /* "netCDF4/_netCDF4.pyx":4337 * 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, 4314, __pyx_L1_error) + __pyx_t_4 = PyObject_GetItem(__pyx_v_count, __pyx_v_n); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4337, __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, 4314, __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, 4337, __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, 4314, __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, 4337, __pyx_L1_error) (__pyx_v_countp[__pyx_t_2]) = __pyx_t_8; - /* "netCDF4/_netCDF4.pyx":4316 + /* "netCDF4/_netCDF4.pyx":4339 * 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, 4316, __pyx_L1_error) + __pyx_t_4 = PyObject_GetItem(__pyx_v_stride, __pyx_v_n); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4339, __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, 4316, __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, 4339, __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, 4316, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4339, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":4317 + /* "netCDF4/_netCDF4.pyx":4340 * # for neg strides, reverse order (then flip that axis after data read in) * if stride[n] < 0: * negstride = 1 # <<<<<<<<<<<<<< @@ -48439,77 +48485,77 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ __pyx_v_negstride = 1; - /* "netCDF4/_netCDF4.pyx":4318 + /* "netCDF4/_netCDF4.pyx":4341 * 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, 4318, __pyx_L1_error) + __pyx_t_1 = PyObject_GetItem(__pyx_v_stride, __pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyNumber_Negative(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4318, __pyx_L1_error) + __pyx_t_4 = PyNumber_Negative(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4341, __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, 4318, __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, 4341, __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, 4318, __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, 4341, __pyx_L1_error) (__pyx_v_stridep[__pyx_t_2]) = __pyx_t_9; - /* "netCDF4/_netCDF4.pyx":4319 + /* "netCDF4/_netCDF4.pyx":4342 * 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, 4319, __pyx_L1_error) + __pyx_t_4 = PyObject_GetItem(__pyx_v_start, __pyx_v_n); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4342, __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, 4319, __pyx_L1_error) + __pyx_t_1 = PyObject_GetItem(__pyx_v_stride, __pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4342, __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, 4319, __pyx_L1_error) + __pyx_t_5 = PyObject_GetItem(__pyx_v_count, __pyx_v_n); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4342, __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, 4319, __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, 4342, __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, 4319, __pyx_L1_error) + __pyx_t_5 = PyNumber_Multiply(__pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4342, __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, 4319, __pyx_L1_error) + __pyx_t_10 = PyNumber_Add(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4342, __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, 4319, __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, 4342, __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, 4319, __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, 4342, __pyx_L1_error) (__pyx_v_startp[__pyx_t_2]) = __pyx_t_8; - /* "netCDF4/_netCDF4.pyx":4320 + /* "netCDF4/_netCDF4.pyx":4343 * 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, 4320, __pyx_L1_error) + __pyx_t_10 = PyObject_GetItem(__pyx_v_stride, __pyx_v_n); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_5 = PyNumber_Negative(__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4320, __pyx_L1_error) + __pyx_t_5 = PyNumber_Negative(__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4343, __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, 4320, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v_stride, __pyx_v_n, __pyx_t_5) < 0)) __PYX_ERR(0, 4343, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":4321 + /* "netCDF4/_netCDF4.pyx":4344 * 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__71); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4321, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_sl, __pyx_slice__75); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4344, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4316 + /* "netCDF4/_netCDF4.pyx":4339 * countp[n] = count[n] * # for neg strides, reverse order (then flip that axis after data read in) * if stride[n] < 0: # <<<<<<<<<<<<<< @@ -48519,7 +48565,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 goto __pyx_L6; } - /* "netCDF4/_netCDF4.pyx":4323 + /* "netCDF4/_netCDF4.pyx":4346 * sl.append(slice(None, None, -1)) # this slice will reverse the data * else: * startp[n] = start[n] # <<<<<<<<<<<<<< @@ -48527,63 +48573,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, 4323, __pyx_L1_error) + __pyx_t_5 = PyObject_GetItem(__pyx_v_start, __pyx_v_n); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4346, __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, 4323, __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, 4346, __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, 4323, __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, 4346, __pyx_L1_error) (__pyx_v_startp[__pyx_t_2]) = __pyx_t_8; - /* "netCDF4/_netCDF4.pyx":4324 + /* "netCDF4/_netCDF4.pyx":4347 * 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, 4324, __pyx_L1_error) + __pyx_t_5 = PyObject_GetItem(__pyx_v_stride, __pyx_v_n); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4347, __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, 4324, __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, 4347, __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, 4324, __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, 4347, __pyx_L1_error) (__pyx_v_stridep[__pyx_t_2]) = __pyx_t_9; - /* "netCDF4/_netCDF4.pyx":4325 + /* "netCDF4/_netCDF4.pyx":4348 * 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__72); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4325, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_sl, __pyx_slice__76); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4348, __pyx_L1_error) } __pyx_L6:; - /* "netCDF4/_netCDF4.pyx":4326 + /* "netCDF4/_netCDF4.pyx":4349 * 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, 4326, __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_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, 4312, __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, 4335, __pyx_L1_error) } - /* "netCDF4/_netCDF4.pyx":4312 + /* "netCDF4/_netCDF4.pyx":4335 * 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, 4312, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4335, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_5); __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":4329 + /* "netCDF4/_netCDF4.pyx":4352 * # check to see that size of data array is what is expected * # for slice given. * dataelem = PyArray_SIZE(data) # <<<<<<<<<<<<<< @@ -48592,7 +48638,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":4330 + /* "netCDF4/_netCDF4.pyx":4353 * # for slice given. * dataelem = PyArray_SIZE(data) * if totelem != dataelem: # <<<<<<<<<<<<<< @@ -48602,20 +48648,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":4331 + /* "netCDF4/_netCDF4.pyx":4354 * 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__73, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4331, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__77, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4354, __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, 4331, __pyx_L1_error) + __PYX_ERR(0, 4354, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4330 + /* "netCDF4/_netCDF4.pyx":4353 * # for slice given. * dataelem = PyArray_SIZE(data) * if totelem != dataelem: # <<<<<<<<<<<<<< @@ -48624,7 +48670,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ } - /* "netCDF4/_netCDF4.pyx":4332 + /* "netCDF4/_netCDF4.pyx":4355 * if totelem != dataelem: * raise IndexError('size of data array does not conform to slice') * if negstride: # <<<<<<<<<<<<<< @@ -48634,16 +48680,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":4334 + /* "netCDF4/_netCDF4.pyx":4357 * 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, 4334, __pyx_L1_error) + __pyx_t_10 = PyObject_GetItem(((PyObject *)__pyx_v_data), __pyx_v_sl); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4357, __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, 4334, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_copy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4357, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = NULL; @@ -48657,18 +48703,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, 4334, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4357, __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, 4334, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4357, __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, 4334, __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, 4357, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_5)); __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":4332 + /* "netCDF4/_netCDF4.pyx":4355 * if totelem != dataelem: * raise IndexError('size of data array does not conform to slice') * if negstride: # <<<<<<<<<<<<<< @@ -48677,53 +48723,53 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ } - /* "netCDF4/_netCDF4.pyx":4335 + /* "netCDF4/_netCDF4.pyx":4358 * # 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, 4335, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4358, __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, 4335, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_iscompound); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4358, __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, 4335, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isenum); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4358, __pyx_L1_error) __pyx_t_3 = __pyx_t_12; __pyx_L10_bool_binop_done:; if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":4339 + /* "netCDF4/_netCDF4.pyx":4362 * # 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, 4339, __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, 4362, __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, 4339, __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, 4362, __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, 4339, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4362, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { - /* "netCDF4/_netCDF4.pyx":4340 + /* "netCDF4/_netCDF4.pyx":4363 * # 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, 4340, __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, 4363, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -48736,13 +48782,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, 4340, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_self->dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4363, __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, 4340, __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, 4363, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_4); } else @@ -48750,29 +48796,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, 4340, __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, 4363, __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, 4340, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4363, __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, 4340, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4363, __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, 4340, __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, 4363, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_4)); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":4339 + /* "netCDF4/_netCDF4.pyx":4362 * # if data type of array doesn't match variable, * # try to cast the data. * if self.dtype != data.dtype: # <<<<<<<<<<<<<< @@ -48781,31 +48827,31 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ } - /* "netCDF4/_netCDF4.pyx":4344 + /* "netCDF4/_netCDF4.pyx":4367 * # 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, 4344, __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, 4367, __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, 4344, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_isnative); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4367, __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, 4344, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4367, __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":4345 + /* "netCDF4/_netCDF4.pyx":4368 * # 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, 4345, __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, 4368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -48818,18 +48864,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, 4345, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4368, __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, 4345, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4368, __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, 4345, __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, 4368, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_5)); __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":4344 + /* "netCDF4/_netCDF4.pyx":4367 * # endian byte order (this is what netcdf-c expects - * # issue #554, pull request #555) * if not data.dtype.isnative: # <<<<<<<<<<<<<< @@ -48838,27 +48884,27 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ } - /* "netCDF4/_netCDF4.pyx":4347 + /* "netCDF4/_netCDF4.pyx":4370 * 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, 4347, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4370, __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, 4347, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4370, __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, 4347, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ndims); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4370, __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, 4347, __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, 4370, __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, 4347, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4370, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_3) { } else { @@ -48870,7 +48916,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":4348 + /* "netCDF4/_netCDF4.pyx":4371 * # 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, # <<<<<<<<<<<<<< @@ -48879,7 +48925,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":4347 + /* "netCDF4/_netCDF4.pyx":4370 * data = data.byteswap() * # strides all 1 or scalar variable, use put_vara (faster) * if sum(stride) == ndims or ndims == 0: # <<<<<<<<<<<<<< @@ -48889,7 +48935,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 goto __pyx_L15; } - /* "netCDF4/_netCDF4.pyx":4351 + /* "netCDF4/_netCDF4.pyx":4374 * startp, countp, data.data) * else: * ierr = nc_put_vars(self._grpid, self._varid, # <<<<<<<<<<<<<< @@ -48898,7 +48944,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ /*else*/ { - /* "netCDF4/_netCDF4.pyx":4352 + /* "netCDF4/_netCDF4.pyx":4375 * else: * ierr = nc_put_vars(self._grpid, self._varid, * startp, countp, stridep, data.data) # <<<<<<<<<<<<<< @@ -48909,7 +48955,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 } __pyx_L15:; - /* "netCDF4/_netCDF4.pyx":4353 + /* "netCDF4/_netCDF4.pyx":4376 * ierr = nc_put_vars(self._grpid, self._varid, * startp, countp, stridep, data.data) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -48919,7 +48965,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":4354 + /* "netCDF4/_netCDF4.pyx":4377 * startp, countp, stridep, data.data) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -48927,22 +48973,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, 4354, __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, 4377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4354, __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_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, 4354, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4377, __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, 4354, __pyx_L1_error) + __PYX_ERR(0, 4377, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4353 + /* "netCDF4/_netCDF4.pyx":4376 * ierr = nc_put_vars(self._grpid, self._varid, * startp, countp, stridep, data.data) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -48951,7 +48997,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ } - /* "netCDF4/_netCDF4.pyx":4335 + /* "netCDF4/_netCDF4.pyx":4358 * # 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: # <<<<<<<<<<<<<< @@ -48961,46 +49007,46 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 goto __pyx_L9; } - /* "netCDF4/_netCDF4.pyx":4355 + /* "netCDF4/_netCDF4.pyx":4378 * 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, 4355, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4378, __pyx_L1_error) if (__pyx_t_12) { - /* "netCDF4/_netCDF4.pyx":4356 + /* "netCDF4/_netCDF4.pyx":4379 * 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, 4356, __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, 4379, __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, 4356, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_char); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4379, __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, 4356, __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, 4379, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_12) { - /* "netCDF4/_netCDF4.pyx":4357 + /* "netCDF4/_netCDF4.pyx":4380 * 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__74, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4357, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__78, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4380, __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, 4357, __pyx_L1_error) + __PYX_ERR(0, 4380, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4356 + /* "netCDF4/_netCDF4.pyx":4379 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * elif self._isvlen: * if data.dtype.char !='O': # <<<<<<<<<<<<<< @@ -49009,14 +49055,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ } - /* "netCDF4/_netCDF4.pyx":4359 + /* "netCDF4/_netCDF4.pyx":4382 * 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, 4359, __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, 4382, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -49029,56 +49075,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, 4359, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4382, __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, 4359, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4382, __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, 4359, __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, 4382, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_5)); __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":4360 + /* "netCDF4/_netCDF4.pyx":4383 * # 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, 4360, __pyx_L1_error) - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4360, __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, 4383, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4383, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_12) { - /* "netCDF4/_netCDF4.pyx":4362 + /* "netCDF4/_netCDF4.pyx":4385 * 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, 4362, __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, 4385, __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, 4362, __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, 4385, __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, 4362, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4385, __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, 4362, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4385, __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, 4362, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4385, __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, 4362, __pyx_L1_error) + __pyx_t_14 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4385, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -49086,17 +49132,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, 4362, __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, 4385, __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, 4362, __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, 4385, __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, 4362, __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, 4385, __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, 4362, __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, 4385, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -49106,7 +49152,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, 4362, __pyx_L1_error) + else __PYX_ERR(0, 4385, __pyx_L1_error) } break; } @@ -49115,22 +49161,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":4363 + /* "netCDF4/_netCDF4.pyx":4386 * # 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, 4363, __pyx_L1_error) + __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_data), __pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4386, __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, 4363, __pyx_L1_error) + __pyx_t_4 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4386, __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, 4363, __pyx_L1_error) + if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_data), __pyx_v_n, __pyx_t_4) < 0)) __PYX_ERR(0, 4386, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":4362 + /* "netCDF4/_netCDF4.pyx":4385 * if self.dtype == str: * # convert all elements from strings to bytes * for n in range(data.shape[0]): # <<<<<<<<<<<<<< @@ -49140,7 +49186,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":4368 + /* "netCDF4/_netCDF4.pyx":4391 * # each element in struct. * # allocate struct array to hold vlen data. * strdata = malloc(sizeof(char *)*totelem) # <<<<<<<<<<<<<< @@ -49149,7 +49195,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":4369 + /* "netCDF4/_netCDF4.pyx":4392 * # 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":4372 + /* "netCDF4/_netCDF4.pyx":4395 * strdata[i] = data[i] * # strides all 1 or scalar variable, use put_vara (faster) * if sum(stride) == ndims or ndims == 0: # <<<<<<<<<<<<<< @@ -49224,7 +49270,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 goto __pyx_L25; } - /* "netCDF4/_netCDF4.pyx":4376 + /* "netCDF4/_netCDF4.pyx":4399 * startp, countp, strdata) * else: * raise IndexError('strides must all be 1 for string variables') # <<<<<<<<<<<<<< @@ -49232,15 +49278,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__75, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4376, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__79, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4399, __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, 4376, __pyx_L1_error) + __PYX_ERR(0, 4399, __pyx_L1_error) } __pyx_L25:; - /* "netCDF4/_netCDF4.pyx":4379 + /* "netCDF4/_netCDF4.pyx":4402 * #ierr = nc_put_vars(self._grpid, self._varid, * # startp, countp, stridep, strdata) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -49250,7 +49296,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":4380 + /* "netCDF4/_netCDF4.pyx":4403 * # startp, countp, stridep, strdata) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -49258,22 +49304,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, 4380, __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, 4403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4380, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4403, __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, 4380, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4403, __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, 4380, __pyx_L1_error) + __PYX_ERR(0, 4403, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4379 + /* "netCDF4/_netCDF4.pyx":4402 * #ierr = nc_put_vars(self._grpid, self._varid, * # startp, countp, stridep, strdata) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -49282,7 +49328,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ } - /* "netCDF4/_netCDF4.pyx":4381 + /* "netCDF4/_netCDF4.pyx":4404 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * free(strdata) # <<<<<<<<<<<<<< @@ -49291,7 +49337,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ free(__pyx_v_strdata); - /* "netCDF4/_netCDF4.pyx":4360 + /* "netCDF4/_netCDF4.pyx":4383 * # flatten data array. * data = data.flatten() * if self.dtype == str: # <<<<<<<<<<<<<< @@ -49301,7 +49347,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 goto __pyx_L20; } - /* "netCDF4/_netCDF4.pyx":4386 + /* "netCDF4/_netCDF4.pyx":4409 * # loop over elements of object array, put data buffer for * # each element in struct. * databuff = data.data # <<<<<<<<<<<<<< @@ -49312,7 +49358,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":4388 + /* "netCDF4/_netCDF4.pyx":4411 * databuff = data.data * # allocate struct array to hold vlen data. * vldata = malloc(totelem*sizeof(nc_vlen_t)) # <<<<<<<<<<<<<< @@ -49321,7 +49367,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":4389 + /* "netCDF4/_netCDF4.pyx":4412 * # 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] # <<<<<<<<<<<<<< @@ -49340,7 +49386,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":4391 + /* "netCDF4/_netCDF4.pyx":4414 * for i from 0<=idatabuff)[0] * dataarr = elptr # <<<<<<<<<<<<<< @@ -49352,37 +49398,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":4392 + /* "netCDF4/_netCDF4.pyx":4415 * 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, 4392, __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, 4415, __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, 4392, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_str); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4415, __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__76, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4392, __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, 4415, __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, 4392, __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, 4415, __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, 4392, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4415, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_12) { - /* "netCDF4/_netCDF4.pyx":4395 + /* "netCDF4/_netCDF4.pyx":4418 * #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, 4395, __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, 4418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4395, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self->dtype); __Pyx_GIVEREF(__pyx_v_self->dtype); @@ -49390,22 +49436,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, 4395, __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, 4418, __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, 4395, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4418, __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, 4395, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4418, __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, 4395, __pyx_L1_error) + __PYX_ERR(0, 4418, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4392 + /* "netCDF4/_netCDF4.pyx":4415 * elptr = (databuff)[0] * dataarr = elptr * if self.dtype != dataarr.dtype.str[1:]: # <<<<<<<<<<<<<< @@ -49414,7 +49460,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ } - /* "netCDF4/_netCDF4.pyx":4396 + /* "netCDF4/_netCDF4.pyx":4419 * # 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) # <<<<<<<<<<<<<< @@ -49423,7 +49469,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":4397 + /* "netCDF4/_netCDF4.pyx":4420 * 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 # <<<<<<<<<<<<<< @@ -49433,7 +49479,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":4398 + /* "netCDF4/_netCDF4.pyx":4421 * vldata[i].len = PyArray_SIZE(dataarr) * vldata[i].p = dataarr.data * databuff = databuff + data.strides[0] # <<<<<<<<<<<<<< @@ -49443,27 +49489,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":4400 + /* "netCDF4/_netCDF4.pyx":4423 * 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, 4400, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4423, __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, 4400, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4423, __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, 4400, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ndims); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4423, __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, 4400, __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, 4423, __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, 4400, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4423, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!__pyx_t_3) { } else { @@ -49475,7 +49521,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":4401 + /* "netCDF4/_netCDF4.pyx":4424 * # 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, # <<<<<<<<<<<<<< @@ -49484,7 +49530,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":4400 + /* "netCDF4/_netCDF4.pyx":4423 * databuff = databuff + data.strides[0] * # strides all 1 or scalar variable, use put_vara (faster) * if sum(stride) == ndims or ndims == 0: # <<<<<<<<<<<<<< @@ -49494,7 +49540,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 goto __pyx_L32; } - /* "netCDF4/_netCDF4.pyx":4404 + /* "netCDF4/_netCDF4.pyx":4427 * startp, countp, vldata) * else: * raise IndexError('strides must all be 1 for vlen variables') # <<<<<<<<<<<<<< @@ -49502,15 +49548,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__77, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4404, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__81, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4427, __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, 4404, __pyx_L1_error) + __PYX_ERR(0, 4427, __pyx_L1_error) } __pyx_L32:; - /* "netCDF4/_netCDF4.pyx":4407 + /* "netCDF4/_netCDF4.pyx":4430 * #ierr = nc_put_vars(self._grpid, self._varid, * # startp, countp, stridep, vldata) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -49520,7 +49566,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":4408 + /* "netCDF4/_netCDF4.pyx":4431 * # startp, countp, stridep, vldata) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -49528,22 +49574,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, 4408, __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, 4431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4408, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4431, __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, 4408, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4431, __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, 4408, __pyx_L1_error) + __PYX_ERR(0, 4431, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4407 + /* "netCDF4/_netCDF4.pyx":4430 * #ierr = nc_put_vars(self._grpid, self._varid, * # startp, countp, stridep, vldata) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -49552,7 +49598,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ } - /* "netCDF4/_netCDF4.pyx":4410 + /* "netCDF4/_netCDF4.pyx":4433 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * # free the pointer array. * free(vldata) # <<<<<<<<<<<<<< @@ -49563,7 +49609,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 } __pyx_L20:; - /* "netCDF4/_netCDF4.pyx":4355 + /* "netCDF4/_netCDF4.pyx":4378 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * elif self._isvlen: # <<<<<<<<<<<<<< @@ -49573,7 +49619,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 } __pyx_L9:; - /* "netCDF4/_netCDF4.pyx":4411 + /* "netCDF4/_netCDF4.pyx":4434 * # free the pointer array. * free(vldata) * free(startp) # <<<<<<<<<<<<<< @@ -49582,7 +49628,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ free(__pyx_v_startp); - /* "netCDF4/_netCDF4.pyx":4412 + /* "netCDF4/_netCDF4.pyx":4435 * free(vldata) * free(startp) * free(countp) # <<<<<<<<<<<<<< @@ -49591,7 +49637,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ free(__pyx_v_countp); - /* "netCDF4/_netCDF4.pyx":4413 + /* "netCDF4/_netCDF4.pyx":4436 * free(startp) * free(countp) * free(stridep) # <<<<<<<<<<<<<< @@ -49600,7 +49646,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 */ free(__pyx_v_stridep); - /* "netCDF4/_netCDF4.pyx":4287 + /* "netCDF4/_netCDF4.pyx":4310 * * * def _put(self,ndarray data,start,count,stride): # <<<<<<<<<<<<<< @@ -49628,7 +49674,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7 return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4415 +/* "netCDF4/_netCDF4.pyx":4438 * free(stridep) * * def _get(self,start,count,stride): # <<<<<<<<<<<<<< @@ -49667,16 +49713,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, 4415, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_get", 1, 3, 3, 1); __PYX_ERR(0, 4438, __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, 4415, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_get", 1, 3, 3, 2); __PYX_ERR(0, 4438, __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, 4415, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_get") < 0)) __PYX_ERR(0, 4438, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -49691,7 +49737,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, 4415, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_get", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4438, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("netCDF4._netCDF4.Variable._get", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -49744,7 +49790,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":4428 + /* "netCDF4/_netCDF4.pyx":4451 * # and not a slice so the resulting array * # should be 'squeezed' to remove the singleton dimension. * shapeout = () # <<<<<<<<<<<<<< @@ -49754,7 +49800,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":4429 + /* "netCDF4/_netCDF4.pyx":4452 * # should be 'squeezed' to remove the singleton dimension. * shapeout = () * squeeze_out = False # <<<<<<<<<<<<<< @@ -49763,7 +49809,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 */ __pyx_v_squeeze_out = 0; - /* "netCDF4/_netCDF4.pyx":4430 + /* "netCDF4/_netCDF4.pyx":4453 * shapeout = () * squeeze_out = False * for lendim in count: # <<<<<<<<<<<<<< @@ -49774,26 +49820,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, 4430, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_count); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4453, __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, 4430, __pyx_L1_error) + __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4453, __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, 4430, __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, 4453, __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, 4430, __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, 4453, __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, 4430, __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, 4453, __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, 4430, __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, 4453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -49803,7 +49849,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, 4430, __pyx_L1_error) + else __PYX_ERR(0, 4453, __pyx_L1_error) } break; } @@ -49812,32 +49858,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":4431 + /* "netCDF4/_netCDF4.pyx":4454 * 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, 4431, __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, 4454, __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, 4431, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4454, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { - /* "netCDF4/_netCDF4.pyx":4432 + /* "netCDF4/_netCDF4.pyx":4455 * for lendim in count: * if lendim == -1: * shapeout = shapeout + (1,) # <<<<<<<<<<<<<< * squeeze_out = True * else: */ - __pyx_t_4 = PyNumber_Add(__pyx_v_shapeout, __pyx_tuple__78); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4432, __pyx_L1_error) + __pyx_t_4 = PyNumber_Add(__pyx_v_shapeout, __pyx_tuple__82); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_shapeout, __pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":4433 + /* "netCDF4/_netCDF4.pyx":4456 * if lendim == -1: * shapeout = shapeout + (1,) * squeeze_out = True # <<<<<<<<<<<<<< @@ -49846,7 +49892,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 */ __pyx_v_squeeze_out = 1; - /* "netCDF4/_netCDF4.pyx":4431 + /* "netCDF4/_netCDF4.pyx":4454 * squeeze_out = False * for lendim in count: * if lendim == -1: # <<<<<<<<<<<<<< @@ -49856,7 +49902,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 goto __pyx_L5; } - /* "netCDF4/_netCDF4.pyx":4435 + /* "netCDF4/_netCDF4.pyx":4458 * squeeze_out = True * else: * shapeout = shapeout + (lendim,) # <<<<<<<<<<<<<< @@ -49864,12 +49910,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, 4435, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4458, __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, 4435, __pyx_L1_error) + __pyx_t_6 = PyNumber_Add(__pyx_v_shapeout, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4458, __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); @@ -49877,7 +49923,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 } __pyx_L5:; - /* "netCDF4/_netCDF4.pyx":4430 + /* "netCDF4/_netCDF4.pyx":4453 * shapeout = () * squeeze_out = False * for lendim in count: # <<<<<<<<<<<<<< @@ -49887,20 +49933,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":4437 + /* "netCDF4/_netCDF4.pyx":4460 * 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, 4437, __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, 4460, __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, 4437, __pyx_L1_error) + __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 4460, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_ndims = __pyx_t_2; - /* "netCDF4/_netCDF4.pyx":4439 + /* "netCDF4/_netCDF4.pyx":4462 * ndims = len(self.dimensions) * # fill up startp,countp,stridep. * negstride = 0 # <<<<<<<<<<<<<< @@ -49909,19 +49955,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 */ __pyx_v_negstride = 0; - /* "netCDF4/_netCDF4.pyx":4440 + /* "netCDF4/_netCDF4.pyx":4463 * # 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, 4440, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_sl = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":4441 + /* "netCDF4/_netCDF4.pyx":4464 * negstride = 0 * sl = [] * startp = malloc(sizeof(size_t) * ndims) # <<<<<<<<<<<<<< @@ -49930,7 +49976,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":4442 + /* "netCDF4/_netCDF4.pyx":4465 * sl = [] * startp = malloc(sizeof(size_t) * ndims) * countp = malloc(sizeof(size_t) * ndims) # <<<<<<<<<<<<<< @@ -49939,7 +49985,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":4443 + /* "netCDF4/_netCDF4.pyx":4466 * startp = malloc(sizeof(size_t) * ndims) * countp = malloc(sizeof(size_t) * ndims) * stridep = malloc(sizeof(ptrdiff_t) * ndims) # <<<<<<<<<<<<<< @@ -49948,7 +49994,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":4444 + /* "netCDF4/_netCDF4.pyx":4467 * countp = malloc(sizeof(size_t) * ndims) * stridep = malloc(sizeof(ptrdiff_t) * ndims) * for n from 0 <= n < ndims: # <<<<<<<<<<<<<< @@ -49958,50 +50004,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":4445 + /* "netCDF4/_netCDF4.pyx":4468 * 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, 4445, __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, 4468, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyNumber_Absolute(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4445, __pyx_L1_error) + __pyx_t_6 = PyNumber_Absolute(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4468, __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, 4445, __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, 4468, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":4446 + /* "netCDF4/_netCDF4.pyx":4469 * 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, 4446, __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, 4469, __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, 4446, __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, 4469, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; (__pyx_v_countp[__pyx_v_n]) = __pyx_t_8; - /* "netCDF4/_netCDF4.pyx":4448 + /* "netCDF4/_netCDF4.pyx":4471 * 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, 4448, __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, 4471, __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, 4448, __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, 4471, __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, 4448, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4471, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { - /* "netCDF4/_netCDF4.pyx":4449 + /* "netCDF4/_netCDF4.pyx":4472 * # for neg strides, reverse order (then flip that axis after data read in) * if stride[n] < 0: * negstride = 1 # <<<<<<<<<<<<<< @@ -50010,75 +50056,75 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 */ __pyx_v_negstride = 1; - /* "netCDF4/_netCDF4.pyx":4450 + /* "netCDF4/_netCDF4.pyx":4473 * 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, 4450, __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, 4473, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyNumber_Negative(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4450, __pyx_L1_error) + __pyx_t_6 = PyNumber_Negative(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4473, __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, 4450, __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, 4473, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; (__pyx_v_stridep[__pyx_v_n]) = __pyx_t_9; - /* "netCDF4/_netCDF4.pyx":4451 + /* "netCDF4/_netCDF4.pyx":4474 * 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, 4451, __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, 4474, __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, 4451, __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, 4474, __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, 4451, __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, 4474, __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, 4451, __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, 4474, __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, 4451, __pyx_L1_error) + __pyx_t_4 = PyNumber_Multiply(__pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4474, __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, 4451, __pyx_L1_error) + __pyx_t_10 = PyNumber_Add(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4474, __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, 4451, __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, 4474, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; (__pyx_v_startp[__pyx_v_n]) = __pyx_t_8; - /* "netCDF4/_netCDF4.pyx":4452 + /* "netCDF4/_netCDF4.pyx":4475 * 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, 4452, __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, 4475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_4 = PyNumber_Negative(__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4452, __pyx_L1_error) + __pyx_t_4 = PyNumber_Negative(__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4475, __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, 4452, __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, 4475, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":4453 + /* "netCDF4/_netCDF4.pyx":4476 * 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__79); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4453, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_sl, __pyx_slice__83); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4476, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4448 + /* "netCDF4/_netCDF4.pyx":4471 * countp[n] = count[n] * # for neg strides, reverse order (then flip that axis after data read in) * if stride[n] < 0: # <<<<<<<<<<<<<< @@ -50088,7 +50134,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 goto __pyx_L8; } - /* "netCDF4/_netCDF4.pyx":4455 + /* "netCDF4/_netCDF4.pyx":4478 * sl.append(slice(None, None, -1)) # this slice will reverse the data * else: * startp[n] = start[n] # <<<<<<<<<<<<<< @@ -50096,71 +50142,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, 4455, __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, 4478, __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, 4455, __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, 4478, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; (__pyx_v_startp[__pyx_v_n]) = __pyx_t_8; - /* "netCDF4/_netCDF4.pyx":4456 + /* "netCDF4/_netCDF4.pyx":4479 * 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, 4456, __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, 4479, __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, 4456, __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, 4479, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; (__pyx_v_stridep[__pyx_v_n]) = __pyx_t_9; - /* "netCDF4/_netCDF4.pyx":4457 + /* "netCDF4/_netCDF4.pyx":4480 * 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__80); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4457, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_sl, __pyx_slice__84); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4480, __pyx_L1_error) } __pyx_L8:; } - /* "netCDF4/_netCDF4.pyx":4458 + /* "netCDF4/_netCDF4.pyx":4481 * 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, 4458, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4481, __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, 4458, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_iscompound); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4481, __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, 4458, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isenum); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4481, __pyx_L1_error) __pyx_t_5 = __pyx_t_12; __pyx_L10_bool_binop_done:; if (__pyx_t_5) { - /* "netCDF4/_netCDF4.pyx":4459 + /* "netCDF4/_netCDF4.pyx":4482 * 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, 4459, __pyx_L1_error) + __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4482, __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, 4459, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4482, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = NULL; @@ -50178,7 +50224,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, 4459, __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, 4482, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_4); } else @@ -50186,13 +50232,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, 4459, __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, 4482, __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, 4459, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4482, __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; @@ -50203,36 +50249,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, 4459, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4482, __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, 4459, __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, 4482, __pyx_L1_error) __pyx_v_data = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":4461 + /* "netCDF4/_netCDF4.pyx":4484 * 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, 4461, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4484, __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, 4461, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4484, __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, 4461, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ndims); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4484, __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, 4461, __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, 4484, __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, 4461, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4484, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_12) { } else { @@ -50244,7 +50290,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":4462 + /* "netCDF4/_netCDF4.pyx":4485 * # strides all 1 or scalar variable, use get_vara (faster) * if sum(stride) == ndims or ndims == 0: * with nogil: # <<<<<<<<<<<<<< @@ -50258,7 +50304,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":4463 + /* "netCDF4/_netCDF4.pyx":4486 * if sum(stride) == ndims or ndims == 0: * with nogil: * ierr = nc_get_vara(self._grpid, self._varid, # <<<<<<<<<<<<<< @@ -50268,7 +50314,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":4462 + /* "netCDF4/_netCDF4.pyx":4485 * # strides all 1 or scalar variable, use get_vara (faster) * if sum(stride) == ndims or ndims == 0: * with nogil: # <<<<<<<<<<<<<< @@ -50286,7 +50332,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 } } - /* "netCDF4/_netCDF4.pyx":4461 + /* "netCDF4/_netCDF4.pyx":4484 * data = numpy.empty(shapeout, self.dtype) * # strides all 1 or scalar variable, use get_vara (faster) * if sum(stride) == ndims or ndims == 0: # <<<<<<<<<<<<<< @@ -50296,7 +50342,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 goto __pyx_L13; } - /* "netCDF4/_netCDF4.pyx":4466 + /* "netCDF4/_netCDF4.pyx":4489 * startp, countp, data.data) * else: * with nogil: # <<<<<<<<<<<<<< @@ -50311,7 +50357,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":4467 + /* "netCDF4/_netCDF4.pyx":4490 * else: * with nogil: * ierr = nc_get_vars(self._grpid, self._varid, # <<<<<<<<<<<<<< @@ -50321,7 +50367,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":4466 + /* "netCDF4/_netCDF4.pyx":4489 * startp, countp, data.data) * else: * with nogil: # <<<<<<<<<<<<<< @@ -50341,7 +50387,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 } __pyx_L13:; - /* "netCDF4/_netCDF4.pyx":4469 + /* "netCDF4/_netCDF4.pyx":4492 * ierr = nc_get_vars(self._grpid, self._varid, * startp, countp, stridep, data.data) * if ierr == NC_EINVALCOORDS: # <<<<<<<<<<<<<< @@ -50351,7 +50397,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":4470 + /* "netCDF4/_netCDF4.pyx":4493 * startp, countp, stridep, data.data) * if ierr == NC_EINVALCOORDS: * raise IndexError # <<<<<<<<<<<<<< @@ -50359,9 +50405,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, 4470, __pyx_L1_error) + __PYX_ERR(0, 4493, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4469 + /* "netCDF4/_netCDF4.pyx":4492 * ierr = nc_get_vars(self._grpid, self._varid, * startp, countp, stridep, data.data) * if ierr == NC_EINVALCOORDS: # <<<<<<<<<<<<<< @@ -50370,7 +50416,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 */ } - /* "netCDF4/_netCDF4.pyx":4471 + /* "netCDF4/_netCDF4.pyx":4494 * if ierr == NC_EINVALCOORDS: * raise IndexError * elif ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -50380,7 +50426,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":4472 + /* "netCDF4/_netCDF4.pyx":4495 * raise IndexError * elif ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -50388,22 +50434,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, 4472, __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, 4495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4472, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4495, __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, 4472, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4495, __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, 4472, __pyx_L1_error) + __PYX_ERR(0, 4495, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4471 + /* "netCDF4/_netCDF4.pyx":4494 * if ierr == NC_EINVALCOORDS: * raise IndexError * elif ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -50412,7 +50458,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 */ } - /* "netCDF4/_netCDF4.pyx":4458 + /* "netCDF4/_netCDF4.pyx":4481 * stridep[n] = stride[n] * sl.append(slice(None,None, 1)) * if self._isprimitive or self._iscompound or self._isenum: # <<<<<<<<<<<<<< @@ -50422,26 +50468,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 goto __pyx_L9; } - /* "netCDF4/_netCDF4.pyx":4473 + /* "netCDF4/_netCDF4.pyx":4496 * 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, 4473, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4496, __pyx_L1_error) if (__pyx_t_5) { - /* "netCDF4/_netCDF4.pyx":4475 + /* "netCDF4/_netCDF4.pyx":4498 * 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, 4475, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4498, __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, 4475, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -50459,7 +50505,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, 4475, __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, 4498, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -50467,13 +50513,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, 4475, __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, 4498, __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, 4475, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4498, __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; @@ -50484,23 +50530,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, 4475, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4498, __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, 4475, __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, 4498, __pyx_L1_error) __pyx_v_data = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":4477 + /* "netCDF4/_netCDF4.pyx":4500 * 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, 4477, __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, 4500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -50513,78 +50559,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, 4477, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4500, __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, 4477, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4500, __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, 4477, __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, 4500, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":4478 + /* "netCDF4/_netCDF4.pyx":4501 * # 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, 4478, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_npy_intp(PyArray_SIZE(__pyx_v_data)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4501, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_totelem = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":4479 + /* "netCDF4/_netCDF4.pyx":4502 * 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, 4479, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4479, __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, 4502, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4502, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { - /* "netCDF4/_netCDF4.pyx":4482 + /* "netCDF4/_netCDF4.pyx":4505 * # 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, 4482, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(char *))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4505, __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, 4482, __pyx_L1_error) + __pyx_t_6 = PyNumber_Multiply(__pyx_t_1, __pyx_v_totelem); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4505, __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, 4482, __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, 4505, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_strdata = ((char **)malloc(__pyx_t_8)); - /* "netCDF4/_netCDF4.pyx":4484 + /* "netCDF4/_netCDF4.pyx":4507 * 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, 4484, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4507, __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, 4484, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_6, NULL); 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; - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_ndims); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4484, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_ndims); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4507, __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, 4484, __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, 4507, __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, 4484, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4507, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (!__pyx_t_12) { } else { @@ -50596,7 +50642,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":4485 + /* "netCDF4/_netCDF4.pyx":4508 * # strides all 1 or scalar variable, use get_vara (faster) * if sum(stride) == ndims or ndims == 0: * with nogil: # <<<<<<<<<<<<<< @@ -50610,7 +50656,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":4486 + /* "netCDF4/_netCDF4.pyx":4509 * if sum(stride) == ndims or ndims == 0: * with nogil: * ierr = nc_get_vara(self._grpid, self._varid, # <<<<<<<<<<<<<< @@ -50620,7 +50666,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":4485 + /* "netCDF4/_netCDF4.pyx":4508 * # strides all 1 or scalar variable, use get_vara (faster) * if sum(stride) == ndims or ndims == 0: * with nogil: # <<<<<<<<<<<<<< @@ -50638,7 +50684,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 } } - /* "netCDF4/_netCDF4.pyx":4484 + /* "netCDF4/_netCDF4.pyx":4507 * strdata = malloc(sizeof(char *) * totelem) * # strides all 1 or scalar variable, use get_vara (faster) * if sum(stride) == ndims or ndims == 0: # <<<<<<<<<<<<<< @@ -50648,7 +50694,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 goto __pyx_L24; } - /* "netCDF4/_netCDF4.pyx":4490 + /* "netCDF4/_netCDF4.pyx":4513 * else: * # FIXME: is this a bug in netCDF4? * raise IndexError('strides must all be 1 for string variables') # <<<<<<<<<<<<<< @@ -50656,15 +50702,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__81, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4490, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__85, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4513, __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, 4490, __pyx_L1_error) + __PYX_ERR(0, 4513, __pyx_L1_error) } __pyx_L24:; - /* "netCDF4/_netCDF4.pyx":4493 + /* "netCDF4/_netCDF4.pyx":4516 * #ierr = nc_get_vars(self._grpid, self._varid, * # startp, countp, stridep, strdata) * if ierr == NC_EINVALCOORDS: # <<<<<<<<<<<<<< @@ -50674,7 +50720,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":4494 + /* "netCDF4/_netCDF4.pyx":4517 * # startp, countp, stridep, strdata) * if ierr == NC_EINVALCOORDS: * raise IndexError # <<<<<<<<<<<<<< @@ -50682,9 +50728,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, 4494, __pyx_L1_error) + __PYX_ERR(0, 4517, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4493 + /* "netCDF4/_netCDF4.pyx":4516 * #ierr = nc_get_vars(self._grpid, self._varid, * # startp, countp, stridep, strdata) * if ierr == NC_EINVALCOORDS: # <<<<<<<<<<<<<< @@ -50693,7 +50739,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 */ } - /* "netCDF4/_netCDF4.pyx":4495 + /* "netCDF4/_netCDF4.pyx":4518 * if ierr == NC_EINVALCOORDS: * raise IndexError * elif ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -50703,7 +50749,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":4496 + /* "netCDF4/_netCDF4.pyx":4519 * raise IndexError * elif ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -50711,22 +50757,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, 4496, __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, 4519, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4496, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4519, __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, 4496, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4519, __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, 4496, __pyx_L1_error) + __PYX_ERR(0, 4519, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4495 + /* "netCDF4/_netCDF4.pyx":4518 * if ierr == NC_EINVALCOORDS: * raise IndexError * elif ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -50735,34 +50781,34 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 */ } - /* "netCDF4/_netCDF4.pyx":4499 + /* "netCDF4/_netCDF4.pyx":4522 * # loop over elements of object array, fill array with * # contents of strdata. * for i from 0<=imalloc(totelem*sizeof(nc_vlen_t)) # <<<<<<<<<<<<<< @@ -50925,37 +50971,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, 4510, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_FromSize_t((sizeof(nc_vlen_t))); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4533, __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, 4510, __pyx_L1_error) + __pyx_t_16 = PyNumber_Multiply(__pyx_v_totelem, __pyx_t_10); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4533, __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, 4510, __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, 4533, __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":4511 + /* "netCDF4/_netCDF4.pyx":4534 * # 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, 4511, __pyx_L1_error) + __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4534, __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, 4511, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_16, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4534, __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, 4511, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_16 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4534, __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, 4511, __pyx_L1_error) + __pyx_t_3 = Py_TYPE(__pyx_t_16)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4534, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; for (;;) { @@ -50963,17 +51009,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, 4511, __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, 4534, __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, 4511, __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, 4534, __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, 4511, __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, 4534, __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, 4511, __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, 4534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); #endif } @@ -50983,7 +51029,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, 4511, __pyx_L1_error) + else __PYX_ERR(0, 4534, __pyx_L1_error) } break; } @@ -50992,27 +51038,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":4512 + /* "netCDF4/_netCDF4.pyx":4535 * 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, 4512, __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, 4535, __pyx_L1_error) (__pyx_v_vldata[__pyx_t_17]).len = 0; - /* "netCDF4/_netCDF4.pyx":4513 + /* "netCDF4/_netCDF4.pyx":4536 * 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, 4513, __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, 4536, __pyx_L1_error) (__pyx_v_vldata[__pyx_t_17]).p = ((void *)0); - /* "netCDF4/_netCDF4.pyx":4511 + /* "netCDF4/_netCDF4.pyx":4534 * # allocate struct array to hold vlen data. * vldata = malloc(totelem*sizeof(nc_vlen_t)) * for i in range(totelem): # <<<<<<<<<<<<<< @@ -51022,27 +51068,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":4515 + /* "netCDF4/_netCDF4.pyx":4538 * 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, 4515, __pyx_L1_error) + __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4538, __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, 4515, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_16, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4538, __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, 4515, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyInt_From_int(__pyx_v_ndims); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4538, __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, 4515, __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, 4538, __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, 4515, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4538, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!__pyx_t_12) { } else { @@ -51054,7 +51100,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":4516 + /* "netCDF4/_netCDF4.pyx":4539 * # strides all 1 or scalar variable, use get_vara (faster) * if sum(stride) == ndims or ndims == 0: * with nogil: # <<<<<<<<<<<<<< @@ -51068,7 +51114,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":4517 + /* "netCDF4/_netCDF4.pyx":4540 * if sum(stride) == ndims or ndims == 0: * with nogil: * ierr = nc_get_vara(self._grpid, self._varid, # <<<<<<<<<<<<<< @@ -51078,7 +51124,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":4516 + /* "netCDF4/_netCDF4.pyx":4539 * # strides all 1 or scalar variable, use get_vara (faster) * if sum(stride) == ndims or ndims == 0: * with nogil: # <<<<<<<<<<<<<< @@ -51096,7 +51142,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 } } - /* "netCDF4/_netCDF4.pyx":4515 + /* "netCDF4/_netCDF4.pyx":4538 * vldata[i].p = 0 * # strides all 1 or scalar variable, use get_vara (faster) * if sum(stride) == ndims or ndims == 0: # <<<<<<<<<<<<<< @@ -51106,7 +51152,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 goto __pyx_L35; } - /* "netCDF4/_netCDF4.pyx":4520 + /* "netCDF4/_netCDF4.pyx":4543 * startp, countp, vldata) * else: * raise IndexError('strides must all be 1 for vlen variables') # <<<<<<<<<<<<<< @@ -51114,15 +51160,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__82, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4520, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__86, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4543, __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, 4520, __pyx_L1_error) + __PYX_ERR(0, 4543, __pyx_L1_error) } __pyx_L35:; - /* "netCDF4/_netCDF4.pyx":4523 + /* "netCDF4/_netCDF4.pyx":4546 * #ierr = nc_get_vars(self._grpid, self._varid, * # startp, countp, stridep, vldata) * if ierr == NC_EINVALCOORDS: # <<<<<<<<<<<<<< @@ -51132,7 +51178,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":4524 + /* "netCDF4/_netCDF4.pyx":4547 * # startp, countp, stridep, vldata) * if ierr == NC_EINVALCOORDS: * raise IndexError # <<<<<<<<<<<<<< @@ -51140,9 +51186,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, 4524, __pyx_L1_error) + __PYX_ERR(0, 4547, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4523 + /* "netCDF4/_netCDF4.pyx":4546 * #ierr = nc_get_vars(self._grpid, self._varid, * # startp, countp, stridep, vldata) * if ierr == NC_EINVALCOORDS: # <<<<<<<<<<<<<< @@ -51151,7 +51197,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 */ } - /* "netCDF4/_netCDF4.pyx":4525 + /* "netCDF4/_netCDF4.pyx":4548 * if ierr == NC_EINVALCOORDS: * raise IndexError * elif ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -51161,7 +51207,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":4526 + /* "netCDF4/_netCDF4.pyx":4549 * raise IndexError * elif ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -51169,22 +51215,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, 4526, __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, 4549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4526, __pyx_L1_error) + __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4549, __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, 4526, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_16, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4549, __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, 4526, __pyx_L1_error) + __PYX_ERR(0, 4549, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4525 + /* "netCDF4/_netCDF4.pyx":4548 * if ierr == NC_EINVALCOORDS: * raise IndexError * elif ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -51193,44 +51239,44 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 */ } - /* "netCDF4/_netCDF4.pyx":4529 + /* "netCDF4/_netCDF4.pyx":4552 * # 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, 4530, __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, 4553, __pyx_L1_error) __pyx_t_8 = (__pyx_v_vldata[__pyx_t_2]).len; __pyx_v_arrlen = __pyx_t_8; - /* "netCDF4/_netCDF4.pyx":4531 + /* "netCDF4/_netCDF4.pyx":4554 * 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, 4531, __pyx_L1_error) + __pyx_t_16 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4554, __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, 4531, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_empty); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4554, __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, 4531, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyInt_FromSize_t(__pyx_v_arrlen); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __pyx_t_1 = NULL; __pyx_t_7 = 0; @@ -51247,7 +51293,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, 4531, __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, 4554, __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; @@ -51256,14 +51302,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, 4531, __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, 4554, __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, 4531, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4554, __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; @@ -51274,62 +51320,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, 4531, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4554, __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, 4531, __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, 4554, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_dataarr, ((PyArrayObject *)__pyx_t_6)); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":4533 + /* "netCDF4/_netCDF4.pyx":4556 * 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, 4533, __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, 4533, __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, 4556, __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, 4556, __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, 4533, __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, 4556, __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":4534 + /* "netCDF4/_netCDF4.pyx":4557 * #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, 4534, __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, 4529, __pyx_L1_error) + if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_data), __pyx_v_i, ((PyObject *)__pyx_v_dataarr)) < 0)) __PYX_ERR(0, 4557, __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, 4552, __pyx_L1_error) } - /* "netCDF4/_netCDF4.pyx":4529 + /* "netCDF4/_netCDF4.pyx":4552 * # 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: # <<<<<<<<<<<<<< @@ -51412,7 +51458,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 } __pyx_L9:; - /* "netCDF4/_netCDF4.pyx":4541 + /* "netCDF4/_netCDF4.pyx":4564 * # free the pointer array * free(vldata) * free(startp) # <<<<<<<<<<<<<< @@ -51421,7 +51467,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 */ free(__pyx_v_startp); - /* "netCDF4/_netCDF4.pyx":4542 + /* "netCDF4/_netCDF4.pyx":4565 * free(vldata) * free(startp) * free(countp) # <<<<<<<<<<<<<< @@ -51430,7 +51476,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 */ free(__pyx_v_countp); - /* "netCDF4/_netCDF4.pyx":4543 + /* "netCDF4/_netCDF4.pyx":4566 * free(startp) * free(countp) * free(stridep) # <<<<<<<<<<<<<< @@ -51439,7 +51485,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 */ free(__pyx_v_stridep); - /* "netCDF4/_netCDF4.pyx":4544 + /* "netCDF4/_netCDF4.pyx":4567 * free(countp) * free(stridep) * if negstride: # <<<<<<<<<<<<<< @@ -51449,17 +51495,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":4546 + /* "netCDF4/_netCDF4.pyx":4569 * 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, 4546, __pyx_L1_error) } - __pyx_t_4 = PyObject_GetItem(((PyObject *)__pyx_v_data), __pyx_v_sl); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4546, __pyx_L1_error) + if (unlikely(!__pyx_v_data)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 4569, __pyx_L1_error) } + __pyx_t_4 = PyObject_GetItem(((PyObject *)__pyx_v_data), __pyx_v_sl); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4569, __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, 4546, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -51473,18 +51519,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, 4546, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4569, __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, 4546, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_16); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4569, __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, 4546, __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, 4569, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_6)); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":4544 + /* "netCDF4/_netCDF4.pyx":4567 * free(countp) * free(stridep) * if negstride: # <<<<<<<<<<<<<< @@ -51493,40 +51539,40 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 */ } - /* "netCDF4/_netCDF4.pyx":4552 + /* "netCDF4/_netCDF4.pyx":4575 * # 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, 4552, __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, 4552, __pyx_L1_error) + if (unlikely(!__pyx_v_data)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 4575, __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, 4575, __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, 4552, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_isnative); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4575, __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, 4552, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_16); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4575, __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":4553 + /* "netCDF4/_netCDF4.pyx":4576 * # (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, 4553, __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, 4553, __pyx_L1_error) + if (unlikely(!__pyx_v_data)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 4576, __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, 4576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_tuple__83, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4553, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_tuple__87, NULL); 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; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":4552 + /* "netCDF4/_netCDF4.pyx":4575 * # dtype of the returned numpy array matches the variable dtype. * # (pull request #555, issue #554). * if not data.dtype.isnative: # <<<<<<<<<<<<<< @@ -51535,21 +51581,21 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 */ } - /* "netCDF4/_netCDF4.pyx":4554 + /* "netCDF4/_netCDF4.pyx":4577 * 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, 4554, __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, 4577, __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, 4554, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4577, __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":4555 + /* "netCDF4/_netCDF4.pyx":4578 * data.byteswap(True) # in-place byteswap * if not self.dimensions: * return data[0] # a scalar # <<<<<<<<<<<<<< @@ -51557,14 +51603,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, 4555, __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, 4555, __pyx_L1_error) + if (unlikely(!__pyx_v_data)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 4578, __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, 4578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":4554 + /* "netCDF4/_netCDF4.pyx":4577 * if not data.dtype.isnative: * data.byteswap(True) # in-place byteswap * if not self.dimensions: # <<<<<<<<<<<<<< @@ -51573,7 +51619,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 */ } - /* "netCDF4/_netCDF4.pyx":4556 + /* "netCDF4/_netCDF4.pyx":4579 * if not self.dimensions: * return data[0] # a scalar * elif squeeze_out: # <<<<<<<<<<<<<< @@ -51583,7 +51629,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":4557 + /* "netCDF4/_netCDF4.pyx":4580 * return data[0] # a scalar * elif squeeze_out: * return numpy.squeeze(data) # <<<<<<<<<<<<<< @@ -51591,12 +51637,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, 4557, __pyx_L1_error) + __pyx_t_16 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4580, __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, 4557, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_squeeze); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4580, __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, 4557, __pyx_L1_error) } + if (unlikely(!__pyx_v_data)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 4580, __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); @@ -51608,13 +51654,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, 4557, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_data)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4580, __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, 4557, __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, 4580, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_GOTREF(__pyx_t_6); } else @@ -51622,19 +51668,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, 4557, __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, 4580, __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, 4557, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4580, __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, 4557, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4580, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -51644,7 +51690,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":4556 + /* "netCDF4/_netCDF4.pyx":4579 * if not self.dimensions: * return data[0] # a scalar * elif squeeze_out: # <<<<<<<<<<<<<< @@ -51653,7 +51699,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 */ } - /* "netCDF4/_netCDF4.pyx":4559 + /* "netCDF4/_netCDF4.pyx":4582 * return numpy.squeeze(data) * else: * return data # <<<<<<<<<<<<<< @@ -51662,13 +51708,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, 4559, __pyx_L1_error) } + if (unlikely(!__pyx_v_data)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 4582, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_data)); __pyx_r = ((PyObject *)__pyx_v_data); goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":4415 + /* "netCDF4/_netCDF4.pyx":4438 * free(stridep) * * def _get(self,start,count,stride): # <<<<<<<<<<<<<< @@ -51698,7 +51744,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7 return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4561 +/* "netCDF4/_netCDF4.pyx":4584 * return data * * def __reduce__(self): # <<<<<<<<<<<<<< @@ -51725,20 +51771,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":4563 + /* "netCDF4/_netCDF4.pyx":4586 * 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__84, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4563, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__88, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4586, __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, 4563, __pyx_L1_error) + __PYX_ERR(0, 4586, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4561 + /* "netCDF4/_netCDF4.pyx":4584 * return data * * def __reduce__(self): # <<<<<<<<<<<<<< @@ -51756,7 +51802,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_68__reduce__(CYTHON_UNUSE return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2911 +/* "netCDF4/_netCDF4.pyx":2934 * **`size`**: The number of stored elements. * """ * cdef public int _varid, _grpid, _nunlimdim # <<<<<<<<<<<<<< @@ -51783,7 +51829,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6_varid___get__(struct __ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_varid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2911, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_varid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2934, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -51818,7 +51864,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_6_varid_2__set__(struct __pyx_o __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2911, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2934, __pyx_L1_error) __pyx_v_self->_varid = __pyx_t_1; /* function exit code */ @@ -51851,7 +51897,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6_grpid___get__(struct __ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2911, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2934, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -51886,7 +51932,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_6_grpid_2__set__(struct __pyx_o __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2911, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2934, __pyx_L1_error) __pyx_v_self->_grpid = __pyx_t_1; /* function exit code */ @@ -51919,7 +51965,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_10_nunlimdim___get__(stru PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_nunlimdim); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2911, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_nunlimdim); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2934, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -51954,7 +52000,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_10_nunlimdim_2__set__(struct __ __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2911, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2934, __pyx_L1_error) __pyx_v_self->_nunlimdim = __pyx_t_1; /* function exit code */ @@ -51968,7 +52014,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_10_nunlimdim_2__set__(struct __ return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2912 +/* "netCDF4/_netCDF4.pyx":2935 * """ * cdef public int _varid, _grpid, _nunlimdim * cdef public _name, ndim, dtype, mask, scale, _isprimitive, _iscompound,\ # <<<<<<<<<<<<<< @@ -52585,7 +52631,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_11_iscompound_4__del__(struct _ return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2913 +/* "netCDF4/_netCDF4.pyx":2936 * cdef public int _varid, _grpid, _nunlimdim * cdef public _name, ndim, dtype, mask, scale, _isprimitive, _iscompound,\ * _isvlen, _isenum, _grp, _cmptype, _vltype, _enumtype,\ # <<<<<<<<<<<<<< @@ -53115,7 +53161,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_9_enumtype_4__del__(struct __py return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":2914 +/* "netCDF4/_netCDF4.pyx":2937 * cdef public _name, ndim, dtype, mask, scale, _isprimitive, _iscompound,\ * _isvlen, _isenum, _grp, _cmptype, _vltype, _enumtype,\ * __orthogonal_indexing__, _has_lsd # <<<<<<<<<<<<<< @@ -53297,7 +53343,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_8_has_lsd_4__del__(struct __pyx return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4584 +/* "netCDF4/_netCDF4.pyx":4607 * __pdoc__['CompoundType.dtype'] = \ * """A numpy dtype object describing the compound data type.""" * def __init__(self, grp, object dt, object dtype_name, **kwargs): # <<<<<<<<<<<<<< @@ -53342,16 +53388,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, 4584, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 4607, __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, 4584, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 4607, __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, 4584, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 4607, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -53366,7 +53412,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, 4584, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4607, __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); @@ -53395,27 +53441,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":4609 + /* "netCDF4/_netCDF4.pyx":4632 * """ * 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, 4609, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4632, __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, 4609, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4632, __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, 4609, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4632, __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, 4609, __pyx_L1_error) + __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_align, Py_True) < 0) __PYX_ERR(0, 4609, __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, 4609, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_align, Py_True) < 0) __PYX_ERR(0, 4632, __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, 4632, __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; @@ -53423,31 +53469,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":4610 + /* "netCDF4/_netCDF4.pyx":4633 * 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, 4610, __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, 4633, __pyx_L1_error) __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "netCDF4/_netCDF4.pyx":4611 + /* "netCDF4/_netCDF4.pyx":4634 * 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, 4611, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_s_typeid); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4634, __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, 4611, __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, 4634, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_xtype = __pyx_t_7; - /* "netCDF4/_netCDF4.pyx":4610 + /* "netCDF4/_netCDF4.pyx":4633 * cdef nc_type xtype * dt = numpy.dtype(dt,align=True) * if 'typeid' in kwargs: # <<<<<<<<<<<<<< @@ -53457,7 +53503,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_12CompoundType___init__(struct __pyx_obj_ goto __pyx_L3; } - /* "netCDF4/_netCDF4.pyx":4613 + /* "netCDF4/_netCDF4.pyx":4636 * xtype = kwargs['typeid'] * else: * xtype = _def_compound(grp, dt, dtype_name) # <<<<<<<<<<<<<< @@ -53465,15 +53511,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, 4613, __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, 4636, __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, 4613, __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, 4636, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_xtype = __pyx_t_7; } __pyx_L3:; - /* "netCDF4/_netCDF4.pyx":4614 + /* "netCDF4/_netCDF4.pyx":4637 * else: * xtype = _def_compound(grp, dt, dtype_name) * self._nc_type = xtype # <<<<<<<<<<<<<< @@ -53482,7 +53528,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_12CompoundType___init__(struct __pyx_obj_ */ __pyx_v_self->_nc_type = __pyx_v_xtype; - /* "netCDF4/_netCDF4.pyx":4615 + /* "netCDF4/_netCDF4.pyx":4638 * xtype = _def_compound(grp, dt, dtype_name) * self._nc_type = xtype * self.dtype = dt # <<<<<<<<<<<<<< @@ -53495,7 +53541,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":4616 + /* "netCDF4/_netCDF4.pyx":4639 * self._nc_type = xtype * self.dtype = dt * self.name = dtype_name # <<<<<<<<<<<<<< @@ -53508,7 +53554,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":4584 + /* "netCDF4/_netCDF4.pyx":4607 * __pdoc__['CompoundType.dtype'] = \ * """A numpy dtype object describing the compound data type.""" * def __init__(self, grp, object dt, object dtype_name, **kwargs): # <<<<<<<<<<<<<< @@ -53532,7 +53578,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_12CompoundType___init__(struct __pyx_obj_ return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4618 +/* "netCDF4/_netCDF4.pyx":4641 * self.name = dtype_name * * def __repr__(self): # <<<<<<<<<<<<<< @@ -53564,20 +53610,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":4619 + /* "netCDF4/_netCDF4.pyx":4642 * * 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, 4619, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4642, __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, 4619, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4642, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":4620 + /* "netCDF4/_netCDF4.pyx":4643 * def __repr__(self): * if python3: * return self.__unicode__() # <<<<<<<<<<<<<< @@ -53585,7 +53631,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, 4620, __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, 4643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -53598,10 +53644,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, 4620, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4643, __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, 4620, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4643, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -53609,7 +53655,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_2__repr__(struct __p __pyx_t_1 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":4619 + /* "netCDF4/_netCDF4.pyx":4642 * * def __repr__(self): * if python3: # <<<<<<<<<<<<<< @@ -53618,7 +53664,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_2__repr__(struct __p */ } - /* "netCDF4/_netCDF4.pyx":4622 + /* "netCDF4/_netCDF4.pyx":4645 * return self.__unicode__() * else: * return unicode(self).encode(default_encoding) # <<<<<<<<<<<<<< @@ -53627,18 +53673,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, 4622, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4645, __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, 4622, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4645, __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, 4622, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4645, __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, 4622, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -53651,14 +53697,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, 4622, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4645, __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, 4622, __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, 4645, __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; @@ -53667,20 +53713,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, 4622, __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, 4645, __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, 4622, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4645, __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, 4622, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -53691,7 +53737,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_2__repr__(struct __p goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":4618 + /* "netCDF4/_netCDF4.pyx":4641 * self.name = dtype_name * * def __repr__(self): # <<<<<<<<<<<<<< @@ -53714,7 +53760,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_2__repr__(struct __p return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4624 +/* "netCDF4/_netCDF4.pyx":4647 * return unicode(self).encode(default_encoding) * * def __unicode__(self): # <<<<<<<<<<<<<< @@ -53743,7 +53789,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_4__unicode__(struct PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__unicode__", 0); - /* "netCDF4/_netCDF4.pyx":4625 + /* "netCDF4/_netCDF4.pyx":4648 * * def __unicode__(self): * return repr(type(self))+": name = '%s', numpy dtype = %s\n" %\ # <<<<<<<<<<<<<< @@ -53751,17 +53797,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, 4625, __pyx_L1_error) + __pyx_t_1 = PyObject_Repr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4648, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "netCDF4/_netCDF4.pyx":4626 + /* "netCDF4/_netCDF4.pyx":4649 * 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, 4626, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4649, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_self->name); __Pyx_GIVEREF(__pyx_v_self->name); @@ -53770,17 +53816,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":4625 + /* "netCDF4/_netCDF4.pyx":4648 * * 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, 4625, __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, 4648, __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, 4625, __pyx_L1_error) + __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4648, __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; @@ -53788,7 +53834,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_4__unicode__(struct __pyx_t_2 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":4624 + /* "netCDF4/_netCDF4.pyx":4647 * return unicode(self).encode(default_encoding) * * def __unicode__(self): # <<<<<<<<<<<<<< @@ -53809,7 +53855,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_4__unicode__(struct return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4628 +/* "netCDF4/_netCDF4.pyx":4651 * (self.name,self.dtype) * * def __reduce__(self): # <<<<<<<<<<<<<< @@ -53836,20 +53882,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":4630 + /* "netCDF4/_netCDF4.pyx":4653 * 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__85, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4630, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__89, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4653, __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, 4630, __pyx_L1_error) + __PYX_ERR(0, 4653, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4628 + /* "netCDF4/_netCDF4.pyx":4651 * (self.name,self.dtype) * * def __reduce__(self): # <<<<<<<<<<<<<< @@ -53867,7 +53913,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_6__reduce__(CYTHON_U return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4578 +/* "netCDF4/_netCDF4.pyx":4601 * the user. * """ * cdef public nc_type _nc_type # <<<<<<<<<<<<<< @@ -53894,7 +53940,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, 4578, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_nc_type(__pyx_v_self->_nc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -53929,7 +53975,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, 4578, __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, 4601, __pyx_L1_error) __pyx_v_self->_nc_type = __pyx_t_1; /* function exit code */ @@ -53943,7 +53989,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_12CompoundType_8_nc_type_2__set__(struct return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4579 +/* "netCDF4/_netCDF4.pyx":4602 * """ * cdef public nc_type _nc_type * cdef public dtype, name # <<<<<<<<<<<<<< @@ -54125,7 +54171,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_12CompoundType_4name_4__del__(struct __py return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4632 +/* "netCDF4/_netCDF4.pyx":4655 * raise NotImplementedError('CompoundType is not picklable') * * cdef _def_compound(grp, object dt, object dtype_name): # <<<<<<<<<<<<<< @@ -54175,55 +54221,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":4641 + /* "netCDF4/_netCDF4.pyx":4664 * 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, 4641, __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, 4664, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_bytestr = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":4642 + /* "netCDF4/_netCDF4.pyx":4665 * 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, 4642, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 4665, __pyx_L1_error) __pyx_v_namstring = __pyx_t_2; - /* "netCDF4/_netCDF4.pyx":4643 + /* "netCDF4/_netCDF4.pyx":4666 * 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, 4643, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4666, __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, 4643, __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, 4666, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_size = __pyx_t_3; - /* "netCDF4/_netCDF4.pyx":4644 + /* "netCDF4/_netCDF4.pyx":4667 * 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, 4644, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4667, __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, 4644, __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, 4667, __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":4645 + /* "netCDF4/_netCDF4.pyx":4668 * size = dt.itemsize * ierr = nc_def_compound(grp._grpid, size, namstring, &xtype) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -54233,7 +54279,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":4646 + /* "netCDF4/_netCDF4.pyx":4669 * ierr = nc_def_compound(grp._grpid, size, namstring, &xtype) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -54241,22 +54287,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, 4646, __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, 4669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4646, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4669, __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, 4646, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4669, __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, 4646, __pyx_L1_error) + __PYX_ERR(0, 4669, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4645 + /* "netCDF4/_netCDF4.pyx":4668 * size = dt.itemsize * ierr = nc_def_compound(grp._grpid, size, namstring, &xtype) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -54265,16 +54311,16 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, */ } - /* "netCDF4/_netCDF4.pyx":4647 + /* "netCDF4/_netCDF4.pyx":4670 * 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, 4647, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_fields); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4670, __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, 4647, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_keys); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4670, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -54288,31 +54334,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, 4647, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4670, __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, 4647, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4670, __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, 4647, __pyx_L1_error) + __pyx_t_7 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4670, __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":4648 + /* "netCDF4/_netCDF4.pyx":4671 * 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, 4648, __pyx_L1_error) + __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4671, __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, 4648, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_fields); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4671, __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, 4648, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_values); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -54326,10 +54372,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, 4648, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4671, __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, 4648, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4671, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -54337,9 +54383,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, 4648, __pyx_L1_error) + __pyx_t_9 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4671, __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, 4648, __pyx_L1_error) + __pyx_t_10 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4671, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -54347,17 +54393,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, 4648, __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, 4671, __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, 4648, __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, 4671, __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, 4648, __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, 4671, __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, 4648, __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, 4671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -54367,7 +54413,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, 4648, __pyx_L1_error) + else __PYX_ERR(0, 4671, __pyx_L1_error) } break; } @@ -54375,27 +54421,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, 4648, __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, 4671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 4648, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 4671, __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":4649 + /* "netCDF4/_netCDF4.pyx":4672 * 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, 4649, __pyx_L1_error) + __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4672, __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, 4649, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_fields); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4672, __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, 4649, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_values); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4672, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -54409,10 +54455,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, 4649, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4672, __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, 4649, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4672, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -54420,9 +54466,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, 4649, __pyx_L1_error) + __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4672, __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, 4649, __pyx_L1_error) + __pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4672, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; for (;;) { @@ -54430,17 +54476,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, 4649, __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, 4672, __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, 4649, __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, 4672, __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, 4649, __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, 4672, __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, 4649, __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, 4672, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif } @@ -54450,7 +54496,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, 4649, __pyx_L1_error) + else __PYX_ERR(0, 4672, __pyx_L1_error) } break; } @@ -54458,23 +54504,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, 4649, __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, 4672, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 4649, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 4672, __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":4652 + /* "netCDF4/_netCDF4.pyx":4675 * # 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, 4652, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_sortbylist); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; __pyx_t_4 = 0; @@ -54491,7 +54537,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, 4652, __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, 4675, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_7); } else @@ -54499,13 +54545,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, 4652, __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, 4675, __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, 4652, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4675, __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; @@ -54516,7 +54562,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, 4652, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } @@ -54524,14 +54570,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":4653 + /* "netCDF4/_netCDF4.pyx":4676 * # (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, 4653, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_sortbylist); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = NULL; __pyx_t_4 = 0; @@ -54548,7 +54594,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, 4653, __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, 4676, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_7); } else @@ -54556,13 +54602,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, 4653, __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, 4676, __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, 4653, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4676, __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; @@ -54573,7 +54619,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, 4653, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -54581,23 +54627,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":4654 + /* "netCDF4/_netCDF4.pyx":4677 * 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, 4654, __pyx_L1_error) + __pyx_t_11 = PyList_Sort(__pyx_v_offsets); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4677, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4655 + /* "netCDF4/_netCDF4.pyx":4678 * 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, 4655, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; __pyx_t_4 = 0; @@ -54614,7 +54660,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, 4655, __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, 4678, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_7); } else @@ -54622,13 +54668,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, 4655, __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, 4678, __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, 4655, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4678, __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; @@ -54642,7 +54688,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, 4655, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } @@ -54651,9 +54697,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, 4655, __pyx_L1_error) + __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4678, __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, 4655, __pyx_L1_error) + __pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4678, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; for (;;) { @@ -54661,17 +54707,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, 4655, __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, 4678, __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, 4655, __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, 4678, __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, 4655, __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, 4678, __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, 4655, __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, 4678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } @@ -54681,7 +54727,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, 4655, __pyx_L1_error) + else __PYX_ERR(0, 4678, __pyx_L1_error) } break; } @@ -54697,7 +54743,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, 4655, __pyx_L1_error) + __PYX_ERR(0, 4678, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -54713,17 +54759,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, 4655, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4655, __pyx_L1_error) + __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_12 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4655, __pyx_L1_error) + __pyx_t_12 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4678, __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, 4655, __pyx_L1_error) + __pyx_t_13 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4678, __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; @@ -54733,7 +54779,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, 4655, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 3) < 0) __PYX_ERR(0, 4678, __pyx_L1_error) __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L11_unpacking_done; @@ -54741,10 +54787,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, 4655, __pyx_L1_error) + __PYX_ERR(0, 4678, __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, 4655, __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, 4678, __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; @@ -54752,42 +54798,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":4656 + /* "netCDF4/_netCDF4.pyx":4679 * 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, 4656, __pyx_L1_error) + __pyx_t_7 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF_SET(__pyx_v_bytestr, __pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":4657 + /* "netCDF4/_netCDF4.pyx":4680 * 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, 4657, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 4680, __pyx_L1_error) __pyx_v_namstring = __pyx_t_2; - /* "netCDF4/_netCDF4.pyx":4658 + /* "netCDF4/_netCDF4.pyx":4681 * 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, 4658, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_kind); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4681, __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, 4658, __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, 4681, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_5) { - /* "netCDF4/_netCDF4.pyx":4659 + /* "netCDF4/_netCDF4.pyx":4682 * namstring = bytestr * if format.kind != 'V': # scalar primitive type * try: # <<<<<<<<<<<<<< @@ -54803,29 +54849,29 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, __Pyx_XGOTREF(__pyx_t_17); /*try:*/ { - /* "netCDF4/_netCDF4.pyx":4660 + /* "netCDF4/_netCDF4.pyx":4683 * 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, 4660, __pyx_L13_error) + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4683, __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, 4660, __pyx_L13_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_str); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4683, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_t_12, 1, 0, NULL, NULL, &__pyx_slice__86, 1, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4660, __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, 4683, __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, 4660, __pyx_L13_error) + __pyx_t_12 = PyObject_GetItem(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4683, __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, 4660, __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, 4683, __pyx_L13_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_v_xtype_tmp = __pyx_t_18; - /* "netCDF4/_netCDF4.pyx":4659 + /* "netCDF4/_netCDF4.pyx":4682 * namstring = bytestr * if format.kind != 'V': # scalar primitive type * try: # <<<<<<<<<<<<<< @@ -54845,7 +54891,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":4661 + /* "netCDF4/_netCDF4.pyx":4684 * try: * xtype_tmp = _nptonctype[format.str[1:]] * except KeyError: # <<<<<<<<<<<<<< @@ -54855,28 +54901,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, 4661, __pyx_L15_except_error) + if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_8, &__pyx_t_7) < 0) __PYX_ERR(0, 4684, __pyx_L15_except_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_7); - /* "netCDF4/_netCDF4.pyx":4662 + /* "netCDF4/_netCDF4.pyx":4685 * 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__87, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4662, __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, 4685, __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, 4662, __pyx_L15_except_error) + __PYX_ERR(0, 4685, __pyx_L15_except_error) } goto __pyx_L15_except_error; __pyx_L15_except_error:; - /* "netCDF4/_netCDF4.pyx":4659 + /* "netCDF4/_netCDF4.pyx":4682 * namstring = bytestr * if format.kind != 'V': # scalar primitive type * try: # <<<<<<<<<<<<<< @@ -54892,19 +54938,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, __pyx_L20_try_end:; } - /* "netCDF4/_netCDF4.pyx":4663 + /* "netCDF4/_netCDF4.pyx":4686 * 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, 4663, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4686, __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, 4663, __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, 4686, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":4664 + /* "netCDF4/_netCDF4.pyx":4687 * raise ValueError('Unsupported compound type element') * ierr = nc_insert_compound(grp._grpid, xtype, namstring, * offset, xtype_tmp) # <<<<<<<<<<<<<< @@ -54913,7 +54959,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":4665 + /* "netCDF4/_netCDF4.pyx":4688 * ierr = nc_insert_compound(grp._grpid, xtype, namstring, * offset, xtype_tmp) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -54923,7 +54969,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":4666 + /* "netCDF4/_netCDF4.pyx":4689 * offset, xtype_tmp) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -54931,22 +54977,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, 4666, __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, 4689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4666, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4689, __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, 4666, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4689, __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, 4666, __pyx_L1_error) + __PYX_ERR(0, 4689, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4665 + /* "netCDF4/_netCDF4.pyx":4688 * ierr = nc_insert_compound(grp._grpid, xtype, namstring, * offset, xtype_tmp) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -54955,7 +55001,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, */ } - /* "netCDF4/_netCDF4.pyx":4658 + /* "netCDF4/_netCDF4.pyx":4681 * bytestr = _strencode(name) * namstring = bytestr * if format.kind != 'V': # scalar primitive type # <<<<<<<<<<<<<< @@ -54965,7 +55011,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, goto __pyx_L12; } - /* "netCDF4/_netCDF4.pyx":4668 + /* "netCDF4/_netCDF4.pyx":4691 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * else: * if format.shape == (): # nested scalar compound type # <<<<<<<<<<<<<< @@ -54973,62 +55019,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, 4668, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_shape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4691, __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, 4668, __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, 4691, __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, 4668, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4691, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_5) { - /* "netCDF4/_netCDF4.pyx":4670 + /* "netCDF4/_netCDF4.pyx":4693 * 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, 4670, __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, 4693, __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, 4670, __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, 4693, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_xtype_tmp = __pyx_t_18; - /* "netCDF4/_netCDF4.pyx":4671 + /* "netCDF4/_netCDF4.pyx":4694 * # 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, 4671, __pyx_L1_error) + __pyx_t_8 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4694, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF_SET(__pyx_v_bytestr, __pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":4672 + /* "netCDF4/_netCDF4.pyx":4695 * 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, 4672, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 4695, __pyx_L1_error) __pyx_v_nested_namstring = __pyx_t_2; - /* "netCDF4/_netCDF4.pyx":4673 + /* "netCDF4/_netCDF4.pyx":4696 * 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, 4673, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4696, __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, 4673, __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, 4696, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":4675 + /* "netCDF4/_netCDF4.pyx":4698 * ierr = nc_insert_compound(grp._grpid, xtype,\ * nested_namstring,\ * offset, xtype_tmp) # <<<<<<<<<<<<<< @@ -55037,7 +55083,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":4676 + /* "netCDF4/_netCDF4.pyx":4699 * nested_namstring,\ * offset, xtype_tmp) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -55047,7 +55093,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":4700 * offset, xtype_tmp) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -55055,22 +55101,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, 4677, __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, 4700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4677, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4700, __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, 4677, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4700, __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, 4677, __pyx_L1_error) + __PYX_ERR(0, 4700, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4676 + /* "netCDF4/_netCDF4.pyx":4699 * nested_namstring,\ * offset, xtype_tmp) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -55079,7 +55125,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, */ } - /* "netCDF4/_netCDF4.pyx":4668 + /* "netCDF4/_netCDF4.pyx":4691 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * else: * if format.shape == (): # nested scalar compound type # <<<<<<<<<<<<<< @@ -55089,7 +55135,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, goto __pyx_L24; } - /* "netCDF4/_netCDF4.pyx":4679 + /* "netCDF4/_netCDF4.pyx":4702 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * else: # array compound element * ndims = len(format.shape) # <<<<<<<<<<<<<< @@ -55097,13 +55143,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, 4679, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_shape); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4702, __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, 4679, __pyx_L1_error) + __pyx_t_19 = PyObject_Length(__pyx_t_8); if (unlikely(__pyx_t_19 == -1)) __PYX_ERR(0, 4702, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_ndims = __pyx_t_19; - /* "netCDF4/_netCDF4.pyx":4680 + /* "netCDF4/_netCDF4.pyx":4703 * else: # array compound element * ndims = len(format.shape) * dim_sizes = malloc(sizeof(int) * ndims) # <<<<<<<<<<<<<< @@ -55112,7 +55158,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":4681 + /* "netCDF4/_netCDF4.pyx":4704 * ndims = len(format.shape) * dim_sizes = malloc(sizeof(int) * ndims) * for n from 0 <= n < ndims: # <<<<<<<<<<<<<< @@ -55122,46 +55168,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":4682 + /* "netCDF4/_netCDF4.pyx":4705 * 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, 4682, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_shape); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4705, __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, 4682, __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, 4705, __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, 4682, __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, 4705, __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":4683 + /* "netCDF4/_netCDF4.pyx":4706 * 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, 4683, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_subdtype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4706, __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, 4683, __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, 4706, __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, 4683, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_str); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4706, __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, 4683, __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, 4706, __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, 4683, __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, 4706, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_5) { - /* "netCDF4/_netCDF4.pyx":4684 + /* "netCDF4/_netCDF4.pyx":4707 * dim_sizes[n] = format.shape[n] * if format.subdtype[0].str[1] != 'V': # primitive type. * try: # <<<<<<<<<<<<<< @@ -55177,35 +55223,35 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, __Pyx_XGOTREF(__pyx_t_15); /*try:*/ { - /* "netCDF4/_netCDF4.pyx":4685 + /* "netCDF4/_netCDF4.pyx":4708 * 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, 4685, __pyx_L29_error) + __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4708, __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, 4685, __pyx_L29_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_subdtype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4708, __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, 4685, __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, 4708, __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, 4685, __pyx_L29_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_str); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4708, __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__88, 1, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4685, __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, 4708, __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, 4685, __pyx_L29_error) + __pyx_t_7 = PyObject_GetItem(__pyx_t_8, __pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4708, __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, 4685, __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, 4708, __pyx_L29_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_xtype_tmp = __pyx_t_18; - /* "netCDF4/_netCDF4.pyx":4684 + /* "netCDF4/_netCDF4.pyx":4707 * dim_sizes[n] = format.shape[n] * if format.subdtype[0].str[1] != 'V': # primitive type. * try: # <<<<<<<<<<<<<< @@ -55225,7 +55271,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":4686 + /* "netCDF4/_netCDF4.pyx":4709 * try: * xtype_tmp = _nptonctype[format.subdtype[0].str[1:]] * except KeyError: # <<<<<<<<<<<<<< @@ -55235,28 +55281,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, 4686, __pyx_L31_except_error) + if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_12, &__pyx_t_8) < 0) __PYX_ERR(0, 4709, __pyx_L31_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_12); __Pyx_GOTREF(__pyx_t_8); - /* "netCDF4/_netCDF4.pyx":4687 + /* "netCDF4/_netCDF4.pyx":4710 * 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__89, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4687, __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, 4710, __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, 4687, __pyx_L31_except_error) + __PYX_ERR(0, 4710, __pyx_L31_except_error) } goto __pyx_L31_except_error; __pyx_L31_except_error:; - /* "netCDF4/_netCDF4.pyx":4684 + /* "netCDF4/_netCDF4.pyx":4707 * dim_sizes[n] = format.shape[n] * if format.subdtype[0].str[1] != 'V': # primitive type. * try: # <<<<<<<<<<<<<< @@ -55272,19 +55318,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, __pyx_L36_try_end:; } - /* "netCDF4/_netCDF4.pyx":4688 + /* "netCDF4/_netCDF4.pyx":4711 * 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, 4688, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4711, __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, 4688, __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, 4711, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":4689 + /* "netCDF4/_netCDF4.pyx":4712 * raise ValueError('Unsupported compound type element') * ierr = nc_insert_array_compound(grp._grpid,xtype,namstring, * offset,xtype_tmp,ndims,dim_sizes) # <<<<<<<<<<<<<< @@ -55293,7 +55339,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":4690 + /* "netCDF4/_netCDF4.pyx":4713 * ierr = nc_insert_array_compound(grp._grpid,xtype,namstring, * offset,xtype_tmp,ndims,dim_sizes) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -55303,7 +55349,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":4691 + /* "netCDF4/_netCDF4.pyx":4714 * offset,xtype_tmp,ndims,dim_sizes) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -55311,22 +55357,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, 4691, __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, 4714, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4691, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4714, __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, 4691, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_12, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4714, __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, 4691, __pyx_L1_error) + __PYX_ERR(0, 4714, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4690 + /* "netCDF4/_netCDF4.pyx":4713 * ierr = nc_insert_array_compound(grp._grpid,xtype,namstring, * offset,xtype_tmp,ndims,dim_sizes) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -55335,7 +55381,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, */ } - /* "netCDF4/_netCDF4.pyx":4683 + /* "netCDF4/_netCDF4.pyx":4706 * for n from 0 <= n < ndims: * dim_sizes[n] = format.shape[n] * if format.subdtype[0].str[1] != 'V': # primitive type. # <<<<<<<<<<<<<< @@ -55345,7 +55391,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, goto __pyx_L28; } - /* "netCDF4/_netCDF4.pyx":4694 + /* "netCDF4/_netCDF4.pyx":4717 * else: # nested array compound type. * # find this compound type in this group or it's parents. * xtype_tmp = _find_cmptype(grp, format.subdtype[0]) # <<<<<<<<<<<<<< @@ -55353,53 +55399,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, 4694, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_subdtype); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4717, __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, 4694, __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, 4717, __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, 4694, __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, 4717, __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, 4694, __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, 4717, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_xtype_tmp = __pyx_t_18; - /* "netCDF4/_netCDF4.pyx":4695 + /* "netCDF4/_netCDF4.pyx":4718 * # 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, 4695, __pyx_L1_error) + __pyx_t_8 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF_SET(__pyx_v_bytestr, __pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":4696 + /* "netCDF4/_netCDF4.pyx":4719 * 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, 4696, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 4719, __pyx_L1_error) __pyx_v_nested_namstring = __pyx_t_2; - /* "netCDF4/_netCDF4.pyx":4697 + /* "netCDF4/_netCDF4.pyx":4720 * 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, 4697, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4720, __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, 4697, __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, 4720, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":4700 + /* "netCDF4/_netCDF4.pyx":4723 * nested_namstring,\ * offset,xtype_tmp,\ * ndims,dim_sizes) # <<<<<<<<<<<<<< @@ -55408,7 +55454,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":4701 + /* "netCDF4/_netCDF4.pyx":4724 * offset,xtype_tmp,\ * ndims,dim_sizes) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -55418,7 +55464,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":4702 + /* "netCDF4/_netCDF4.pyx":4725 * ndims,dim_sizes) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -55426,22 +55472,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, 4702, __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, 4725, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4702, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4725, __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, 4702, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_12, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4725, __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, 4702, __pyx_L1_error) + __PYX_ERR(0, 4725, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4701 + /* "netCDF4/_netCDF4.pyx":4724 * offset,xtype_tmp,\ * ndims,dim_sizes) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -55452,7 +55498,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, } __pyx_L28:; - /* "netCDF4/_netCDF4.pyx":4703 + /* "netCDF4/_netCDF4.pyx":4726 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * free(dim_sizes) # <<<<<<<<<<<<<< @@ -55465,7 +55511,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, } __pyx_L12:; - /* "netCDF4/_netCDF4.pyx":4655 + /* "netCDF4/_netCDF4.pyx":4678 * formats = _sortbylist(formats, offsets) * offsets.sort() * for name, format, offset in zip(names, formats, offsets): # <<<<<<<<<<<<<< @@ -55475,7 +55521,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":4704 + /* "netCDF4/_netCDF4.pyx":4727 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * free(dim_sizes) * return xtype # <<<<<<<<<<<<<< @@ -55483,13 +55529,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, 4704, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_nc_type(__pyx_v_xtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4727, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":4632 + /* "netCDF4/_netCDF4.pyx":4655 * raise NotImplementedError('CompoundType is not picklable') * * cdef _def_compound(grp, object dt, object dtype_name): # <<<<<<<<<<<<<< @@ -55520,7 +55566,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp, return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4706 +/* "netCDF4/_netCDF4.pyx":4729 * return xtype * * cdef _find_cmptype(grp, dtype): # <<<<<<<<<<<<<< @@ -55560,7 +55606,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":4710 + /* "netCDF4/_netCDF4.pyx":4733 * # return datatype id when found, if not found, raise exception. * cdef nc_type xtype * match = False # <<<<<<<<<<<<<< @@ -55569,16 +55615,16 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, */ __pyx_v_match = 0; - /* "netCDF4/_netCDF4.pyx":4711 + /* "netCDF4/_netCDF4.pyx":4734 * 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, 4711, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_cmptypes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4734, __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, 4711, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4734, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -55592,10 +55638,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, 4711, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4734, __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, 4711, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4734, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -55603,9 +55649,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, 4711, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4734, __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, 4711, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4734, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -55613,17 +55659,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, 4711, __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, 4734, __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, 4711, __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, 4734, __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, 4711, __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, 4734, __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, 4711, __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, 4734, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -55633,7 +55679,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, 4711, __pyx_L1_error) + else __PYX_ERR(0, 4734, __pyx_L1_error) } break; } @@ -55649,7 +55695,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, 4711, __pyx_L1_error) + __PYX_ERR(0, 4734, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -55662,15 +55708,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, 4711, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4734, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4711, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4734, __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, 4711, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4734, __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; @@ -55678,7 +55724,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, 4711, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 4734, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_unpacking_done; @@ -55686,7 +55732,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, 4711, __pyx_L1_error) + __PYX_ERR(0, 4734, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_cmpname, __pyx_t_2); @@ -55694,50 +55740,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":4712 + /* "netCDF4/_netCDF4.pyx":4735 * 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, 4712, __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, 4735, __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, 4712, __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, 4735, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_xtype = __pyx_t_9; - /* "netCDF4/_netCDF4.pyx":4713 + /* "netCDF4/_netCDF4.pyx":4736 * 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, 4713, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_names); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4736, __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, 4713, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmpdt, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4736, __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, 4713, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_names); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4736, __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":4714 + /* "netCDF4/_netCDF4.pyx":4737 * 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, 4714, __pyx_L1_error) + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4737, __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, 4714, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_fields); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4737, __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, 4714, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4737, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -55751,10 +55797,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, 4714, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4737, __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, 4714, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4737, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -55762,9 +55808,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, 4714, __pyx_L1_error) + __pyx_t_10 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4737, __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, 4714, __pyx_L1_error) + __pyx_t_11 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4737, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -55772,17 +55818,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, 4714, __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, 4737, __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, 4714, __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, 4737, __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, 4714, __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, 4737, __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, 4714, __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, 4737, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -55792,7 +55838,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, 4714, __pyx_L1_error) + else __PYX_ERR(0, 4737, __pyx_L1_error) } break; } @@ -55800,30 +55846,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, 4714, __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, 4737, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 4714, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 4737, __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":4715 + /* "netCDF4/_netCDF4.pyx":4738 * 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, 4715, __pyx_L1_error) + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4738, __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, 4715, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmpdt, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4738, __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, 4715, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_fields); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4738, __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, 4715, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4738, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -55837,10 +55883,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, 4715, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4738, __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, 4715, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4738, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -55848,9 +55894,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, 4715, __pyx_L1_error) + __pyx_t_10 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4738, __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, 4715, __pyx_L1_error) + __pyx_t_11 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4738, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; for (;;) { @@ -55858,17 +55904,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, 4715, __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, 4738, __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, 4715, __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, 4738, __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, 4715, __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, 4738, __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, 4715, __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, 4738, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } @@ -55878,7 +55924,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, 4715, __pyx_L1_error) + else __PYX_ERR(0, 4738, __pyx_L1_error) } break; } @@ -55886,38 +55932,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, 4715, __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, 4738, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 4715, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 4738, __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":4718 + /* "netCDF4/_netCDF4.pyx":4741 * # 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, 4718, __pyx_L1_error) - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 4718, __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, 4741, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 4741, __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, 4718, __pyx_L1_error) - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 4718, __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, 4741, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 4741, __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":4719 + /* "netCDF4/_netCDF4.pyx":4742 * # by netcdf lib). * if names1==names2 and formats1==formats2: * match = True # <<<<<<<<<<<<<< @@ -55926,7 +55972,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, */ __pyx_v_match = 1; - /* "netCDF4/_netCDF4.pyx":4720 + /* "netCDF4/_netCDF4.pyx":4743 * if names1==names2 and formats1==formats2: * match = True * break # <<<<<<<<<<<<<< @@ -55935,7 +55981,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, */ goto __pyx_L4_break; - /* "netCDF4/_netCDF4.pyx":4718 + /* "netCDF4/_netCDF4.pyx":4741 * # match names, formats, but not offsets (they may be changed * # by netcdf lib). * if names1==names2 and formats1==formats2: # <<<<<<<<<<<<<< @@ -55944,7 +55990,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, */ } - /* "netCDF4/_netCDF4.pyx":4711 + /* "netCDF4/_netCDF4.pyx":4734 * cdef nc_type xtype * match = False * for cmpname, cmpdt in grp.cmptypes.items(): # <<<<<<<<<<<<<< @@ -55955,7 +56001,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":4721 + /* "netCDF4/_netCDF4.pyx":4744 * match = True * break * if not match: # <<<<<<<<<<<<<< @@ -55965,7 +56011,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":4722 + /* "netCDF4/_netCDF4.pyx":4745 * break * if not match: * try: # <<<<<<<<<<<<<< @@ -55981,19 +56027,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, __Pyx_XGOTREF(__pyx_t_16); /*try:*/ { - /* "netCDF4/_netCDF4.pyx":4723 + /* "netCDF4/_netCDF4.pyx":4746 * 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, 4723, __pyx_L15_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_parent); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4746, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_parent_grp = __pyx_t_3; __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":4722 + /* "netCDF4/_netCDF4.pyx":4745 * break * if not match: * try: # <<<<<<<<<<<<<< @@ -56013,7 +56059,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":4724 + /* "netCDF4/_netCDF4.pyx":4747 * try: * parent_grp = grp.parent * except AttributeError: # <<<<<<<<<<<<<< @@ -56023,28 +56069,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, 4724, __pyx_L17_except_error) + if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_6, &__pyx_t_1) < 0) __PYX_ERR(0, 4747, __pyx_L17_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_1); - /* "netCDF4/_netCDF4.pyx":4725 + /* "netCDF4/_netCDF4.pyx":4748 * 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__90, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4725, __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, 4748, __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, 4725, __pyx_L17_except_error) + __PYX_ERR(0, 4748, __pyx_L17_except_error) } goto __pyx_L17_except_error; __pyx_L17_except_error:; - /* "netCDF4/_netCDF4.pyx":4722 + /* "netCDF4/_netCDF4.pyx":4745 * break * if not match: * try: # <<<<<<<<<<<<<< @@ -56060,7 +56106,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, __pyx_L22_try_end:; } - /* "netCDF4/_netCDF4.pyx":4726 + /* "netCDF4/_netCDF4.pyx":4749 * except AttributeError: * raise ValueError("cannot find compound type in this group or parent groups") * if parent_grp is None: # <<<<<<<<<<<<<< @@ -56071,20 +56117,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":4727 + /* "netCDF4/_netCDF4.pyx":4750 * 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__91, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4727, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__95, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4750, __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, 4727, __pyx_L1_error) + __PYX_ERR(0, 4750, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4726 + /* "netCDF4/_netCDF4.pyx":4749 * except AttributeError: * raise ValueError("cannot find compound type in this group or parent groups") * if parent_grp is None: # <<<<<<<<<<<<<< @@ -56093,7 +56139,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, */ } - /* "netCDF4/_netCDF4.pyx":4729 + /* "netCDF4/_netCDF4.pyx":4752 * raise ValueError("cannot find compound type in this group or parent groups") * else: * xtype = _find_cmptype(parent_grp,dtype) # <<<<<<<<<<<<<< @@ -56101,14 +56147,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, 4729, __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, 4752, __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, 4729, __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, 4752, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_xtype = __pyx_t_9; } - /* "netCDF4/_netCDF4.pyx":4721 + /* "netCDF4/_netCDF4.pyx":4744 * match = True * break * if not match: # <<<<<<<<<<<<<< @@ -56117,7 +56163,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, */ } - /* "netCDF4/_netCDF4.pyx":4730 + /* "netCDF4/_netCDF4.pyx":4753 * else: * xtype = _find_cmptype(parent_grp,dtype) * return xtype # <<<<<<<<<<<<<< @@ -56125,13 +56171,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, 4730, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_nc_type(__pyx_v_xtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4753, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":4706 + /* "netCDF4/_netCDF4.pyx":4729 * return xtype * * cdef _find_cmptype(grp, dtype): # <<<<<<<<<<<<<< @@ -56162,7 +56208,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp, return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4732 +/* "netCDF4/_netCDF4.pyx":4755 * return xtype * * cdef _read_compound(group, nc_type xtype, endian=None): # <<<<<<<<<<<<<< @@ -56218,20 +56264,20 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro } } - /* "netCDF4/_netCDF4.pyx":4745 + /* "netCDF4/_netCDF4.pyx":4768 * 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, 4745, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4768, __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, 4745, __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, 4768, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v__grpid = __pyx_t_2; - /* "netCDF4/_netCDF4.pyx":4746 + /* "netCDF4/_netCDF4.pyx":4769 * # get name and number of fields. * _grpid = group._grpid * with nogil: # <<<<<<<<<<<<<< @@ -56245,7 +56291,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":4747 + /* "netCDF4/_netCDF4.pyx":4770 * _grpid = group._grpid * with nogil: * ierr = nc_inq_compound(_grpid, xtype, cmp_namstring, NULL, &nfields) # <<<<<<<<<<<<<< @@ -56255,7 +56301,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":4746 + /* "netCDF4/_netCDF4.pyx":4769 * # get name and number of fields. * _grpid = group._grpid * with nogil: # <<<<<<<<<<<<<< @@ -56273,7 +56319,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro } } - /* "netCDF4/_netCDF4.pyx":4748 + /* "netCDF4/_netCDF4.pyx":4771 * with nogil: * ierr = nc_inq_compound(_grpid, xtype, cmp_namstring, NULL, &nfields) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -56283,7 +56329,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":4749 + /* "netCDF4/_netCDF4.pyx":4772 * ierr = nc_inq_compound(_grpid, xtype, cmp_namstring, NULL, &nfields) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -56291,22 +56337,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, 4749, __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, 4772, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4749, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4772, __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, 4749, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4772, __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, 4749, __pyx_L1_error) + __PYX_ERR(0, 4772, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4748 + /* "netCDF4/_netCDF4.pyx":4771 * with nogil: * ierr = nc_inq_compound(_grpid, xtype, cmp_namstring, NULL, &nfields) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -56315,21 +56361,21 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro */ } - /* "netCDF4/_netCDF4.pyx":4750 + /* "netCDF4/_netCDF4.pyx":4773 * 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, 4750, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_cmp_namstring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4773, __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, 4750, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4773, __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, 4750, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4773, __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, 4750, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4773, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; __pyx_t_2 = 0; @@ -56346,7 +56392,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, 4750, __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, 4773, __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; @@ -56356,7 +56402,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, 4750, __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, 4773, __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; @@ -56364,7 +56410,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, 4750, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4773, __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; @@ -56375,7 +56421,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, 4750, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4773, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -56383,43 +56429,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":4752 + /* "netCDF4/_netCDF4.pyx":4775 * 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, 4752, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_names = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":4753 + /* "netCDF4/_netCDF4.pyx":4776 * # 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, 4753, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4776, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_formats = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":4754 + /* "netCDF4/_netCDF4.pyx":4777 * 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, 4754, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4777, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_offsets = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":4755 + /* "netCDF4/_netCDF4.pyx":4778 * formats = [] * offsets = [] * for nf from 0 <= nf < nfields: # <<<<<<<<<<<<<< @@ -56429,7 +56475,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":4756 + /* "netCDF4/_netCDF4.pyx":4779 * offsets = [] * for nf from 0 <= nf < nfields: * with nogil: # <<<<<<<<<<<<<< @@ -56443,7 +56489,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":4757 + /* "netCDF4/_netCDF4.pyx":4780 * for nf from 0 <= nf < nfields: * with nogil: * ierr = nc_inq_compound_field(_grpid, # <<<<<<<<<<<<<< @@ -56453,7 +56499,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":4756 + /* "netCDF4/_netCDF4.pyx":4779 * offsets = [] * for nf from 0 <= nf < nfields: * with nogil: # <<<<<<<<<<<<<< @@ -56471,7 +56517,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro } } - /* "netCDF4/_netCDF4.pyx":4765 + /* "netCDF4/_netCDF4.pyx":4788 * &numdims, * NULL) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -56481,7 +56527,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":4766 + /* "netCDF4/_netCDF4.pyx":4789 * NULL) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -56489,22 +56535,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, 4766, __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, 4789, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4766, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4789, __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, 4766, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4789, __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, 4766, __pyx_L1_error) + __PYX_ERR(0, 4789, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4765 + /* "netCDF4/_netCDF4.pyx":4788 * &numdims, * NULL) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -56513,7 +56559,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro */ } - /* "netCDF4/_netCDF4.pyx":4767 + /* "netCDF4/_netCDF4.pyx":4790 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * dim_sizes = malloc(sizeof(int) * numdims) # <<<<<<<<<<<<<< @@ -56522,7 +56568,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":4768 + /* "netCDF4/_netCDF4.pyx":4791 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * dim_sizes = malloc(sizeof(int) * numdims) * with nogil: # <<<<<<<<<<<<<< @@ -56536,7 +56582,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":4769 + /* "netCDF4/_netCDF4.pyx":4792 * dim_sizes = malloc(sizeof(int) * numdims) * with nogil: * ierr = nc_inq_compound_field(_grpid, # <<<<<<<<<<<<<< @@ -56546,7 +56592,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":4768 + /* "netCDF4/_netCDF4.pyx":4791 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * dim_sizes = malloc(sizeof(int) * numdims) * with nogil: # <<<<<<<<<<<<<< @@ -56564,7 +56610,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro } } - /* "netCDF4/_netCDF4.pyx":4777 + /* "netCDF4/_netCDF4.pyx":4800 * &numdims, * dim_sizes) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -56574,7 +56620,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":4778 + /* "netCDF4/_netCDF4.pyx":4801 * dim_sizes) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -56582,22 +56628,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, 4778, __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, 4801, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4778, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4801, __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, 4778, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4801, __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, 4778, __pyx_L1_error) + __PYX_ERR(0, 4801, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4777 + /* "netCDF4/_netCDF4.pyx":4800 * &numdims, * dim_sizes) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -56606,21 +56652,21 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro */ } - /* "netCDF4/_netCDF4.pyx":4779 + /* "netCDF4/_netCDF4.pyx":4802 * 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, 4779, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_FromString(__pyx_v_field_namstring); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4802, __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, 4779, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_decode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4802, __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, 4779, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4802, __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, 4779, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4802, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = NULL; __pyx_t_2 = 0; @@ -56637,7 +56683,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, 4779, __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, 4802, __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; @@ -56647,7 +56693,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, 4779, __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, 4802, __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; @@ -56655,7 +56701,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, 4779, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4802, __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; @@ -56666,7 +56712,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, 4779, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4802, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -56674,28 +56720,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":4780 + /* "netCDF4/_netCDF4.pyx":4803 * 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, 4780, __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, 4803, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4781 + /* "netCDF4/_netCDF4.pyx":4804 * 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, 4781, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4804, __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, 4781, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_offsets, __pyx_t_1); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4804, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":4783 + /* "netCDF4/_netCDF4.pyx":4806 * offsets.append(offset) * # if numdims=0, not an array. * field_shape = () # <<<<<<<<<<<<<< @@ -56705,7 +56751,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":4784 + /* "netCDF4/_netCDF4.pyx":4807 * # if numdims=0, not an array. * field_shape = () * if numdims != 0: # <<<<<<<<<<<<<< @@ -56715,7 +56761,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":4785 + /* "netCDF4/_netCDF4.pyx":4808 * field_shape = () * if numdims != 0: * for ndim from 0 <= ndim < numdims: # <<<<<<<<<<<<<< @@ -56725,28 +56771,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":4786 + /* "netCDF4/_netCDF4.pyx":4809 * 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, 4786, __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, 4809, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4786, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4809, __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, 4786, __pyx_L1_error) + __pyx_t_1 = PyNumber_Add(__pyx_v_field_shape, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4809, __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":4784 + /* "netCDF4/_netCDF4.pyx":4807 * # if numdims=0, not an array. * field_shape = () * if numdims != 0: # <<<<<<<<<<<<<< @@ -56755,7 +56801,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro */ } - /* "netCDF4/_netCDF4.pyx":4787 + /* "netCDF4/_netCDF4.pyx":4810 * for ndim from 0 <= ndim < numdims: * field_shape = field_shape + (dim_sizes[ndim],) * free(dim_sizes) # <<<<<<<<<<<<<< @@ -56764,7 +56810,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro */ free(__pyx_v_dim_sizes); - /* "netCDF4/_netCDF4.pyx":4789 + /* "netCDF4/_netCDF4.pyx":4812 * free(dim_sizes) * # check to see if this field is a nested compound type. * try: # <<<<<<<<<<<<<< @@ -56780,22 +56826,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro __Pyx_XGOTREF(__pyx_t_14); /*try:*/ { - /* "netCDF4/_netCDF4.pyx":4790 + /* "netCDF4/_netCDF4.pyx":4813 * # 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, 4790, __pyx_L24_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4813, __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, 4790, __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, 4813, __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":4791 + /* "netCDF4/_netCDF4.pyx":4814 * try: * field_type = _nctonptype[field_typeid] * if endian is not None: # <<<<<<<<<<<<<< @@ -56806,20 +56852,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":4792 + /* "netCDF4/_netCDF4.pyx":4815 * 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, 4792, __pyx_L24_error) } - __pyx_t_9 = PyNumber_Add(__pyx_v_endian, __pyx_v_format); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4792, __pyx_L24_error) + if (unlikely(!__pyx_v_format)) { __Pyx_RaiseUnboundLocalError("format"); __PYX_ERR(0, 4815, __pyx_L24_error) } + __pyx_t_9 = PyNumber_Add(__pyx_v_endian, __pyx_v_format); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4815, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_XDECREF_SET(__pyx_v_format, __pyx_t_9); __pyx_t_9 = 0; - /* "netCDF4/_netCDF4.pyx":4791 + /* "netCDF4/_netCDF4.pyx":4814 * try: * field_type = _nctonptype[field_typeid] * if endian is not None: # <<<<<<<<<<<<<< @@ -56828,7 +56874,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro */ } - /* "netCDF4/_netCDF4.pyx":4789 + /* "netCDF4/_netCDF4.pyx":4812 * free(dim_sizes) * # check to see if this field is a nested compound type. * try: # <<<<<<<<<<<<<< @@ -56849,7 +56895,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":4793 + /* "netCDF4/_netCDF4.pyx":4816 * if endian is not None: * format = endian + format * except KeyError: # <<<<<<<<<<<<<< @@ -56859,12 +56905,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, 4793, __pyx_L26_except_error) + if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_1, &__pyx_t_8) < 0) __PYX_ERR(0, 4816, __pyx_L26_except_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_8); - /* "netCDF4/_netCDF4.pyx":4794 + /* "netCDF4/_netCDF4.pyx":4817 * format = endian + format * except KeyError: * with nogil: # <<<<<<<<<<<<<< @@ -56878,7 +56924,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":4795 + /* "netCDF4/_netCDF4.pyx":4818 * except KeyError: * with nogil: * ierr = nc_inq_user_type(_grpid, # <<<<<<<<<<<<<< @@ -56888,7 +56934,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":4794 + /* "netCDF4/_netCDF4.pyx":4817 * format = endian + format * except KeyError: * with nogil: # <<<<<<<<<<<<<< @@ -56906,7 +56952,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro } } - /* "netCDF4/_netCDF4.pyx":4797 + /* "netCDF4/_netCDF4.pyx":4820 * ierr = nc_inq_user_type(_grpid, * field_typeid,NULL,NULL,NULL,NULL,&classp) * if classp == NC_COMPOUND: # a compound type # <<<<<<<<<<<<<< @@ -56916,7 +56962,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":4799 + /* "netCDF4/_netCDF4.pyx":4822 * if classp == NC_COMPOUND: # a compound type * # recursively call this function? * field_type = _read_compound(group, field_typeid, endian=endian) # <<<<<<<<<<<<<< @@ -56925,12 +56971,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, 4799, __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, 4822, __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":4797 + /* "netCDF4/_netCDF4.pyx":4820 * ierr = nc_inq_user_type(_grpid, * field_typeid,NULL,NULL,NULL,NULL,&classp) * if classp == NC_COMPOUND: # a compound type # <<<<<<<<<<<<<< @@ -56940,7 +56986,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro goto __pyx_L40; } - /* "netCDF4/_netCDF4.pyx":4801 + /* "netCDF4/_netCDF4.pyx":4824 * field_type = _read_compound(group, field_typeid, endian=endian) * else: * raise KeyError('compound field of an unsupported data type') # <<<<<<<<<<<<<< @@ -56948,11 +56994,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__92, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4801, __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, 4824, __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, 4801, __pyx_L26_except_error) + __PYX_ERR(0, 4824, __pyx_L26_except_error) } __pyx_L40:; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; @@ -56963,7 +57009,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":4789 + /* "netCDF4/_netCDF4.pyx":4812 * free(dim_sizes) * # check to see if this field is a nested compound type. * try: # <<<<<<<<<<<<<< @@ -56985,26 +57031,26 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro __pyx_L31_try_end:; } - /* "netCDF4/_netCDF4.pyx":4802 + /* "netCDF4/_netCDF4.pyx":4825 * 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, 4802, __pyx_L1_error) - __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 4802, __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, 4825, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 4825, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_15) { - /* "netCDF4/_netCDF4.pyx":4803 + /* "netCDF4/_netCDF4.pyx":4826 * 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, 4803, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4826, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_field_type); __Pyx_GIVEREF(__pyx_v_field_type); @@ -57012,10 +57058,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, 4803, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_formats, __pyx_t_8); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4826, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":4802 + /* "netCDF4/_netCDF4.pyx":4825 * else: * raise KeyError('compound field of an unsupported data type') * if field_shape != (): # <<<<<<<<<<<<<< @@ -57025,7 +57071,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro goto __pyx_L41; } - /* "netCDF4/_netCDF4.pyx":4805 + /* "netCDF4/_netCDF4.pyx":4828 * formats.append((field_type,field_shape)) * else: * formats.append(field_type) # <<<<<<<<<<<<<< @@ -57033,19 +57079,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, 4805, __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, 4828, __pyx_L1_error) } __pyx_L41:; } - /* "netCDF4/_netCDF4.pyx":4807 + /* "netCDF4/_netCDF4.pyx":4830 * 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, 4807, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sortbylist); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4830, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = NULL; __pyx_t_2 = 0; @@ -57062,7 +57108,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, 4807, __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, 4830, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_8); } else @@ -57070,13 +57116,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, 4807, __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, 4830, __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, 4807, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4830, __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; @@ -57087,7 +57133,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, 4807, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4830, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -57095,14 +57141,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":4808 + /* "netCDF4/_netCDF4.pyx":4831 * # 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, 4808, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sortbylist); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4831, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = NULL; __pyx_t_2 = 0; @@ -57119,7 +57165,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, 4808, __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, 4831, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_8); } else @@ -57127,13 +57173,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, 4808, __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, 4831, __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, 4808, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4831, __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; @@ -57144,7 +57190,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, 4808, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4831, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -57152,31 +57198,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":4809 + /* "netCDF4/_netCDF4.pyx":4832 * 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, 4809, __pyx_L1_error) + __pyx_t_11 = PyList_Sort(__pyx_v_offsets); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4832, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4811 + /* "netCDF4/_netCDF4.pyx":4834 * 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, 4811, __pyx_L1_error) + __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4834, __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, 4811, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_formats, __pyx_v_formats) < 0) __PYX_ERR(0, 4811, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_offsets, __pyx_v_offsets) < 0) __PYX_ERR(0, 4811, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_names, __pyx_v_names) < 0) __PYX_ERR(0, 4834, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_formats, __pyx_v_formats) < 0) __PYX_ERR(0, 4834, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_offsets, __pyx_v_offsets) < 0) __PYX_ERR(0, 4834, __pyx_L1_error) __pyx_v_dtype_dict = ((PyObject*)__pyx_t_8); __pyx_t_8 = 0; - /* "netCDF4/_netCDF4.pyx":4812 + /* "netCDF4/_netCDF4.pyx":4835 * # 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) # <<<<<<<<<<<<<< @@ -57184,7 +57230,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, 4812, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4835, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_group); __Pyx_GIVEREF(__pyx_v_group); @@ -57195,13 +57241,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, 4812, __pyx_L1_error) + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4835, __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, 4812, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_From_nc_type(__pyx_v_xtype); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4835, __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, 4812, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_typeid, __pyx_t_9) < 0) __PYX_ERR(0, 4835, __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, 4812, __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, 4835, __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; @@ -57209,7 +57255,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro __pyx_t_9 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":4732 + /* "netCDF4/_netCDF4.pyx":4755 * return xtype * * cdef _read_compound(group, nc_type xtype, endian=None): # <<<<<<<<<<<<<< @@ -57242,7 +57288,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4832 +/* "netCDF4/_netCDF4.pyx":4855 * __pdoc__['VLType.dtype'] = \ * """A numpy dtype object describing the component type for the VLEN.""" * def __init__(self, grp, object dt, object dtype_name, **kwargs): # <<<<<<<<<<<<<< @@ -57287,16 +57333,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, 4832, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 4855, __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, 4832, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 4855, __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, 4832, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 4855, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -57311,7 +57357,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, 4832, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4855, __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); @@ -57341,31 +57387,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":4851 + /* "netCDF4/_netCDF4.pyx":4874 * """ * 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, 4851, __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, 4874, __pyx_L1_error) __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":4852 + /* "netCDF4/_netCDF4.pyx":4875 * 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, 4852, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_s_typeid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4875, __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, 4852, __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, 4875, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_xtype = __pyx_t_4; - /* "netCDF4/_netCDF4.pyx":4851 + /* "netCDF4/_netCDF4.pyx":4874 * """ * cdef nc_type xtype * if 'typeid' in kwargs: # <<<<<<<<<<<<<< @@ -57375,7 +57421,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_6VLType___init__(struct __pyx_obj_7netCDF goto __pyx_L3; } - /* "netCDF4/_netCDF4.pyx":4854 + /* "netCDF4/_netCDF4.pyx":4877 * xtype = kwargs['typeid'] * else: * xtype, dt = _def_vlen(grp, dt, dtype_name) # <<<<<<<<<<<<<< @@ -57383,7 +57429,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, 4854, __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, 4877, __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; @@ -57395,7 +57441,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, 4854, __pyx_L1_error) + __PYX_ERR(0, 4877, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -57408,15 +57454,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, 4854, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4877, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4854, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4877, __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, 4854, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4877, __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; @@ -57424,7 +57470,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, 4854, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 4877, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L5_unpacking_done; @@ -57432,10 +57478,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, 4854, __pyx_L1_error) + __PYX_ERR(0, 4877, __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, 4854, __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, 4877, __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); @@ -57443,7 +57489,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_6VLType___init__(struct __pyx_obj_7netCDF } __pyx_L3:; - /* "netCDF4/_netCDF4.pyx":4855 + /* "netCDF4/_netCDF4.pyx":4878 * else: * xtype, dt = _def_vlen(grp, dt, dtype_name) * self._nc_type = xtype # <<<<<<<<<<<<<< @@ -57452,7 +57498,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":4856 + /* "netCDF4/_netCDF4.pyx":4879 * xtype, dt = _def_vlen(grp, dt, dtype_name) * self._nc_type = xtype * self.dtype = dt # <<<<<<<<<<<<<< @@ -57465,19 +57511,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":4857 + /* "netCDF4/_netCDF4.pyx":4880 * 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, 4857, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4857, __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, 4880, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4880, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":4858 + /* "netCDF4/_netCDF4.pyx":4881 * self.dtype = dt * if dt == str: * self.name = None # <<<<<<<<<<<<<< @@ -57490,7 +57536,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":4857 + /* "netCDF4/_netCDF4.pyx":4880 * self._nc_type = xtype * self.dtype = dt * if dt == str: # <<<<<<<<<<<<<< @@ -57500,7 +57546,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_6VLType___init__(struct __pyx_obj_7netCDF goto __pyx_L6; } - /* "netCDF4/_netCDF4.pyx":4860 + /* "netCDF4/_netCDF4.pyx":4883 * self.name = None * else: * self.name = dtype_name # <<<<<<<<<<<<<< @@ -57516,7 +57562,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_6VLType___init__(struct __pyx_obj_7netCDF } __pyx_L6:; - /* "netCDF4/_netCDF4.pyx":4832 + /* "netCDF4/_netCDF4.pyx":4855 * __pdoc__['VLType.dtype'] = \ * """A numpy dtype object describing the component type for the VLEN.""" * def __init__(self, grp, object dt, object dtype_name, **kwargs): # <<<<<<<<<<<<<< @@ -57540,7 +57586,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_6VLType___init__(struct __pyx_obj_7netCDF return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4862 +/* "netCDF4/_netCDF4.pyx":4885 * self.name = dtype_name * * def __repr__(self): # <<<<<<<<<<<<<< @@ -57572,20 +57618,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":4863 + /* "netCDF4/_netCDF4.pyx":4886 * * 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, 4863, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4886, __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, 4863, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4886, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":4864 + /* "netCDF4/_netCDF4.pyx":4887 * def __repr__(self): * if python3: * return self.__unicode__() # <<<<<<<<<<<<<< @@ -57593,7 +57639,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, 4864, __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, 4887, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -57606,10 +57652,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, 4864, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4887, __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, 4864, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4887, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -57617,7 +57663,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_2__repr__(struct __pyx_obj_ __pyx_t_1 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":4863 + /* "netCDF4/_netCDF4.pyx":4886 * * def __repr__(self): * if python3: # <<<<<<<<<<<<<< @@ -57626,7 +57672,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_2__repr__(struct __pyx_obj_ */ } - /* "netCDF4/_netCDF4.pyx":4866 + /* "netCDF4/_netCDF4.pyx":4889 * return self.__unicode__() * else: * return unicode(self).encode(default_encoding) # <<<<<<<<<<<<<< @@ -57635,18 +57681,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, 4866, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4889, __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, 4866, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4889, __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, 4866, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4889, __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, 4866, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4889, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -57659,14 +57705,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, 4866, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4889, __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, 4866, __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, 4889, __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; @@ -57675,20 +57721,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, 4866, __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, 4889, __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, 4866, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4889, __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, 4866, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4889, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -57699,7 +57745,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_2__repr__(struct __pyx_obj_ goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":4862 + /* "netCDF4/_netCDF4.pyx":4885 * self.name = dtype_name * * def __repr__(self): # <<<<<<<<<<<<<< @@ -57722,7 +57768,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_2__repr__(struct __pyx_obj_ return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4868 +/* "netCDF4/_netCDF4.pyx":4891 * return unicode(self).encode(default_encoding) * * def __unicode__(self): # <<<<<<<<<<<<<< @@ -57752,19 +57798,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":4869 + /* "netCDF4/_netCDF4.pyx":4892 * * 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, 4869, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4869, __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, 4892, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4892, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":4870 + /* "netCDF4/_netCDF4.pyx":4893 * def __unicode__(self): * if self.dtype == str: * return repr(type(self))+': string type' # <<<<<<<<<<<<<< @@ -57772,16 +57818,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, 4870, __pyx_L1_error) + __pyx_t_1 = PyObject_Repr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4893, __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, 4870, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_kp_s_string_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4893, __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":4869 + /* "netCDF4/_netCDF4.pyx":4892 * * def __unicode__(self): * if self.dtype == str: # <<<<<<<<<<<<<< @@ -57790,7 +57836,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_4__unicode__(struct __pyx_o */ } - /* "netCDF4/_netCDF4.pyx":4872 + /* "netCDF4/_netCDF4.pyx":4895 * return repr(type(self))+': string type' * else: * return repr(type(self))+": name = '%s', numpy dtype = %s\n" %\ # <<<<<<<<<<<<<< @@ -57799,17 +57845,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, 4872, __pyx_L1_error) + __pyx_t_3 = PyObject_Repr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - /* "netCDF4/_netCDF4.pyx":4873 + /* "netCDF4/_netCDF4.pyx":4896 * 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, 4873, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self->name); __Pyx_GIVEREF(__pyx_v_self->name); @@ -57818,17 +57864,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":4872 + /* "netCDF4/_netCDF4.pyx":4895 * 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, 4872, __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, 4895, __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, 4872, __pyx_L1_error) + __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4895, __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; @@ -57837,7 +57883,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_4__unicode__(struct __pyx_o goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":4868 + /* "netCDF4/_netCDF4.pyx":4891 * return unicode(self).encode(default_encoding) * * def __unicode__(self): # <<<<<<<<<<<<<< @@ -57858,7 +57904,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_4__unicode__(struct __pyx_o return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4875 +/* "netCDF4/_netCDF4.pyx":4898 * (self.name, self.dtype) * * def __reduce__(self): # <<<<<<<<<<<<<< @@ -57885,20 +57931,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":4877 + /* "netCDF4/_netCDF4.pyx":4900 * 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__93, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4877, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__97, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4900, __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, 4877, __pyx_L1_error) + __PYX_ERR(0, 4900, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4875 + /* "netCDF4/_netCDF4.pyx":4898 * (self.name, self.dtype) * * def __reduce__(self): # <<<<<<<<<<<<<< @@ -57916,7 +57962,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_6__reduce__(CYTHON_UNUSED s return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4826 +/* "netCDF4/_netCDF4.pyx":4849 * the user. * """ * cdef public nc_type _nc_type # <<<<<<<<<<<<<< @@ -57943,7 +57989,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, 4826, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_nc_type(__pyx_v_self->_nc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4849, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -57978,7 +58024,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, 4826, __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, 4849, __pyx_L1_error) __pyx_v_self->_nc_type = __pyx_t_1; /* function exit code */ @@ -57992,7 +58038,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_6VLType_8_nc_type_2__set__(struct __pyx_o return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4827 +/* "netCDF4/_netCDF4.pyx":4850 * """ * cdef public nc_type _nc_type * cdef public dtype, name # <<<<<<<<<<<<<< @@ -58174,7 +58220,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_6VLType_4name_4__del__(struct __pyx_obj_7 return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4879 +/* "netCDF4/_netCDF4.pyx":4902 * raise NotImplementedError('VLType is not picklable') * * cdef _def_vlen(grp, object dt, object dtype_name): # <<<<<<<<<<<<<< @@ -58202,19 +58248,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":4887 + /* "netCDF4/_netCDF4.pyx":4910 * 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, 4887, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4887, __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, 4910, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4910, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":4888 + /* "netCDF4/_netCDF4.pyx":4911 * cdef char *nested_namstring * if dt == str: # python string, use NC_STRING * xtype = NC_STRING # <<<<<<<<<<<<<< @@ -58223,7 +58269,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_vlen(PyObject *__pyx_v_grp, PyO */ __pyx_v_xtype = NC_STRING; - /* "netCDF4/_netCDF4.pyx":4887 + /* "netCDF4/_netCDF4.pyx":4910 * cdef char *namstring * cdef char *nested_namstring * if dt == str: # python string, use NC_STRING # <<<<<<<<<<<<<< @@ -58233,7 +58279,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_vlen(PyObject *__pyx_v_grp, PyO goto __pyx_L3; } - /* "netCDF4/_netCDF4.pyx":4891 + /* "netCDF4/_netCDF4.pyx":4914 * # dtype_name ignored * else: # numpy datatype * bytestr = _strencode(dtype_name) # <<<<<<<<<<<<<< @@ -58241,31 +58287,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, 4891, __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, 4914, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_bytestr = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":4892 + /* "netCDF4/_netCDF4.pyx":4915 * 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, 4892, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 4915, __pyx_L1_error) __pyx_v_namstring = __pyx_t_3; - /* "netCDF4/_netCDF4.pyx":4893 + /* "netCDF4/_netCDF4.pyx":4916 * 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, 4893, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4916, __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, 4893, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4916, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -58279,13 +58325,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, 4893, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_dt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4916, __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, 4893, __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, 4916, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -58293,19 +58339,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, 4893, __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, 4916, __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, 4893, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4916, __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, 4893, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4916, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -58314,62 +58360,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":4894 + /* "netCDF4/_netCDF4.pyx":4917 * 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, 4894, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_str); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4917, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_1, 1, 0, NULL, NULL, &__pyx_slice__94, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4894, __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, 4917, __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, 4894, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_supportedtypes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4917, __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, 4894, __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, 4917, __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":4897 + /* "netCDF4/_netCDF4.pyx":4920 * # 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, 4897, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4920, __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, 4897, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_str); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4920, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_t_5, 1, 0, NULL, NULL, &__pyx_slice__95, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4897, __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, 4920, __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, 4897, __pyx_L1_error) + __pyx_t_5 = PyObject_GetItem(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4920, __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, 4897, __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, 4920, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_xtype_tmp = __pyx_t_8; - /* "netCDF4/_netCDF4.pyx":4898 + /* "netCDF4/_netCDF4.pyx":4921 * # 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, 4898, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4921, __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, 4898, __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, 4921, __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":4899 + /* "netCDF4/_netCDF4.pyx":4922 * xtype_tmp = _nptonctype[dt.str[1:]] * ierr = nc_def_vlen(grp._grpid, namstring, xtype_tmp, &xtype); * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -58379,7 +58425,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":4900 + /* "netCDF4/_netCDF4.pyx":4923 * ierr = nc_def_vlen(grp._grpid, namstring, xtype_tmp, &xtype); * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -58387,22 +58433,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, 4900, __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, 4923, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4900, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4923, __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, 4900, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4923, __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, 4900, __pyx_L1_error) + __PYX_ERR(0, 4923, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4899 + /* "netCDF4/_netCDF4.pyx":4922 * xtype_tmp = _nptonctype[dt.str[1:]] * ierr = nc_def_vlen(grp._grpid, namstring, xtype_tmp, &xtype); * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -58411,7 +58457,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_vlen(PyObject *__pyx_v_grp, PyO */ } - /* "netCDF4/_netCDF4.pyx":4894 + /* "netCDF4/_netCDF4.pyx":4917 * namstring = bytestr * dt = numpy.dtype(dt) # convert to numpy datatype. * if dt.str[1:] in _supportedtypes: # <<<<<<<<<<<<<< @@ -58421,7 +58467,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_vlen(PyObject *__pyx_v_grp, PyO goto __pyx_L4; } - /* "netCDF4/_netCDF4.pyx":4902 + /* "netCDF4/_netCDF4.pyx":4925 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * else: * raise KeyError("unsupported datatype specified for VLEN") # <<<<<<<<<<<<<< @@ -58429,17 +58475,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__96, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4902, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_tuple__100, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4925, __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, 4902, __pyx_L1_error) + __PYX_ERR(0, 4925, __pyx_L1_error) } __pyx_L4:; } __pyx_L3:; - /* "netCDF4/_netCDF4.pyx":4903 + /* "netCDF4/_netCDF4.pyx":4926 * else: * raise KeyError("unsupported datatype specified for VLEN") * return xtype, dt # <<<<<<<<<<<<<< @@ -58447,9 +58493,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, 4903, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_nc_type(__pyx_v_xtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4926, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4903, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4926, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); @@ -58461,7 +58507,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":4879 + /* "netCDF4/_netCDF4.pyx":4902 * raise NotImplementedError('VLType is not picklable') * * cdef _def_vlen(grp, object dt, object dtype_name): # <<<<<<<<<<<<<< @@ -58485,7 +58531,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_vlen(PyObject *__pyx_v_grp, PyO return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4905 +/* "netCDF4/_netCDF4.pyx":4928 * return xtype, dt * * cdef _read_vlen(group, nc_type xtype, endian=None): # <<<<<<<<<<<<<< @@ -58525,20 +58571,20 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group, } } - /* "netCDF4/_netCDF4.pyx":4914 + /* "netCDF4/_netCDF4.pyx":4937 * 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, 4914, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4937, __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, 4914, __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, 4937, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v__grpid = __pyx_t_2; - /* "netCDF4/_netCDF4.pyx":4915 + /* "netCDF4/_netCDF4.pyx":4938 * cdef char vl_namstring[NC_MAX_NAME+1] * _grpid = group._grpid * if xtype == NC_STRING: # <<<<<<<<<<<<<< @@ -58548,7 +58594,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":4916 + /* "netCDF4/_netCDF4.pyx":4939 * _grpid = group._grpid * if xtype == NC_STRING: * dt = str # <<<<<<<<<<<<<< @@ -58558,7 +58604,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":4917 + /* "netCDF4/_netCDF4.pyx":4940 * if xtype == NC_STRING: * dt = str * name = None # <<<<<<<<<<<<<< @@ -58568,7 +58614,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":4915 + /* "netCDF4/_netCDF4.pyx":4938 * cdef char vl_namstring[NC_MAX_NAME+1] * _grpid = group._grpid * if xtype == NC_STRING: # <<<<<<<<<<<<<< @@ -58578,7 +58624,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group, goto __pyx_L3; } - /* "netCDF4/_netCDF4.pyx":4919 + /* "netCDF4/_netCDF4.pyx":4942 * name = None * else: * with nogil: # <<<<<<<<<<<<<< @@ -58593,7 +58639,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group, #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":4920 + /* "netCDF4/_netCDF4.pyx":4943 * else: * with nogil: * ierr = nc_inq_vlen(_grpid, xtype, vl_namstring, &vlsize, &base_xtype) # <<<<<<<<<<<<<< @@ -58603,7 +58649,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":4919 + /* "netCDF4/_netCDF4.pyx":4942 * name = None * else: * with nogil: # <<<<<<<<<<<<<< @@ -58621,7 +58667,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group, } } - /* "netCDF4/_netCDF4.pyx":4921 + /* "netCDF4/_netCDF4.pyx":4944 * with nogil: * ierr = nc_inq_vlen(_grpid, xtype, vl_namstring, &vlsize, &base_xtype) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -58631,7 +58677,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":4922 + /* "netCDF4/_netCDF4.pyx":4945 * ierr = nc_inq_vlen(_grpid, xtype, vl_namstring, &vlsize, &base_xtype) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -58639,22 +58685,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, 4922, __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, 4945, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4922, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4945, __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, 4922, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4945, __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, 4922, __pyx_L1_error) + __PYX_ERR(0, 4945, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4921 + /* "netCDF4/_netCDF4.pyx":4944 * with nogil: * ierr = nc_inq_vlen(_grpid, xtype, vl_namstring, &vlsize, &base_xtype) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -58663,21 +58709,21 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group, */ } - /* "netCDF4/_netCDF4.pyx":4923 + /* "netCDF4/_netCDF4.pyx":4946 * 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, 4923, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_vl_namstring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4946, __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, 4923, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4946, __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, 4923, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4946, __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, 4923, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4946, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; __pyx_t_2 = 0; @@ -58694,7 +58740,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, 4923, __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, 4946, __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; @@ -58704,7 +58750,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, 4923, __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, 4946, __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; @@ -58712,7 +58758,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, 4923, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4946, __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; @@ -58723,7 +58769,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, 4923, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4946, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -58731,7 +58777,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":4924 + /* "netCDF4/_netCDF4.pyx":4947 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * name = vl_namstring.decode(default_encoding,unicode_error) * try: # <<<<<<<<<<<<<< @@ -58747,22 +58793,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group, __Pyx_XGOTREF(__pyx_t_12); /*try:*/ { - /* "netCDF4/_netCDF4.pyx":4925 + /* "netCDF4/_netCDF4.pyx":4948 * 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, 4925, __pyx_L8_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4948, __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, 4925, __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, 4948, __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":4926 + /* "netCDF4/_netCDF4.pyx":4949 * try: * datatype = _nctonptype[base_xtype] * if endian is not None: datatype = endian + datatype # <<<<<<<<<<<<<< @@ -58772,22 +58818,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, 4926, __pyx_L8_error) + __pyx_t_6 = PyNumber_Add(__pyx_v_endian, __pyx_v_datatype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4949, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_datatype, __pyx_t_6); __pyx_t_6 = 0; } - /* "netCDF4/_netCDF4.pyx":4927 + /* "netCDF4/_netCDF4.pyx":4950 * 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, 4927, __pyx_L8_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4950, __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, 4927, __pyx_L8_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dtype); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4950, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -58801,13 +58847,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, 4927, __pyx_L8_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_datatype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4950, __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, 4927, __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, 4950, __pyx_L8_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_6); } else @@ -58815,19 +58861,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, 4927, __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, 4950, __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, 4927, __pyx_L8_error) + __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4950, __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, 4927, __pyx_L8_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4950, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -58836,7 +58882,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":4924 + /* "netCDF4/_netCDF4.pyx":4947 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * name = vl_namstring.decode(default_encoding,unicode_error) * try: # <<<<<<<<<<<<<< @@ -58857,7 +58903,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":4928 + /* "netCDF4/_netCDF4.pyx":4951 * if endian is not None: datatype = endian + datatype * dt = numpy.dtype(datatype) # see if it is a primitive type * except KeyError: # <<<<<<<<<<<<<< @@ -58867,28 +58913,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, 4928, __pyx_L10_except_error) + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_9, &__pyx_t_7) < 0) __PYX_ERR(0, 4951, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_7); - /* "netCDF4/_netCDF4.pyx":4929 + /* "netCDF4/_netCDF4.pyx":4952 * 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__97, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4929, __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, 4952, __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, 4929, __pyx_L10_except_error) + __PYX_ERR(0, 4952, __pyx_L10_except_error) } goto __pyx_L10_except_error; __pyx_L10_except_error:; - /* "netCDF4/_netCDF4.pyx":4924 + /* "netCDF4/_netCDF4.pyx":4947 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * name = vl_namstring.decode(default_encoding,unicode_error) * try: # <<<<<<<<<<<<<< @@ -58906,7 +58952,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group, } __pyx_L3:; - /* "netCDF4/_netCDF4.pyx":4930 + /* "netCDF4/_netCDF4.pyx":4953 * except KeyError: * raise KeyError("unsupported component type for VLEN") * return VLType(group, dt, name, typeid=xtype) # <<<<<<<<<<<<<< @@ -58914,7 +58960,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, 4930, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4953, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_group); __Pyx_GIVEREF(__pyx_v_group); @@ -58925,13 +58971,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, 4930, __pyx_L1_error) + __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4953, __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, 4930, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_nc_type(__pyx_v_xtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4953, __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, 4930, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_typeid, __pyx_t_6) < 0) __PYX_ERR(0, 4953, __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, 4930, __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, 4953, __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; @@ -58939,7 +58985,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group, __pyx_t_6 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":4905 + /* "netCDF4/_netCDF4.pyx":4928 * return xtype, dt * * cdef _read_vlen(group, nc_type xtype, endian=None): # <<<<<<<<<<<<<< @@ -58966,7 +59012,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group, return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4952 +/* "netCDF4/_netCDF4.pyx":4975 * __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): # <<<<<<<<<<<<<< @@ -59013,21 +59059,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, 4952, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 1); __PYX_ERR(0, 4975, __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, 4952, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 2); __PYX_ERR(0, 4975, __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, 4952, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 3); __PYX_ERR(0, 4975, __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, 4952, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 4975, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; @@ -59044,7 +59090,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, 4952, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4975, __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); @@ -59074,31 +59120,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":4974 + /* "netCDF4/_netCDF4.pyx":4997 * """ * 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, 4974, __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, 4997, __pyx_L1_error) __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":4975 + /* "netCDF4/_netCDF4.pyx":4998 * 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, 4975, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_s_typeid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4998, __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, 4975, __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, 4998, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_xtype = __pyx_t_4; - /* "netCDF4/_netCDF4.pyx":4974 + /* "netCDF4/_netCDF4.pyx":4997 * """ * cdef nc_type xtype * if 'typeid' in kwargs: # <<<<<<<<<<<<<< @@ -59108,7 +59154,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8EnumType___init__(struct __pyx_obj_7netC goto __pyx_L3; } - /* "netCDF4/_netCDF4.pyx":4977 + /* "netCDF4/_netCDF4.pyx":5000 * xtype = kwargs['typeid'] * else: * xtype, dt = _def_enum(grp, dt, dtype_name, enum_dict) # <<<<<<<<<<<<<< @@ -59116,7 +59162,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, 4977, __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, 5000, __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; @@ -59128,7 +59174,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, 4977, __pyx_L1_error) + __PYX_ERR(0, 5000, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -59141,15 +59187,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, 4977, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5000, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4977, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5000, __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, 4977, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5000, __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; @@ -59157,7 +59203,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, 4977, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 5000, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L5_unpacking_done; @@ -59165,10 +59211,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, 4977, __pyx_L1_error) + __PYX_ERR(0, 5000, __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, 4977, __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, 5000, __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); @@ -59176,7 +59222,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8EnumType___init__(struct __pyx_obj_7netC } __pyx_L3:; - /* "netCDF4/_netCDF4.pyx":4978 + /* "netCDF4/_netCDF4.pyx":5001 * else: * xtype, dt = _def_enum(grp, dt, dtype_name, enum_dict) * self._nc_type = xtype # <<<<<<<<<<<<<< @@ -59185,7 +59231,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":4979 + /* "netCDF4/_netCDF4.pyx":5002 * xtype, dt = _def_enum(grp, dt, dtype_name, enum_dict) * self._nc_type = xtype * self.dtype = dt # <<<<<<<<<<<<<< @@ -59198,7 +59244,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":4980 + /* "netCDF4/_netCDF4.pyx":5003 * self._nc_type = xtype * self.dtype = dt * self.name = dtype_name # <<<<<<<<<<<<<< @@ -59211,7 +59257,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":4981 + /* "netCDF4/_netCDF4.pyx":5004 * self.dtype = dt * self.name = dtype_name * self.enum_dict = enum_dict # <<<<<<<<<<<<<< @@ -59224,7 +59270,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":4952 + /* "netCDF4/_netCDF4.pyx":4975 * __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): # <<<<<<<<<<<<<< @@ -59248,7 +59294,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8EnumType___init__(struct __pyx_obj_7netC return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4983 +/* "netCDF4/_netCDF4.pyx":5006 * self.enum_dict = enum_dict * * def __repr__(self): # <<<<<<<<<<<<<< @@ -59280,20 +59326,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":4984 + /* "netCDF4/_netCDF4.pyx":5007 * * 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, 4984, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5007, __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, 4984, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5007, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":4985 + /* "netCDF4/_netCDF4.pyx":5008 * def __repr__(self): * if python3: * return self.__unicode__() # <<<<<<<<<<<<<< @@ -59301,7 +59347,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, 4985, __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, 5008, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -59314,10 +59360,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, 4985, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5008, __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, 4985, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5008, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -59325,7 +59371,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8EnumType_2__repr__(struct __pyx_ob __pyx_t_1 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":4984 + /* "netCDF4/_netCDF4.pyx":5007 * * def __repr__(self): * if python3: # <<<<<<<<<<<<<< @@ -59334,7 +59380,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8EnumType_2__repr__(struct __pyx_ob */ } - /* "netCDF4/_netCDF4.pyx":4987 + /* "netCDF4/_netCDF4.pyx":5010 * return self.__unicode__() * else: * return unicode(self).encode(default_encoding) # <<<<<<<<<<<<<< @@ -59343,18 +59389,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, 4987, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5010, __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, 4987, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5010, __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, 4987, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5010, __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, 4987, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5010, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -59367,14 +59413,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, 4987, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5010, __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, 4987, __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, 5010, __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; @@ -59383,20 +59429,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, 4987, __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, 5010, __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, 4987, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5010, __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, 4987, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5010, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -59407,7 +59453,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8EnumType_2__repr__(struct __pyx_ob goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":4983 + /* "netCDF4/_netCDF4.pyx":5006 * self.enum_dict = enum_dict * * def __repr__(self): # <<<<<<<<<<<<<< @@ -59430,7 +59476,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8EnumType_2__repr__(struct __pyx_ob return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4989 +/* "netCDF4/_netCDF4.pyx":5012 * return unicode(self).encode(default_encoding) * * def __unicode__(self): # <<<<<<<<<<<<<< @@ -59459,7 +59505,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":4990 + /* "netCDF4/_netCDF4.pyx":5013 * * def __unicode__(self): * return repr(type(self))+\ # <<<<<<<<<<<<<< @@ -59467,17 +59513,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, 4990, __pyx_L1_error) + __pyx_t_1 = PyObject_Repr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5013, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "netCDF4/_netCDF4.pyx":4992 + /* "netCDF4/_netCDF4.pyx":5015 * 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, 4992, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5015, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_self->name); __Pyx_GIVEREF(__pyx_v_self->name); @@ -59489,25 +59535,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":4991 + /* "netCDF4/_netCDF4.pyx":5014 * 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, 4991, __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, 5014, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":4990 + /* "netCDF4/_netCDF4.pyx":5013 * * 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, 4990, __pyx_L1_error) + __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5013, __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; @@ -59515,7 +59561,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8EnumType_4__unicode__(struct __pyx __pyx_t_2 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":4989 + /* "netCDF4/_netCDF4.pyx":5012 * return unicode(self).encode(default_encoding) * * def __unicode__(self): # <<<<<<<<<<<<<< @@ -59536,7 +59582,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8EnumType_4__unicode__(struct __pyx return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4994 +/* "netCDF4/_netCDF4.pyx":5017 * (self.name, self.dtype, self.enum_dict) * * def __reduce__(self): # <<<<<<<<<<<<<< @@ -59563,20 +59609,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":4996 + /* "netCDF4/_netCDF4.pyx":5019 * 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__98, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4996, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__102, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5019, __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, 4996, __pyx_L1_error) + __PYX_ERR(0, 5019, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":4994 + /* "netCDF4/_netCDF4.pyx":5017 * (self.name, self.dtype, self.enum_dict) * * def __reduce__(self): # <<<<<<<<<<<<<< @@ -59594,7 +59640,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8EnumType_6__reduce__(CYTHON_UNUSED return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4944 +/* "netCDF4/_netCDF4.pyx":4967 * the user. * """ * cdef public nc_type _nc_type # <<<<<<<<<<<<<< @@ -59621,7 +59667,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, 4944, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_nc_type(__pyx_v_self->_nc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4967, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -59656,7 +59702,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, 4944, __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, 4967, __pyx_L1_error) __pyx_v_self->_nc_type = __pyx_t_1; /* function exit code */ @@ -59670,7 +59716,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8EnumType_8_nc_type_2__set__(struct __pyx return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4945 +/* "netCDF4/_netCDF4.pyx":4968 * """ * cdef public nc_type _nc_type * cdef public dtype, name, enum_dict # <<<<<<<<<<<<<< @@ -59939,7 +59985,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8EnumType_9enum_dict_4__del__(struct __py return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":4998 +/* "netCDF4/_netCDF4.pyx":5021 * raise NotImplementedError('EnumType is not picklable') * * cdef _def_enum(grp, object dt, object dtype_name, object enum_dict): # <<<<<<<<<<<<<< @@ -59974,38 +60020,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":5005 + /* "netCDF4/_netCDF4.pyx":5028 * 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, 5005, __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, 5028, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_bytestr = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5006 + /* "netCDF4/_netCDF4.pyx":5029 * 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, 5006, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 5029, __pyx_L1_error) __pyx_v_namstring = __pyx_t_2; - /* "netCDF4/_netCDF4.pyx":5007 + /* "netCDF4/_netCDF4.pyx":5030 * 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, 5007, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5030, __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, 5007, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5030, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -60019,13 +60065,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, 5007, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_dt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5030, __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, 5007, __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, 5030, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -60033,19 +60079,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, 5007, __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, 5030, __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, 5007, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5030, __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, 5007, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5030, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -60054,21 +60100,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":5008 + /* "netCDF4/_netCDF4.pyx":5031 * 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, 5008, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_str); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5031, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_t_1, 1, 0, NULL, NULL, &__pyx_slice__99, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5008, __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, 5031, __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, 5008, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_intnptonctype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5031, __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, 5008, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_keys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5031, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -60082,55 +60128,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, 5008, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5031, __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, 5008, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5031, __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, 5008, __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, 5031, __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":5011 + /* "netCDF4/_netCDF4.pyx":5034 * # 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, 5011, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_intnptonctype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5034, __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, 5011, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_str); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5034, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_4, 1, 0, NULL, NULL, &__pyx_slice__100, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5011, __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, 5034, __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, 5011, __pyx_L1_error) + __pyx_t_4 = PyObject_GetItem(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5034, __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, 5011, __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, 5034, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_xtype_tmp = __pyx_t_8; - /* "netCDF4/_netCDF4.pyx":5012 + /* "netCDF4/_netCDF4.pyx":5035 * # 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, 5012, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5035, __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, 5012, __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, 5035, __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":5013 + /* "netCDF4/_netCDF4.pyx":5036 * xtype_tmp = _intnptonctype[dt.str[1:]] * ierr = nc_def_enum(grp._grpid, xtype_tmp, namstring, &xtype); * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -60140,7 +60186,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":5014 + /* "netCDF4/_netCDF4.pyx":5037 * ierr = nc_def_enum(grp._grpid, xtype_tmp, namstring, &xtype); * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -60148,22 +60194,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, 5014, __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, 5037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5014, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5037, __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, 5014, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_3, NULL); 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_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(0, 5014, __pyx_L1_error) + __PYX_ERR(0, 5037, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5013 + /* "netCDF4/_netCDF4.pyx":5036 * xtype_tmp = _intnptonctype[dt.str[1:]] * ierr = nc_def_enum(grp._grpid, xtype_tmp, namstring, &xtype); * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -60172,7 +60218,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_enum(PyObject *__pyx_v_grp, PyO */ } - /* "netCDF4/_netCDF4.pyx":5008 + /* "netCDF4/_netCDF4.pyx":5031 * namstring = bytestr * dt = numpy.dtype(dt) # convert to numpy datatype. * if dt.str[1:] in _intnptonctype.keys(): # <<<<<<<<<<<<<< @@ -60182,7 +60228,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_enum(PyObject *__pyx_v_grp, PyO goto __pyx_L3; } - /* "netCDF4/_netCDF4.pyx":5016 + /* "netCDF4/_netCDF4.pyx":5039 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * else: * msg="unsupported datatype specified for Enum (must be integer)" # <<<<<<<<<<<<<< @@ -60193,28 +60239,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":5017 + /* "netCDF4/_netCDF4.pyx":5040 * 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, 5017, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5040, __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, 5017, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5040, __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, 5017, __pyx_L1_error) + __PYX_ERR(0, 5040, __pyx_L1_error) } __pyx_L3:; - /* "netCDF4/_netCDF4.pyx":5019 + /* "netCDF4/_netCDF4.pyx":5042 * raise KeyError(msg) * # insert named members into enum type. * for field in enum_dict: # <<<<<<<<<<<<<< @@ -60225,26 +60271,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, 5019, __pyx_L1_error) + __pyx_t_10 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_enum_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5042, __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, 5019, __pyx_L1_error) + __pyx_t_11 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5042, __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, 5019, __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, 5042, __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, 5019, __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, 5042, __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, 5019, __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, 5042, __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, 5019, __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, 5042, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -60254,7 +60300,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, 5019, __pyx_L1_error) + else __PYX_ERR(0, 5042, __pyx_L1_error) } break; } @@ -60263,19 +60309,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":5020 + /* "netCDF4/_netCDF4.pyx":5043 * # 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, 5020, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5043, __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, 5020, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5043, __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, 5020, __pyx_L1_error) + __pyx_t_1 = PyObject_GetItem(__pyx_v_enum_dict, __pyx_v_field); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5043, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_12 = NULL; __pyx_t_9 = 0; @@ -60292,7 +60338,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, 5020, __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, 5043, __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; @@ -60301,14 +60347,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, 5020, __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, 5043, __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, 5020, __pyx_L1_error) + __pyx_t_13 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5043, __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; @@ -60319,51 +60365,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, 5020, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_13, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5043, __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, 5020, __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, 5043, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_value_arr, ((PyArrayObject *)__pyx_t_4)); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":5021 + /* "netCDF4/_netCDF4.pyx":5044 * 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, 5021, __pyx_L1_error) + __pyx_t_4 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_field, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5044, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_bytestr, __pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":5022 + /* "netCDF4/_netCDF4.pyx":5045 * 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, 5022, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 5045, __pyx_L1_error) __pyx_v_namstring = __pyx_t_2; - /* "netCDF4/_netCDF4.pyx":5023 + /* "netCDF4/_netCDF4.pyx":5046 * 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, 5023, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5046, __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, 5023, __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, 5046, __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":5024 + /* "netCDF4/_netCDF4.pyx":5047 * namstring = bytestr * ierr = nc_insert_enum(grp._grpid, xtype, namstring, value_arr.data) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -60373,7 +60419,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":5025 + /* "netCDF4/_netCDF4.pyx":5048 * ierr = nc_insert_enum(grp._grpid, xtype, namstring, value_arr.data) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -60381,22 +60427,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, 5025, __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, 5048, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5025, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5048, __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, 5025, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5048, __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, 5025, __pyx_L1_error) + __PYX_ERR(0, 5048, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5024 + /* "netCDF4/_netCDF4.pyx":5047 * namstring = bytestr * ierr = nc_insert_enum(grp._grpid, xtype, namstring, value_arr.data) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -60405,7 +60451,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_enum(PyObject *__pyx_v_grp, PyO */ } - /* "netCDF4/_netCDF4.pyx":5019 + /* "netCDF4/_netCDF4.pyx":5042 * raise KeyError(msg) * # insert named members into enum type. * for field in enum_dict: # <<<<<<<<<<<<<< @@ -60415,7 +60461,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":5026 + /* "netCDF4/_netCDF4.pyx":5049 * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * return xtype, dt # <<<<<<<<<<<<<< @@ -60423,9 +60469,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, 5026, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_nc_type(__pyx_v_xtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5026, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); @@ -60437,7 +60483,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":4998 + /* "netCDF4/_netCDF4.pyx":5021 * raise NotImplementedError('EnumType is not picklable') * * cdef _def_enum(grp, object dt, object dtype_name, object enum_dict): # <<<<<<<<<<<<<< @@ -60466,7 +60512,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_enum(PyObject *__pyx_v_grp, PyO return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5028 +/* "netCDF4/_netCDF4.pyx":5051 * return xtype, dt * * cdef _read_enum(group, nc_type xtype, endian=None): # <<<<<<<<<<<<<< @@ -60510,20 +60556,20 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, } } - /* "netCDF4/_netCDF4.pyx":5038 + /* "netCDF4/_netCDF4.pyx":5061 * 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, 5038, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5061, __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, 5038, __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, 5061, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v__grpid = __pyx_t_2; - /* "netCDF4/_netCDF4.pyx":5040 + /* "netCDF4/_netCDF4.pyx":5063 * _grpid = group._grpid * # get name, datatype, and number of members. * with nogil: # <<<<<<<<<<<<<< @@ -60537,7 +60583,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":5041 + /* "netCDF4/_netCDF4.pyx":5064 * # get name, datatype, and number of members. * with nogil: * ierr = nc_inq_enum(_grpid, xtype, enum_namstring, &base_xtype, NULL,\ # <<<<<<<<<<<<<< @@ -60547,7 +60593,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":5040 + /* "netCDF4/_netCDF4.pyx":5063 * _grpid = group._grpid * # get name, datatype, and number of members. * with nogil: # <<<<<<<<<<<<<< @@ -60565,7 +60611,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, } } - /* "netCDF4/_netCDF4.pyx":5043 + /* "netCDF4/_netCDF4.pyx":5066 * ierr = nc_inq_enum(_grpid, xtype, enum_namstring, &base_xtype, NULL,\ * &nmembers) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -60575,7 +60621,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":5044 + /* "netCDF4/_netCDF4.pyx":5067 * &nmembers) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -60583,22 +60629,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, 5044, __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, 5067, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5044, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5067, __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, 5044, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5067, __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, 5044, __pyx_L1_error) + __PYX_ERR(0, 5067, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5043 + /* "netCDF4/_netCDF4.pyx":5066 * ierr = nc_inq_enum(_grpid, xtype, enum_namstring, &base_xtype, NULL,\ * &nmembers) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -60607,21 +60653,21 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, */ } - /* "netCDF4/_netCDF4.pyx":5045 + /* "netCDF4/_netCDF4.pyx":5068 * 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, 5045, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_enum_namstring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5068, __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, 5045, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5068, __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, 5045, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5068, __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, 5045, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5068, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; __pyx_t_2 = 0; @@ -60638,7 +60684,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, 5045, __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, 5068, __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; @@ -60648,7 +60694,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, 5045, __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, 5068, __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; @@ -60656,7 +60702,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, 5045, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5068, __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; @@ -60667,7 +60713,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, 5045, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5068, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -60675,7 +60721,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":5046 + /* "netCDF4/_netCDF4.pyx":5069 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * name = enum_namstring.decode(default_encoding,unicode_error) * try: # <<<<<<<<<<<<<< @@ -60691,22 +60737,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, __Pyx_XGOTREF(__pyx_t_12); /*try:*/ { - /* "netCDF4/_netCDF4.pyx":5047 + /* "netCDF4/_netCDF4.pyx":5070 * 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, 5047, __pyx_L7_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5070, __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, 5047, __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, 5070, __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":5048 + /* "netCDF4/_netCDF4.pyx":5071 * try: * datatype = _nctonptype[base_xtype] * if endian is not None: datatype = endian + datatype # <<<<<<<<<<<<<< @@ -60716,22 +60762,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, 5048, __pyx_L7_error) + __pyx_t_6 = PyNumber_Add(__pyx_v_endian, __pyx_v_datatype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5071, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_datatype, __pyx_t_6); __pyx_t_6 = 0; } - /* "netCDF4/_netCDF4.pyx":5049 + /* "netCDF4/_netCDF4.pyx":5072 * 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, 5049, __pyx_L7_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5072, __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, 5049, __pyx_L7_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dtype); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5072, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -60745,13 +60791,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, 5049, __pyx_L7_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_datatype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5072, __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, 5049, __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, 5072, __pyx_L7_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_6); } else @@ -60759,19 +60805,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, 5049, __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, 5072, __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, 5049, __pyx_L7_error) + __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5072, __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, 5049, __pyx_L7_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5072, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -60780,7 +60826,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":5046 + /* "netCDF4/_netCDF4.pyx":5069 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * name = enum_namstring.decode(default_encoding,unicode_error) * try: # <<<<<<<<<<<<<< @@ -60801,7 +60847,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":5050 + /* "netCDF4/_netCDF4.pyx":5073 * if endian is not None: datatype = endian + datatype * dt = numpy.dtype(datatype) # see if it is a primitive type * except KeyError: # <<<<<<<<<<<<<< @@ -60811,28 +60857,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, 5050, __pyx_L9_except_error) + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_9, &__pyx_t_7) < 0) __PYX_ERR(0, 5073, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_7); - /* "netCDF4/_netCDF4.pyx":5051 + /* "netCDF4/_netCDF4.pyx":5074 * 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__101, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5051, __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, 5074, __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, 5051, __pyx_L9_except_error) + __PYX_ERR(0, 5074, __pyx_L9_except_error) } goto __pyx_L9_except_error; __pyx_L9_except_error:; - /* "netCDF4/_netCDF4.pyx":5046 + /* "netCDF4/_netCDF4.pyx":5069 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * name = enum_namstring.decode(default_encoding,unicode_error) * try: # <<<<<<<<<<<<<< @@ -60848,19 +60894,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, __pyx_L14_try_end:; } - /* "netCDF4/_netCDF4.pyx":5053 + /* "netCDF4/_netCDF4.pyx":5076 * 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, 5053, __pyx_L1_error) + __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5076, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_v_enum_dict = ((PyObject*)__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5054 + /* "netCDF4/_netCDF4.pyx":5077 * # loop over members, build dict. * enum_dict = {} * for nmem from 0 <= nmem < nmembers: # <<<<<<<<<<<<<< @@ -60870,7 +60916,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":5055 + /* "netCDF4/_netCDF4.pyx":5078 * enum_dict = {} * for nmem from 0 <= nmem < nmembers: * with nogil: # <<<<<<<<<<<<<< @@ -60884,7 +60930,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, #endif /*try:*/ { - /* "netCDF4/_netCDF4.pyx":5056 + /* "netCDF4/_netCDF4.pyx":5079 * for nmem from 0 <= nmem < nmembers: * with nogil: * ierr = nc_inq_enum_member(_grpid, xtype, nmem, \ # <<<<<<<<<<<<<< @@ -60894,7 +60940,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":5055 + /* "netCDF4/_netCDF4.pyx":5078 * enum_dict = {} * for nmem from 0 <= nmem < nmembers: * with nogil: # <<<<<<<<<<<<<< @@ -60912,7 +60958,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, } } - /* "netCDF4/_netCDF4.pyx":5058 + /* "netCDF4/_netCDF4.pyx":5081 * ierr = nc_inq_enum_member(_grpid, xtype, nmem, \ * enum_namstring, &enum_val) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -60922,7 +60968,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":5059 + /* "netCDF4/_netCDF4.pyx":5082 * enum_namstring, &enum_val) * if ierr != NC_NOERR: * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<< @@ -60930,22 +60976,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, 5059, __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, 5082, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5059, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5082, __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, 5059, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_9, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5082, __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, 5059, __pyx_L1_error) + __PYX_ERR(0, 5082, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5058 + /* "netCDF4/_netCDF4.pyx":5081 * ierr = nc_inq_enum_member(_grpid, xtype, nmem, \ * enum_namstring, &enum_val) * if ierr != NC_NOERR: # <<<<<<<<<<<<<< @@ -60954,21 +61000,21 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, */ } - /* "netCDF4/_netCDF4.pyx":5060 + /* "netCDF4/_netCDF4.pyx":5083 * 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, 5060, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_FromString(__pyx_v_enum_namstring); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5083, __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, 5060, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5083, __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, 5060, __pyx_L1_error) + __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5083, __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, 5060, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5083, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = NULL; __pyx_t_2 = 0; @@ -60985,7 +61031,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, 5060, __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, 5083, __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; @@ -60995,7 +61041,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, 5060, __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, 5083, __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; @@ -61003,7 +61049,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, 5060, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5083, __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; @@ -61014,7 +61060,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, 5060, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5083, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -61022,28 +61068,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":5061 + /* "netCDF4/_netCDF4.pyx":5084 * 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, 5061, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_From_char(__pyx_v_enum_val); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5084, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5061, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5084, __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, 5061, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)(&PyInt_Type)), __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5084, __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, 5061, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_enum_dict, __pyx_v_name, __pyx_t_7) < 0)) __PYX_ERR(0, 5084, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } - /* "netCDF4/_netCDF4.pyx":5062 + /* "netCDF4/_netCDF4.pyx":5085 * name = enum_namstring.decode(default_encoding,unicode_error) * enum_dict[name] = int(enum_val) * return EnumType(group, dt, name, enum_dict, typeid=xtype) # <<<<<<<<<<<<<< @@ -61051,7 +61097,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, 5062, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5085, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_group); __Pyx_GIVEREF(__pyx_v_group); @@ -61065,13 +61111,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, 5062, __pyx_L1_error) + __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5085, __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, 5062, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_From_nc_type(__pyx_v_xtype); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5085, __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, 5062, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_typeid, __pyx_t_8) < 0) __PYX_ERR(0, 5085, __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, 5062, __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, 5085, __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; @@ -61079,7 +61125,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, __pyx_t_8 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":5028 + /* "netCDF4/_netCDF4.pyx":5051 * return xtype, dt * * cdef _read_enum(group, nc_type xtype, endian=None): # <<<<<<<<<<<<<< @@ -61107,7 +61153,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group, return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5064 +/* "netCDF4/_netCDF4.pyx":5087 * return EnumType(group, dt, name, enum_dict, typeid=xtype) * * cdef _strencode(pystr,encoding=None): # <<<<<<<<<<<<<< @@ -61137,7 +61183,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__strencode(PyObject *__pyx_v_pystr, } __Pyx_INCREF(__pyx_v_encoding); - /* "netCDF4/_netCDF4.pyx":5067 + /* "netCDF4/_netCDF4.pyx":5090 * # encode a string into bytes. If already bytes, do nothing. * # uses default_encoding module variable for default encoding. * if encoding is None: # <<<<<<<<<<<<<< @@ -61148,19 +61194,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":5068 + /* "netCDF4/_netCDF4.pyx":5091 * # 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, 5068, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5091, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_encoding, __pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":5067 + /* "netCDF4/_netCDF4.pyx":5090 * # encode a string into bytes. If already bytes, do nothing. * # uses default_encoding module variable for default encoding. * if encoding is None: # <<<<<<<<<<<<<< @@ -61169,7 +61215,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__strencode(PyObject *__pyx_v_pystr, */ } - /* "netCDF4/_netCDF4.pyx":5069 + /* "netCDF4/_netCDF4.pyx":5092 * if encoding is None: * encoding = default_encoding * try: # <<<<<<<<<<<<<< @@ -61185,7 +61231,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__strencode(PyObject *__pyx_v_pystr, __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { - /* "netCDF4/_netCDF4.pyx":5070 + /* "netCDF4/_netCDF4.pyx":5093 * encoding = default_encoding * try: * return pystr.encode(encoding) # <<<<<<<<<<<<<< @@ -61193,7 +61239,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, 5070, __pyx_L4_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_pystr, __pyx_n_s_encode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5093, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -61206,13 +61252,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, 5070, __pyx_L4_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_encoding); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5093, __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, 5070, __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, 5093, __pyx_L4_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -61220,19 +61266,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, 5070, __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, 5093, __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, 5070, __pyx_L4_error) + __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5093, __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, 5070, __pyx_L4_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5093, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -61242,7 +61288,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":5069 + /* "netCDF4/_netCDF4.pyx":5092 * if encoding is None: * encoding = default_encoding * try: # <<<<<<<<<<<<<< @@ -61257,7 +61303,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":5071 + /* "netCDF4/_netCDF4.pyx":5094 * try: * return pystr.encode(encoding) * except (AttributeError, UnicodeDecodeError): # <<<<<<<<<<<<<< @@ -61267,12 +61313,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, 5071, __pyx_L6_except_error) + if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_7, &__pyx_t_9) < 0) __PYX_ERR(0, 5094, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_9); - /* "netCDF4/_netCDF4.pyx":5072 + /* "netCDF4/_netCDF4.pyx":5095 * return pystr.encode(encoding) * except (AttributeError, UnicodeDecodeError): * return pystr # already bytes or unicode? # <<<<<<<<<<<<<< @@ -61290,7 +61336,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":5069 + /* "netCDF4/_netCDF4.pyx":5092 * if encoding is None: * encoding = default_encoding * try: # <<<<<<<<<<<<<< @@ -61319,7 +61365,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__strencode(PyObject *__pyx_v_pystr, goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":5064 + /* "netCDF4/_netCDF4.pyx":5087 * return EnumType(group, dt, name, enum_dict, typeid=xtype) * * cdef _strencode(pystr,encoding=None): # <<<<<<<<<<<<<< @@ -61342,7 +61388,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__strencode(PyObject *__pyx_v_pystr, return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5074 +/* "netCDF4/_netCDF4.pyx":5097 * return pystr # already bytes or unicode? * * def _to_ascii(bytestr): # <<<<<<<<<<<<<< @@ -61373,20 +61419,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":5076 + /* "netCDF4/_netCDF4.pyx":5099 * 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, 5076, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5099, __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, 5076, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5099, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":5077 + /* "netCDF4/_netCDF4.pyx":5100 * # encode a byte string to an ascii encoded string. * if python3: * return str(bytestr,encoding='ascii') # <<<<<<<<<<<<<< @@ -61394,15 +61440,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, 5077, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5100, __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, 5077, __pyx_L1_error) + __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5100, __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, 5077, __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, 5077, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_encoding, __pyx_n_s_ascii) < 0) __PYX_ERR(0, 5100, __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, 5100, __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; @@ -61410,7 +61456,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6_to_ascii(CYTHON_UNUSED PyObject * __pyx_t_4 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":5076 + /* "netCDF4/_netCDF4.pyx":5099 * def _to_ascii(bytestr): * # encode a byte string to an ascii encoded string. * if python3: # <<<<<<<<<<<<<< @@ -61419,7 +61465,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6_to_ascii(CYTHON_UNUSED PyObject * */ } - /* "netCDF4/_netCDF4.pyx":5079 + /* "netCDF4/_netCDF4.pyx":5102 * return str(bytestr,encoding='ascii') * else: * return bytestr.encode('ascii') # <<<<<<<<<<<<<< @@ -61428,9 +61474,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, 5079, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_bytestr, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__102, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5079, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__106, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; @@ -61438,7 +61484,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6_to_ascii(CYTHON_UNUSED PyObject * goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":5074 + /* "netCDF4/_netCDF4.pyx":5097 * return pystr # already bytes or unicode? * * def _to_ascii(bytestr): # <<<<<<<<<<<<<< @@ -61459,7 +61505,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6_to_ascii(CYTHON_UNUSED PyObject * return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5091 +/* "netCDF4/_netCDF4.pyx":5114 * gregorian = datetime(1582,10,15) * * def _dateparse(timestr): # <<<<<<<<<<<<<< @@ -61512,14 +61558,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8_dateparse(CYTHON_UNUSED PyObject int __pyx_t_13; __Pyx_RefNannySetupContext("_dateparse", 0); - /* "netCDF4/_netCDF4.pyx":5096 + /* "netCDF4/_netCDF4.pyx":5119 * # 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, 5096, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_timestr, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -61532,26 +61578,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, 5096, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5119, __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, 5096, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5119, __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":5097 + /* "netCDF4/_netCDF4.pyx":5120 * # 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, 5097, __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, 5120, __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, 5097, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_lower); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -61565,26 +61611,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, 5097, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5120, __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, 5097, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5120, __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":5098 + /* "netCDF4/_netCDF4.pyx":5121 * 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, 5098, __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, 5121, __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, 5098, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -61598,31 +61644,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, 5098, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5121, __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, 5098, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5121, __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, 5098, __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, 5121, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":5099 + /* "netCDF4/_netCDF4.pyx":5122 * 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__103, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5099, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__107, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5122, __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, 5099, __pyx_L1_error) + __PYX_ERR(0, 5122, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5098 + /* "netCDF4/_netCDF4.pyx":5121 * timestr_split = timestr.split() * units = timestr_split[0].lower() * if timestr_split[1].lower() != 'since': # <<<<<<<<<<<<<< @@ -61631,46 +61677,46 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8_dateparse(CYTHON_UNUSED PyObject */ } - /* "netCDF4/_netCDF4.pyx":5101 + /* "netCDF4/_netCDF4.pyx":5124 * 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, 5101, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_timestr, __pyx_n_s_find); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__104, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5101, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__108, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5124, __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, 5101, __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, 5124, __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":5102 + /* "netCDF4/_netCDF4.pyx":5125 * # 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, 5102, __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, 5125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_isostring = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5104 + /* "netCDF4/_netCDF4.pyx":5127 * 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, 5104, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_parse_date); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5127, __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, 5104, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_isostring, __pyx_n_s_strip); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -61683,10 +61729,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, 5104, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5127, __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, 5104, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5127, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -61701,14 +61747,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, 5104, __pyx_L1_error) + __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_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, 5104, __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, 5127, __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; @@ -61717,20 +61763,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, 5104, __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, 5127, __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, 5104, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5127, __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, 5104, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -61746,7 +61792,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, 5103, __pyx_L1_error) + __PYX_ERR(0, 5126, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -61778,7 +61824,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, 5103, __pyx_L1_error) + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 5126, __pyx_L1_error) __Pyx_GOTREF(item); *(temps[i]) = item; } @@ -61788,7 +61834,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, 5103, __pyx_L1_error) + __pyx_t_10 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5126, __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; @@ -61797,7 +61843,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, 5103, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 7) < 0) __PYX_ERR(0, 5126, __pyx_L1_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L5_unpacking_done; @@ -61805,11 +61851,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, 5103, __pyx_L1_error) + __PYX_ERR(0, 5126, __pyx_L1_error) __pyx_L5_unpacking_done:; } - /* "netCDF4/_netCDF4.pyx":5103 + /* "netCDF4/_netCDF4.pyx":5126 * n = timestr.find('since')+6 * isostring = timestr[n:] * year, month, day, hour, minute, second, utc_offset =\ # <<<<<<<<<<<<<< @@ -61831,29 +61877,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":5105 + /* "netCDF4/_netCDF4.pyx":5128 * 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, 5105, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_MINYEAR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5128, __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, 5105, __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, 5128, __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, 5105, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 5128, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":5106 + /* "netCDF4/_netCDF4.pyx":5129 * _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, 5106, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = NULL; __pyx_t_12 = 0; @@ -61870,7 +61916,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, 5106, __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, 5129, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_9); } else @@ -61878,13 +61924,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, 5106, __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, 5129, __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, 5106, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(6+__pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5129, __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; @@ -61907,7 +61953,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, 5106, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -61915,32 +61961,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":5108 + /* "netCDF4/_netCDF4.pyx":5131 * 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, 5108, __pyx_L1_error) + __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_timedelta); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5108, __pyx_L1_error) + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5131, __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, 5108, __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, 5131, __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, 5108, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_days, __pyx_t_7) < 0) __PYX_ERR(0, 5131, __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, 5108, __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, 5131, __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, 5108, __pyx_L1_error) + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_basedate, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5131, __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":5105 + /* "netCDF4/_netCDF4.pyx":5128 * year, month, day, hour, minute, second, utc_offset =\ * _parse_date( isostring.strip() ) * if year >= MINYEAR: # <<<<<<<<<<<<<< @@ -61950,7 +61996,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8_dateparse(CYTHON_UNUSED PyObject goto __pyx_L6; } - /* "netCDF4/_netCDF4.pyx":5110 + /* "netCDF4/_netCDF4.pyx":5133 * basedate += timedelta(days=utc_offset/1440.) * else: * if not utc_offset: # <<<<<<<<<<<<<< @@ -61958,20 +62004,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, 5110, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_utc_offset); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 5133, __pyx_L1_error) __pyx_t_13 = ((!__pyx_t_4) != 0); if (__pyx_t_13) { - /* "netCDF4/_netCDF4.pyx":5111 + /* "netCDF4/_netCDF4.pyx":5134 * 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, 5111, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdftime); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5134, __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, 5111, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_datetime); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; @@ -61989,7 +62035,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, 5111, __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, 5134, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -61997,13 +62043,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, 5111, __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, 5134, __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, 5111, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(6+__pyx_t_12); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5134, __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; @@ -62026,7 +62072,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, 5111, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -62034,7 +62080,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":5110 + /* "netCDF4/_netCDF4.pyx":5133 * basedate += timedelta(days=utc_offset/1440.) * else: * if not utc_offset: # <<<<<<<<<<<<<< @@ -62044,7 +62090,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8_dateparse(CYTHON_UNUSED PyObject goto __pyx_L7; } - /* "netCDF4/_netCDF4.pyx":5113 + /* "netCDF4/_netCDF4.pyx":5136 * basedate = netcdftime.datetime(year, month, day, hour, minute, second) * else: * raise ValueError('cannot use utc_offset for reference years <= 0') # <<<<<<<<<<<<<< @@ -62052,17 +62098,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__105, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5113, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__109, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5136, __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, 5113, __pyx_L1_error) + __PYX_ERR(0, 5136, __pyx_L1_error) } __pyx_L7:; } __pyx_L6:; - /* "netCDF4/_netCDF4.pyx":5114 + /* "netCDF4/_netCDF4.pyx":5137 * else: * raise ValueError('cannot use utc_offset for reference years <= 0') * return basedate # <<<<<<<<<<<<<< @@ -62074,7 +62120,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8_dateparse(CYTHON_UNUSED PyObject __pyx_r = __pyx_v_basedate; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":5091 + /* "netCDF4/_netCDF4.pyx":5114 * gregorian = datetime(1582,10,15) * * def _dateparse(timestr): # <<<<<<<<<<<<<< @@ -62113,7 +62159,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8_dateparse(CYTHON_UNUSED PyObject return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5116 +/* "netCDF4/_netCDF4.pyx":5139 * return basedate * * def stringtoarr(string,NUMCHARS,dtype='S'): # <<<<<<<<<<<<<< @@ -62154,7 +62200,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, 5116, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("stringtoarr", 0, 2, 3, 1); __PYX_ERR(0, 5139, __pyx_L3_error) } case 2: if (kw_args > 0) { @@ -62163,7 +62209,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, 5116, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "stringtoarr") < 0)) __PYX_ERR(0, 5139, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -62180,7 +62226,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, 5116, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("stringtoarr", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5139, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("netCDF4._netCDF4.stringtoarr", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -62208,7 +62254,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":5133 + /* "netCDF4/_netCDF4.pyx":5156 * 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"]: # <<<<<<<<<<<<<< @@ -62217,33 +62263,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, 5133, __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, 5156, __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, 5133, __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, 5156, __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":5134 + /* "netCDF4/_netCDF4.pyx":5157 * (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__106, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5134, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__110, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5157, __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, 5134, __pyx_L1_error) + __PYX_ERR(0, 5157, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5133 + /* "netCDF4/_netCDF4.pyx":5156 * 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"]: # <<<<<<<<<<<<<< @@ -62252,19 +62298,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10stringtoarr(CYTHON_UNUSED PyObjec */ } - /* "netCDF4/_netCDF4.pyx":5135 + /* "netCDF4/_netCDF4.pyx":5158 * 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, 5135, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5158, __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, 5135, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5158, __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, 5135, __pyx_L1_error) + __pyx_t_4 = PyNumber_Add(__pyx_v_dtype, __pyx_kp_s_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; __pyx_t_7 = 0; @@ -62281,7 +62327,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, 5135, __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, 5158, __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; @@ -62290,14 +62336,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, 5135, __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, 5158, __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, 5135, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5158, __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; @@ -62308,7 +62354,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, 5135, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -62316,20 +62362,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":5136 + /* "netCDF4/_netCDF4.pyx":5159 * 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, 5136, __pyx_L1_error) + __pyx_t_1 = PySequence_Tuple(__pyx_v_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5159, __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, 5136, __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, 5136, __pyx_L1_error) + __pyx_t_9 = PyObject_Length(__pyx_v_string); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 5159, __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, 5159, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5137 + /* "netCDF4/_netCDF4.pyx":5160 * arr = numpy.zeros(NUMCHARS,dtype+'1') * arr[0:len(string)] = tuple(string) * return arr # <<<<<<<<<<<<<< @@ -62341,7 +62387,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10stringtoarr(CYTHON_UNUSED PyObjec __pyx_r = __pyx_v_arr; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":5116 + /* "netCDF4/_netCDF4.pyx":5139 * return basedate * * def stringtoarr(string,NUMCHARS,dtype='S'): # <<<<<<<<<<<<<< @@ -62365,7 +62411,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10stringtoarr(CYTHON_UNUSED PyObjec return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5139 +/* "netCDF4/_netCDF4.pyx":5162 * return arr * * def stringtochar(a): # <<<<<<<<<<<<<< @@ -62405,22 +62451,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12stringtochar(CYTHON_UNUSED PyObje int __pyx_t_10; __Pyx_RefNannySetupContext("stringtochar", 0); - /* "netCDF4/_netCDF4.pyx":5151 + /* "netCDF4/_netCDF4.pyx":5174 * 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, 5151, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5174, __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, 5151, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_kind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5174, __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":5152 + /* "netCDF4/_netCDF4.pyx":5175 * 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"]: # <<<<<<<<<<<<<< @@ -62429,33 +62475,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, 5152, __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, 5175, __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, 5152, __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, 5175, __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":5153 + /* "netCDF4/_netCDF4.pyx":5176 * 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__107, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5153, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__111, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5176, __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, 5153, __pyx_L1_error) + __PYX_ERR(0, 5176, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5152 + /* "netCDF4/_netCDF4.pyx":5175 * 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"]: # <<<<<<<<<<<<<< @@ -62464,19 +62510,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12stringtochar(CYTHON_UNUSED PyObje */ } - /* "netCDF4/_netCDF4.pyx":5154 + /* "netCDF4/_netCDF4.pyx":5177 * 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, 5154, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5177, __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, 5154, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5177, __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, 5154, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s_tostring); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -62489,17 +62535,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, 5154, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5177, __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, 5154, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5177, __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, 5154, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_decode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5177, __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, 5154, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -62512,14 +62558,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, 5154, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5177, __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, 5154, __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, 5177, __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; @@ -62528,29 +62574,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, 5154, __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, 5177, __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, 5154, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5177, __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, 5154, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5177, __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, 5154, __pyx_L1_error) + __pyx_t_7 = PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5177, __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, 5154, __pyx_L1_error) + __pyx_t_1 = PyNumber_Add(__pyx_v_dtype, __pyx_kp_s_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = NULL; __pyx_t_10 = 0; @@ -62567,7 +62613,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, 5154, __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, 5177, __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; @@ -62577,7 +62623,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, 5154, __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, 5177, __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; @@ -62585,7 +62631,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, 5154, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5177, __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; @@ -62596,7 +62642,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, 5154, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -62604,30 +62650,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":5155 + /* "netCDF4/_netCDF4.pyx":5178 * 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, 5155, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5178, __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, 5155, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5155, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5178, __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, 5155, __pyx_L1_error) + __pyx_t_5 = PyNumber_Add(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5178, __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, 5155, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_b, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(0, 5178, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":5156 + /* "netCDF4/_netCDF4.pyx":5179 * b = numpy.array(tuple(a.tostring().decode(default_encoding)),dtype+'1') * b.shape = a.shape + (a.itemsize,) * return b # <<<<<<<<<<<<<< @@ -62639,7 +62685,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12stringtochar(CYTHON_UNUSED PyObje __pyx_r = __pyx_v_b; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":5139 + /* "netCDF4/_netCDF4.pyx":5162 * return arr * * def stringtochar(a): # <<<<<<<<<<<<<< @@ -62666,7 +62712,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12stringtochar(CYTHON_UNUSED PyObje return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5158 +/* "netCDF4/_netCDF4.pyx":5181 * return b * * def chartostring(b): # <<<<<<<<<<<<<< @@ -62710,22 +62756,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_14chartostring(CYTHON_UNUSED PyObje int __pyx_t_11; __Pyx_RefNannySetupContext("chartostring", 0); - /* "netCDF4/_netCDF4.pyx":5170 + /* "netCDF4/_netCDF4.pyx":5193 * 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, 5170, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5193, __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, 5170, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_kind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5193, __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":5171 + /* "netCDF4/_netCDF4.pyx":5194 * `b.shape[:-1]` where where `N=b.shape[-1]`.""" * dtype = b.dtype.kind * if dtype not in ["S","U"]: # <<<<<<<<<<<<<< @@ -62734,33 +62780,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, 5171, __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, 5194, __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, 5171, __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, 5194, __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":5172 + /* "netCDF4/_netCDF4.pyx":5195 * 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__108, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5172, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__112, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5195, __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, 5172, __pyx_L1_error) + __PYX_ERR(0, 5195, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5171 + /* "netCDF4/_netCDF4.pyx":5194 * `b.shape[:-1]` where where `N=b.shape[-1]`.""" * dtype = b.dtype.kind * if dtype not in ["S","U"]: # <<<<<<<<<<<<<< @@ -62769,14 +62815,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_14chartostring(CYTHON_UNUSED PyObje */ } - /* "netCDF4/_netCDF4.pyx":5173 + /* "netCDF4/_netCDF4.pyx":5196 * 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, 5173, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_tostring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -62789,17 +62835,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, 5173, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5196, __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, 5173, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5196, __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, 5173, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_decode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5196, __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, 5173, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -62812,14 +62858,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, 5173, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5196, __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, 5173, __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, 5196, __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; @@ -62828,20 +62874,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, 5173, __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, 5196, __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, 5173, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5196, __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, 5173, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -62850,42 +62896,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":5174 + /* "netCDF4/_netCDF4.pyx":5197 * 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, 5174, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5197, __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, 5174, __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, 5197, __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, 5174, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5197, __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":5175 + /* "netCDF4/_netCDF4.pyx":5198 * 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, 5175, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5198, __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, 5175, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5198, __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, 5175, __pyx_L1_error) + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5198, __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, 5175, __pyx_L1_error) - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5175, __pyx_L1_error) + __pyx_t_8 = PyObject_Length(__pyx_v_bs); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 5198, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5175, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); @@ -62896,16 +62942,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, 5175, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5198, __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, 5175, __pyx_L1_error) + __pyx_t_8 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5198, __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, 5175, __pyx_L1_error) + __pyx_t_9 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5198, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -62913,17 +62959,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, 5175, __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, 5198, __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, 5175, __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, 5198, __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, 5175, __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, 5198, __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, 5175, __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, 5198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -62933,7 +62979,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, 5175, __pyx_L1_error) + else __PYX_ERR(0, 5198, __pyx_L1_error) } break; } @@ -62941,18 +62987,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, 5175, __pyx_L1_error) + __pyx_t_1 = PyNumber_Add(__pyx_v_n1, __pyx_v_slen); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5198, __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, 5175, __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, 5198, __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, 5175, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_10))) __PYX_ERR(0, 5198, __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, 5175, __pyx_L1_error) + __pyx_t_6 = PyObject_Repr(__pyx_v_slen); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5198, __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, 5175, __pyx_L1_error) + __pyx_t_10 = PyNumber_Add(__pyx_v_dtype, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -62970,7 +63016,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, 5175, __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, 5198, __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; @@ -62980,7 +63026,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, 5175, __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, 5198, __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; @@ -62988,7 +63034,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, 5175, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5198, __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; @@ -62999,7 +63045,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, 5175, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } @@ -63007,22 +63053,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":5176 + /* "netCDF4/_netCDF4.pyx":5199 * 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, 5176, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_t_2, 0, -1L, NULL, NULL, &__pyx_slice__109, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5176, __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, 5199, __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, 5176, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_shape, __pyx_t_7) < 0) __PYX_ERR(0, 5199, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5177 + /* "netCDF4/_netCDF4.pyx":5200 * 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 # <<<<<<<<<<<<<< @@ -63034,7 +63080,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_14chartostring(CYTHON_UNUSED PyObje __pyx_r = __pyx_v_a; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":5158 + /* "netCDF4/_netCDF4.pyx":5181 * return b * * def chartostring(b): # <<<<<<<<<<<<<< @@ -63063,7 +63109,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_14chartostring(CYTHON_UNUSED PyObje return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5179 +/* "netCDF4/_netCDF4.pyx":5202 * return a * * def date2num(dates,units,calendar='standard'): # <<<<<<<<<<<<<< @@ -63104,7 +63150,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, 5179, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("date2num", 0, 2, 3, 1); __PYX_ERR(0, 5202, __pyx_L3_error) } case 2: if (kw_args > 0) { @@ -63113,7 +63159,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, 5179, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "date2num") < 0)) __PYX_ERR(0, 5202, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -63130,7 +63176,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, 5179, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("date2num", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5202, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("netCDF4._netCDF4.date2num", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -63178,14 +63224,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":5208 + /* "netCDF4/_netCDF4.pyx":5231 * 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, 5208, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_calendar, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5231, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -63198,24 +63244,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, 5208, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5231, __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, 5208, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5231, __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":5209 + /* "netCDF4/_netCDF4.pyx":5232 * """ * 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, 5209, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_dateparse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -63228,13 +63274,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, 5209, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_units); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5232, __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, 5209, __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, 5232, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -63242,19 +63288,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, 5209, __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, 5232, __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, 5209, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5232, __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, 5209, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -63263,14 +63309,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":5210 + /* "netCDF4/_netCDF4.pyx":5233 * 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, 5210, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_units, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -63283,17 +63329,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, 5210, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5233, __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, 5210, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5233, __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, 5210, __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, 5233, __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, 5210, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -63307,17 +63353,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, 5210, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5233, __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, 5210, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5233, __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":5212 + /* "netCDF4/_netCDF4.pyx":5235 * unit = units.split()[0].lower() * # real-world calendars limited to positive reference years. * if calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']: # <<<<<<<<<<<<<< @@ -63326,48 +63372,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, 5212, __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, 5235, __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, 5212, __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, 5235, __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, 5212, __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, 5235, __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, 5212, __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, 5235, __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":5213 + /* "netCDF4/_netCDF4.pyx":5236 * # 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, 5213, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_basedate, __pyx_n_s_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5236, __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, 5213, __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, 5236, __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, 5213, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 5236, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_6) { - /* "netCDF4/_netCDF4.pyx":5214 + /* "netCDF4/_netCDF4.pyx":5237 * 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' # <<<<<<<<<<<<<< @@ -63377,26 +63423,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":5215 + /* "netCDF4/_netCDF4.pyx":5238 * 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, 5215, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5238, __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, 5215, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); 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_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 5215, __pyx_L1_error) + __PYX_ERR(0, 5238, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5213 + /* "netCDF4/_netCDF4.pyx":5236 * # real-world calendars limited to positive reference years. * if calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']: * if basedate.year == 0: # <<<<<<<<<<<<<< @@ -63405,22 +63451,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * */ } - /* "netCDF4/_netCDF4.pyx":5216 + /* "netCDF4/_netCDF4.pyx":5239 * 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, 5216, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_basedate, __pyx_n_s_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5239, __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, 5216, __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, 5239, __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, 5216, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 5239, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_6) { - /* "netCDF4/_netCDF4.pyx":5217 + /* "netCDF4/_netCDF4.pyx":5240 * raise ValueError(msg) * elif basedate.year < 0: * msg='negative reference year in time units, must be >= 1' # <<<<<<<<<<<<<< @@ -63430,26 +63476,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":5218 + /* "netCDF4/_netCDF4.pyx":5241 * 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, 5218, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5241, __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, 5218, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5241, __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, 5218, __pyx_L1_error) + __PYX_ERR(0, 5241, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5216 + /* "netCDF4/_netCDF4.pyx":5239 * msg='zero not allowed as a reference year, does not exist in Julian or Gregorian calendars' * raise ValueError(msg) * elif basedate.year < 0: # <<<<<<<<<<<<<< @@ -63458,7 +63504,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * */ } - /* "netCDF4/_netCDF4.pyx":5212 + /* "netCDF4/_netCDF4.pyx":5235 * unit = units.split()[0].lower() * # real-world calendars limited to positive reference years. * if calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']: # <<<<<<<<<<<<<< @@ -63467,26 +63513,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * */ } - /* "netCDF4/_netCDF4.pyx":5220 + /* "netCDF4/_netCDF4.pyx":5243 * 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, 5220, __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, 5243, __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, 5220, __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_GetModuleGlobalName(__pyx_n_s_MINYEAR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5220, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_MINYEAR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5243, __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, 5220, __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, 5243, __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, 5220, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 5243, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!__pyx_t_5) { } else { @@ -63495,7 +63541,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * } __pyx_L11_next_or:; - /* "netCDF4/_netCDF4.pyx":5221 + /* "netCDF4/_netCDF4.pyx":5244 * * if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \ * (calendar in ['gregorian','standard'] and basedate > gregorian): # <<<<<<<<<<<<<< @@ -63504,13 +63550,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, 5221, __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, 5244, __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, 5221, __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, 5244, __pyx_L1_error) __pyx_t_5 = __pyx_t_7; __pyx_L14_bool_binop_done:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -63520,16 +63566,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, 5221, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_gregorian); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5244, __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, 5221, __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, 5244, __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, 5221, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 5244, __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":5220 + /* "netCDF4/_netCDF4.pyx":5243 * raise ValueError(msg) * * if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \ # <<<<<<<<<<<<<< @@ -63538,7 +63584,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * */ if (__pyx_t_6) { - /* "netCDF4/_netCDF4.pyx":5223 + /* "netCDF4/_netCDF4.pyx":5246 * (calendar in ['gregorian','standard'] and basedate > gregorian): * # use python datetime module, * isscalar = False # <<<<<<<<<<<<<< @@ -63547,7 +63593,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * */ __pyx_v_isscalar = 0; - /* "netCDF4/_netCDF4.pyx":5224 + /* "netCDF4/_netCDF4.pyx":5247 * # use python datetime module, * isscalar = False * try: # <<<<<<<<<<<<<< @@ -63563,18 +63609,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { - /* "netCDF4/_netCDF4.pyx":5225 + /* "netCDF4/_netCDF4.pyx":5248 * 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, 5225, __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, 5248, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5224 + /* "netCDF4/_netCDF4.pyx":5247 * # use python datetime module, * isscalar = False * try: # <<<<<<<<<<<<<< @@ -63593,7 +63639,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":5226 + /* "netCDF4/_netCDF4.pyx":5249 * try: * dates[0] * except: # <<<<<<<<<<<<<< @@ -63602,12 +63648,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, 5226, __pyx_L18_except_error) + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_1) < 0) __PYX_ERR(0, 5249, __pyx_L18_except_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_1); - /* "netCDF4/_netCDF4.pyx":5227 + /* "netCDF4/_netCDF4.pyx":5250 * dates[0] * except: * isscalar = True # <<<<<<<<<<<<<< @@ -63622,7 +63668,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * } __pyx_L18_except_error:; - /* "netCDF4/_netCDF4.pyx":5224 + /* "netCDF4/_netCDF4.pyx":5247 * # use python datetime module, * isscalar = False * try: # <<<<<<<<<<<<<< @@ -63644,7 +63690,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * __pyx_L23_try_end:; } - /* "netCDF4/_netCDF4.pyx":5228 + /* "netCDF4/_netCDF4.pyx":5251 * except: * isscalar = True * if isscalar: # <<<<<<<<<<<<<< @@ -63654,19 +63700,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":5229 + /* "netCDF4/_netCDF4.pyx":5252 * 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, 5229, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5252, __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, 5229, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5252, __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, 5229, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_dates); __Pyx_GIVEREF(__pyx_v_dates); @@ -63682,14 +63728,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, 5229, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5252, __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, 5229, __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, 5252, __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; @@ -63698,20 +63744,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, 5229, __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, 5252, __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, 5229, __pyx_L1_error) + __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5252, __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, 5229, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } @@ -63720,7 +63766,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":5228 + /* "netCDF4/_netCDF4.pyx":5251 * except: * isscalar = True * if isscalar: # <<<<<<<<<<<<<< @@ -63730,7 +63776,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * goto __pyx_L26; } - /* "netCDF4/_netCDF4.pyx":5231 + /* "netCDF4/_netCDF4.pyx":5254 * dates = numpy.array([dates]) * else: * dates = numpy.array(dates) # <<<<<<<<<<<<<< @@ -63738,9 +63784,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, 5231, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5254, __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, 5231, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -63754,13 +63800,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, 5231, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_dates); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5254, __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, 5231, __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, 5254, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -63768,19 +63814,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, 5231, __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, 5254, __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, 5231, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5254, __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, 5231, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -63789,21 +63835,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":5232 + /* "netCDF4/_netCDF4.pyx":5255 * 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, 5232, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dates, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_shape = __pyx_t_1; __pyx_t_1 = 0; } __pyx_L26:; - /* "netCDF4/_netCDF4.pyx":5233 + /* "netCDF4/_netCDF4.pyx":5256 * dates = numpy.array(dates) * shape = dates.shape * ismasked = False # <<<<<<<<<<<<<< @@ -63812,30 +63858,30 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * */ __pyx_v_ismasked = 0; - /* "netCDF4/_netCDF4.pyx":5234 + /* "netCDF4/_netCDF4.pyx":5257 * 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, 5234, __pyx_L1_error) + __pyx_t_6 = PyObject_HasAttr(__pyx_v_dates, __pyx_n_s_mask); if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(0, 5257, __pyx_L1_error) __pyx_t_7 = (__pyx_t_6 != 0); if (__pyx_t_7) { - /* "netCDF4/_netCDF4.pyx":5235 + /* "netCDF4/_netCDF4.pyx":5258 * 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, 5235, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dates, __pyx_n_s_mask); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_mask = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5236 + /* "netCDF4/_netCDF4.pyx":5259 * if hasattr(dates,'mask'): * mask = dates.mask * ismasked = True # <<<<<<<<<<<<<< @@ -63844,7 +63890,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * */ __pyx_v_ismasked = 1; - /* "netCDF4/_netCDF4.pyx":5234 + /* "netCDF4/_netCDF4.pyx":5257 * shape = dates.shape * ismasked = False * if hasattr(dates,'mask'): # <<<<<<<<<<<<<< @@ -63853,34 +63899,34 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * */ } - /* "netCDF4/_netCDF4.pyx":5237 + /* "netCDF4/_netCDF4.pyx":5260 * 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, 5237, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_times = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5238 + /* "netCDF4/_netCDF4.pyx":5261 * 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, 5238, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dates, __pyx_n_s_flat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5261, __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, 5238, __pyx_L1_error) + __pyx_t_12 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5261, __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, 5238, __pyx_L1_error) + __pyx_t_13 = Py_TYPE(__pyx_t_11)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5261, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -63888,17 +63934,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, 5238, __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, 5261, __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, 5238, __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, 5261, __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, 5238, __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, 5261, __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, 5238, __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, 5261, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -63908,7 +63954,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, 5238, __pyx_L1_error) + else __PYX_ERR(0, 5261, __pyx_L1_error) } break; } @@ -63917,7 +63963,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":5239 + /* "netCDF4/_netCDF4.pyx":5262 * times = [] * for date in dates.flat: * if ismasked and not date: # <<<<<<<<<<<<<< @@ -63930,22 +63976,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, 5239, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_date); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 5262, __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":5240 + /* "netCDF4/_netCDF4.pyx":5263 * 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, 5240, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_times, Py_None); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 5263, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5239 + /* "netCDF4/_netCDF4.pyx":5262 * times = [] * for date in dates.flat: * if ismasked and not date: # <<<<<<<<<<<<<< @@ -63955,7 +64001,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * goto __pyx_L30; } - /* "netCDF4/_netCDF4.pyx":5242 + /* "netCDF4/_netCDF4.pyx":5265 * times.append(None) * else: * td = date - basedate # <<<<<<<<<<<<<< @@ -63963,68 +64009,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, 5242, __pyx_L1_error) + __pyx_t_1 = PyNumber_Subtract(__pyx_v_date, __pyx_v_basedate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_td, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5244 + /* "netCDF4/_netCDF4.pyx":5267 * 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, 5244, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_td, __pyx_n_s_microseconds); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5267, __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, 5244, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_td, __pyx_n_s_seconds); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5267, __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, 5244, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_td, __pyx_n_s_days); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5267, __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, 5244, __pyx_L1_error) + __pyx_t_3 = PyNumber_Multiply(__pyx_t_2, __pyx_int_24); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5267, __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, 5244, __pyx_L1_error) + __pyx_t_2 = PyNumber_Multiply(__pyx_t_3, __pyx_int_3600); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5267, __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, 5244, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5267, __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, 5244, __pyx_L1_error) + __pyx_t_2 = PyNumber_Multiply(__pyx_t_3, __pyx_float_1_e6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5267, __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, 5244, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5267, __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":5245 + /* "netCDF4/_netCDF4.pyx":5268 * # 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, 5245, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_microsec_units); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5268, __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, 5245, __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, 5268, __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":5246 + /* "netCDF4/_netCDF4.pyx":5269 * 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, 5246, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_times, __pyx_v_totaltime); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 5269, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5245 + /* "netCDF4/_netCDF4.pyx":5268 * # total time in microseconds. * totaltime = td.microseconds + (td.seconds + td.days * 24 * 3600) * 1.e6 * if unit in microsec_units: # <<<<<<<<<<<<<< @@ -64034,33 +64080,33 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * goto __pyx_L33; } - /* "netCDF4/_netCDF4.pyx":5247 + /* "netCDF4/_netCDF4.pyx":5270 * 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, 5247, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_millisec_units); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5270, __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, 5247, __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, 5270, __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":5248 + /* "netCDF4/_netCDF4.pyx":5271 * 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, 5248, __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, 5271, __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, 5248, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_times, __pyx_t_3); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 5271, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":5247 + /* "netCDF4/_netCDF4.pyx":5270 * if unit in microsec_units: * times.append(totaltime) * elif unit in millisec_units: # <<<<<<<<<<<<<< @@ -64070,33 +64116,33 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * goto __pyx_L33; } - /* "netCDF4/_netCDF4.pyx":5249 + /* "netCDF4/_netCDF4.pyx":5272 * 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, 5249, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_sec_units); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5272, __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, 5249, __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, 5272, __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":5250 + /* "netCDF4/_netCDF4.pyx":5273 * 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, 5250, __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, 5273, __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, 5250, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_times, __pyx_t_3); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 5273, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":5249 + /* "netCDF4/_netCDF4.pyx":5272 * elif unit in millisec_units: * times.append(totaltime/1.e3) * elif unit in sec_units: # <<<<<<<<<<<<<< @@ -64106,36 +64152,36 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * goto __pyx_L33; } - /* "netCDF4/_netCDF4.pyx":5251 + /* "netCDF4/_netCDF4.pyx":5274 * 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, 5251, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_min_units); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5274, __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, 5251, __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, 5274, __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":5252 + /* "netCDF4/_netCDF4.pyx":5275 * 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, 5252, __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, 5275, __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, 5252, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_t_3, __pyx_int_60); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5275, __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, 5252, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_times, __pyx_t_2); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 5275, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5251 + /* "netCDF4/_netCDF4.pyx":5274 * elif unit in sec_units: * times.append(totaltime/1.e6) * elif unit in min_units: # <<<<<<<<<<<<<< @@ -64145,36 +64191,36 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * goto __pyx_L33; } - /* "netCDF4/_netCDF4.pyx":5253 + /* "netCDF4/_netCDF4.pyx":5276 * 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, 5253, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hr_units); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5276, __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, 5253, __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, 5276, __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":5254 + /* "netCDF4/_netCDF4.pyx":5277 * 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, 5254, __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, 5277, __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, 5254, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_int_3600); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5277, __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, 5254, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_times, __pyx_t_3); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 5277, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":5253 + /* "netCDF4/_netCDF4.pyx":5276 * elif unit in min_units: * times.append(totaltime/1.e6/60) * elif unit in hr_units: # <<<<<<<<<<<<<< @@ -64184,39 +64230,39 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * goto __pyx_L33; } - /* "netCDF4/_netCDF4.pyx":5255 + /* "netCDF4/_netCDF4.pyx":5278 * 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, 5255, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_day_units); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5278, __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, 5255, __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, 5278, __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":5256 + /* "netCDF4/_netCDF4.pyx":5279 * 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, 5256, __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, 5279, __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, 5256, __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, 5279, __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, 5256, __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, 5279, __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, 5256, __pyx_L1_error) + __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_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":5255 + /* "netCDF4/_netCDF4.pyx":5278 * elif unit in hr_units: * times.append(totaltime/1.e6/3600) * elif unit in day_units: # <<<<<<<<<<<<<< @@ -64226,7 +64272,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * goto __pyx_L33; } - /* "netCDF4/_netCDF4.pyx":5258 + /* "netCDF4/_netCDF4.pyx":5281 * times.append(totaltime/1.e6/3600./24.) * else: * raise ValueError('unsupported time units') # <<<<<<<<<<<<<< @@ -64234,17 +64280,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__110, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5258, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__114, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5281, __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, 5258, __pyx_L1_error) + __PYX_ERR(0, 5281, __pyx_L1_error) } __pyx_L33:; } __pyx_L30:; - /* "netCDF4/_netCDF4.pyx":5238 + /* "netCDF4/_netCDF4.pyx":5261 * ismasked = True * times = [] * for date in dates.flat: # <<<<<<<<<<<<<< @@ -64254,7 +64300,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":5259 + /* "netCDF4/_netCDF4.pyx":5282 * else: * raise ValueError('unsupported time units') * if isscalar: # <<<<<<<<<<<<<< @@ -64264,7 +64310,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":5260 + /* "netCDF4/_netCDF4.pyx":5283 * raise ValueError('unsupported time units') * if isscalar: * return times[0] # <<<<<<<<<<<<<< @@ -64272,13 +64318,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, 5260, __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, 5283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_r = __pyx_t_11; __pyx_t_11 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":5259 + /* "netCDF4/_netCDF4.pyx":5282 * else: * raise ValueError('unsupported time units') * if isscalar: # <<<<<<<<<<<<<< @@ -64287,7 +64333,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * */ } - /* "netCDF4/_netCDF4.pyx":5262 + /* "netCDF4/_netCDF4.pyx":5285 * return times[0] * else: * return numpy.reshape(numpy.array(times), shape) # <<<<<<<<<<<<<< @@ -64296,14 +64342,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, 5262, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5285, __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, 5262, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5285, __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, 5262, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5285, __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, 5262, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -64317,13 +64363,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, 5262, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_times); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5285, __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, 5262, __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, 5285, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -64331,25 +64377,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, 5262, __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, 5285, __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, 5262, __pyx_L1_error) + __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5285, __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, 5262, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_15, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5285, __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, 5262, __pyx_L1_error) } + if (unlikely(!__pyx_v_shape)) { __Pyx_RaiseUnboundLocalError("shape"); __PYX_ERR(0, 5285, __pyx_L1_error) } __pyx_t_4 = NULL; __pyx_t_16 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -64365,7 +64411,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, 5262, __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, 5285, __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; @@ -64374,14 +64420,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, 5262, __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, 5285, __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, 5262, __pyx_L1_error) + __pyx_t_15 = PyTuple_New(2+__pyx_t_16); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5285, __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; @@ -64392,7 +64438,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, 5262, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_15, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; } @@ -64402,7 +64448,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":5220 + /* "netCDF4/_netCDF4.pyx":5243 * raise ValueError(msg) * * if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \ # <<<<<<<<<<<<<< @@ -64411,7 +64457,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * */ } - /* "netCDF4/_netCDF4.pyx":5264 + /* "netCDF4/_netCDF4.pyx":5287 * return numpy.reshape(numpy.array(times), shape) * else: # use netcdftime module for other calendars * cdftime = netcdftime.utime(units,calendar=calendar) # <<<<<<<<<<<<<< @@ -64419,20 +64465,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, 5264, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdftime); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5287, __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, 5264, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_utime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5287, __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, 5264, __pyx_L1_error) + __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5287, __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, 5264, __pyx_L1_error) + __pyx_t_15 = PyDict_New(); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5287, __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, 5264, __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, 5264, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_15, __pyx_n_s_calendar, __pyx_v_calendar) < 0) __PYX_ERR(0, 5287, __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, 5287, __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; @@ -64440,7 +64486,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":5265 + /* "netCDF4/_netCDF4.pyx":5288 * else: # use netcdftime module for other calendars * cdftime = netcdftime.utime(units,calendar=calendar) * return cdftime.date2num(dates) # <<<<<<<<<<<<<< @@ -64448,7 +64494,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, 5265, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_cdftime, __pyx_n_s_date2num); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_11 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) { @@ -64461,13 +64507,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, 5265, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_v_dates); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5288, __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, 5265, __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, 5288, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -64475,19 +64521,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, 5265, __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, 5288, __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, 5265, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5288, __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, 5265, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -64498,7 +64544,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":5179 + /* "netCDF4/_netCDF4.pyx":5202 * return a * * def date2num(dates,units,calendar='standard'): # <<<<<<<<<<<<<< @@ -64534,7 +64580,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject * return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5267 +/* "netCDF4/_netCDF4.pyx":5290 * return cdftime.date2num(dates) * * def num2date(times,units,calendar='standard'): # <<<<<<<<<<<<<< @@ -64575,7 +64621,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, 5267, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("num2date", 0, 2, 3, 1); __PYX_ERR(0, 5290, __pyx_L3_error) } case 2: if (kw_args > 0) { @@ -64584,7 +64630,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, 5267, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "num2date") < 0)) __PYX_ERR(0, 5290, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -64601,7 +64647,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, 5267, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("num2date", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5290, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("netCDF4._netCDF4.num2date", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -64654,14 +64700,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * __Pyx_INCREF(__pyx_v_times); __Pyx_INCREF(__pyx_v_calendar); - /* "netCDF4/_netCDF4.pyx":5304 + /* "netCDF4/_netCDF4.pyx":5327 * 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, 5304, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_calendar, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -64674,24 +64720,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, 5304, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5327, __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, 5304, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5327, __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":5305 + /* "netCDF4/_netCDF4.pyx":5328 * """ * 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, 5305, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_dateparse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -64704,13 +64750,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, 5305, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_units); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5328, __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, 5305, __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, 5328, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -64718,19 +64764,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, 5305, __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, 5328, __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, 5305, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5328, __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, 5305, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -64739,14 +64785,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":5306 + /* "netCDF4/_netCDF4.pyx":5329 * 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, 5306, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_units, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -64759,17 +64805,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, 5306, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5329, __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, 5306, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5329, __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, 5306, __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, 5329, __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, 5306, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -64783,17 +64829,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, 5306, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5329, __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, 5306, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5329, __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":5308 + /* "netCDF4/_netCDF4.pyx":5331 * unit = units.split()[0].lower() * # real-world calendars limited to positive reference years. * if calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']: # <<<<<<<<<<<<<< @@ -64802,48 +64848,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, 5308, __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, 5331, __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, 5308, __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, 5331, __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, 5308, __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, 5331, __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, 5308, __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, 5331, __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":5309 + /* "netCDF4/_netCDF4.pyx":5332 * # 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, 5309, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_basedate, __pyx_n_s_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5332, __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, 5309, __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, 5332, __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, 5309, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 5332, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_6) { - /* "netCDF4/_netCDF4.pyx":5310 + /* "netCDF4/_netCDF4.pyx":5333 * 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' # <<<<<<<<<<<<<< @@ -64853,26 +64899,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":5311 + /* "netCDF4/_netCDF4.pyx":5334 * 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, 5311, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5334, __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, 5311, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); 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_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 5311, __pyx_L1_error) + __PYX_ERR(0, 5334, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5309 + /* "netCDF4/_netCDF4.pyx":5332 * # real-world calendars limited to positive reference years. * if calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']: * if basedate.year == 0: # <<<<<<<<<<<<<< @@ -64881,22 +64927,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * */ } - /* "netCDF4/_netCDF4.pyx":5312 + /* "netCDF4/_netCDF4.pyx":5335 * 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, 5312, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_basedate, __pyx_n_s_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5335, __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, 5312, __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, 5335, __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, 5312, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 5335, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_6) { - /* "netCDF4/_netCDF4.pyx":5313 + /* "netCDF4/_netCDF4.pyx":5336 * raise ValueError(msg) * elif basedate.year < 0: * msg='negative reference year in time units, must be >= 1' # <<<<<<<<<<<<<< @@ -64906,26 +64952,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":5314 + /* "netCDF4/_netCDF4.pyx":5337 * 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, 5314, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5337, __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, 5314, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5337, __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, 5314, __pyx_L1_error) + __PYX_ERR(0, 5337, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5312 + /* "netCDF4/_netCDF4.pyx":5335 * msg='zero not allowed as a reference year, does not exist in Julian or Gregorian calendars' * raise ValueError(msg) * elif basedate.year < 0: # <<<<<<<<<<<<<< @@ -64934,7 +64980,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * */ } - /* "netCDF4/_netCDF4.pyx":5308 + /* "netCDF4/_netCDF4.pyx":5331 * unit = units.split()[0].lower() * # real-world calendars limited to positive reference years. * if calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']: # <<<<<<<<<<<<<< @@ -64943,26 +64989,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * */ } - /* "netCDF4/_netCDF4.pyx":5316 + /* "netCDF4/_netCDF4.pyx":5339 * 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, 5316, __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, 5339, __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, 5316, __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_GetModuleGlobalName(__pyx_n_s_MINYEAR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5316, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_MINYEAR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5339, __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, 5316, __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, 5339, __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, 5316, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 5339, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!__pyx_t_5) { } else { @@ -64971,7 +65017,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * } __pyx_L11_next_or:; - /* "netCDF4/_netCDF4.pyx":5317 + /* "netCDF4/_netCDF4.pyx":5340 * * if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \ * (calendar in ['gregorian','standard'] and basedate > gregorian): # <<<<<<<<<<<<<< @@ -64980,13 +65026,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(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, 5317, __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, 5340, __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, 5317, __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, 5340, __pyx_L1_error) __pyx_t_5 = __pyx_t_7; __pyx_L14_bool_binop_done:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -64996,16 +65042,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(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, 5317, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_gregorian); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5340, __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, 5317, __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, 5340, __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, 5317, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 5340, __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":5316 + /* "netCDF4/_netCDF4.pyx":5339 * raise ValueError(msg) * * if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \ # <<<<<<<<<<<<<< @@ -65014,7 +65060,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * */ if (__pyx_t_6) { - /* "netCDF4/_netCDF4.pyx":5319 + /* "netCDF4/_netCDF4.pyx":5342 * (calendar in ['gregorian','standard'] and basedate > gregorian): * # use python datetime module, * isscalar = False # <<<<<<<<<<<<<< @@ -65023,7 +65069,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * */ __pyx_v_isscalar = 0; - /* "netCDF4/_netCDF4.pyx":5320 + /* "netCDF4/_netCDF4.pyx":5343 * # use python datetime module, * isscalar = False * try: # <<<<<<<<<<<<<< @@ -65039,18 +65085,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { - /* "netCDF4/_netCDF4.pyx":5321 + /* "netCDF4/_netCDF4.pyx":5344 * isscalar = False * try: * times[0] # <<<<<<<<<<<<<< * 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, 5321, __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, 5344, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5320 + /* "netCDF4/_netCDF4.pyx":5343 * # use python datetime module, * isscalar = False * try: # <<<<<<<<<<<<<< @@ -65069,7 +65115,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5322 + /* "netCDF4/_netCDF4.pyx":5345 * try: * times[0] * except: # <<<<<<<<<<<<<< @@ -65078,12 +65124,12 @@ 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, 5322, __pyx_L18_except_error) + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_1) < 0) __PYX_ERR(0, 5345, __pyx_L18_except_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_1); - /* "netCDF4/_netCDF4.pyx":5323 + /* "netCDF4/_netCDF4.pyx":5346 * times[0] * except: * isscalar = True # <<<<<<<<<<<<<< @@ -65098,7 +65144,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * } __pyx_L18_except_error:; - /* "netCDF4/_netCDF4.pyx":5320 + /* "netCDF4/_netCDF4.pyx":5343 * # use python datetime module, * isscalar = False * try: # <<<<<<<<<<<<<< @@ -65120,7 +65166,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * __pyx_L23_try_end:; } - /* "netCDF4/_netCDF4.pyx":5324 + /* "netCDF4/_netCDF4.pyx":5347 * except: * isscalar = True * if isscalar: # <<<<<<<<<<<<<< @@ -65130,32 +65176,32 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * __pyx_t_6 = (__pyx_v_isscalar != 0); if (__pyx_t_6) { - /* "netCDF4/_netCDF4.pyx":5325 + /* "netCDF4/_netCDF4.pyx":5348 * isscalar = True * if isscalar: * times = numpy.array([times],dtype='d') # <<<<<<<<<<<<<< * else: * times = numpy.array(times, dtype='d') */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5325, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5348, __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, 5325, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5348, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5325, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5348, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_times); __Pyx_GIVEREF(__pyx_v_times); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_times); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5325, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5348, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5325, __pyx_L1_error) + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5348, __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, 5325, __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, 5325, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_n_s_d) < 0) __PYX_ERR(0, 5348, __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, 5348, __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; @@ -65163,7 +65209,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * __Pyx_DECREF_SET(__pyx_v_times, __pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":5324 + /* "netCDF4/_netCDF4.pyx":5347 * except: * isscalar = True * if isscalar: # <<<<<<<<<<<<<< @@ -65173,7 +65219,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * goto __pyx_L26; } - /* "netCDF4/_netCDF4.pyx":5327 + /* "netCDF4/_netCDF4.pyx":5350 * times = numpy.array([times],dtype='d') * else: * times = numpy.array(times, dtype='d') # <<<<<<<<<<<<<< @@ -65181,20 +65227,20 @@ 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, 5327, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5350, __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, 5327, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5350, __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, 5327, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_times); __Pyx_GIVEREF(__pyx_v_times); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_times); - __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5327, __pyx_L1_error) + __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5350, __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, 5327, __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, 5327, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_n_s_d) < 0) __PYX_ERR(0, 5350, __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, 5350, __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; @@ -65202,21 +65248,21 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * __Pyx_DECREF_SET(__pyx_v_times, __pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":5328 + /* "netCDF4/_netCDF4.pyx":5351 * else: * times = numpy.array(times, dtype='d') * shape = times.shape # <<<<<<<<<<<<<< * 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, 5328, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_times, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_shape = __pyx_t_4; __pyx_t_4 = 0; } __pyx_L26:; - /* "netCDF4/_netCDF4.pyx":5329 + /* "netCDF4/_netCDF4.pyx":5352 * times = numpy.array(times, dtype='d') * shape = times.shape * ismasked = False # <<<<<<<<<<<<<< @@ -65225,30 +65271,30 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * */ __pyx_v_ismasked = 0; - /* "netCDF4/_netCDF4.pyx":5330 + /* "netCDF4/_netCDF4.pyx":5353 * shape = times.shape * ismasked = False * if hasattr(times,'mask'): # <<<<<<<<<<<<<< * mask = times.mask * ismasked = True */ - __pyx_t_6 = PyObject_HasAttr(__pyx_v_times, __pyx_n_s_mask); if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(0, 5330, __pyx_L1_error) + __pyx_t_6 = PyObject_HasAttr(__pyx_v_times, __pyx_n_s_mask); if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(0, 5353, __pyx_L1_error) __pyx_t_7 = (__pyx_t_6 != 0); if (__pyx_t_7) { - /* "netCDF4/_netCDF4.pyx":5331 + /* "netCDF4/_netCDF4.pyx":5354 * ismasked = False * if hasattr(times,'mask'): * mask = times.mask # <<<<<<<<<<<<<< * ismasked = True * dates = [] */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_times, __pyx_n_s_mask); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5331, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_times, __pyx_n_s_mask); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5354, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_mask = __pyx_t_4; __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":5332 + /* "netCDF4/_netCDF4.pyx":5355 * if hasattr(times,'mask'): * mask = times.mask * ismasked = True # <<<<<<<<<<<<<< @@ -65257,7 +65303,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * */ __pyx_v_ismasked = 1; - /* "netCDF4/_netCDF4.pyx":5330 + /* "netCDF4/_netCDF4.pyx":5353 * shape = times.shape * ismasked = False * if hasattr(times,'mask'): # <<<<<<<<<<<<<< @@ -65266,34 +65312,34 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * */ } - /* "netCDF4/_netCDF4.pyx":5333 + /* "netCDF4/_netCDF4.pyx":5356 * mask = times.mask * ismasked = True * dates = [] # <<<<<<<<<<<<<< * for time in times.flat: * if ismasked and not time: */ - __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5333, __pyx_L1_error) + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_dates = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":5334 + /* "netCDF4/_netCDF4.pyx":5357 * ismasked = True * dates = [] * for time in times.flat: # <<<<<<<<<<<<<< * 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, 5334, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_times, __pyx_n_s_flat); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5357, __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; } else { - __pyx_t_11 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5334, __pyx_L1_error) + __pyx_t_11 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5357, __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, 5334, __pyx_L1_error) + __pyx_t_12 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5357, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -65301,17 +65347,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_11 >= 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, 5334, __pyx_L1_error) + __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, 5357, __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, 5334, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5357, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_11 >= 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, 5334, __pyx_L1_error) + __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, 5357, __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, 5334, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5357, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -65321,7 +65367,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(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, 5334, __pyx_L1_error) + else __PYX_ERR(0, 5357, __pyx_L1_error) } break; } @@ -65330,7 +65376,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * __Pyx_XDECREF_SET(__pyx_v_time, __pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":5335 + /* "netCDF4/_netCDF4.pyx":5358 * dates = [] * for time in times.flat: * if ismasked and not time: # <<<<<<<<<<<<<< @@ -65343,22 +65389,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * __pyx_t_7 = __pyx_t_6; goto __pyx_L31_bool_binop_done; } - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_time); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 5335, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_time); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 5358, __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":5336 + /* "netCDF4/_netCDF4.pyx":5359 * for time in times.flat: * if ismasked and not time: * dates.append(None) # <<<<<<<<<<<<<< * 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, 5336, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_dates, Py_None); if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 5359, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5335 + /* "netCDF4/_netCDF4.pyx":5358 * dates = [] * for time in times.flat: * if ismasked and not time: # <<<<<<<<<<<<<< @@ -65368,7 +65414,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * goto __pyx_L30; } - /* "netCDF4/_netCDF4.pyx":5339 + /* "netCDF4/_netCDF4.pyx":5362 * else: * # convert to total seconds * if unit in microsec_units: # <<<<<<<<<<<<<< @@ -65376,26 +65422,26 @@ 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, 5339, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_microsec_units); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5362, __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, 5339, __pyx_L1_error) + __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_unit, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 5362, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = (__pyx_t_7 != 0); if (__pyx_t_5) { - /* "netCDF4/_netCDF4.pyx":5340 + /* "netCDF4/_netCDF4.pyx":5363 * # convert to total seconds * if unit in microsec_units: * tsecs = time/1.e6 # <<<<<<<<<<<<<< * 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, 5340, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyFloat_DivideObjC(__pyx_v_time, __pyx_float_1_e6, 1.e6, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5363, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_tsecs, __pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":5339 + /* "netCDF4/_netCDF4.pyx":5362 * else: * # convert to total seconds * if unit in microsec_units: # <<<<<<<<<<<<<< @@ -65405,33 +65451,33 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * goto __pyx_L33; } - /* "netCDF4/_netCDF4.pyx":5341 + /* "netCDF4/_netCDF4.pyx":5364 * if unit in microsec_units: * tsecs = time/1.e6 * elif unit in millisec_units: # <<<<<<<<<<<<<< * 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, 5341, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_millisec_units); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5364, __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, 5341, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_unit, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 5364, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_7 = (__pyx_t_5 != 0); if (__pyx_t_7) { - /* "netCDF4/_netCDF4.pyx":5342 + /* "netCDF4/_netCDF4.pyx":5365 * tsecs = time/1.e6 * elif unit in millisec_units: * tsecs = time/1.e3 # <<<<<<<<<<<<<< * 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, 5342, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyFloat_DivideObjC(__pyx_v_time, __pyx_float_1_e3, 1.e3, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5365, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_tsecs, __pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":5341 + /* "netCDF4/_netCDF4.pyx":5364 * if unit in microsec_units: * tsecs = time/1.e6 * elif unit in millisec_units: # <<<<<<<<<<<<<< @@ -65441,21 +65487,21 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * goto __pyx_L33; } - /* "netCDF4/_netCDF4.pyx":5343 + /* "netCDF4/_netCDF4.pyx":5366 * elif unit in millisec_units: * tsecs = time/1.e3 * elif unit in sec_units: # <<<<<<<<<<<<<< * 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, 5343, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_sec_units); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5366, __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, 5343, __pyx_L1_error) + __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_unit, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 5366, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = (__pyx_t_7 != 0); if (__pyx_t_5) { - /* "netCDF4/_netCDF4.pyx":5344 + /* "netCDF4/_netCDF4.pyx":5367 * tsecs = time/1.e3 * elif unit in sec_units: * tsecs = time # <<<<<<<<<<<<<< @@ -65465,7 +65511,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * __Pyx_INCREF(__pyx_v_time); __Pyx_XDECREF_SET(__pyx_v_tsecs, __pyx_v_time); - /* "netCDF4/_netCDF4.pyx":5343 + /* "netCDF4/_netCDF4.pyx":5366 * elif unit in millisec_units: * tsecs = time/1.e3 * elif unit in sec_units: # <<<<<<<<<<<<<< @@ -65475,33 +65521,33 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * goto __pyx_L33; } - /* "netCDF4/_netCDF4.pyx":5345 + /* "netCDF4/_netCDF4.pyx":5368 * elif unit in sec_units: * tsecs = time * elif unit in min_units: # <<<<<<<<<<<<<< * 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, 5345, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_min_units); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5368, __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, 5345, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_unit, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 5368, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_7 = (__pyx_t_5 != 0); if (__pyx_t_7) { - /* "netCDF4/_netCDF4.pyx":5346 + /* "netCDF4/_netCDF4.pyx":5369 * tsecs = time * elif unit in min_units: * tsecs = time*60. # <<<<<<<<<<<<<< * 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, 5346, __pyx_L1_error) + __pyx_t_4 = PyNumber_Multiply(__pyx_v_time, __pyx_float_60_); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_tsecs, __pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":5345 + /* "netCDF4/_netCDF4.pyx":5368 * elif unit in sec_units: * tsecs = time * elif unit in min_units: # <<<<<<<<<<<<<< @@ -65511,33 +65557,33 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * goto __pyx_L33; } - /* "netCDF4/_netCDF4.pyx":5347 + /* "netCDF4/_netCDF4.pyx":5370 * elif unit in min_units: * tsecs = time*60. * elif unit in hr_units: # <<<<<<<<<<<<<< * 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, 5347, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_hr_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, 5347, __pyx_L1_error) + __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); if (__pyx_t_5) { - /* "netCDF4/_netCDF4.pyx":5348 + /* "netCDF4/_netCDF4.pyx":5371 * tsecs = time*60. * elif unit in hr_units: * tsecs = time*3600. # <<<<<<<<<<<<<< * 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, 5348, __pyx_L1_error) + __pyx_t_4 = PyNumber_Multiply(__pyx_v_time, __pyx_float_3600_); 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; - /* "netCDF4/_netCDF4.pyx":5347 + /* "netCDF4/_netCDF4.pyx":5370 * elif unit in min_units: * tsecs = time*60. * elif unit in hr_units: # <<<<<<<<<<<<<< @@ -65547,33 +65593,33 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * goto __pyx_L33; } - /* "netCDF4/_netCDF4.pyx":5349 + /* "netCDF4/_netCDF4.pyx":5372 * elif unit in hr_units: * tsecs = time*3600. * elif unit in day_units: # <<<<<<<<<<<<<< * tsecs = time*86400. * else: */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_day_units); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5349, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_day_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, 5349, __pyx_L1_error) + __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) { - /* "netCDF4/_netCDF4.pyx":5350 + /* "netCDF4/_netCDF4.pyx":5373 * tsecs = time*3600. * elif unit in day_units: * tsecs = time*86400. # <<<<<<<<<<<<<< * 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, 5350, __pyx_L1_error) + __pyx_t_4 = PyNumber_Multiply(__pyx_v_time, __pyx_float_86400_); 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; - /* "netCDF4/_netCDF4.pyx":5349 + /* "netCDF4/_netCDF4.pyx":5372 * elif unit in hr_units: * tsecs = time*3600. * elif unit in day_units: # <<<<<<<<<<<<<< @@ -65583,7 +65629,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * goto __pyx_L33; } - /* "netCDF4/_netCDF4.pyx":5352 + /* "netCDF4/_netCDF4.pyx":5375 * tsecs = time*86400. * else: * raise ValueError('unsupported time units') # <<<<<<<<<<<<<< @@ -65591,74 +65637,74 @@ 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__111, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5352, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__115, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5375, __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, 5352, __pyx_L1_error) + __PYX_ERR(0, 5375, __pyx_L1_error) } __pyx_L33:; - /* "netCDF4/_netCDF4.pyx":5354 + /* "netCDF4/_netCDF4.pyx":5377 * raise ValueError('unsupported time units') * # compute time delta. * days = tsecs // 86400. # <<<<<<<<<<<<<< * 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, 5354, __pyx_L1_error) + __pyx_t_4 = PyNumber_FloorDivide(__pyx_v_tsecs, __pyx_float_86400_); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_days, __pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":5355 + /* "netCDF4/_netCDF4.pyx":5378 * # compute time delta. * days = tsecs // 86400. * msecsd = tsecs*1.e6 - days*86400.*1.e6 # <<<<<<<<<<<<<< * 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, 5355, __pyx_L1_error) + __pyx_t_4 = PyNumber_Multiply(__pyx_v_tsecs, __pyx_float_1_e6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5378, __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, 5355, __pyx_L1_error) + __pyx_t_3 = PyNumber_Multiply(__pyx_v_days, __pyx_float_86400_); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5378, __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, 5355, __pyx_L1_error) + __pyx_t_1 = PyNumber_Multiply(__pyx_t_3, __pyx_float_1_e6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5378, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __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, 5355, __pyx_L1_error) + __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5378, __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; - /* "netCDF4/_netCDF4.pyx":5356 + /* "netCDF4/_netCDF4.pyx":5379 * days = tsecs // 86400. * msecsd = tsecs*1.e6 - days*86400.*1.e6 * secs = msecsd // 1.e6 # <<<<<<<<<<<<<< * 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, 5356, __pyx_L1_error) + __pyx_t_3 = PyNumber_FloorDivide(__pyx_v_msecsd, __pyx_float_1_e6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5379, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_secs, __pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":5357 + /* "netCDF4/_netCDF4.pyx":5380 * msecsd = tsecs*1.e6 - days*86400.*1.e6 * secs = msecsd // 1.e6 * msecs = numpy.round(msecsd - secs*1.e6) # <<<<<<<<<<<<<< * td = timedelta(days=days,seconds=secs,microseconds=msecs) * # add time delta to base date. */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5357, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5380, __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, 5357, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_round); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5380, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __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, 5357, __pyx_L1_error) + __pyx_t_1 = PyNumber_Multiply(__pyx_v_secs, __pyx_float_1_e6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5380, __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, 5357, __pyx_L1_error) + __pyx_t_14 = PyNumber_Subtract(__pyx_v_msecsd, __pyx_t_1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5380, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -65672,14 +65718,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * } } if (!__pyx_t_1) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_14); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5357, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_14); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5380, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_GOTREF(__pyx_t_3); } 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, 5357, __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, 5380, __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; @@ -65688,20 +65734,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * #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, 5357, __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, 5380, __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; } else #endif { - __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5357, __pyx_L1_error) + __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5380, __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, 5357, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_15, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5380, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; } @@ -65710,51 +65756,51 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * __Pyx_XDECREF_SET(__pyx_v_msecs, __pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":5358 + /* "netCDF4/_netCDF4.pyx":5381 * secs = msecsd // 1.e6 * msecs = numpy.round(msecsd - secs*1.e6) * td = timedelta(days=days,seconds=secs,microseconds=msecs) # <<<<<<<<<<<<<< * # 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, 5358, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_timedelta); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5381, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5358, __pyx_L1_error) + __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5381, __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, 5358, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_seconds, __pyx_v_secs) < 0) __PYX_ERR(0, 5358, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_microseconds, __pyx_v_msecs) < 0) __PYX_ERR(0, 5358, __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, 5358, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_days, __pyx_v_days) < 0) __PYX_ERR(0, 5381, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_seconds, __pyx_v_secs) < 0) __PYX_ERR(0, 5381, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_microseconds, __pyx_v_msecs) < 0) __PYX_ERR(0, 5381, __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, 5381, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __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; - /* "netCDF4/_netCDF4.pyx":5360 + /* "netCDF4/_netCDF4.pyx":5383 * td = timedelta(days=days,seconds=secs,microseconds=msecs) * # add time delta to base date. * date = basedate + td # <<<<<<<<<<<<<< * dates.append(date) * if isscalar: */ - __pyx_t_15 = PyNumber_Add(__pyx_v_basedate, __pyx_v_td); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5360, __pyx_L1_error) + __pyx_t_15 = PyNumber_Add(__pyx_v_basedate, __pyx_v_td); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_XDECREF_SET(__pyx_v_date, __pyx_t_15); __pyx_t_15 = 0; - /* "netCDF4/_netCDF4.pyx":5361 + /* "netCDF4/_netCDF4.pyx":5384 * # add time delta to base date. * date = basedate + td * dates.append(date) # <<<<<<<<<<<<<< * 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, 5361, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_dates, __pyx_v_date); if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 5384, __pyx_L1_error) } __pyx_L30:; - /* "netCDF4/_netCDF4.pyx":5334 + /* "netCDF4/_netCDF4.pyx":5357 * ismasked = True * dates = [] * for time in times.flat: # <<<<<<<<<<<<<< @@ -65764,7 +65810,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5362 + /* "netCDF4/_netCDF4.pyx":5385 * date = basedate + td * dates.append(date) * if isscalar: # <<<<<<<<<<<<<< @@ -65774,7 +65820,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * __pyx_t_7 = (__pyx_v_isscalar != 0); if (__pyx_t_7) { - /* "netCDF4/_netCDF4.pyx":5363 + /* "netCDF4/_netCDF4.pyx":5386 * dates.append(date) * if isscalar: * return dates[0] # <<<<<<<<<<<<<< @@ -65782,13 +65828,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * * return numpy.reshape(numpy.array(dates), shape) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_dates, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5363, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_dates, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5386, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":5362 + /* "netCDF4/_netCDF4.pyx":5385 * date = basedate + td * dates.append(date) * if isscalar: # <<<<<<<<<<<<<< @@ -65797,7 +65843,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * */ } - /* "netCDF4/_netCDF4.pyx":5365 + /* "netCDF4/_netCDF4.pyx":5388 * return dates[0] * else: * return numpy.reshape(numpy.array(dates), shape) # <<<<<<<<<<<<<< @@ -65806,14 +65852,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * */ /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5365, __pyx_L1_error) + __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5388, __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, 5365, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5388, __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, 5365, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5388, __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, 5365, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -65827,13 +65873,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * } } if (!__pyx_t_3) { - __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_v_dates); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5365, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_v_dates); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5388, __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, 5365, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5388, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_15); } else @@ -65841,25 +65887,25 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * #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, 5365, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5388, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_15); } else #endif { - __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5365, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5388, __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_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, 5365, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_1, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5388, __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; - if (unlikely(!__pyx_v_shape)) { __Pyx_RaiseUnboundLocalError("shape"); __PYX_ERR(0, 5365, __pyx_L1_error) } + if (unlikely(!__pyx_v_shape)) { __Pyx_RaiseUnboundLocalError("shape"); __PYX_ERR(0, 5388, __pyx_L1_error) } __pyx_t_14 = NULL; __pyx_t_16 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -65875,7 +65921,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * #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, 5365, __pyx_L1_error) + __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, 5388, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; @@ -65884,14 +65930,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * #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, 5365, __pyx_L1_error) + __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, 5388, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; } else #endif { - __pyx_t_1 = PyTuple_New(2+__pyx_t_16); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5365, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2+__pyx_t_16); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5388, __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; @@ -65902,7 +65948,7 @@ 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, 5365, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } @@ -65912,7 +65958,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":5316 + /* "netCDF4/_netCDF4.pyx":5339 * raise ValueError(msg) * * if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \ # <<<<<<<<<<<<<< @@ -65921,7 +65967,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * */ } - /* "netCDF4/_netCDF4.pyx":5367 + /* "netCDF4/_netCDF4.pyx":5390 * return numpy.reshape(numpy.array(dates), shape) * else: # use netcdftime for other calendars * cdftime = netcdftime.utime(units,calendar=calendar) # <<<<<<<<<<<<<< @@ -65929,20 +65975,20 @@ 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, 5367, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdftime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5390, __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, 5367, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_utime); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5390, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5367, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5390, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_units); __Pyx_GIVEREF(__pyx_v_units); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_units); - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5367, __pyx_L1_error) + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5390, __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, 5367, __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, 5367, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_calendar, __pyx_v_calendar) < 0) __PYX_ERR(0, 5390, __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, 5390, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -65950,7 +65996,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * __pyx_v_cdftime = __pyx_t_15; __pyx_t_15 = 0; - /* "netCDF4/_netCDF4.pyx":5368 + /* "netCDF4/_netCDF4.pyx":5391 * else: # use netcdftime for other calendars * cdftime = netcdftime.utime(units,calendar=calendar) * return cdftime.num2date(times) # <<<<<<<<<<<<<< @@ -65958,7 +66004,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * * def date2index(dates, nctime, calendar=None, select='exact'): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cdftime, __pyx_n_s_num2date); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5368, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cdftime, __pyx_n_s_num2date); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5391, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -65971,13 +66017,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * } } if (!__pyx_t_2) { - __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_times); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5368, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_times); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5391, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_times}; - __pyx_t_15 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5368, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5391, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_15); } else @@ -65985,19 +66031,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_times}; - __pyx_t_15 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5368, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5391, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_15); } else #endif { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5368, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5391, __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_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, 5368, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5391, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -66008,7 +66054,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":5267 + /* "netCDF4/_netCDF4.pyx":5290 * return cdftime.date2num(dates) * * def num2date(times,units,calendar='standard'): # <<<<<<<<<<<<<< @@ -66049,7 +66095,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject * return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5370 +/* "netCDF4/_netCDF4.pyx":5393 * return cdftime.num2date(times) * * def date2index(dates, nctime, calendar=None, select='exact'): # <<<<<<<<<<<<<< @@ -66093,7 +66139,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_21date2index(PyObject *__pyx_self, case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nctime)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("date2index", 0, 2, 4, 1); __PYX_ERR(0, 5370, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("date2index", 0, 2, 4, 1); __PYX_ERR(0, 5393, __pyx_L3_error) } case 2: if (kw_args > 0) { @@ -66107,7 +66153,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_21date2index(PyObject *__pyx_self, } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "date2index") < 0)) __PYX_ERR(0, 5370, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "date2index") < 0)) __PYX_ERR(0, 5393, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -66126,7 +66172,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_21date2index(PyObject *__pyx_self, } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("date2index", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5370, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("date2index", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5393, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("netCDF4._netCDF4.date2index", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -66160,7 +66206,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject __Pyx_RefNannySetupContext("date2index", 0); __Pyx_INCREF(__pyx_v_calendar); - /* "netCDF4/_netCDF4.pyx":5401 + /* "netCDF4/_netCDF4.pyx":5424 * to the given datetime object(s). * """ * try: # <<<<<<<<<<<<<< @@ -66176,18 +66222,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "netCDF4/_netCDF4.pyx":5402 + /* "netCDF4/_netCDF4.pyx":5425 * """ * try: * nctime.units # <<<<<<<<<<<<<< * except AttributeError: * raise AttributeError("netcdf time variable is missing a 'units' attribute") */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_nctime, __pyx_n_s_units); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5402, __pyx_L3_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_nctime, __pyx_n_s_units); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5425, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":5401 + /* "netCDF4/_netCDF4.pyx":5424 * to the given datetime object(s). * """ * try: # <<<<<<<<<<<<<< @@ -66203,7 +66249,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":5403 + /* "netCDF4/_netCDF4.pyx":5426 * try: * nctime.units * except AttributeError: # <<<<<<<<<<<<<< @@ -66213,28 +66259,28 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_5) { __Pyx_AddTraceback("netCDF4._netCDF4.date2index", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 5403, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 5426, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); - /* "netCDF4/_netCDF4.pyx":5404 + /* "netCDF4/_netCDF4.pyx":5427 * nctime.units * except AttributeError: * raise AttributeError("netcdf time variable is missing a 'units' attribute") # <<<<<<<<<<<<<< * if calendar == None: * calendar = getattr(nctime, 'calendar', 'standard') */ - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__112, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5404, __pyx_L5_except_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__116, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5427, __pyx_L5_except_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, 5404, __pyx_L5_except_error) + __PYX_ERR(0, 5427, __pyx_L5_except_error) } goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "netCDF4/_netCDF4.pyx":5401 + /* "netCDF4/_netCDF4.pyx":5424 * to the given datetime object(s). * """ * try: # <<<<<<<<<<<<<< @@ -66250,31 +66296,31 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject __pyx_L10_try_end:; } - /* "netCDF4/_netCDF4.pyx":5405 + /* "netCDF4/_netCDF4.pyx":5428 * except AttributeError: * raise AttributeError("netcdf time variable is missing a 'units' attribute") * if calendar == None: # <<<<<<<<<<<<<< * calendar = getattr(nctime, 'calendar', 'standard') * calendar = calendar.lower() */ - __pyx_t_7 = PyObject_RichCompare(__pyx_v_calendar, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5405, __pyx_L1_error) - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 5405, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(__pyx_v_calendar, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5428, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 5428, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_9) { - /* "netCDF4/_netCDF4.pyx":5406 + /* "netCDF4/_netCDF4.pyx":5429 * raise AttributeError("netcdf time variable is missing a 'units' attribute") * if calendar == None: * calendar = getattr(nctime, 'calendar', 'standard') # <<<<<<<<<<<<<< * calendar = calendar.lower() * basedate = _dateparse(nctime.units) */ - __pyx_t_7 = __Pyx_GetAttr3(__pyx_v_nctime, __pyx_n_s_calendar, __pyx_n_s_standard); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5406, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetAttr3(__pyx_v_nctime, __pyx_n_s_calendar, __pyx_n_s_standard); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5429, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF_SET(__pyx_v_calendar, __pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5405 + /* "netCDF4/_netCDF4.pyx":5428 * except AttributeError: * raise AttributeError("netcdf time variable is missing a 'units' attribute") * if calendar == None: # <<<<<<<<<<<<<< @@ -66283,14 +66329,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject */ } - /* "netCDF4/_netCDF4.pyx":5407 + /* "netCDF4/_netCDF4.pyx":5430 * if calendar == None: * calendar = getattr(nctime, 'calendar', 'standard') * calendar = calendar.lower() # <<<<<<<<<<<<<< * basedate = _dateparse(nctime.units) * # real-world calendars limited to positive reference years. */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_calendar, __pyx_n_s_lower); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5407, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_calendar, __pyx_n_s_lower); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -66303,26 +66349,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject } } if (__pyx_t_4) { - __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5407, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5430, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { - __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5407, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5430, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_calendar, __pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5408 + /* "netCDF4/_netCDF4.pyx":5431 * calendar = getattr(nctime, 'calendar', 'standard') * calendar = calendar.lower() * basedate = _dateparse(nctime.units) # <<<<<<<<<<<<<< * # real-world calendars limited to positive reference years. * if calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']: */ - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_dateparse); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5408, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_dateparse); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_nctime, __pyx_n_s_units); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5408, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_nctime, __pyx_n_s_units); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { @@ -66335,14 +66381,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject } } if (!__pyx_t_8) { - __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5408, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5431, __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_6)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_4}; - __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5408, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5431, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -66351,20 +66397,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_4}; - __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5408, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5431, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { - __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5408, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5408, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -66373,7 +66419,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject __pyx_v_basedate = __pyx_t_7; __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5410 + /* "netCDF4/_netCDF4.pyx":5433 * basedate = _dateparse(nctime.units) * # real-world calendars limited to positive reference years. * if calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']: # <<<<<<<<<<<<<< @@ -66382,48 +66428,48 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject */ __Pyx_INCREF(__pyx_v_calendar); __pyx_t_7 = __pyx_v_calendar; - __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_julian, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5410, __pyx_L1_error) + __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_julian, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5433, __pyx_L1_error) if (!__pyx_t_11) { } else { __pyx_t_9 = __pyx_t_11; goto __pyx_L15_bool_binop_done; } - __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_standard, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5410, __pyx_L1_error) + __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_standard, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5433, __pyx_L1_error) if (!__pyx_t_11) { } else { __pyx_t_9 = __pyx_t_11; goto __pyx_L15_bool_binop_done; } - __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_gregorian, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5410, __pyx_L1_error) + __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_gregorian, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5433, __pyx_L1_error) if (!__pyx_t_11) { } else { __pyx_t_9 = __pyx_t_11; goto __pyx_L15_bool_binop_done; } - __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_proleptic_gregorian, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5410, __pyx_L1_error) + __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_proleptic_gregorian, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5433, __pyx_L1_error) __pyx_t_9 = __pyx_t_11; __pyx_L15_bool_binop_done:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_11 = (__pyx_t_9 != 0); if (__pyx_t_11) { - /* "netCDF4/_netCDF4.pyx":5411 + /* "netCDF4/_netCDF4.pyx":5434 * # 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_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_basedate, __pyx_n_s_year); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5411, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_basedate, __pyx_n_s_year); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5434, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_t_7, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5411, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_t_7, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5434, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5411, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5434, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_11) { - /* "netCDF4/_netCDF4.pyx":5412 + /* "netCDF4/_netCDF4.pyx":5435 * 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' # <<<<<<<<<<<<<< @@ -66433,26 +66479,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(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":5413 + /* "netCDF4/_netCDF4.pyx":5436 * 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_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5413, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5436, __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_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5413, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5436, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __PYX_ERR(0, 5413, __pyx_L1_error) + __PYX_ERR(0, 5436, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5411 + /* "netCDF4/_netCDF4.pyx":5434 * # real-world calendars limited to positive reference years. * if calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']: * if basedate.year == 0: # <<<<<<<<<<<<<< @@ -66461,22 +66507,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject */ } - /* "netCDF4/_netCDF4.pyx":5414 + /* "netCDF4/_netCDF4.pyx":5437 * 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_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_basedate, __pyx_n_s_year); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5414, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_basedate, __pyx_n_s_year); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = PyObject_RichCompare(__pyx_t_7, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5414, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_t_7, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5437, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5414, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5437, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_11) { - /* "netCDF4/_netCDF4.pyx":5415 + /* "netCDF4/_netCDF4.pyx":5438 * raise ValueError(msg) * elif basedate.year < 0: * msg='negative reference year in time units, must be >= 1' # <<<<<<<<<<<<<< @@ -66486,26 +66532,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(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":5416 + /* "netCDF4/_netCDF4.pyx":5439 * 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_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5416, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5439, __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_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5416, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __PYX_ERR(0, 5416, __pyx_L1_error) + __PYX_ERR(0, 5439, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5414 + /* "netCDF4/_netCDF4.pyx":5437 * msg='zero not allowed as a reference year, does not exist in Julian or Gregorian calendars' * raise ValueError(msg) * elif basedate.year < 0: # <<<<<<<<<<<<<< @@ -66514,7 +66560,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject */ } - /* "netCDF4/_netCDF4.pyx":5410 + /* "netCDF4/_netCDF4.pyx":5433 * basedate = _dateparse(nctime.units) * # real-world calendars limited to positive reference years. * if calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']: # <<<<<<<<<<<<<< @@ -66523,26 +66569,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject */ } - /* "netCDF4/_netCDF4.pyx":5418 + /* "netCDF4/_netCDF4.pyx":5441 * raise ValueError(msg) * * if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \ # <<<<<<<<<<<<<< * (calendar in ['gregorian','standard'] and basedate > gregorian): * # use python datetime */ - __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_calendar, __pyx_n_s_proleptic_gregorian, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 5418, __pyx_L1_error) + __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_calendar, __pyx_n_s_proleptic_gregorian, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 5441, __pyx_L1_error) if (!__pyx_t_9) { goto __pyx_L22_next_or; } else { } - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_basedate, __pyx_n_s_year); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5418, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_basedate, __pyx_n_s_year); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_MINYEAR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5418, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_MINYEAR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_10 = PyObject_RichCompare(__pyx_t_7, __pyx_t_6, Py_GE); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5418, __pyx_L1_error) + __pyx_t_10 = PyObject_RichCompare(__pyx_t_7, __pyx_t_6, Py_GE); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5441, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 5418, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 5441, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (!__pyx_t_9) { } else { @@ -66551,7 +66597,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject } __pyx_L22_next_or:; - /* "netCDF4/_netCDF4.pyx":5419 + /* "netCDF4/_netCDF4.pyx":5442 * * if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \ * (calendar in ['gregorian','standard'] and basedate > gregorian): # <<<<<<<<<<<<<< @@ -66560,13 +66606,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject */ __Pyx_INCREF(__pyx_v_calendar); __pyx_t_10 = __pyx_v_calendar; - __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_t_10, __pyx_n_s_gregorian, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 5419, __pyx_L1_error) + __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_t_10, __pyx_n_s_gregorian, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 5442, __pyx_L1_error) if (!__pyx_t_12) { } else { __pyx_t_9 = __pyx_t_12; goto __pyx_L25_bool_binop_done; } - __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_t_10, __pyx_n_s_standard, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 5419, __pyx_L1_error) + __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_t_10, __pyx_n_s_standard, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 5442, __pyx_L1_error) __pyx_t_9 = __pyx_t_12; __pyx_L25_bool_binop_done:; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -66576,16 +66622,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject __pyx_t_11 = __pyx_t_12; goto __pyx_L21_bool_binop_done; } - __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_gregorian); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5419, __pyx_L1_error) + __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_gregorian); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_6 = PyObject_RichCompare(__pyx_v_basedate, __pyx_t_10, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5419, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_v_basedate, __pyx_t_10, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5442, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 5419, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 5442, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_11 = __pyx_t_12; __pyx_L21_bool_binop_done:; - /* "netCDF4/_netCDF4.pyx":5418 + /* "netCDF4/_netCDF4.pyx":5441 * raise ValueError(msg) * * if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \ # <<<<<<<<<<<<<< @@ -66594,18 +66640,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject */ if (__pyx_t_11) { - /* "netCDF4/_netCDF4.pyx":5421 + /* "netCDF4/_netCDF4.pyx":5444 * (calendar in ['gregorian','standard'] and basedate > gregorian): * # use python datetime * times = date2num(dates,nctime.units,calendar=calendar) # <<<<<<<<<<<<<< * return netcdftime.time2index(times, nctime, calendar, select) * else: # use netcdftime module for other cases */ - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_date2num); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5421, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_date2num); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_nctime, __pyx_n_s_units); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5421, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_nctime, __pyx_n_s_units); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5421, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_dates); __Pyx_GIVEREF(__pyx_v_dates); @@ -66613,10 +66659,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5421, __pyx_L1_error) + __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_calendar, __pyx_v_calendar) < 0) __PYX_ERR(0, 5421, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5421, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_calendar, __pyx_v_calendar) < 0) __PYX_ERR(0, 5444, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -66624,7 +66670,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject __pyx_v_times = __pyx_t_4; __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":5422 + /* "netCDF4/_netCDF4.pyx":5445 * # use python datetime * times = date2num(dates,nctime.units,calendar=calendar) * return netcdftime.time2index(times, nctime, calendar, select) # <<<<<<<<<<<<<< @@ -66632,9 +66678,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject * return netcdftime.date2index(dates, nctime, calendar, select) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdftime); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5422, __pyx_L1_error) + __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdftime); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_time2index); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5422, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_time2index); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = NULL; @@ -66652,7 +66698,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[5] = {__pyx_t_10, __pyx_v_times, __pyx_v_nctime, __pyx_v_calendar, __pyx_v_select}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5422, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5445, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_4); } else @@ -66660,13 +66706,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[5] = {__pyx_t_10, __pyx_v_times, __pyx_v_nctime, __pyx_v_calendar, __pyx_v_select}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5422, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5445, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { - __pyx_t_6 = PyTuple_New(4+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5422, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(4+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_10) { __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_10); __pyx_t_10 = NULL; @@ -66683,7 +66729,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject __Pyx_INCREF(__pyx_v_select); __Pyx_GIVEREF(__pyx_v_select); PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_5, __pyx_v_select); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5422, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -66692,7 +66738,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject __pyx_t_4 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":5418 + /* "netCDF4/_netCDF4.pyx":5441 * raise ValueError(msg) * * if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \ # <<<<<<<<<<<<<< @@ -66701,7 +66747,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject */ } - /* "netCDF4/_netCDF4.pyx":5424 + /* "netCDF4/_netCDF4.pyx":5447 * return netcdftime.time2index(times, nctime, calendar, select) * else: # use netcdftime module for other cases * return netcdftime.date2index(dates, nctime, calendar, select) # <<<<<<<<<<<<<< @@ -66710,9 +66756,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject */ /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdftime); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5424, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdftime); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_date2index); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5424, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_date2index); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; @@ -66730,7 +66776,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_v_dates, __pyx_v_nctime, __pyx_v_calendar, __pyx_v_select}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5424, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5447, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_4); } else @@ -66738,13 +66784,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_v_dates, __pyx_v_nctime, __pyx_v_calendar, __pyx_v_select}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5424, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5447, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { - __pyx_t_10 = PyTuple_New(4+__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5424, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(4+__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -66761,7 +66807,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject __Pyx_INCREF(__pyx_v_select); __Pyx_GIVEREF(__pyx_v_select); PyTuple_SET_ITEM(__pyx_t_10, 3+__pyx_t_5, __pyx_v_select); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5424, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -66771,7 +66817,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":5370 + /* "netCDF4/_netCDF4.pyx":5393 * return cdftime.num2date(times) * * def date2index(dates, nctime, calendar=None, select='exact'): # <<<<<<<<<<<<<< @@ -66798,7 +66844,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5456 +/* "netCDF4/_netCDF4.pyx":5479 * """ * * def __init__(self, files, check=False, aggdim=None, exclude=[]): # <<<<<<<<<<<<<< @@ -66813,7 +66859,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_25__defaults__(CYTHON_UNUSED PyObje PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__defaults__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5456, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_False)); __Pyx_GIVEREF(((PyObject *)Py_False)); @@ -66824,7 +66870,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_25__defaults__(CYTHON_UNUSED PyObje __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_exclude); __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_exclude); PyTuple_SET_ITEM(__pyx_t_1, 2, __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_exclude); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5456, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); @@ -66888,7 +66934,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_1__init__(PyObject *__py case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_files)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 5, 1); __PYX_ERR(0, 5456, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 5, 1); __PYX_ERR(0, 5479, __pyx_L3_error) } case 2: if (kw_args > 0) { @@ -66907,7 +66953,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_1__init__(PyObject *__py } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 5456, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 5479, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -66928,7 +66974,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_1__init__(PyObject *__py } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5456, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5479, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("netCDF4._netCDF4.MFDataset.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -66996,7 +67042,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __Pyx_RefNannySetupContext("__init__", 0); __Pyx_INCREF(__pyx_v_files); - /* "netCDF4/_netCDF4.pyx":5489 + /* "netCDF4/_netCDF4.pyx":5512 * # Open the master file in the base class, so that the CDFMF instance * # can be used like a CDF instance. * if isinstance(files, str): # <<<<<<<<<<<<<< @@ -67007,23 +67053,23 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":5490 + /* "netCDF4/_netCDF4.pyx":5513 * # can be used like a CDF instance. * if isinstance(files, str): * if files.startswith('http'): # <<<<<<<<<<<<<< * msg='cannot using file globbing for remote (OPeNDAP) datasets' * raise ValueError(msg) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_files, __pyx_n_s_startswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5490, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_files, __pyx_n_s_startswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__113, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5490, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__117, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5490, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5513, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":5491 + /* "netCDF4/_netCDF4.pyx":5514 * if isinstance(files, str): * if files.startswith('http'): * msg='cannot using file globbing for remote (OPeNDAP) datasets' # <<<<<<<<<<<<<< @@ -67033,26 +67079,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __Pyx_INCREF(__pyx_kp_s_cannot_using_file_globbing_for_r); __pyx_v_msg = __pyx_kp_s_cannot_using_file_globbing_for_r; - /* "netCDF4/_netCDF4.pyx":5492 + /* "netCDF4/_netCDF4.pyx":5515 * if files.startswith('http'): * msg='cannot using file globbing for remote (OPeNDAP) datasets' * raise ValueError(msg) # <<<<<<<<<<<<<< * else: * files = sorted(glob(files)) */ - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5492, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5515, __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_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5492, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5515, __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, 5492, __pyx_L1_error) + __PYX_ERR(0, 5515, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5490 + /* "netCDF4/_netCDF4.pyx":5513 * # can be used like a CDF instance. * if isinstance(files, str): * if files.startswith('http'): # <<<<<<<<<<<<<< @@ -67061,7 +67107,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P */ } - /* "netCDF4/_netCDF4.pyx":5494 + /* "netCDF4/_netCDF4.pyx":5517 * raise ValueError(msg) * else: * files = sorted(glob(files)) # <<<<<<<<<<<<<< @@ -67069,7 +67115,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P * master = files[0] */ /*else*/ { - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_glob); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5494, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_glob); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { @@ -67082,13 +67128,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P } } if (!__pyx_t_6) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_files); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5494, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_files); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5517, __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_6, __pyx_v_files}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5494, __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, 5517, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); } else @@ -67096,35 +67142,35 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_files}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5494, __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, 5517, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { - __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5494, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5517, __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_INCREF(__pyx_v_files); __Pyx_GIVEREF(__pyx_v_files); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_files); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5494, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PySequence_List(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5494, __pyx_L1_error) + __pyx_t_5 = PySequence_List(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = PyList_Sort(__pyx_t_3); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 5494, __pyx_L1_error) + __pyx_t_8 = PyList_Sort(__pyx_t_3); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 5517, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_files, __pyx_t_3); __pyx_t_3 = 0; } - /* "netCDF4/_netCDF4.pyx":5489 + /* "netCDF4/_netCDF4.pyx":5512 * # Open the master file in the base class, so that the CDFMF instance * # can be used like a CDF instance. * if isinstance(files, str): # <<<<<<<<<<<<<< @@ -67133,46 +67179,46 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P */ } - /* "netCDF4/_netCDF4.pyx":5496 + /* "netCDF4/_netCDF4.pyx":5519 * files = sorted(glob(files)) * * master = files[0] # <<<<<<<<<<<<<< * * # Open the master again, this time as a classic CDF instance. This will avoid */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_files, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5496, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_files, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5519, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_master = __pyx_t_3; __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":5500 + /* "netCDF4/_netCDF4.pyx":5523 * # Open the master again, this time as a classic CDF instance. This will avoid * # calling methods of the CDFMF subclass when querying the master file. * cdfm = Dataset(master) # <<<<<<<<<<<<<< * # copy attributes from master. * for name, value in cdfm.__dict__.items(): */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5500, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_master); __Pyx_GIVEREF(__pyx_v_master); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_master); - __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7netCDF4_8_netCDF4_Dataset), __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5500, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7netCDF4_8_netCDF4_Dataset), __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_cdfm = ((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_t_5); __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":5502 + /* "netCDF4/_netCDF4.pyx":5525 * cdfm = Dataset(master) * # copy attributes from master. * for name, value in cdfm.__dict__.items(): # <<<<<<<<<<<<<< * self.__dict__[name] = value * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cdfm), __pyx_n_s_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5502, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cdfm), __pyx_n_s_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5502, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -67186,10 +67232,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P } } if (__pyx_t_3) { - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5502, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5525, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5502, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5525, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -67197,9 +67243,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_9 = 0; __pyx_t_10 = NULL; } else { - __pyx_t_9 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5502, __pyx_L1_error) + __pyx_t_9 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_10 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5502, __pyx_L1_error) + __pyx_t_10 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5525, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { @@ -67207,17 +67253,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 5502, __pyx_L1_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 5525, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5502, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 5502, __pyx_L1_error) + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 5525, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5502, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } @@ -67227,7 +67273,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED 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, 5502, __pyx_L1_error) + else __PYX_ERR(0, 5525, __pyx_L1_error) } break; } @@ -67243,7 +67289,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 5502, __pyx_L1_error) + __PYX_ERR(0, 5525, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -67256,15 +67302,15 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_7); #else - __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5502, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5502, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; - __pyx_t_6 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5502, __pyx_L1_error) + __pyx_t_6 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_11 = Py_TYPE(__pyx_t_6)->tp_iternext; @@ -67272,7 +67318,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_7 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_7)) goto __pyx_L7_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_6), 2) < 0) __PYX_ERR(0, 5502, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_6), 2) < 0) __PYX_ERR(0, 5525, __pyx_L1_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L8_unpacking_done; @@ -67280,7 +67326,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 5502, __pyx_L1_error) + __PYX_ERR(0, 5525, __pyx_L1_error) __pyx_L8_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_3); @@ -67288,19 +67334,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5503 + /* "netCDF4/_netCDF4.pyx":5526 * # copy attributes from master. * for name, value in cdfm.__dict__.items(): * self.__dict__[name] = value # <<<<<<<<<<<<<< * * # Make sure the master defines a dim with name aggdim, */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5503, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (unlikely(PyObject_SetItem(__pyx_t_5, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(0, 5503, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_5, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(0, 5526, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":5502 + /* "netCDF4/_netCDF4.pyx":5525 * cdfm = Dataset(master) * # copy attributes from master. * for name, value in cdfm.__dict__.items(): # <<<<<<<<<<<<<< @@ -67310,7 +67356,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":5507 + /* "netCDF4/_netCDF4.pyx":5530 * # Make sure the master defines a dim with name aggdim, * # or an unlimited dimension. * aggDimId = None # <<<<<<<<<<<<<< @@ -67320,14 +67366,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __Pyx_INCREF(Py_None); __pyx_v_aggDimId = Py_None; - /* "netCDF4/_netCDF4.pyx":5508 + /* "netCDF4/_netCDF4.pyx":5531 * # or an unlimited dimension. * aggDimId = None * for dimname,dim in cdfm.dimensions.items(): # <<<<<<<<<<<<<< * if aggdim is None: * if dim.isunlimited(): */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_cdfm->dimensions, __pyx_n_s_items); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5508, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_cdfm->dimensions, __pyx_n_s_items); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -67340,10 +67386,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P } } if (__pyx_t_7) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5508, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5531, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5508, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5531, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -67351,9 +67397,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_9 = 0; __pyx_t_10 = NULL; } else { - __pyx_t_9 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5508, __pyx_L1_error) + __pyx_t_9 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_10 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5508, __pyx_L1_error) + __pyx_t_10 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5531, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -67361,17 +67407,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P if (likely(PyList_CheckExact(__pyx_t_5))) { if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 5508, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 5531, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5508, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 5508, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 5531, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5508, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -67381,7 +67427,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED 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, 5508, __pyx_L1_error) + else __PYX_ERR(0, 5531, __pyx_L1_error) } break; } @@ -67397,7 +67443,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 5508, __pyx_L1_error) + __PYX_ERR(0, 5531, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -67410,15 +67456,15 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_3); #else - __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5508, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5508, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; - __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5508, __pyx_L1_error) + __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_11 = Py_TYPE(__pyx_t_6)->tp_iternext; @@ -67426,7 +67472,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __Pyx_GOTREF(__pyx_t_7); index = 1; __pyx_t_3 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L11_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_6), 2) < 0) __PYX_ERR(0, 5508, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_6), 2) < 0) __PYX_ERR(0, 5531, __pyx_L1_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L12_unpacking_done; @@ -67434,7 +67480,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 5508, __pyx_L1_error) + __PYX_ERR(0, 5531, __pyx_L1_error) __pyx_L12_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_dimname, __pyx_t_7); @@ -67442,7 +67488,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __Pyx_XDECREF_SET(__pyx_v_dim, __pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":5509 + /* "netCDF4/_netCDF4.pyx":5532 * aggDimId = None * for dimname,dim in cdfm.dimensions.items(): * if aggdim is None: # <<<<<<<<<<<<<< @@ -67453,14 +67499,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":5510 + /* "netCDF4/_netCDF4.pyx":5533 * for dimname,dim in cdfm.dimensions.items(): * if aggdim is None: * if dim.isunlimited(): # <<<<<<<<<<<<<< * aggDimId = dim * aggDimName = dimname */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dim, __pyx_n_s_isunlimited); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5510, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dim, __pyx_n_s_isunlimited); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -67473,18 +67519,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P } } if (__pyx_t_7) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5510, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5533, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5510, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5533, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5510, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5533, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":5511 + /* "netCDF4/_netCDF4.pyx":5534 * if aggdim is None: * if dim.isunlimited(): * aggDimId = dim # <<<<<<<<<<<<<< @@ -67494,7 +67540,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __Pyx_INCREF(__pyx_v_dim); __Pyx_DECREF_SET(__pyx_v_aggDimId, __pyx_v_dim); - /* "netCDF4/_netCDF4.pyx":5512 + /* "netCDF4/_netCDF4.pyx":5535 * if dim.isunlimited(): * aggDimId = dim * aggDimName = dimname # <<<<<<<<<<<<<< @@ -67504,7 +67550,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __Pyx_INCREF(__pyx_v_dimname); __Pyx_XDECREF_SET(__pyx_v_aggDimName, __pyx_v_dimname); - /* "netCDF4/_netCDF4.pyx":5510 + /* "netCDF4/_netCDF4.pyx":5533 * for dimname,dim in cdfm.dimensions.items(): * if aggdim is None: * if dim.isunlimited(): # <<<<<<<<<<<<<< @@ -67513,7 +67559,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P */ } - /* "netCDF4/_netCDF4.pyx":5509 + /* "netCDF4/_netCDF4.pyx":5532 * aggDimId = None * for dimname,dim in cdfm.dimensions.items(): * if aggdim is None: # <<<<<<<<<<<<<< @@ -67523,7 +67569,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P goto __pyx_L13; } - /* "netCDF4/_netCDF4.pyx":5514 + /* "netCDF4/_netCDF4.pyx":5537 * aggDimName = dimname * else: * if dimname == aggdim: # <<<<<<<<<<<<<< @@ -67531,12 +67577,12 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P * aggDimName = dimname */ /*else*/ { - __pyx_t_4 = PyObject_RichCompare(__pyx_v_dimname, __pyx_v_aggdim, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5514, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5514, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_dimname, __pyx_v_aggdim, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5537, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5537, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":5515 + /* "netCDF4/_netCDF4.pyx":5538 * else: * if dimname == aggdim: * aggDimId = dim # <<<<<<<<<<<<<< @@ -67546,7 +67592,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __Pyx_INCREF(__pyx_v_dim); __Pyx_DECREF_SET(__pyx_v_aggDimId, __pyx_v_dim); - /* "netCDF4/_netCDF4.pyx":5516 + /* "netCDF4/_netCDF4.pyx":5539 * if dimname == aggdim: * aggDimId = dim * aggDimName = dimname # <<<<<<<<<<<<<< @@ -67556,7 +67602,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __Pyx_INCREF(__pyx_v_dimname); __Pyx_XDECREF_SET(__pyx_v_aggDimName, __pyx_v_dimname); - /* "netCDF4/_netCDF4.pyx":5514 + /* "netCDF4/_netCDF4.pyx":5537 * aggDimName = dimname * else: * if dimname == aggdim: # <<<<<<<<<<<<<< @@ -67567,7 +67613,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P } __pyx_L13:; - /* "netCDF4/_netCDF4.pyx":5508 + /* "netCDF4/_netCDF4.pyx":5531 * # or an unlimited dimension. * aggDimId = None * for dimname,dim in cdfm.dimensions.items(): # <<<<<<<<<<<<<< @@ -67577,7 +67623,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":5517 + /* "netCDF4/_netCDF4.pyx":5540 * aggDimId = dim * aggDimName = dimname * if aggDimId is None: # <<<<<<<<<<<<<< @@ -67588,28 +67634,28 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":5518 + /* "netCDF4/_netCDF4.pyx":5541 * aggDimName = dimname * if aggDimId is None: * raise IOError("master dataset %s does not have a aggregation dimension" % master) # <<<<<<<<<<<<<< * * # Get info on all aggregation variables defined in the master. */ - __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_master_dataset_s_does_not_have_a, __pyx_v_master); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5518, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_master_dataset_s_does_not_have_a, __pyx_v_master); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5518, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5518, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __PYX_ERR(0, 5518, __pyx_L1_error) + __PYX_ERR(0, 5541, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5517 + /* "netCDF4/_netCDF4.pyx":5540 * aggDimId = dim * aggDimName = dimname * if aggDimId is None: # <<<<<<<<<<<<<< @@ -67618,26 +67664,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P */ } - /* "netCDF4/_netCDF4.pyx":5522 + /* "netCDF4/_netCDF4.pyx":5545 * # Get info on all aggregation variables defined in the master. * # Make sure the master defines at least one aggregation variable. * masterRecVar = {} # <<<<<<<<<<<<<< * for vName,v in cdfm.variables.items(): * # skip variables specified in exclude list. */ - __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5522, __pyx_L1_error) + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5545, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_masterRecVar = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":5523 + /* "netCDF4/_netCDF4.pyx":5546 * # Make sure the master defines at least one aggregation variable. * masterRecVar = {} * for vName,v in cdfm.variables.items(): # <<<<<<<<<<<<<< * # skip variables specified in exclude list. * if vName in exclude: continue */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_cdfm->variables, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5523, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_cdfm->variables, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -67650,10 +67696,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P } } if (__pyx_t_3) { - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5523, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5546, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5523, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5546, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -67661,9 +67707,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_9 = 0; __pyx_t_10 = NULL; } else { - __pyx_t_9 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5523, __pyx_L1_error) + __pyx_t_9 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_10 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5523, __pyx_L1_error) + __pyx_t_10 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5546, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { @@ -67671,17 +67717,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 5523, __pyx_L1_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 5546, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5523, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 5523, __pyx_L1_error) + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 5546, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5523, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } @@ -67691,7 +67737,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED 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, 5523, __pyx_L1_error) + else __PYX_ERR(0, 5546, __pyx_L1_error) } break; } @@ -67707,7 +67753,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 5523, __pyx_L1_error) + __PYX_ERR(0, 5546, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -67720,15 +67766,15 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_7); #else - __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5523, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5523, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; - __pyx_t_6 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5523, __pyx_L1_error) + __pyx_t_6 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_11 = Py_TYPE(__pyx_t_6)->tp_iternext; @@ -67736,7 +67782,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_7 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_7)) goto __pyx_L19_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_6), 2) < 0) __PYX_ERR(0, 5523, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_6), 2) < 0) __PYX_ERR(0, 5546, __pyx_L1_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L20_unpacking_done; @@ -67744,7 +67790,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 5523, __pyx_L1_error) + __PYX_ERR(0, 5546, __pyx_L1_error) __pyx_L20_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_vName, __pyx_t_3); @@ -67752,88 +67798,88 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5525 + /* "netCDF4/_netCDF4.pyx":5548 * for vName,v in cdfm.variables.items(): * # skip variables specified in exclude list. * if vName in exclude: continue # <<<<<<<<<<<<<< * dims = v.dimensions * shape = v.shape */ - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_vName, __pyx_v_exclude, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5525, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_vName, __pyx_v_exclude, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5548, __pyx_L1_error) __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { goto __pyx_L17_continue; } - /* "netCDF4/_netCDF4.pyx":5526 + /* "netCDF4/_netCDF4.pyx":5549 * # skip variables specified in exclude list. * if vName in exclude: continue * dims = v.dimensions # <<<<<<<<<<<<<< * shape = v.shape * dtype = v.dtype */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5526, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_dims, __pyx_t_5); __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":5527 + /* "netCDF4/_netCDF4.pyx":5550 * if vName in exclude: continue * dims = v.dimensions * shape = v.shape # <<<<<<<<<<<<<< * dtype = v.dtype * # Be careful: we may deal with a scalar (dimensionless) variable. */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5527, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_shape, __pyx_t_5); __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":5528 + /* "netCDF4/_netCDF4.pyx":5551 * dims = v.dimensions * shape = v.shape * dtype = v.dtype # <<<<<<<<<<<<<< * # Be careful: we may deal with a scalar (dimensionless) variable. * # Unlimited dimension always occupies index 0. */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5528, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_dtype, __pyx_t_5); __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":5531 + /* "netCDF4/_netCDF4.pyx":5554 * # Be careful: we may deal with a scalar (dimensionless) variable. * # Unlimited dimension always occupies index 0. * if (len(dims) > 0 and aggDimName == dims[0]): # <<<<<<<<<<<<<< * masterRecVar[vName] = (dims, shape, dtype) * if len(masterRecVar) == 0: */ - __pyx_t_12 = PyObject_Length(__pyx_v_dims); if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 5531, __pyx_L1_error) + __pyx_t_12 = PyObject_Length(__pyx_v_dims); if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 5554, __pyx_L1_error) __pyx_t_2 = ((__pyx_t_12 > 0) != 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L23_bool_binop_done; } - if (unlikely(!__pyx_v_aggDimName)) { __Pyx_RaiseUnboundLocalError("aggDimName"); __PYX_ERR(0, 5531, __pyx_L1_error) } - __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_dims, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5531, __pyx_L1_error) + if (unlikely(!__pyx_v_aggDimName)) { __Pyx_RaiseUnboundLocalError("aggDimName"); __PYX_ERR(0, 5554, __pyx_L1_error) } + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_dims, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = PyObject_RichCompare(__pyx_v_aggDimName, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5531, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(__pyx_v_aggDimName, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5554, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5531, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5554, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_1 = __pyx_t_2; __pyx_L23_bool_binop_done:; if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":5532 + /* "netCDF4/_netCDF4.pyx":5555 * # Unlimited dimension always occupies index 0. * if (len(dims) > 0 and aggDimName == dims[0]): * masterRecVar[vName] = (dims, shape, dtype) # <<<<<<<<<<<<<< * if len(masterRecVar) == 0: * raise IOError("master dataset %s does not have any variables to aggregate" % master) */ - __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5532, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_dims); __Pyx_GIVEREF(__pyx_v_dims); @@ -67844,10 +67890,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __Pyx_INCREF(__pyx_v_dtype); __Pyx_GIVEREF(__pyx_v_dtype); PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_dtype); - if (unlikely(PyDict_SetItem(__pyx_v_masterRecVar, __pyx_v_vName, __pyx_t_7) < 0)) __PYX_ERR(0, 5532, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_masterRecVar, __pyx_v_vName, __pyx_t_7) < 0)) __PYX_ERR(0, 5555, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5531 + /* "netCDF4/_netCDF4.pyx":5554 * # Be careful: we may deal with a scalar (dimensionless) variable. * # Unlimited dimension always occupies index 0. * if (len(dims) > 0 and aggDimName == dims[0]): # <<<<<<<<<<<<<< @@ -67856,7 +67902,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P */ } - /* "netCDF4/_netCDF4.pyx":5523 + /* "netCDF4/_netCDF4.pyx":5546 * # Make sure the master defines at least one aggregation variable. * masterRecVar = {} * for vName,v in cdfm.variables.items(): # <<<<<<<<<<<<<< @@ -67867,39 +67913,39 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":5533 + /* "netCDF4/_netCDF4.pyx":5556 * if (len(dims) > 0 and aggDimName == dims[0]): * masterRecVar[vName] = (dims, shape, dtype) * if len(masterRecVar) == 0: # <<<<<<<<<<<<<< * raise IOError("master dataset %s does not have any variables to aggregate" % master) * */ - __pyx_t_9 = PyDict_Size(__pyx_v_masterRecVar); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 5533, __pyx_L1_error) + __pyx_t_9 = PyDict_Size(__pyx_v_masterRecVar); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 5556, __pyx_L1_error) __pyx_t_1 = ((__pyx_t_9 == 0) != 0); if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":5534 + /* "netCDF4/_netCDF4.pyx":5557 * masterRecVar[vName] = (dims, shape, dtype) * if len(masterRecVar) == 0: * raise IOError("master dataset %s does not have any variables to aggregate" % master) # <<<<<<<<<<<<<< * * # Create the following: */ - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_master_dataset_s_does_not_have_a_2, __pyx_v_master); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5534, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_master_dataset_s_does_not_have_a_2, __pyx_v_master); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5534, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5557, __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 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5534, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(0, 5534, __pyx_L1_error) + __PYX_ERR(0, 5557, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5533 + /* "netCDF4/_netCDF4.pyx":5556 * if (len(dims) > 0 and aggDimName == dims[0]): * masterRecVar[vName] = (dims, shape, dtype) * if len(masterRecVar) == 0: # <<<<<<<<<<<<<< @@ -67908,14 +67954,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P */ } - /* "netCDF4/_netCDF4.pyx":5542 + /* "netCDF4/_netCDF4.pyx":5565 * # a list of the corresponding Variable instance, one for each * # cdf file of the file set * cdf = [cdfm] # <<<<<<<<<<<<<< * self._cdf = cdf # Store this now, because dim() method needs it * cdfVLen = [len(aggDimId)] */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5542, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5565, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_cdfm)); __Pyx_GIVEREF(((PyObject *)__pyx_v_cdfm)); @@ -67923,26 +67969,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __pyx_v_cdf = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":5543 + /* "netCDF4/_netCDF4.pyx":5566 * # cdf file of the file set * cdf = [cdfm] * self._cdf = cdf # Store this now, because dim() method needs it # <<<<<<<<<<<<<< * cdfVLen = [len(aggDimId)] * cdfRecVar = {} */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_cdf, __pyx_v_cdf) < 0) __PYX_ERR(0, 5543, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_cdf, __pyx_v_cdf) < 0) __PYX_ERR(0, 5566, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5544 + /* "netCDF4/_netCDF4.pyx":5567 * cdf = [cdfm] * self._cdf = cdf # Store this now, because dim() method needs it * cdfVLen = [len(aggDimId)] # <<<<<<<<<<<<<< * cdfRecVar = {} * for v in masterRecVar.keys(): */ - __pyx_t_9 = PyObject_Length(__pyx_v_aggDimId); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 5544, __pyx_L1_error) - __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5544, __pyx_L1_error) + __pyx_t_9 = PyObject_Length(__pyx_v_aggDimId); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 5567, __pyx_L1_error) + __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5544, __pyx_L1_error) + __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_4); PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); @@ -67950,34 +67996,34 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __pyx_v_cdfVLen = ((PyObject*)__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5545 + /* "netCDF4/_netCDF4.pyx":5568 * self._cdf = cdf # Store this now, because dim() method needs it * cdfVLen = [len(aggDimId)] * cdfRecVar = {} # <<<<<<<<<<<<<< * for v in masterRecVar.keys(): * cdfRecVar[v] = [cdfm.variables[v]] */ - __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5545, __pyx_L1_error) + __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_v_cdfRecVar = ((PyObject*)__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5546 + /* "netCDF4/_netCDF4.pyx":5569 * cdfVLen = [len(aggDimId)] * cdfRecVar = {} * for v in masterRecVar.keys(): # <<<<<<<<<<<<<< * cdfRecVar[v] = [cdfm.variables[v]] * */ - __pyx_t_7 = __Pyx_PyDict_Keys(__pyx_v_masterRecVar); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5546, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_Keys(__pyx_v_masterRecVar); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) { __pyx_t_4 = __pyx_t_7; __Pyx_INCREF(__pyx_t_4); __pyx_t_9 = 0; __pyx_t_10 = NULL; } else { - __pyx_t_9 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5546, __pyx_L1_error) + __pyx_t_9 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_10 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5546, __pyx_L1_error) + __pyx_t_10 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5569, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; for (;;) { @@ -67985,17 +68031,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 5546, __pyx_L1_error) + __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 5569, __pyx_L1_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5546, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } else { if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 5546, __pyx_L1_error) + __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 5569, __pyx_L1_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5546, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } @@ -68005,7 +68051,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED 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, 5546, __pyx_L1_error) + else __PYX_ERR(0, 5569, __pyx_L1_error) } break; } @@ -68014,24 +68060,24 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5547 + /* "netCDF4/_netCDF4.pyx":5570 * cdfRecVar = {} * for v in masterRecVar.keys(): * cdfRecVar[v] = [cdfm.variables[v]] # <<<<<<<<<<<<<< * * # Open each remaining file in read-only mode. */ - __pyx_t_7 = PyObject_GetItem(__pyx_v_cdfm->variables, __pyx_v_v); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5547, __pyx_L1_error) + __pyx_t_7 = PyObject_GetItem(__pyx_v_cdfm->variables, __pyx_v_v); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5547, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_7); PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = 0; - if (unlikely(PyDict_SetItem(__pyx_v_cdfRecVar, __pyx_v_v, __pyx_t_5) < 0)) __PYX_ERR(0, 5547, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_cdfRecVar, __pyx_v_v, __pyx_t_5) < 0)) __PYX_ERR(0, 5570, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":5546 + /* "netCDF4/_netCDF4.pyx":5569 * cdfVLen = [len(aggDimId)] * cdfRecVar = {} * for v in masterRecVar.keys(): # <<<<<<<<<<<<<< @@ -68041,22 +68087,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":5552 + /* "netCDF4/_netCDF4.pyx":5575 * # Make sure each file defines the same aggregation variables as the master * # and that the variables are defined in the same way (name, shape and type) * for f in files[1:]: # <<<<<<<<<<<<<< * part = Dataset(f) * varInfo = part.variables */ - __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_files, 1, 0, NULL, NULL, &__pyx_slice__114, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5552, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_files, 1, 0, NULL, NULL, &__pyx_slice__118, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_9 = 0; __pyx_t_10 = NULL; } else { - __pyx_t_9 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5552, __pyx_L1_error) + __pyx_t_9 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_10 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5552, __pyx_L1_error) + __pyx_t_10 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5575, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -68064,17 +68110,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P if (likely(PyList_CheckExact(__pyx_t_5))) { if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 5552, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 5575, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5552, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 5552, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 5575, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5552, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -68084,7 +68130,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED 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, 5552, __pyx_L1_error) + else __PYX_ERR(0, 5575, __pyx_L1_error) } break; } @@ -68093,25 +68139,25 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":5553 + /* "netCDF4/_netCDF4.pyx":5576 * # and that the variables are defined in the same way (name, shape and type) * for f in files[1:]: * part = Dataset(f) # <<<<<<<<<<<<<< * varInfo = part.variables * for v in masterRecVar.keys(): */ - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5553, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_f); __Pyx_GIVEREF(__pyx_v_f); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_f); - __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7netCDF4_8_netCDF4_Dataset), __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5553, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7netCDF4_8_netCDF4_Dataset), __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_part, ((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_t_7)); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5554 + /* "netCDF4/_netCDF4.pyx":5577 * for f in files[1:]: * part = Dataset(f) * varInfo = part.variables # <<<<<<<<<<<<<< @@ -68123,22 +68169,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __Pyx_XDECREF_SET(__pyx_v_varInfo, __pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5555 + /* "netCDF4/_netCDF4.pyx":5578 * part = Dataset(f) * varInfo = part.variables * for v in masterRecVar.keys(): # <<<<<<<<<<<<<< * if check: * # Make sure master rec var is also defined here. */ - __pyx_t_7 = __Pyx_PyDict_Keys(__pyx_v_masterRecVar); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5555, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_Keys(__pyx_v_masterRecVar); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) { __pyx_t_4 = __pyx_t_7; __Pyx_INCREF(__pyx_t_4); __pyx_t_12 = 0; __pyx_t_13 = NULL; } else { - __pyx_t_12 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5555, __pyx_L1_error) + __pyx_t_12 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_13 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5555, __pyx_L1_error) + __pyx_t_13 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5578, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; for (;;) { @@ -68146,17 +68192,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_12); __Pyx_INCREF(__pyx_t_7); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 5555, __pyx_L1_error) + __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_12); __Pyx_INCREF(__pyx_t_7); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 5578, __pyx_L1_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5555, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } else { if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_12); __Pyx_INCREF(__pyx_t_7); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 5555, __pyx_L1_error) + __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_12); __Pyx_INCREF(__pyx_t_7); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 5578, __pyx_L1_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5555, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } @@ -68166,7 +68212,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED 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, 5555, __pyx_L1_error) + else __PYX_ERR(0, 5578, __pyx_L1_error) } break; } @@ -68175,24 +68221,24 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5556 + /* "netCDF4/_netCDF4.pyx":5579 * varInfo = part.variables * for v in masterRecVar.keys(): * if check: # <<<<<<<<<<<<<< * # Make sure master rec var is also defined here. * if v not in varInfo.keys(): */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_check); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5556, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_check); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5579, __pyx_L1_error) if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":5558 + /* "netCDF4/_netCDF4.pyx":5581 * if check: * # Make sure master rec var is also defined here. * if v not in varInfo.keys(): # <<<<<<<<<<<<<< * raise IOError("aggregation variable %s not defined in %s" % (v, f)) * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_varInfo, __pyx_n_s_keys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5558, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_varInfo, __pyx_n_s_keys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -68205,26 +68251,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P } } if (__pyx_t_6) { - __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5558, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5581, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { - __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5558, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5581, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_v, __pyx_t_7, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5558, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_v, __pyx_t_7, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5581, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":5559 + /* "netCDF4/_netCDF4.pyx":5582 * # Make sure master rec var is also defined here. * if v not in varInfo.keys(): * raise IOError("aggregation variable %s not defined in %s" % (v, f)) # <<<<<<<<<<<<<< * * #if not vInst.dimensions[0] != aggDimName: */ - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5559, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_v); __Pyx_GIVEREF(__pyx_v_v); @@ -68232,22 +68278,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __Pyx_INCREF(__pyx_v_f); __Pyx_GIVEREF(__pyx_v_f); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_f); - __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_aggregation_variable_s_not_defin, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5559, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_aggregation_variable_s_not_defin, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5582, __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, 5559, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5559, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 5559, __pyx_L1_error) + __PYX_ERR(0, 5582, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5558 + /* "netCDF4/_netCDF4.pyx":5581 * if check: * # Make sure master rec var is also defined here. * if v not in varInfo.keys(): # <<<<<<<<<<<<<< @@ -68256,16 +68302,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P */ } - /* "netCDF4/_netCDF4.pyx":5563 + /* "netCDF4/_netCDF4.pyx":5586 * #if not vInst.dimensions[0] != aggDimName: * * masterDims, masterShape, masterType = masterRecVar[v][:3] # <<<<<<<<<<<<<< * extDims = varInfo[v].dimensions * extShape = varInfo[v].shape */ - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_masterRecVar, __pyx_v_v); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5563, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_masterRecVar, __pyx_v_v); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_t_3, 0, 3, NULL, NULL, &__pyx_slice__115, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5563, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_t_3, 0, 3, NULL, NULL, &__pyx_slice__119, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) { @@ -68278,7 +68324,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 5563, __pyx_L1_error) + __PYX_ERR(0, 5586, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -68294,17 +68340,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_14); #else - __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5563, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5563, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_14 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5563, __pyx_L1_error) + __pyx_t_14 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #endif __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { Py_ssize_t index = -1; - __pyx_t_15 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5563, __pyx_L1_error) + __pyx_t_15 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_11 = Py_TYPE(__pyx_t_15)->tp_iternext; @@ -68314,7 +68360,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __Pyx_GOTREF(__pyx_t_6); index = 2; __pyx_t_14 = __pyx_t_11(__pyx_t_15); if (unlikely(!__pyx_t_14)) goto __pyx_L34_unpacking_failed; __Pyx_GOTREF(__pyx_t_14); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_15), 3) < 0) __PYX_ERR(0, 5563, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_15), 3) < 0) __PYX_ERR(0, 5586, __pyx_L1_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; goto __pyx_L35_unpacking_done; @@ -68322,7 +68368,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 5563, __pyx_L1_error) + __PYX_ERR(0, 5586, __pyx_L1_error) __pyx_L35_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_masterDims, __pyx_t_3); @@ -68332,71 +68378,71 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __Pyx_XDECREF_SET(__pyx_v_masterType, __pyx_t_14); __pyx_t_14 = 0; - /* "netCDF4/_netCDF4.pyx":5564 + /* "netCDF4/_netCDF4.pyx":5587 * * masterDims, masterShape, masterType = masterRecVar[v][:3] * extDims = varInfo[v].dimensions # <<<<<<<<<<<<<< * extShape = varInfo[v].shape * extType = varInfo[v].dtype */ - __pyx_t_7 = PyObject_GetItem(__pyx_v_varInfo, __pyx_v_v); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5564, __pyx_L1_error) + __pyx_t_7 = PyObject_GetItem(__pyx_v_varInfo, __pyx_v_v); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5564, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF_SET(__pyx_v_extDims, __pyx_t_14); __pyx_t_14 = 0; - /* "netCDF4/_netCDF4.pyx":5565 + /* "netCDF4/_netCDF4.pyx":5588 * masterDims, masterShape, masterType = masterRecVar[v][:3] * extDims = varInfo[v].dimensions * extShape = varInfo[v].shape # <<<<<<<<<<<<<< * extType = varInfo[v].dtype * # Check that dimension names are identical. */ - __pyx_t_14 = PyObject_GetItem(__pyx_v_varInfo, __pyx_v_v); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5565, __pyx_L1_error) + __pyx_t_14 = PyObject_GetItem(__pyx_v_varInfo, __pyx_v_v); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_shape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5565, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_shape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF_SET(__pyx_v_extShape, __pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5566 + /* "netCDF4/_netCDF4.pyx":5589 * extDims = varInfo[v].dimensions * extShape = varInfo[v].shape * extType = varInfo[v].dtype # <<<<<<<<<<<<<< * # Check that dimension names are identical. * if masterDims != extDims: */ - __pyx_t_7 = PyObject_GetItem(__pyx_v_varInfo, __pyx_v_v); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5566, __pyx_L1_error) + __pyx_t_7 = PyObject_GetItem(__pyx_v_varInfo, __pyx_v_v); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_dtype); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5566, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_dtype); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF_SET(__pyx_v_extType, __pyx_t_14); __pyx_t_14 = 0; - /* "netCDF4/_netCDF4.pyx":5568 + /* "netCDF4/_netCDF4.pyx":5591 * extType = varInfo[v].dtype * # Check that dimension names are identical. * if masterDims != extDims: # <<<<<<<<<<<<<< * raise IOError("variable %s : dimensions mismatch between " * "master %s (%s) and extension %s (%s)" % */ - __pyx_t_14 = PyObject_RichCompare(__pyx_v_masterDims, __pyx_v_extDims, Py_NE); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5568, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5568, __pyx_L1_error) + __pyx_t_14 = PyObject_RichCompare(__pyx_v_masterDims, __pyx_v_extDims, Py_NE); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5591, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5591, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":5571 + /* "netCDF4/_netCDF4.pyx":5594 * raise IOError("variable %s : dimensions mismatch between " * "master %s (%s) and extension %s (%s)" % * (v, master, masterDims, f, extDims)) # <<<<<<<<<<<<<< * * # Check that the ranks are identical, and the dimension lengths are */ - __pyx_t_14 = PyTuple_New(5); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5571, __pyx_L1_error) + __pyx_t_14 = PyTuple_New(5); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_INCREF(__pyx_v_v); __Pyx_GIVEREF(__pyx_v_v); @@ -68414,37 +68460,37 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __Pyx_GIVEREF(__pyx_v_extDims); PyTuple_SET_ITEM(__pyx_t_14, 4, __pyx_v_extDims); - /* "netCDF4/_netCDF4.pyx":5570 + /* "netCDF4/_netCDF4.pyx":5593 * if masterDims != extDims: * raise IOError("variable %s : dimensions mismatch between " * "master %s (%s) and extension %s (%s)" % # <<<<<<<<<<<<<< * (v, master, masterDims, f, extDims)) * */ - __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_variable_s_dimensions_mismatch_b, __pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5570, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_variable_s_dimensions_mismatch_b, __pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - /* "netCDF4/_netCDF4.pyx":5569 + /* "netCDF4/_netCDF4.pyx":5592 * # Check that dimension names are identical. * if masterDims != extDims: * raise IOError("variable %s : dimensions mismatch between " # <<<<<<<<<<<<<< * "master %s (%s) and extension %s (%s)" % * (v, master, masterDims, f, extDims)) */ - __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5569, __pyx_L1_error) + __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_14, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5569, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_14, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __PYX_ERR(0, 5569, __pyx_L1_error) + __PYX_ERR(0, 5592, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5568 + /* "netCDF4/_netCDF4.pyx":5591 * extType = varInfo[v].dtype * # Check that dimension names are identical. * if masterDims != extDims: # <<<<<<<<<<<<<< @@ -68453,32 +68499,32 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P */ } - /* "netCDF4/_netCDF4.pyx":5576 + /* "netCDF4/_netCDF4.pyx":5599 * # identical (except for that of the unlimited dimension, which of * # course may vary. * if len(masterShape) != len(extShape): # <<<<<<<<<<<<<< * raise IOError("variable %s : rank mismatch between " * "master %s (%s) and extension %s (%s)" % */ - __pyx_t_16 = PyObject_Length(__pyx_v_masterShape); if (unlikely(__pyx_t_16 == -1)) __PYX_ERR(0, 5576, __pyx_L1_error) - __pyx_t_17 = PyObject_Length(__pyx_v_extShape); if (unlikely(__pyx_t_17 == -1)) __PYX_ERR(0, 5576, __pyx_L1_error) + __pyx_t_16 = PyObject_Length(__pyx_v_masterShape); if (unlikely(__pyx_t_16 == -1)) __PYX_ERR(0, 5599, __pyx_L1_error) + __pyx_t_17 = PyObject_Length(__pyx_v_extShape); if (unlikely(__pyx_t_17 == -1)) __PYX_ERR(0, 5599, __pyx_L1_error) __pyx_t_2 = ((__pyx_t_16 != __pyx_t_17) != 0); if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":5579 + /* "netCDF4/_netCDF4.pyx":5602 * raise IOError("variable %s : rank mismatch between " * "master %s (%s) and extension %s (%s)" % * (v, master, len(masterShape), f, len(extShape))) # <<<<<<<<<<<<<< * if masterShape[1:] != extShape[1:]: * raise IOError("variable %s : shape mismatch between " */ - __pyx_t_17 = PyObject_Length(__pyx_v_masterShape); if (unlikely(__pyx_t_17 == -1)) __PYX_ERR(0, 5579, __pyx_L1_error) - __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_17); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5579, __pyx_L1_error) + __pyx_t_17 = PyObject_Length(__pyx_v_masterShape); if (unlikely(__pyx_t_17 == -1)) __PYX_ERR(0, 5602, __pyx_L1_error) + __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_17); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_17 = PyObject_Length(__pyx_v_extShape); if (unlikely(__pyx_t_17 == -1)) __PYX_ERR(0, 5579, __pyx_L1_error) - __pyx_t_14 = PyInt_FromSsize_t(__pyx_t_17); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5579, __pyx_L1_error) + __pyx_t_17 = PyObject_Length(__pyx_v_extShape); if (unlikely(__pyx_t_17 == -1)) __PYX_ERR(0, 5602, __pyx_L1_error) + __pyx_t_14 = PyInt_FromSsize_t(__pyx_t_17); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); - __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5579, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_v); __Pyx_GIVEREF(__pyx_v_v); @@ -68496,37 +68542,37 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __pyx_t_7 = 0; __pyx_t_14 = 0; - /* "netCDF4/_netCDF4.pyx":5578 + /* "netCDF4/_netCDF4.pyx":5601 * if len(masterShape) != len(extShape): * raise IOError("variable %s : rank mismatch between " * "master %s (%s) and extension %s (%s)" % # <<<<<<<<<<<<<< * (v, master, len(masterShape), f, len(extShape))) * if masterShape[1:] != extShape[1:]: */ - __pyx_t_14 = __Pyx_PyString_Format(__pyx_kp_s_variable_s_rank_mismatch_between, __pyx_t_6); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5578, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyString_Format(__pyx_kp_s_variable_s_rank_mismatch_between, __pyx_t_6); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":5577 + /* "netCDF4/_netCDF4.pyx":5600 * # course may vary. * if len(masterShape) != len(extShape): * raise IOError("variable %s : rank mismatch between " # <<<<<<<<<<<<<< * "master %s (%s) and extension %s (%s)" % * (v, master, len(masterShape), f, len(extShape))) */ - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5577, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_14); __pyx_t_14 = 0; - __pyx_t_14 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5577, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_14, 0, 0, 0); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __PYX_ERR(0, 5577, __pyx_L1_error) + __PYX_ERR(0, 5600, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5576 + /* "netCDF4/_netCDF4.pyx":5599 * # identical (except for that of the unlimited dimension, which of * # course may vary. * if len(masterShape) != len(extShape): # <<<<<<<<<<<<<< @@ -68535,32 +68581,32 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P */ } - /* "netCDF4/_netCDF4.pyx":5580 + /* "netCDF4/_netCDF4.pyx":5603 * "master %s (%s) and extension %s (%s)" % * (v, master, len(masterShape), f, len(extShape))) * if masterShape[1:] != extShape[1:]: # <<<<<<<<<<<<<< * raise IOError("variable %s : shape mismatch between " * "master %s (%s) and extension %s (%s)" % */ - __pyx_t_14 = __Pyx_PyObject_GetSlice(__pyx_v_masterShape, 1, 0, NULL, NULL, &__pyx_slice__116, 1, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5580, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_GetSlice(__pyx_v_masterShape, 1, 0, NULL, NULL, &__pyx_slice__120, 1, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); - __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_extShape, 1, 0, NULL, NULL, &__pyx_slice__117, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5580, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_extShape, 1, 0, NULL, NULL, &__pyx_slice__121, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = PyObject_RichCompare(__pyx_t_14, __pyx_t_6, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5580, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(__pyx_t_14, __pyx_t_6, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5603, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5580, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5603, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":5583 + /* "netCDF4/_netCDF4.pyx":5606 * raise IOError("variable %s : shape mismatch between " * "master %s (%s) and extension %s (%s)" % * (v, master, masterShape, f, extShape)) # <<<<<<<<<<<<<< * * # Check that the data types are identical. */ - __pyx_t_7 = PyTuple_New(5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5583, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_v); __Pyx_GIVEREF(__pyx_v_v); @@ -68578,37 +68624,37 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __Pyx_GIVEREF(__pyx_v_extShape); PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_v_extShape); - /* "netCDF4/_netCDF4.pyx":5582 + /* "netCDF4/_netCDF4.pyx":5605 * if masterShape[1:] != extShape[1:]: * raise IOError("variable %s : shape mismatch between " * "master %s (%s) and extension %s (%s)" % # <<<<<<<<<<<<<< * (v, master, masterShape, f, extShape)) * */ - __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_variable_s_shape_mismatch_betwee, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5582, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_variable_s_shape_mismatch_betwee, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5605, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5581 + /* "netCDF4/_netCDF4.pyx":5604 * (v, master, len(masterShape), f, len(extShape))) * if masterShape[1:] != extShape[1:]: * raise IOError("variable %s : shape mismatch between " # <<<<<<<<<<<<<< * "master %s (%s) and extension %s (%s)" % * (v, master, masterShape, f, extShape)) */ - __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5581, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5604, __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 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5581, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 5581, __pyx_L1_error) + __PYX_ERR(0, 5604, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5580 + /* "netCDF4/_netCDF4.pyx":5603 * "master %s (%s) and extension %s (%s)" % * (v, master, len(masterShape), f, len(extShape))) * if masterShape[1:] != extShape[1:]: # <<<<<<<<<<<<<< @@ -68617,26 +68663,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P */ } - /* "netCDF4/_netCDF4.pyx":5586 + /* "netCDF4/_netCDF4.pyx":5609 * * # Check that the data types are identical. * if masterType != extType: # <<<<<<<<<<<<<< * raise IOError("variable %s : data type mismatch between " * "master %s (%s) and extension %s (%s)" % */ - __pyx_t_6 = PyObject_RichCompare(__pyx_v_masterType, __pyx_v_extType, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5586, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5586, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_v_masterType, __pyx_v_extType, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5609, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5609, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":5589 + /* "netCDF4/_netCDF4.pyx":5612 * raise IOError("variable %s : data type mismatch between " * "master %s (%s) and extension %s (%s)" % * (v, master, masterType, f, extType)) # <<<<<<<<<<<<<< * * # Everything ok. */ - __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5589, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_v); __Pyx_GIVEREF(__pyx_v_v); @@ -68654,37 +68700,37 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __Pyx_GIVEREF(__pyx_v_extType); PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_v_extType); - /* "netCDF4/_netCDF4.pyx":5588 + /* "netCDF4/_netCDF4.pyx":5611 * if masterType != extType: * raise IOError("variable %s : data type mismatch between " * "master %s (%s) and extension %s (%s)" % # <<<<<<<<<<<<<< * (v, master, masterType, f, extType)) * */ - __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_variable_s_data_type_mismatch_be, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5588, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_variable_s_data_type_mismatch_be, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5611, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":5587 + /* "netCDF4/_netCDF4.pyx":5610 * # Check that the data types are identical. * if masterType != extType: * raise IOError("variable %s : data type mismatch between " # <<<<<<<<<<<<<< * "master %s (%s) and extension %s (%s)" % * (v, master, masterType, f, extType)) */ - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5587, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5610, __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(__pyx_builtin_IOError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5587, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5610, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __PYX_ERR(0, 5587, __pyx_L1_error) + __PYX_ERR(0, 5610, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5586 + /* "netCDF4/_netCDF4.pyx":5609 * * # Check that the data types are identical. * if masterType != extType: # <<<<<<<<<<<<<< @@ -68693,31 +68739,31 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P */ } - /* "netCDF4/_netCDF4.pyx":5592 + /* "netCDF4/_netCDF4.pyx":5615 * * # Everything ok. * vInst = part.variables[v] # <<<<<<<<<<<<<< * cdfRecVar[v].append(vInst) * else: */ - __pyx_t_7 = PyObject_GetItem(__pyx_v_part->variables, __pyx_v_v); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5592, __pyx_L1_error) + __pyx_t_7 = PyObject_GetItem(__pyx_v_part->variables, __pyx_v_v); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5615, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_XDECREF_SET(__pyx_v_vInst, __pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5593 + /* "netCDF4/_netCDF4.pyx":5616 * # Everything ok. * vInst = part.variables[v] * cdfRecVar[v].append(vInst) # <<<<<<<<<<<<<< * else: * # No making sure of anything -- assume this is ok.. */ - __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_cdfRecVar, __pyx_v_v); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5593, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_cdfRecVar, __pyx_v_v); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5616, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyObject_Append(__pyx_t_7, __pyx_v_vInst); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 5593, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Append(__pyx_t_7, __pyx_v_vInst); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 5616, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5556 + /* "netCDF4/_netCDF4.pyx":5579 * varInfo = part.variables * for v in masterRecVar.keys(): * if check: # <<<<<<<<<<<<<< @@ -68727,7 +68773,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P goto __pyx_L32; } - /* "netCDF4/_netCDF4.pyx":5596 + /* "netCDF4/_netCDF4.pyx":5619 * else: * # No making sure of anything -- assume this is ok.. * vInst = part.variables[v] # <<<<<<<<<<<<<< @@ -68735,26 +68781,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P * */ /*else*/ { - __pyx_t_7 = PyObject_GetItem(__pyx_v_part->variables, __pyx_v_v); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5596, __pyx_L1_error) + __pyx_t_7 = PyObject_GetItem(__pyx_v_part->variables, __pyx_v_v); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_XDECREF_SET(__pyx_v_vInst, __pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5597 + /* "netCDF4/_netCDF4.pyx":5620 * # No making sure of anything -- assume this is ok.. * vInst = part.variables[v] * cdfRecVar[v].append(vInst) # <<<<<<<<<<<<<< * * cdf.append(part) */ - __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_cdfRecVar, __pyx_v_v); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5597, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_cdfRecVar, __pyx_v_v); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5620, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyObject_Append(__pyx_t_7, __pyx_v_vInst); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 5597, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Append(__pyx_t_7, __pyx_v_vInst); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 5620, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __pyx_L32:; - /* "netCDF4/_netCDF4.pyx":5555 + /* "netCDF4/_netCDF4.pyx":5578 * part = Dataset(f) * varInfo = part.variables * for v in masterRecVar.keys(): # <<<<<<<<<<<<<< @@ -68764,33 +68810,33 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":5599 + /* "netCDF4/_netCDF4.pyx":5622 * cdfRecVar[v].append(vInst) * * cdf.append(part) # <<<<<<<<<<<<<< * cdfVLen.append(len(part.dimensions[aggDimName])) * */ - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_cdf, ((PyObject *)__pyx_v_part)); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 5599, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_cdf, ((PyObject *)__pyx_v_part)); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 5622, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5600 + /* "netCDF4/_netCDF4.pyx":5623 * * cdf.append(part) * cdfVLen.append(len(part.dimensions[aggDimName])) # <<<<<<<<<<<<<< * * # Attach attributes to the MFDataset instance. */ - if (unlikely(!__pyx_v_aggDimName)) { __Pyx_RaiseUnboundLocalError("aggDimName"); __PYX_ERR(0, 5600, __pyx_L1_error) } - __pyx_t_4 = PyObject_GetItem(__pyx_v_part->dimensions, __pyx_v_aggDimName); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5600, __pyx_L1_error) + if (unlikely(!__pyx_v_aggDimName)) { __Pyx_RaiseUnboundLocalError("aggDimName"); __PYX_ERR(0, 5623, __pyx_L1_error) } + __pyx_t_4 = PyObject_GetItem(__pyx_v_part->dimensions, __pyx_v_aggDimName); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5623, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_12 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 5600, __pyx_L1_error) + __pyx_t_12 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 5623, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5600, __pyx_L1_error) + __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5623, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_cdfVLen, __pyx_t_4); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 5600, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_cdfVLen, __pyx_t_4); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 5623, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":5552 + /* "netCDF4/_netCDF4.pyx":5575 * # Make sure each file defines the same aggregation variables as the master * # and that the variables are defined in the same way (name, shape and type) * for f in files[1:]: # <<<<<<<<<<<<<< @@ -68800,52 +68846,52 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "netCDF4/_netCDF4.pyx":5604 + /* "netCDF4/_netCDF4.pyx":5627 * # Attach attributes to the MFDataset instance. * # A local __setattr__() method is required for them. * self._files = files # list of cdf file names in the set # <<<<<<<<<<<<<< * self._cdfVLen = cdfVLen # list of unlimited lengths * self._cdfTLen = sum(cdfVLen) # total length */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_files_2, __pyx_v_files) < 0) __PYX_ERR(0, 5604, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_files_2, __pyx_v_files) < 0) __PYX_ERR(0, 5627, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5605 + /* "netCDF4/_netCDF4.pyx":5628 * # A local __setattr__() method is required for them. * self._files = files # list of cdf file names in the set * self._cdfVLen = cdfVLen # list of unlimited lengths # <<<<<<<<<<<<<< * self._cdfTLen = sum(cdfVLen) # total length * self._cdfRecVar = cdfRecVar # dictionary of Variable instances for all */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_cdfVLen, __pyx_v_cdfVLen) < 0) __PYX_ERR(0, 5605, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_cdfVLen, __pyx_v_cdfVLen) < 0) __PYX_ERR(0, 5628, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5606 + /* "netCDF4/_netCDF4.pyx":5629 * self._files = files # list of cdf file names in the set * self._cdfVLen = cdfVLen # list of unlimited lengths * self._cdfTLen = sum(cdfVLen) # total length # <<<<<<<<<<<<<< * self._cdfRecVar = cdfRecVar # dictionary of Variable instances for all * # the aggregation variables */ - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5606, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5629, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_cdfVLen); __Pyx_GIVEREF(__pyx_v_cdfVLen); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_cdfVLen); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5606, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5629, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_cdfTLen, __pyx_t_4) < 0) __PYX_ERR(0, 5606, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_cdfTLen, __pyx_t_4) < 0) __PYX_ERR(0, 5629, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":5607 + /* "netCDF4/_netCDF4.pyx":5630 * self._cdfVLen = cdfVLen # list of unlimited lengths * self._cdfTLen = sum(cdfVLen) # total length * self._cdfRecVar = cdfRecVar # dictionary of Variable instances for all # <<<<<<<<<<<<<< * # the aggregation variables * self._dims = cdfm.dimensions */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_cdfRecVar, __pyx_v_cdfRecVar) < 0) __PYX_ERR(0, 5607, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_cdfRecVar, __pyx_v_cdfRecVar) < 0) __PYX_ERR(0, 5630, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5609 + /* "netCDF4/_netCDF4.pyx":5632 * self._cdfRecVar = cdfRecVar # dictionary of Variable instances for all * # the aggregation variables * self._dims = cdfm.dimensions # <<<<<<<<<<<<<< @@ -68854,10 +68900,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P */ __pyx_t_4 = __pyx_v_cdfm->dimensions; __Pyx_INCREF(__pyx_t_4); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dims, __pyx_t_4) < 0) __PYX_ERR(0, 5609, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dims, __pyx_t_4) < 0) __PYX_ERR(0, 5632, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":5610 + /* "netCDF4/_netCDF4.pyx":5633 * # the aggregation variables * self._dims = cdfm.dimensions * self._grps = cdfm.groups # <<<<<<<<<<<<<< @@ -68866,19 +68912,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P */ __pyx_t_4 = __pyx_v_cdfm->groups; __Pyx_INCREF(__pyx_t_4); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_grps, __pyx_t_4) < 0) __PYX_ERR(0, 5610, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_grps, __pyx_t_4) < 0) __PYX_ERR(0, 5633, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":5611 + /* "netCDF4/_netCDF4.pyx":5634 * self._dims = cdfm.dimensions * self._grps = cdfm.groups * for dimname, dim in self._dims.items(): # <<<<<<<<<<<<<< * if dimname == aggDimName: * self._dims[dimname] = _Dimension(dimname, dim, self._cdfVLen, self._cdfTLen) */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dims); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5611, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dims); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5634, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_items); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5611, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_items); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5634, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -68892,10 +68938,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P } } if (__pyx_t_5) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5611, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5634, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5611, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5634, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -68903,9 +68949,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __pyx_t_7 = __pyx_t_4; __Pyx_INCREF(__pyx_t_7); __pyx_t_9 = 0; __pyx_t_10 = NULL; } else { - __pyx_t_9 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5611, __pyx_L1_error) + __pyx_t_9 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5634, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_10 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5611, __pyx_L1_error) + __pyx_t_10 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5634, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -68913,17 +68959,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P if (likely(PyList_CheckExact(__pyx_t_7))) { if (__pyx_t_9 >= 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_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 5611, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 5634, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5611, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5634, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_9 >= 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_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 5611, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 5634, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5611, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5634, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -68933,7 +68979,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED 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, 5611, __pyx_L1_error) + else __PYX_ERR(0, 5634, __pyx_L1_error) } break; } @@ -68949,7 +68995,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 5611, __pyx_L1_error) + __PYX_ERR(0, 5634, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -68962,15 +69008,15 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __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, 5611, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5634, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5611, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5634, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; - __pyx_t_14 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5611, __pyx_L1_error) + __pyx_t_14 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5634, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_11 = Py_TYPE(__pyx_t_14)->tp_iternext; @@ -68978,7 +69024,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_6 = __pyx_t_11(__pyx_t_14); if (unlikely(!__pyx_t_6)) goto __pyx_L42_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_14), 2) < 0) __PYX_ERR(0, 5611, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_14), 2) < 0) __PYX_ERR(0, 5634, __pyx_L1_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; goto __pyx_L43_unpacking_done; @@ -68986,7 +69032,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 5611, __pyx_L1_error) + __PYX_ERR(0, 5634, __pyx_L1_error) __pyx_L43_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_dimname, __pyx_t_5); @@ -68994,31 +69040,31 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __Pyx_XDECREF_SET(__pyx_v_dim, __pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":5612 + /* "netCDF4/_netCDF4.pyx":5635 * self._grps = cdfm.groups * for dimname, dim in self._dims.items(): * if dimname == aggDimName: # <<<<<<<<<<<<<< * self._dims[dimname] = _Dimension(dimname, dim, self._cdfVLen, self._cdfTLen) * self._vars = cdfm.variables */ - if (unlikely(!__pyx_v_aggDimName)) { __Pyx_RaiseUnboundLocalError("aggDimName"); __PYX_ERR(0, 5612, __pyx_L1_error) } - __pyx_t_4 = PyObject_RichCompare(__pyx_v_dimname, __pyx_v_aggDimName, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5612, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5612, __pyx_L1_error) + if (unlikely(!__pyx_v_aggDimName)) { __Pyx_RaiseUnboundLocalError("aggDimName"); __PYX_ERR(0, 5635, __pyx_L1_error) } + __pyx_t_4 = PyObject_RichCompare(__pyx_v_dimname, __pyx_v_aggDimName, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5635, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5635, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_2) { - /* "netCDF4/_netCDF4.pyx":5613 + /* "netCDF4/_netCDF4.pyx":5636 * for dimname, dim in self._dims.items(): * if dimname == aggDimName: * self._dims[dimname] = _Dimension(dimname, dim, self._cdfVLen, self._cdfTLen) # <<<<<<<<<<<<<< * self._vars = cdfm.variables * for varname,var in self._vars.items(): */ - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_Dimension); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5613, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_Dimension); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5636, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cdfVLen); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5613, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cdfVLen); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5636, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cdfTLen); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5613, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cdfTLen); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5636, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_3 = NULL; __pyx_t_18 = 0; @@ -69035,7 +69081,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[5] = {__pyx_t_3, __pyx_v_dimname, __pyx_v_dim, __pyx_t_5, __pyx_t_14}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_18, 4+__pyx_t_18); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5613, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_18, 4+__pyx_t_18); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5636, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -69045,7 +69091,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[5] = {__pyx_t_3, __pyx_v_dimname, __pyx_v_dim, __pyx_t_5, __pyx_t_14}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_18, 4+__pyx_t_18); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5613, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_18, 4+__pyx_t_18); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5636, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -69053,7 +69099,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P } else #endif { - __pyx_t_15 = PyTuple_New(4+__pyx_t_18); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5613, __pyx_L1_error) + __pyx_t_15 = PyTuple_New(4+__pyx_t_18); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5636, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_3); __pyx_t_3 = NULL; @@ -69070,18 +69116,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P PyTuple_SET_ITEM(__pyx_t_15, 3+__pyx_t_18, __pyx_t_14); __pyx_t_5 = 0; __pyx_t_14 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_15, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5613, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_15, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5636, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dims); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5613, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dims); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5636, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (unlikely(PyObject_SetItem(__pyx_t_6, __pyx_v_dimname, __pyx_t_4) < 0)) __PYX_ERR(0, 5613, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_6, __pyx_v_dimname, __pyx_t_4) < 0)) __PYX_ERR(0, 5636, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":5612 + /* "netCDF4/_netCDF4.pyx":5635 * self._grps = cdfm.groups * for dimname, dim in self._dims.items(): * if dimname == aggDimName: # <<<<<<<<<<<<<< @@ -69090,7 +69136,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P */ } - /* "netCDF4/_netCDF4.pyx":5611 + /* "netCDF4/_netCDF4.pyx":5634 * self._dims = cdfm.dimensions * self._grps = cdfm.groups * for dimname, dim in self._dims.items(): # <<<<<<<<<<<<<< @@ -69100,7 +69146,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5614 + /* "netCDF4/_netCDF4.pyx":5637 * if dimname == aggDimName: * self._dims[dimname] = _Dimension(dimname, dim, self._cdfVLen, self._cdfTLen) * self._vars = cdfm.variables # <<<<<<<<<<<<<< @@ -69109,19 +69155,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P */ __pyx_t_7 = __pyx_v_cdfm->variables; __Pyx_INCREF(__pyx_t_7); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_vars, __pyx_t_7) < 0) __PYX_ERR(0, 5614, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_vars, __pyx_t_7) < 0) __PYX_ERR(0, 5637, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5615 + /* "netCDF4/_netCDF4.pyx":5638 * self._dims[dimname] = _Dimension(dimname, dim, self._cdfVLen, self._cdfTLen) * self._vars = cdfm.variables * for varname,var in self._vars.items(): # <<<<<<<<<<<<<< * if varname in self._cdfRecVar.keys(): * self._vars[varname] = _Variable(self, varname, var, aggDimName) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_vars); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5615, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_vars); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5638, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_items); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5615, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_items); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5638, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -69135,10 +69181,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P } } if (__pyx_t_4) { - __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5615, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5638, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { - __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5615, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5638, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -69146,9 +69192,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __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, 5615, __pyx_L1_error) + __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5638, __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, 5615, __pyx_L1_error) + __pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5638, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; for (;;) { @@ -69156,17 +69202,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P 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, 5615, __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, 5638, __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, 5615, __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, 5638, __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, 5615, __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, 5638, __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, 5615, __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, 5638, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } @@ -69176,7 +69222,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED 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, 5615, __pyx_L1_error) + else __PYX_ERR(0, 5638, __pyx_L1_error) } break; } @@ -69192,7 +69238,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 5615, __pyx_L1_error) + __PYX_ERR(0, 5638, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -69205,15 +69251,15 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_15); #else - __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5615, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5638, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_15 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5615, __pyx_L1_error) + __pyx_t_15 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5638, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); #endif __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { Py_ssize_t index = -1; - __pyx_t_14 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5615, __pyx_L1_error) + __pyx_t_14 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5638, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_11 = Py_TYPE(__pyx_t_14)->tp_iternext; @@ -69221,7 +69267,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_15 = __pyx_t_11(__pyx_t_14); if (unlikely(!__pyx_t_15)) goto __pyx_L47_unpacking_failed; __Pyx_GOTREF(__pyx_t_15); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_14), 2) < 0) __PYX_ERR(0, 5615, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_14), 2) < 0) __PYX_ERR(0, 5638, __pyx_L1_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; goto __pyx_L48_unpacking_done; @@ -69229,7 +69275,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 5615, __pyx_L1_error) + __PYX_ERR(0, 5638, __pyx_L1_error) __pyx_L48_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_varname, __pyx_t_4); @@ -69237,16 +69283,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_15); __pyx_t_15 = 0; - /* "netCDF4/_netCDF4.pyx":5616 + /* "netCDF4/_netCDF4.pyx":5639 * self._vars = cdfm.variables * for varname,var in self._vars.items(): * if varname in self._cdfRecVar.keys(): # <<<<<<<<<<<<<< * self._vars[varname] = _Variable(self, varname, var, aggDimName) * self._file_format = [] */ - __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cdfRecVar); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5616, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cdfRecVar); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5639, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_keys); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5616, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_keys); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5639, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_15 = NULL; @@ -69260,28 +69306,28 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P } } if (__pyx_t_15) { - __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_15); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5616, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_15); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5639, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; } else { - __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5616, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5639, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_varname, __pyx_t_7, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5616, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_varname, __pyx_t_7, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5639, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":5617 + /* "netCDF4/_netCDF4.pyx":5640 * for varname,var in self._vars.items(): * if varname in self._cdfRecVar.keys(): * self._vars[varname] = _Variable(self, varname, var, aggDimName) # <<<<<<<<<<<<<< * self._file_format = [] * self._data_model = [] */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Variable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5617, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Variable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5640, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (unlikely(!__pyx_v_aggDimName)) { __Pyx_RaiseUnboundLocalError("aggDimName"); __PYX_ERR(0, 5617, __pyx_L1_error) } + if (unlikely(!__pyx_v_aggDimName)) { __Pyx_RaiseUnboundLocalError("aggDimName"); __PYX_ERR(0, 5640, __pyx_L1_error) } __pyx_t_15 = NULL; __pyx_t_18 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -69297,7 +69343,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[5] = {__pyx_t_15, __pyx_v_self, __pyx_v_varname, __pyx_v_var, __pyx_v_aggDimName}; - __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_18, 4+__pyx_t_18); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5617, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_18, 4+__pyx_t_18); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5640, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_GOTREF(__pyx_t_7); } else @@ -69305,13 +69351,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[5] = {__pyx_t_15, __pyx_v_self, __pyx_v_varname, __pyx_v_var, __pyx_v_aggDimName}; - __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_18, 4+__pyx_t_18); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5617, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_18, 4+__pyx_t_18); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5640, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_GOTREF(__pyx_t_7); } else #endif { - __pyx_t_14 = PyTuple_New(4+__pyx_t_18); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5617, __pyx_L1_error) + __pyx_t_14 = PyTuple_New(4+__pyx_t_18); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5640, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); if (__pyx_t_15) { __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_15); __pyx_t_15 = NULL; @@ -69328,18 +69374,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __Pyx_INCREF(__pyx_v_aggDimName); __Pyx_GIVEREF(__pyx_v_aggDimName); PyTuple_SET_ITEM(__pyx_t_14, 3+__pyx_t_18, __pyx_v_aggDimName); - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_14, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5617, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_14, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5640, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_vars); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5617, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_vars); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5640, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_v_varname, __pyx_t_7) < 0)) __PYX_ERR(0, 5617, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_v_varname, __pyx_t_7) < 0)) __PYX_ERR(0, 5640, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5616 + /* "netCDF4/_netCDF4.pyx":5639 * self._vars = cdfm.variables * for varname,var in self._vars.items(): * if varname in self._cdfRecVar.keys(): # <<<<<<<<<<<<<< @@ -69348,7 +69394,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P */ } - /* "netCDF4/_netCDF4.pyx":5615 + /* "netCDF4/_netCDF4.pyx":5638 * self._dims[dimname] = _Dimension(dimname, dim, self._cdfVLen, self._cdfTLen) * self._vars = cdfm.variables * for varname,var in self._vars.items(): # <<<<<<<<<<<<<< @@ -69358,58 +69404,58 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":5618 + /* "netCDF4/_netCDF4.pyx":5641 * if varname in self._cdfRecVar.keys(): * self._vars[varname] = _Variable(self, varname, var, aggDimName) * self._file_format = [] # <<<<<<<<<<<<<< * self._data_model = [] * self._disk_format = [] */ - __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5618, __pyx_L1_error) + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5641, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_file_format_2, __pyx_t_6) < 0) __PYX_ERR(0, 5618, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_file_format_2, __pyx_t_6) < 0) __PYX_ERR(0, 5641, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":5619 + /* "netCDF4/_netCDF4.pyx":5642 * self._vars[varname] = _Variable(self, varname, var, aggDimName) * self._file_format = [] * self._data_model = [] # <<<<<<<<<<<<<< * self._disk_format = [] * for dset in self._cdf: */ - __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5619, __pyx_L1_error) + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_data_model_2, __pyx_t_6) < 0) __PYX_ERR(0, 5619, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_data_model_2, __pyx_t_6) < 0) __PYX_ERR(0, 5642, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":5620 + /* "netCDF4/_netCDF4.pyx":5643 * self._file_format = [] * self._data_model = [] * self._disk_format = [] # <<<<<<<<<<<<<< * for dset in self._cdf: * if dset.file_format == 'NETCDF4' or dset.data_model == 'NETCDF4': */ - __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5620, __pyx_L1_error) + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_disk_format, __pyx_t_6) < 0) __PYX_ERR(0, 5620, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_disk_format, __pyx_t_6) < 0) __PYX_ERR(0, 5643, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":5621 + /* "netCDF4/_netCDF4.pyx":5644 * self._data_model = [] * self._disk_format = [] * for dset in self._cdf: # <<<<<<<<<<<<<< * if dset.file_format == 'NETCDF4' or dset.data_model == 'NETCDF4': * raise ValueError('MFNetCDF4 only works with NETCDF3_* and NETCDF4_CLASSIC formatted files, not NETCDF4') */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cdf); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5621, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cdf); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) { __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_9 = 0; __pyx_t_10 = NULL; } else { - __pyx_t_9 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5621, __pyx_L1_error) + __pyx_t_9 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_10 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5621, __pyx_L1_error) + __pyx_t_10 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5644, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; for (;;) { @@ -69417,17 +69463,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P if (likely(PyList_CheckExact(__pyx_t_7))) { if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 5621, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 5644, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5621, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } else { if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 5621, __pyx_L1_error) + __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 5644, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5621, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } @@ -69437,7 +69483,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED 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, 5621, __pyx_L1_error) + else __PYX_ERR(0, 5644, __pyx_L1_error) } break; } @@ -69446,44 +69492,44 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P __Pyx_XDECREF_SET(__pyx_v_dset, __pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":5622 + /* "netCDF4/_netCDF4.pyx":5645 * self._disk_format = [] * for dset in self._cdf: * if dset.file_format == 'NETCDF4' or dset.data_model == 'NETCDF4': # <<<<<<<<<<<<<< * raise ValueError('MFNetCDF4 only works with NETCDF3_* and NETCDF4_CLASSIC formatted files, not NETCDF4') * self._file_format.append(dset.file_format) */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dset, __pyx_n_s_file_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5622, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dset, __pyx_n_s_file_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_NETCDF4, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5622, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_NETCDF4, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5645, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L53_bool_binop_done; } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dset, __pyx_n_s_data_model); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5622, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dset, __pyx_n_s_data_model); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_NETCDF4, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5622, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_NETCDF4, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5645, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __pyx_t_2; __pyx_L53_bool_binop_done:; if (__pyx_t_1) { - /* "netCDF4/_netCDF4.pyx":5623 + /* "netCDF4/_netCDF4.pyx":5646 * for dset in self._cdf: * if dset.file_format == 'NETCDF4' or dset.data_model == 'NETCDF4': * raise ValueError('MFNetCDF4 only works with NETCDF3_* and NETCDF4_CLASSIC formatted files, not NETCDF4') # <<<<<<<<<<<<<< * self._file_format.append(dset.file_format) * self._data_model.append(dset.data_model) */ - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__118, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5623, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__122, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5646, __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, 5623, __pyx_L1_error) + __PYX_ERR(0, 5646, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5622 + /* "netCDF4/_netCDF4.pyx":5645 * self._disk_format = [] * for dset in self._cdf: * if dset.file_format == 'NETCDF4' or dset.data_model == 'NETCDF4': # <<<<<<<<<<<<<< @@ -69492,52 +69538,52 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P */ } - /* "netCDF4/_netCDF4.pyx":5624 + /* "netCDF4/_netCDF4.pyx":5647 * if dset.file_format == 'NETCDF4' or dset.data_model == 'NETCDF4': * raise ValueError('MFNetCDF4 only works with NETCDF3_* and NETCDF4_CLASSIC formatted files, not NETCDF4') * self._file_format.append(dset.file_format) # <<<<<<<<<<<<<< * self._data_model.append(dset.data_model) * self._disk_format.append(dset.disk_format) */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_file_format_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5624, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_file_format_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5647, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dset, __pyx_n_s_file_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5624, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dset, __pyx_n_s_file_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5647, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = __Pyx_PyObject_Append(__pyx_t_6, __pyx_t_4); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 5624, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Append(__pyx_t_6, __pyx_t_4); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 5647, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":5625 + /* "netCDF4/_netCDF4.pyx":5648 * raise ValueError('MFNetCDF4 only works with NETCDF3_* and NETCDF4_CLASSIC formatted files, not NETCDF4') * self._file_format.append(dset.file_format) * self._data_model.append(dset.data_model) # <<<<<<<<<<<<<< * self._disk_format.append(dset.disk_format) * self._path = '/' */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_data_model_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5625, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_data_model_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5648, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dset, __pyx_n_s_data_model); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5625, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dset, __pyx_n_s_data_model); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5648, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = __Pyx_PyObject_Append(__pyx_t_4, __pyx_t_6); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 5625, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Append(__pyx_t_4, __pyx_t_6); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 5648, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":5626 + /* "netCDF4/_netCDF4.pyx":5649 * self._file_format.append(dset.file_format) * self._data_model.append(dset.data_model) * self._disk_format.append(dset.disk_format) # <<<<<<<<<<<<<< * self._path = '/' * */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_disk_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5626, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_disk_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5649, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dset, __pyx_n_s_disk_format_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5626, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dset, __pyx_n_s_disk_format_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5649, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = __Pyx_PyObject_Append(__pyx_t_6, __pyx_t_4); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 5626, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Append(__pyx_t_6, __pyx_t_4); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 5649, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":5621 + /* "netCDF4/_netCDF4.pyx":5644 * self._data_model = [] * self._disk_format = [] * for dset in self._cdf: # <<<<<<<<<<<<<< @@ -69547,16 +69593,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5627 + /* "netCDF4/_netCDF4.pyx":5650 * self._data_model.append(dset.data_model) * self._disk_format.append(dset.disk_format) * self._path = '/' # <<<<<<<<<<<<<< * * def __setattr__(self, name, value): */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_path_2, __pyx_kp_s__15) < 0) __PYX_ERR(0, 5627, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_path_2, __pyx_kp_s__17) < 0) __PYX_ERR(0, 5650, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5456 + /* "netCDF4/_netCDF4.pyx":5479 * """ * * def __init__(self, files, check=False, aggdim=None, exclude=[]): # <<<<<<<<<<<<<< @@ -69615,7 +69661,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5629 +/* "netCDF4/_netCDF4.pyx":5652 * self._path = '/' * * def __setattr__(self, name, value): # <<<<<<<<<<<<<< @@ -69655,16 +69701,16 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_3__setattr__(PyObject *_ case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__setattr__", 1, 3, 3, 1); __PYX_ERR(0, 5629, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__setattr__", 1, 3, 3, 1); __PYX_ERR(0, 5652, __pyx_L3_error) } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__setattr__", 1, 3, 3, 2); __PYX_ERR(0, 5629, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__setattr__", 1, 3, 3, 2); __PYX_ERR(0, 5652, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__setattr__") < 0)) __PYX_ERR(0, 5629, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__setattr__") < 0)) __PYX_ERR(0, 5652, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -69679,7 +69725,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_3__setattr__(PyObject *_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__setattr__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5629, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__setattr__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5652, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("netCDF4._netCDF4.MFDataset.__setattr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -69698,19 +69744,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_2__setattr__(CYTHON_UNUS PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__setattr__", 0); - /* "netCDF4/_netCDF4.pyx":5631 + /* "netCDF4/_netCDF4.pyx":5654 * def __setattr__(self, name, value): * """override base class attribute creation""" * self.__dict__[name] = value # <<<<<<<<<<<<<< * * def __getattribute__(self, name): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5631, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(0, 5631, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(0, 5654, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5629 + /* "netCDF4/_netCDF4.pyx":5652 * self._path = '/' * * def __setattr__(self, name, value): # <<<<<<<<<<<<<< @@ -69731,7 +69777,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_2__setattr__(CYTHON_UNUS return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5633 +/* "netCDF4/_netCDF4.pyx":5656 * self.__dict__[name] = value * * def __getattribute__(self, name): # <<<<<<<<<<<<<< @@ -69768,11 +69814,11 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_5__getattribute__(PyObje case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__getattribute__", 1, 2, 2, 1); __PYX_ERR(0, 5633, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__getattribute__", 1, 2, 2, 1); __PYX_ERR(0, 5656, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getattribute__") < 0)) __PYX_ERR(0, 5633, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getattribute__") < 0)) __PYX_ERR(0, 5656, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -69785,7 +69831,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_5__getattribute__(PyObje } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__getattribute__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5633, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__getattribute__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5656, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("netCDF4._netCDF4.MFDataset.__getattribute__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -69810,7 +69856,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_4__getattribute__(CYTHON PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("__getattribute__", 0); - /* "netCDF4/_netCDF4.pyx":5634 + /* "netCDF4/_netCDF4.pyx":5657 * * def __getattribute__(self, name): * if name in ['variables','dimensions','file_format','groups',\ # <<<<<<<<<<<<<< @@ -69819,169 +69865,169 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_4__getattribute__(CYTHON */ __Pyx_INCREF(__pyx_v_name); __pyx_t_1 = __pyx_v_name; - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_variables, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5634, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_variables, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5657, __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_dimensions, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5634, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_dimensions, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5657, __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_file_format, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5634, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_file_format, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5657, __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_groups, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5634, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_groups, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5657, __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_data_model, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5634, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_data_model, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5657, __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_disk_format_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5634, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_disk_format_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5657, __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_path, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5634, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_path, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5657, __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":5636 + /* "netCDF4/_netCDF4.pyx":5659 * if name in ['variables','dimensions','file_format','groups',\ * 'data_model','disk_format','path']: * if name == 'dimensions': return self._dims # <<<<<<<<<<<<<< * if name == 'variables': return self._vars * if name == 'file_format': return self._file_format */ - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_dimensions, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5636, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_dimensions, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5659, __pyx_L1_error) if (__pyx_t_3) { __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dims); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5636, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dims); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5659, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":5637 + /* "netCDF4/_netCDF4.pyx":5660 * 'data_model','disk_format','path']: * if name == 'dimensions': return self._dims * if name == 'variables': return self._vars # <<<<<<<<<<<<<< * if name == 'file_format': return self._file_format * if name == 'data_model': return self._data_model */ - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_variables, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5637, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_variables, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5660, __pyx_L1_error) if (__pyx_t_3) { __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_vars); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5637, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_vars); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5660, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":5638 + /* "netCDF4/_netCDF4.pyx":5661 * if name == 'dimensions': return self._dims * if name == 'variables': return self._vars * if name == 'file_format': return self._file_format # <<<<<<<<<<<<<< * if name == 'data_model': return self._data_model * if name == 'disk_format': return self._disk_format */ - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_file_format, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5638, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_file_format, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5661, __pyx_L1_error) if (__pyx_t_3) { __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_file_format_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5638, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_file_format_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":5639 + /* "netCDF4/_netCDF4.pyx":5662 * if name == 'variables': return self._vars * if name == 'file_format': return self._file_format * if name == 'data_model': return self._data_model # <<<<<<<<<<<<<< * if name == 'disk_format': return self._disk_format * if name == 'path': return self._path */ - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_data_model, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5639, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_data_model, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5662, __pyx_L1_error) if (__pyx_t_3) { __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_data_model_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5639, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_data_model_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":5640 + /* "netCDF4/_netCDF4.pyx":5663 * if name == 'file_format': return self._file_format * if name == 'data_model': return self._data_model * if name == 'disk_format': return self._disk_format # <<<<<<<<<<<<<< * if name == 'path': return self._path * if name == 'groups': return self._grps */ - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_disk_format_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5640, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_disk_format_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5663, __pyx_L1_error) if (__pyx_t_3) { __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_disk_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5640, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_disk_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":5641 + /* "netCDF4/_netCDF4.pyx":5664 * if name == 'data_model': return self._data_model * if name == 'disk_format': return self._disk_format * if name == 'path': return self._path # <<<<<<<<<<<<<< * if name == 'groups': return self._grps * else: */ - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_path, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5641, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_path, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5664, __pyx_L1_error) if (__pyx_t_3) { __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_path_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5641, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_path_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5664, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":5642 + /* "netCDF4/_netCDF4.pyx":5665 * if name == 'disk_format': return self._disk_format * if name == 'path': return self._path * if name == 'groups': return self._grps # <<<<<<<<<<<<<< * else: * return Dataset.__getattribute__(self, name) */ - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_groups, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5642, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_groups, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5665, __pyx_L1_error) if (__pyx_t_3) { __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_grps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5642, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_grps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5665, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":5634 + /* "netCDF4/_netCDF4.pyx":5657 * * def __getattribute__(self, name): * if name in ['variables','dimensions','file_format','groups',\ # <<<<<<<<<<<<<< @@ -69991,7 +70037,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_4__getattribute__(CYTHON goto __pyx_L3; } - /* "netCDF4/_netCDF4.pyx":5644 + /* "netCDF4/_netCDF4.pyx":5667 * if name == 'groups': return self._grps * else: * return Dataset.__getattribute__(self, name) # <<<<<<<<<<<<<< @@ -70000,7 +70046,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_4__getattribute__(CYTHON */ /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7netCDF4_8_netCDF4_Dataset), __pyx_n_s_getattribute); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5644, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7netCDF4_8_netCDF4_Dataset), __pyx_n_s_getattribute); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5667, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -70017,7 +70063,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_4__getattribute__(CYTHON #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_self, __pyx_v_name}; - __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, 5644, __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, 5667, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -70025,13 +70071,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_4__getattribute__(CYTHON #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_self, __pyx_v_name}; - __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, 5644, __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, 5667, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5644, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5667, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -70042,7 +70088,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_4__getattribute__(CYTHON __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_name); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5644, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5667, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -70053,7 +70099,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_4__getattribute__(CYTHON } __pyx_L3:; - /* "netCDF4/_netCDF4.pyx":5633 + /* "netCDF4/_netCDF4.pyx":5656 * self.__dict__[name] = value * * def __getattribute__(self, name): # <<<<<<<<<<<<<< @@ -70077,7 +70123,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_4__getattribute__(CYTHON return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5646 +/* "netCDF4/_netCDF4.pyx":5669 * return Dataset.__getattribute__(self, name) * * def ncattrs(self): # <<<<<<<<<<<<<< @@ -70108,7 +70154,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_6ncattrs(CYTHON_UNUSED P PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("ncattrs", 0); - /* "netCDF4/_netCDF4.pyx":5652 + /* "netCDF4/_netCDF4.pyx":5675 * return the netcdf attribute names from the master file. * """ * return self._cdf[0].__dict__.keys() # <<<<<<<<<<<<<< @@ -70116,15 +70162,15 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_6ncattrs(CYTHON_UNUSED P * def close(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cdf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5652, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cdf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5652, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5652, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_keys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5652, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_keys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -70138,10 +70184,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_6ncattrs(CYTHON_UNUSED P } } if (__pyx_t_2) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5652, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5675, __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, 5652, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5675, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -70149,7 +70195,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_6ncattrs(CYTHON_UNUSED P __pyx_t_1 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":5646 + /* "netCDF4/_netCDF4.pyx":5669 * return Dataset.__getattribute__(self, name) * * def ncattrs(self): # <<<<<<<<<<<<<< @@ -70170,7 +70216,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_6ncattrs(CYTHON_UNUSED P return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5654 +/* "netCDF4/_netCDF4.pyx":5677 * return self._cdf[0].__dict__.keys() * * def close(self): # <<<<<<<<<<<<<< @@ -70205,22 +70251,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_8close(CYTHON_UNUSED PyO PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("close", 0); - /* "netCDF4/_netCDF4.pyx":5660 + /* "netCDF4/_netCDF4.pyx":5683 * close all the open files. * """ * for dset in self._cdf: # <<<<<<<<<<<<<< * dset.close() * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cdf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5660, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cdf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5683, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5660, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5683, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5660, __pyx_L1_error) + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5683, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -70228,17 +70274,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_8close(CYTHON_UNUSED PyO if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 5660, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 5683, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5660, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5683, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 5660, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 5683, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5660, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5683, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -70248,7 +70294,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_8close(CYTHON_UNUSED 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, 5660, __pyx_L1_error) + else __PYX_ERR(0, 5683, __pyx_L1_error) } break; } @@ -70257,14 +70303,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_8close(CYTHON_UNUSED PyO __Pyx_XDECREF_SET(__pyx_v_dset, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5661 + /* "netCDF4/_netCDF4.pyx":5684 * """ * for dset in self._cdf: * dset.close() # <<<<<<<<<<<<<< * * def __repr__(self): */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dset, __pyx_n_s_close); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5661, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dset, __pyx_n_s_close); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -70277,16 +70323,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_8close(CYTHON_UNUSED PyO } } if (__pyx_t_6) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5661, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5684, __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, 5661, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5684, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5660 + /* "netCDF4/_netCDF4.pyx":5683 * close all the open files. * """ * for dset in self._cdf: # <<<<<<<<<<<<<< @@ -70296,7 +70342,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_8close(CYTHON_UNUSED PyO } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5654 + /* "netCDF4/_netCDF4.pyx":5677 * return self._cdf[0].__dict__.keys() * * def close(self): # <<<<<<<<<<<<<< @@ -70321,7 +70367,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_8close(CYTHON_UNUSED PyO return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5663 +/* "netCDF4/_netCDF4.pyx":5686 * dset.close() * * def __repr__(self): # <<<<<<<<<<<<<< @@ -70364,16 +70410,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_10__repr__(CYTHON_UNUSED int __pyx_t_8; __Pyx_RefNannySetupContext("__repr__", 0); - /* "netCDF4/_netCDF4.pyx":5664 + /* "netCDF4/_netCDF4.pyx":5687 * * def __repr__(self): * ncdump = ['%r\n' % type(self)] # <<<<<<<<<<<<<< * dimnames = tuple([str(dimname) for dimname in self.dimensions.keys()]) * varnames = tuple([str(varname) for varname in self.variables.keys()]) */ - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_r_3, ((PyObject *)Py_TYPE(__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5664, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_r_3, ((PyObject *)Py_TYPE(__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5664, __pyx_L1_error) + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); @@ -70381,18 +70427,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_10__repr__(CYTHON_UNUSED __pyx_v_ncdump = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5665 + /* "netCDF4/_netCDF4.pyx":5688 * def __repr__(self): * ncdump = ['%r\n' % type(self)] * dimnames = tuple([str(dimname) for dimname in self.dimensions.keys()]) # <<<<<<<<<<<<<< * varnames = tuple([str(varname) for varname in self.variables.keys()]) * grpnames = () */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5665, __pyx_L1_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5665, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_keys); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5665, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_keys); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -70406,10 +70452,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_10__repr__(CYTHON_UNUSED } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5665, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5688, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5665, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5688, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -70417,9 +70463,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_10__repr__(CYTHON_UNUSED __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5665, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5665, __pyx_L1_error) + __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5688, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -70427,17 +70473,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_10__repr__(CYTHON_UNUSED if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 5665, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 5688, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5665, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 5665, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 5688, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5665, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -70447,7 +70493,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_10__repr__(CYTHON_UNUSED 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, 5665, __pyx_L1_error) + else __PYX_ERR(0, 5688, __pyx_L1_error) } break; } @@ -70455,36 +70501,36 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_10__repr__(CYTHON_UNUSED } __Pyx_XDECREF_SET(__pyx_v_dimname, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5665, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_dimname); __Pyx_GIVEREF(__pyx_v_dimname); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_dimname); - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5665, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 5665, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 5688, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5665, __pyx_L1_error) + __pyx_t_4 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_dimnames = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":5666 + /* "netCDF4/_netCDF4.pyx":5689 * ncdump = ['%r\n' % type(self)] * dimnames = tuple([str(dimname) for dimname in self.dimensions.keys()]) * varnames = tuple([str(varname) for varname in self.variables.keys()]) # <<<<<<<<<<<<<< * grpnames = () * if self.path == '/': */ - __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5666, __pyx_L1_error) + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5666, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_keys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5666, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_keys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -70498,10 +70544,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_10__repr__(CYTHON_UNUSED } } if (__pyx_t_3) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5666, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5689, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5666, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5689, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -70509,9 +70555,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_10__repr__(CYTHON_UNUSED __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5666, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5666, __pyx_L1_error) + __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5689, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { @@ -70519,17 +70565,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_10__repr__(CYTHON_UNUSED if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 5666, __pyx_L1_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 5689, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5666, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 5666, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 5689, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5666, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } @@ -70539,7 +70585,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_10__repr__(CYTHON_UNUSED 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, 5666, __pyx_L1_error) + else __PYX_ERR(0, 5689, __pyx_L1_error) } break; } @@ -70547,25 +70593,25 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_10__repr__(CYTHON_UNUSED } __Pyx_XDECREF_SET(__pyx_v_varname, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5666, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_varname); __Pyx_GIVEREF(__pyx_v_varname); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_varname); - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5666, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 5666, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 5689, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyList_AsTuple(((PyObject*)__pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5666, __pyx_L1_error) + __pyx_t_1 = PyList_AsTuple(((PyObject*)__pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_varnames = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5667 + /* "netCDF4/_netCDF4.pyx":5690 * dimnames = tuple([str(dimname) for dimname in self.dimensions.keys()]) * varnames = tuple([str(varname) for varname in self.variables.keys()]) * grpnames = () # <<<<<<<<<<<<<< @@ -70575,37 +70621,37 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_10__repr__(CYTHON_UNUSED __Pyx_INCREF(__pyx_empty_tuple); __pyx_v_grpnames = __pyx_empty_tuple; - /* "netCDF4/_netCDF4.pyx":5668 + /* "netCDF4/_netCDF4.pyx":5691 * varnames = tuple([str(varname) for varname in self.variables.keys()]) * grpnames = () * if self.path == '/': # <<<<<<<<<<<<<< * ncdump.append('root group (%s data model, file format %s):\n' % * (self.data_model[0], self.disk_format[0])) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5668, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s__15, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 5668, __pyx_L1_error) + __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s__17, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 5691, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_7) { - /* "netCDF4/_netCDF4.pyx":5670 + /* "netCDF4/_netCDF4.pyx":5693 * if self.path == '/': * ncdump.append('root group (%s data model, file format %s):\n' % * (self.data_model[0], self.disk_format[0])) # <<<<<<<<<<<<<< * else: * ncdump.append('group %s:\n' % self.path) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_data_model); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5670, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_data_model); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5693, __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, 5670, __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, 5693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_disk_format_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5670, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_disk_format_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5670, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5670, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); @@ -70614,20 +70660,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_10__repr__(CYTHON_UNUSED __pyx_t_4 = 0; __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":5669 + /* "netCDF4/_netCDF4.pyx":5692 * grpnames = () * if self.path == '/': * ncdump.append('root group (%s data model, file format %s):\n' % # <<<<<<<<<<<<<< * (self.data_model[0], self.disk_format[0])) * else: */ - __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_root_group_s_data_model_file_for, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5669, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_root_group_s_data_model_file_for, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5692, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_3); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 5669, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_3); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 5692, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":5668 + /* "netCDF4/_netCDF4.pyx":5691 * varnames = tuple([str(varname) for varname in self.variables.keys()]) * grpnames = () * if self.path == '/': # <<<<<<<<<<<<<< @@ -70637,7 +70683,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_10__repr__(CYTHON_UNUSED goto __pyx_L7; } - /* "netCDF4/_netCDF4.pyx":5672 + /* "netCDF4/_netCDF4.pyx":5695 * (self.data_model[0], self.disk_format[0])) * else: * ncdump.append('group %s:\n' % self.path) # <<<<<<<<<<<<<< @@ -70645,34 +70691,34 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_10__repr__(CYTHON_UNUSED * self.ncattrs()] */ /*else*/ { - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5672, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5695, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_group_s, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5672, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_group_s, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5695, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_1); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 5672, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_1); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 5695, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L7:; - /* "netCDF4/_netCDF4.pyx":5673 + /* "netCDF4/_netCDF4.pyx":5696 * else: * ncdump.append('group %s:\n' % self.path) * attrs = [' %s: %s\n' % (name,self.__dict__[name]) for name in\ # <<<<<<<<<<<<<< * self.ncattrs()] * ncdump = ncdump + attrs */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5673, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "netCDF4/_netCDF4.pyx":5674 + /* "netCDF4/_netCDF4.pyx":5697 * ncdump.append('group %s:\n' % self.path) * attrs = [' %s: %s\n' % (name,self.__dict__[name]) for name in\ * self.ncattrs()] # <<<<<<<<<<<<<< * ncdump = ncdump + attrs * ncdump.append(' dimensions = %s\n' % str(dimnames)) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ncattrs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5674, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ncattrs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5697, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -70685,10 +70731,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_10__repr__(CYTHON_UNUSED } } if (__pyx_t_2) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5674, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5697, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5674, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5697, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -70696,9 +70742,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_10__repr__(CYTHON_UNUSED __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5674, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5697, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5674, __pyx_L1_error) + __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5697, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -70706,17 +70752,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_10__repr__(CYTHON_UNUSED if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 5674, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 5697, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5674, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5697, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 5674, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 5697, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5674, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5697, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } @@ -70726,7 +70772,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_10__repr__(CYTHON_UNUSED 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, 5674, __pyx_L1_error) + else __PYX_ERR(0, 5697, __pyx_L1_error) } break; } @@ -70735,19 +70781,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_10__repr__(CYTHON_UNUSED __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":5673 + /* "netCDF4/_netCDF4.pyx":5696 * else: * ncdump.append('group %s:\n' % self.path) * attrs = [' %s: %s\n' % (name,self.__dict__[name]) for name in\ # <<<<<<<<<<<<<< * self.ncattrs()] * ncdump = ncdump + attrs */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5673, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyObject_GetItem(__pyx_t_3, __pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5673, __pyx_L1_error) + __pyx_t_2 = PyObject_GetItem(__pyx_t_3, __pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5673, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); @@ -70755,92 +70801,92 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_10__repr__(CYTHON_UNUSED __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5673, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 5673, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 5696, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_attrs = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5675 + /* "netCDF4/_netCDF4.pyx":5698 * attrs = [' %s: %s\n' % (name,self.__dict__[name]) for name in\ * self.ncattrs()] * ncdump = ncdump + attrs # <<<<<<<<<<<<<< * ncdump.append(' dimensions = %s\n' % str(dimnames)) * ncdump.append(' variables = %s\n' % str(varnames)) */ - __pyx_t_1 = PyNumber_Add(__pyx_v_ncdump, __pyx_v_attrs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5675, __pyx_L1_error) + __pyx_t_1 = PyNumber_Add(__pyx_v_ncdump, __pyx_v_attrs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5698, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_ncdump, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5676 + /* "netCDF4/_netCDF4.pyx":5699 * self.ncattrs()] * ncdump = ncdump + attrs * ncdump.append(' dimensions = %s\n' % str(dimnames)) # <<<<<<<<<<<<<< * ncdump.append(' variables = %s\n' % str(varnames)) * ncdump.append(' groups = %s\n' % str(grpnames)) */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5676, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5699, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_dimnames); __Pyx_GIVEREF(__pyx_v_dimnames); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_dimnames); - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5676, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5699, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_dimensions_s, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5676, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_dimensions_s, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5699, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_1); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 5676, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_1); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 5699, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5677 + /* "netCDF4/_netCDF4.pyx":5700 * ncdump = ncdump + attrs * ncdump.append(' dimensions = %s\n' % str(dimnames)) * ncdump.append(' variables = %s\n' % str(varnames)) # <<<<<<<<<<<<<< * ncdump.append(' groups = %s\n' % str(grpnames)) * return ''.join(ncdump) */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5677, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_varnames); __Pyx_GIVEREF(__pyx_v_varnames); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_varnames); - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5677, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_variables_s, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5677, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_variables_s, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_1); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 5677, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_1); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 5700, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5678 + /* "netCDF4/_netCDF4.pyx":5701 * ncdump.append(' dimensions = %s\n' % str(dimnames)) * ncdump.append(' variables = %s\n' % str(varnames)) * ncdump.append(' groups = %s\n' % str(grpnames)) # <<<<<<<<<<<<<< * return ''.join(ncdump) * */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5678, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_grpnames); __Pyx_GIVEREF(__pyx_v_grpnames); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_grpnames); - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5678, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_groups_s_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5678, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_groups_s_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_1); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 5678, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_1); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 5701, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5679 + /* "netCDF4/_netCDF4.pyx":5702 * ncdump.append(' variables = %s\n' % str(varnames)) * ncdump.append(' groups = %s\n' % str(grpnames)) * return ''.join(ncdump) # <<<<<<<<<<<<<< @@ -70848,13 +70894,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_10__repr__(CYTHON_UNUSED * def __reduce__(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__2, __pyx_v_ncdump); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5679, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__2, __pyx_v_ncdump); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5702, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":5663 + /* "netCDF4/_netCDF4.pyx":5686 * dset.close() * * def __repr__(self): # <<<<<<<<<<<<<< @@ -70884,7 +70930,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_10__repr__(CYTHON_UNUSED return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5681 +/* "netCDF4/_netCDF4.pyx":5704 * return ''.join(ncdump) * * def __reduce__(self): # <<<<<<<<<<<<<< @@ -70912,20 +70958,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_12__reduce__(CYTHON_UNUS PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__reduce__", 0); - /* "netCDF4/_netCDF4.pyx":5683 + /* "netCDF4/_netCDF4.pyx":5706 * def __reduce__(self): * # raise error is user tries to pickle a MFDataset object. * raise NotImplementedError('MFDataset is not picklable') # <<<<<<<<<<<<<< * * class _Dimension(object): */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__119, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5683, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__123, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5706, __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, 5683, __pyx_L1_error) + __PYX_ERR(0, 5706, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5681 + /* "netCDF4/_netCDF4.pyx":5704 * return ''.join(ncdump) * * def __reduce__(self): # <<<<<<<<<<<<<< @@ -70943,7 +70989,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_12__reduce__(CYTHON_UNUS return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5686 +/* "netCDF4/_netCDF4.pyx":5709 * * class _Dimension(object): * def __init__(self, dimname, dim, dimlens, dimtotlen): # <<<<<<<<<<<<<< @@ -70986,26 +71032,26 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_10_Dimension_1__init__(PyObject *__ case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dimname)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 1); __PYX_ERR(0, 5686, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 1); __PYX_ERR(0, 5709, __pyx_L3_error) } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dim)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 2); __PYX_ERR(0, 5686, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 2); __PYX_ERR(0, 5709, __pyx_L3_error) } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dimlens)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 3); __PYX_ERR(0, 5686, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 3); __PYX_ERR(0, 5709, __pyx_L3_error) } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dimtotlen)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 4); __PYX_ERR(0, 5686, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 4); __PYX_ERR(0, 5709, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 5686, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 5709, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 5) { goto __pyx_L5_argtuple_error; @@ -71024,7 +71070,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_10_Dimension_1__init__(PyObject *__ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5686, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5709, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("netCDF4._netCDF4._Dimension.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -71042,34 +71088,34 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10_Dimension___init__(CYTHON_UNUSED __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 0); - /* "netCDF4/_netCDF4.pyx":5687 + /* "netCDF4/_netCDF4.pyx":5710 * class _Dimension(object): * def __init__(self, dimname, dim, dimlens, dimtotlen): * self.dimlens = dimlens # <<<<<<<<<<<<<< * self.dimtotlen = dimtotlen * self._name = dimname */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dimlens, __pyx_v_dimlens) < 0) __PYX_ERR(0, 5687, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dimlens, __pyx_v_dimlens) < 0) __PYX_ERR(0, 5710, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5688 + /* "netCDF4/_netCDF4.pyx":5711 * def __init__(self, dimname, dim, dimlens, dimtotlen): * self.dimlens = dimlens * self.dimtotlen = dimtotlen # <<<<<<<<<<<<<< * self._name = dimname * def __len__(self): */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dimtotlen, __pyx_v_dimtotlen) < 0) __PYX_ERR(0, 5688, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dimtotlen, __pyx_v_dimtotlen) < 0) __PYX_ERR(0, 5711, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5689 + /* "netCDF4/_netCDF4.pyx":5712 * self.dimlens = dimlens * self.dimtotlen = dimtotlen * self._name = dimname # <<<<<<<<<<<<<< * def __len__(self): * return self.dimtotlen */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_name_2, __pyx_v_dimname) < 0) __PYX_ERR(0, 5689, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_name_2, __pyx_v_dimname) < 0) __PYX_ERR(0, 5712, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5686 + /* "netCDF4/_netCDF4.pyx":5709 * * class _Dimension(object): * def __init__(self, dimname, dim, dimlens, dimtotlen): # <<<<<<<<<<<<<< @@ -71089,7 +71135,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10_Dimension___init__(CYTHON_UNUSED return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5690 +/* "netCDF4/_netCDF4.pyx":5713 * self.dimtotlen = dimtotlen * self._name = dimname * def __len__(self): # <<<<<<<<<<<<<< @@ -71117,7 +71163,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10_Dimension_2__len__(CYTHON_UNUSED PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__len__", 0); - /* "netCDF4/_netCDF4.pyx":5691 + /* "netCDF4/_netCDF4.pyx":5714 * self._name = dimname * def __len__(self): * return self.dimtotlen # <<<<<<<<<<<<<< @@ -71125,13 +71171,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10_Dimension_2__len__(CYTHON_UNUSED * return True */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dimtotlen); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5691, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dimtotlen); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5714, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":5690 + /* "netCDF4/_netCDF4.pyx":5713 * self.dimtotlen = dimtotlen * self._name = dimname * def __len__(self): # <<<<<<<<<<<<<< @@ -71150,7 +71196,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10_Dimension_2__len__(CYTHON_UNUSED return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5692 +/* "netCDF4/_netCDF4.pyx":5715 * def __len__(self): * return self.dimtotlen * def isunlimited(self): # <<<<<<<<<<<<<< @@ -71177,7 +71223,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10_Dimension_4isunlimited(CYTHON_UN __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isunlimited", 0); - /* "netCDF4/_netCDF4.pyx":5693 + /* "netCDF4/_netCDF4.pyx":5716 * return self.dimtotlen * def isunlimited(self): * return True # <<<<<<<<<<<<<< @@ -71189,7 +71235,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10_Dimension_4isunlimited(CYTHON_UN __pyx_r = Py_True; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":5692 + /* "netCDF4/_netCDF4.pyx":5715 * def __len__(self): * return self.dimtotlen * def isunlimited(self): # <<<<<<<<<<<<<< @@ -71204,7 +71250,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10_Dimension_4isunlimited(CYTHON_UN return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5694 +/* "netCDF4/_netCDF4.pyx":5717 * def isunlimited(self): * return True * def __repr__(self): # <<<<<<<<<<<<<< @@ -71237,14 +71283,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10_Dimension_6__repr__(CYTHON_UNUSE PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - /* "netCDF4/_netCDF4.pyx":5695 + /* "netCDF4/_netCDF4.pyx":5718 * return True * def __repr__(self): * if self.isunlimited(): # <<<<<<<<<<<<<< * return repr(type(self))+" (unlimited): name = '%s', size = %s\n" % (self._name,len(self)) * else: */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_isunlimited); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5695, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_isunlimited); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -71257,18 +71303,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10_Dimension_6__repr__(CYTHON_UNUSE } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5695, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5718, __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, 5695, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5718, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 5695, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 5718, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { - /* "netCDF4/_netCDF4.pyx":5696 + /* "netCDF4/_netCDF4.pyx":5719 * def __repr__(self): * if self.isunlimited(): * return repr(type(self))+" (unlimited): name = '%s', size = %s\n" % (self._name,len(self)) # <<<<<<<<<<<<<< @@ -71276,14 +71322,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10_Dimension_6__repr__(CYTHON_UNUSE * return repr(type(self))+": name = '%s', size = %s\n" % (self._name,len(self)) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_Repr(((PyObject *)Py_TYPE(__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5696, __pyx_L1_error) + __pyx_t_1 = PyObject_Repr(((PyObject *)Py_TYPE(__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5719, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5696, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5719, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(0, 5696, __pyx_L1_error) - __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5696, __pyx_L1_error) + __pyx_t_5 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(0, 5719, __pyx_L1_error) + __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5719, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5696, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5719, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); @@ -71291,10 +71337,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10_Dimension_6__repr__(CYTHON_UNUSE PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3); __pyx_t_2 = 0; __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_unlimited_name_s_size_s, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5696, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_unlimited_name_s_size_s, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5719, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5696, __pyx_L1_error) + __pyx_t_6 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5719, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -71302,7 +71348,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10_Dimension_6__repr__(CYTHON_UNUSE __pyx_t_6 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":5695 + /* "netCDF4/_netCDF4.pyx":5718 * return True * def __repr__(self): * if self.isunlimited(): # <<<<<<<<<<<<<< @@ -71311,7 +71357,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10_Dimension_6__repr__(CYTHON_UNUSE */ } - /* "netCDF4/_netCDF4.pyx":5698 + /* "netCDF4/_netCDF4.pyx":5721 * return repr(type(self))+" (unlimited): name = '%s', size = %s\n" % (self._name,len(self)) * else: * return repr(type(self))+": name = '%s', size = %s\n" % (self._name,len(self)) # <<<<<<<<<<<<<< @@ -71320,14 +71366,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10_Dimension_6__repr__(CYTHON_UNUSE */ /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = PyObject_Repr(((PyObject *)Py_TYPE(__pyx_v_self))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5698, __pyx_L1_error) + __pyx_t_6 = PyObject_Repr(((PyObject *)Py_TYPE(__pyx_v_self))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5698, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(0, 5698, __pyx_L1_error) - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5698, __pyx_L1_error) + __pyx_t_5 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(0, 5721, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5698, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); @@ -71335,10 +71381,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10_Dimension_6__repr__(CYTHON_UNUSE PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); __pyx_t_3 = 0; __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_name_s_size_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5698, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_name_s_size_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyNumber_Add(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5698, __pyx_L1_error) + __pyx_t_2 = PyNumber_Add(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -71347,7 +71393,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10_Dimension_6__repr__(CYTHON_UNUSE goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":5694 + /* "netCDF4/_netCDF4.pyx":5717 * def isunlimited(self): * return True * def __repr__(self): # <<<<<<<<<<<<<< @@ -71369,7 +71415,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10_Dimension_6__repr__(CYTHON_UNUSE return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5701 +/* "netCDF4/_netCDF4.pyx":5724 * * class _Variable(object): * def __init__(self, dset, varname, var, recdimname): # <<<<<<<<<<<<<< @@ -71412,26 +71458,26 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9_Variable_1__init__(PyObject *__py case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dset)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 1); __PYX_ERR(0, 5701, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 1); __PYX_ERR(0, 5724, __pyx_L3_error) } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_varname)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 2); __PYX_ERR(0, 5701, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 2); __PYX_ERR(0, 5724, __pyx_L3_error) } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_var)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 3); __PYX_ERR(0, 5701, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 3); __PYX_ERR(0, 5724, __pyx_L3_error) } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_recdimname)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 4); __PYX_ERR(0, 5701, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 4); __PYX_ERR(0, 5724, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 5701, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 5724, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 5) { goto __pyx_L5_argtuple_error; @@ -71450,7 +71496,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9_Variable_1__init__(PyObject *__py } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5701, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5724, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("netCDF4._netCDF4._Variable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -71478,115 +71524,115 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable___init__(CYTHON_UNUSED P PyObject *(*__pyx_t_8)(PyObject *); __Pyx_RefNannySetupContext("__init__", 0); - /* "netCDF4/_netCDF4.pyx":5702 + /* "netCDF4/_netCDF4.pyx":5725 * class _Variable(object): * def __init__(self, dset, varname, var, recdimname): * self.dimensions = var.dimensions # <<<<<<<<<<<<<< * self._dset = dset * self._grp = dset */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5702, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5725, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dimensions, __pyx_t_1) < 0) __PYX_ERR(0, 5702, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dimensions, __pyx_t_1) < 0) __PYX_ERR(0, 5725, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5703 + /* "netCDF4/_netCDF4.pyx":5726 * def __init__(self, dset, varname, var, recdimname): * self.dimensions = var.dimensions * self._dset = dset # <<<<<<<<<<<<<< * self._grp = dset * self._mastervar = var */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dset_2, __pyx_v_dset) < 0) __PYX_ERR(0, 5703, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dset_2, __pyx_v_dset) < 0) __PYX_ERR(0, 5726, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5704 + /* "netCDF4/_netCDF4.pyx":5727 * self.dimensions = var.dimensions * self._dset = dset * self._grp = dset # <<<<<<<<<<<<<< * self._mastervar = var * self._recVar = dset._cdfRecVar[varname] */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_grp_2, __pyx_v_dset) < 0) __PYX_ERR(0, 5704, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_grp_2, __pyx_v_dset) < 0) __PYX_ERR(0, 5727, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5705 + /* "netCDF4/_netCDF4.pyx":5728 * self._dset = dset * self._grp = dset * self._mastervar = var # <<<<<<<<<<<<<< * self._recVar = dset._cdfRecVar[varname] * self._recdimname = recdimname */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_mastervar, __pyx_v_var) < 0) __PYX_ERR(0, 5705, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_mastervar, __pyx_v_var) < 0) __PYX_ERR(0, 5728, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5706 + /* "netCDF4/_netCDF4.pyx":5729 * self._grp = dset * self._mastervar = var * self._recVar = dset._cdfRecVar[varname] # <<<<<<<<<<<<<< * self._recdimname = recdimname * self._recLen = dset._cdfVLen */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dset, __pyx_n_s_cdfRecVar); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5706, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dset, __pyx_n_s_cdfRecVar); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5729, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_varname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5706, __pyx_L1_error) + __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_varname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5729, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_recVar, __pyx_t_2) < 0) __PYX_ERR(0, 5706, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_recVar, __pyx_t_2) < 0) __PYX_ERR(0, 5729, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5707 + /* "netCDF4/_netCDF4.pyx":5730 * self._mastervar = var * self._recVar = dset._cdfRecVar[varname] * self._recdimname = recdimname # <<<<<<<<<<<<<< * self._recLen = dset._cdfVLen * self.dtype = var.dtype */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_recdimname_2, __pyx_v_recdimname) < 0) __PYX_ERR(0, 5707, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_recdimname_2, __pyx_v_recdimname) < 0) __PYX_ERR(0, 5730, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5708 + /* "netCDF4/_netCDF4.pyx":5731 * self._recVar = dset._cdfRecVar[varname] * self._recdimname = recdimname * self._recLen = dset._cdfVLen # <<<<<<<<<<<<<< * self.dtype = var.dtype * self._name = var._name */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dset, __pyx_n_s_cdfVLen); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5708, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dset, __pyx_n_s_cdfVLen); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5731, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_recLen, __pyx_t_2) < 0) __PYX_ERR(0, 5708, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_recLen, __pyx_t_2) < 0) __PYX_ERR(0, 5731, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5709 + /* "netCDF4/_netCDF4.pyx":5732 * self._recdimname = recdimname * self._recLen = dset._cdfVLen * self.dtype = var.dtype # <<<<<<<<<<<<<< * self._name = var._name * # copy attributes from master. */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5709, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5732, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(0, 5709, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(0, 5732, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5710 + /* "netCDF4/_netCDF4.pyx":5733 * self._recLen = dset._cdfVLen * self.dtype = var.dtype * self._name = var._name # <<<<<<<<<<<<<< * # copy attributes from master. * for name, value in var.__dict__.items(): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5710, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5733, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_name_2, __pyx_t_2) < 0) __PYX_ERR(0, 5710, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_name_2, __pyx_t_2) < 0) __PYX_ERR(0, 5733, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5712 + /* "netCDF4/_netCDF4.pyx":5735 * self._name = var._name * # copy attributes from master. * for name, value in var.__dict__.items(): # <<<<<<<<<<<<<< * self.__dict__[name] = value * def typecode(self): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5712, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5735, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5712, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5735, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -71600,10 +71646,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable___init__(CYTHON_UNUSED P } } if (__pyx_t_1) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5712, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5735, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5712, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5735, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -71611,9 +71657,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable___init__(CYTHON_UNUSED P __pyx_t_3 = __pyx_t_2; __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_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5712, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5735, __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, 5712, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5735, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { @@ -71621,17 +71667,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable___init__(CYTHON_UNUSED P 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_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 5712, __pyx_L1_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 5735, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5712, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5735, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 5712, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 5735, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5712, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5735, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } @@ -71641,7 +71687,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable___init__(CYTHON_UNUSED 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, 5712, __pyx_L1_error) + else __PYX_ERR(0, 5735, __pyx_L1_error) } break; } @@ -71657,7 +71703,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable___init__(CYTHON_UNUSED P if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 5712, __pyx_L1_error) + __PYX_ERR(0, 5735, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -71670,15 +71716,15 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable___init__(CYTHON_UNUSED P __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5712, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5735, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5712, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5735, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; - __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5712, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5735, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; @@ -71686,7 +71732,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable___init__(CYTHON_UNUSED P __Pyx_GOTREF(__pyx_t_1); 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, 5712, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 5735, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_unpacking_done; @@ -71694,7 +71740,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable___init__(CYTHON_UNUSED P __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 5712, __pyx_L1_error) + __PYX_ERR(0, 5735, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1); @@ -71702,19 +71748,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable___init__(CYTHON_UNUSED P __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":5713 + /* "netCDF4/_netCDF4.pyx":5736 * # copy attributes from master. * for name, value in var.__dict__.items(): * self.__dict__[name] = value # <<<<<<<<<<<<<< * def typecode(self): * return self.dtype */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5713, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5736, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(0, 5713, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(0, 5736, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5712 + /* "netCDF4/_netCDF4.pyx":5735 * self._name = var._name * # copy attributes from master. * for name, value in var.__dict__.items(): # <<<<<<<<<<<<<< @@ -71724,7 +71770,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable___init__(CYTHON_UNUSED P } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":5701 + /* "netCDF4/_netCDF4.pyx":5724 * * class _Variable(object): * def __init__(self, dset, varname, var, recdimname): # <<<<<<<<<<<<<< @@ -71751,7 +71797,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable___init__(CYTHON_UNUSED P return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5714 +/* "netCDF4/_netCDF4.pyx":5737 * for name, value in var.__dict__.items(): * self.__dict__[name] = value * def typecode(self): # <<<<<<<<<<<<<< @@ -71779,7 +71825,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_2typecode(CYTHON_UNUSED PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("typecode", 0); - /* "netCDF4/_netCDF4.pyx":5715 + /* "netCDF4/_netCDF4.pyx":5738 * self.__dict__[name] = value * def typecode(self): * return self.dtype # <<<<<<<<<<<<<< @@ -71787,13 +71833,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_2typecode(CYTHON_UNUSED * return self._mastervar.__dict__.keys() */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5715, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5738, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":5714 + /* "netCDF4/_netCDF4.pyx":5737 * for name, value in var.__dict__.items(): * self.__dict__[name] = value * def typecode(self): # <<<<<<<<<<<<<< @@ -71812,7 +71858,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_2typecode(CYTHON_UNUSED return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5716 +/* "netCDF4/_netCDF4.pyx":5739 * def typecode(self): * return self.dtype * def ncattrs(self): # <<<<<<<<<<<<<< @@ -71842,7 +71888,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_4ncattrs(CYTHON_UNUSED P PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("ncattrs", 0); - /* "netCDF4/_netCDF4.pyx":5717 + /* "netCDF4/_netCDF4.pyx":5740 * return self.dtype * def ncattrs(self): * return self._mastervar.__dict__.keys() # <<<<<<<<<<<<<< @@ -71850,12 +71896,12 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_4ncattrs(CYTHON_UNUSED P * if name == 'shape': return self._shape() */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mastervar); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5717, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mastervar); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5740, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5717, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5740, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5717, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5740, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -71869,10 +71915,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_4ncattrs(CYTHON_UNUSED P } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5717, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5740, __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, 5717, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5740, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -71880,7 +71926,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_4ncattrs(CYTHON_UNUSED P __pyx_t_1 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":5716 + /* "netCDF4/_netCDF4.pyx":5739 * def typecode(self): * return self.dtype * def ncattrs(self): # <<<<<<<<<<<<<< @@ -71901,7 +71947,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_4ncattrs(CYTHON_UNUSED P return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5718 +/* "netCDF4/_netCDF4.pyx":5741 * def ncattrs(self): * return self._mastervar.__dict__.keys() * def __getattr__(self,name): # <<<<<<<<<<<<<< @@ -71938,11 +71984,11 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9_Variable_7__getattr__(PyObject *_ case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__getattr__", 1, 2, 2, 1); __PYX_ERR(0, 5718, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__getattr__", 1, 2, 2, 1); __PYX_ERR(0, 5741, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getattr__") < 0)) __PYX_ERR(0, 5718, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getattr__") < 0)) __PYX_ERR(0, 5741, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -71955,7 +72001,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9_Variable_7__getattr__(PyObject *_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__getattr__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5718, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__getattr__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5741, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("netCDF4._netCDF4._Variable.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -71983,17 +72029,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_6__getattr__(CYTHON_UNUS PyObject *__pyx_t_10 = NULL; __Pyx_RefNannySetupContext("__getattr__", 0); - /* "netCDF4/_netCDF4.pyx":5719 + /* "netCDF4/_netCDF4.pyx":5742 * return self._mastervar.__dict__.keys() * def __getattr__(self,name): * if name == 'shape': return self._shape() # <<<<<<<<<<<<<< * if name == 'ndim': return len(self._shape()) * try: */ - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_shape, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5719, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_shape, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5742, __pyx_L1_error) if (__pyx_t_1) { __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shape_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5719, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shape_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5742, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -72006,10 +72052,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_6__getattr__(CYTHON_UNUS } } if (__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5719, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5742, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5719, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5742, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -72018,17 +72064,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_6__getattr__(CYTHON_UNUS goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":5720 + /* "netCDF4/_netCDF4.pyx":5743 * def __getattr__(self,name): * if name == 'shape': return self._shape() * if name == 'ndim': return len(self._shape()) # <<<<<<<<<<<<<< * try: * return self.__dict__[name] */ - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_ndim, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5720, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_ndim, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5743, __pyx_L1_error) if (__pyx_t_1) { __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shape_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5720, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shape_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5743, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -72041,23 +72087,23 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_6__getattr__(CYTHON_UNUS } } if (__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5720, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5743, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5720, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5743, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(0, 5720, __pyx_L1_error) + __pyx_t_5 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(0, 5743, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5720, __pyx_L1_error) + __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5743, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":5721 + /* "netCDF4/_netCDF4.pyx":5744 * if name == 'shape': return self._shape() * if name == 'ndim': return len(self._shape()) * try: # <<<<<<<<<<<<<< @@ -72073,7 +72119,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_6__getattr__(CYTHON_UNUS __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { - /* "netCDF4/_netCDF4.pyx":5722 + /* "netCDF4/_netCDF4.pyx":5745 * if name == 'ndim': return len(self._shape()) * try: * return self.__dict__[name] # <<<<<<<<<<<<<< @@ -72081,16 +72127,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_6__getattr__(CYTHON_UNUS * raise AttributeError(name) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5722, __pyx_L5_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5745, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_GetItem(__pyx_t_2, __pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5722, __pyx_L5_error) + __pyx_t_3 = PyObject_GetItem(__pyx_t_2, __pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5745, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L9_try_return; - /* "netCDF4/_netCDF4.pyx":5721 + /* "netCDF4/_netCDF4.pyx":5744 * if name == 'shape': return self._shape() * if name == 'ndim': return len(self._shape()) * try: # <<<<<<<<<<<<<< @@ -72104,7 +72150,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_6__getattr__(CYTHON_UNUS __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":5723 + /* "netCDF4/_netCDF4.pyx":5746 * try: * return self.__dict__[name] * except: # <<<<<<<<<<<<<< @@ -72113,33 +72159,33 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_6__getattr__(CYTHON_UNUS */ /*except:*/ { __Pyx_AddTraceback("netCDF4._netCDF4._Variable.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_4) < 0) __PYX_ERR(0, 5723, __pyx_L7_except_error) + if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_4) < 0) __PYX_ERR(0, 5746, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_4); - /* "netCDF4/_netCDF4.pyx":5724 + /* "netCDF4/_netCDF4.pyx":5747 * return self.__dict__[name] * except: * raise AttributeError(name) # <<<<<<<<<<<<<< * def __repr__(self): * ncdump_var = ['%r\n' % type(self)] */ - __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5724, __pyx_L7_except_error) + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5747, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_name); - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5724, __pyx_L7_except_error) + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5747, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_Raise(__pyx_t_10, 0, 0, 0); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __PYX_ERR(0, 5724, __pyx_L7_except_error) + __PYX_ERR(0, 5747, __pyx_L7_except_error) } __pyx_L7_except_error:; - /* "netCDF4/_netCDF4.pyx":5721 + /* "netCDF4/_netCDF4.pyx":5744 * if name == 'shape': return self._shape() * if name == 'ndim': return len(self._shape()) * try: # <<<<<<<<<<<<<< @@ -72161,7 +72207,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_6__getattr__(CYTHON_UNUS goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":5718 + /* "netCDF4/_netCDF4.pyx":5741 * def ncattrs(self): * return self._mastervar.__dict__.keys() * def __getattr__(self,name): # <<<<<<<<<<<<<< @@ -72184,7 +72230,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_6__getattr__(CYTHON_UNUS return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5725 +/* "netCDF4/_netCDF4.pyx":5748 * except: * raise AttributeError(name) * def __repr__(self): # <<<<<<<<<<<<<< @@ -72229,16 +72275,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_8__repr__(CYTHON_UNUSED int __pyx_t_11; __Pyx_RefNannySetupContext("__repr__", 0); - /* "netCDF4/_netCDF4.pyx":5726 + /* "netCDF4/_netCDF4.pyx":5749 * raise AttributeError(name) * def __repr__(self): * ncdump_var = ['%r\n' % type(self)] # <<<<<<<<<<<<<< * dimnames = tuple([str(dimname) for dimname in self.dimensions]) * attrs = [' %s: %s\n' % (name,self.__dict__[name]) for name in\ */ - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_r_3, ((PyObject *)Py_TYPE(__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5726, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_r_3, ((PyObject *)Py_TYPE(__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5749, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5726, __pyx_L1_error) + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5749, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); @@ -72246,24 +72292,24 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_8__repr__(CYTHON_UNUSED __pyx_v_ncdump_var = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5727 + /* "netCDF4/_netCDF4.pyx":5750 * def __repr__(self): * ncdump_var = ['%r\n' % type(self)] * dimnames = tuple([str(dimname) for dimname in self.dimensions]) # <<<<<<<<<<<<<< * attrs = [' %s: %s\n' % (name,self.__dict__[name]) for name in\ * self.ncattrs()] */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5727, __pyx_L1_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5750, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5727, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5750, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __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, 5727, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5750, __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, 5727, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5750, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -72271,17 +72317,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_8__repr__(CYTHON_UNUSED 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, 5727, __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, 5750, __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, 5727, __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, 5750, __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, 5727, __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, 5750, __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, 5727, __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, 5750, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -72291,7 +72337,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_8__repr__(CYTHON_UNUSED 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, 5727, __pyx_L1_error) + else __PYX_ERR(0, 5750, __pyx_L1_error) } break; } @@ -72299,42 +72345,42 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_8__repr__(CYTHON_UNUSED } __Pyx_XDECREF_SET(__pyx_v_dimname, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5727, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5750, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_dimname); __Pyx_GIVEREF(__pyx_v_dimname); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_dimname); - __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5727, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5750, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 5727, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 5750, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5727, __pyx_L1_error) + __pyx_t_3 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5750, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_dimnames = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":5728 + /* "netCDF4/_netCDF4.pyx":5751 * ncdump_var = ['%r\n' % type(self)] * dimnames = tuple([str(dimname) for dimname in self.dimensions]) * attrs = [' %s: %s\n' % (name,self.__dict__[name]) for name in\ # <<<<<<<<<<<<<< * self.ncattrs()] * ncdump_var.append('%s %s%s\n' %\ */ - __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5728, __pyx_L1_error) + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5751, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - /* "netCDF4/_netCDF4.pyx":5729 + /* "netCDF4/_netCDF4.pyx":5752 * dimnames = tuple([str(dimname) for dimname in self.dimensions]) * attrs = [' %s: %s\n' % (name,self.__dict__[name]) for name in\ * self.ncattrs()] # <<<<<<<<<<<<<< * ncdump_var.append('%s %s%s\n' %\ * (self.dtype,self._name,dimnames)) */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ncattrs); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5729, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ncattrs); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5752, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -72347,10 +72393,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_8__repr__(CYTHON_UNUSED } } if (__pyx_t_1) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5729, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5752, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5729, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5752, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -72358,9 +72404,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_8__repr__(CYTHON_UNUSED __pyx_t_6 = __pyx_t_2; __Pyx_INCREF(__pyx_t_6); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5729, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5752, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5729, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5752, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { @@ -72368,17 +72414,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_8__repr__(CYTHON_UNUSED if (likely(PyList_CheckExact(__pyx_t_6))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 5729, __pyx_L1_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 5752, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5729, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5752, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 5729, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 5752, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5729, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5752, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } @@ -72388,7 +72434,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_8__repr__(CYTHON_UNUSED 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, 5729, __pyx_L1_error) + else __PYX_ERR(0, 5752, __pyx_L1_error) } break; } @@ -72397,19 +72443,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_8__repr__(CYTHON_UNUSED __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5728 + /* "netCDF4/_netCDF4.pyx":5751 * ncdump_var = ['%r\n' % type(self)] * dimnames = tuple([str(dimname) for dimname in self.dimensions]) * attrs = [' %s: %s\n' % (name,self.__dict__[name]) for name in\ # <<<<<<<<<<<<<< * self.ncattrs()] * ncdump_var.append('%s %s%s\n' %\ */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5728, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5751, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyObject_GetItem(__pyx_t_2, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5728, __pyx_L1_error) + __pyx_t_1 = PyObject_GetItem(__pyx_t_2, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5751, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5728, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5751, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); @@ -72417,28 +72463,28 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_8__repr__(CYTHON_UNUSED __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5728, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5751, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 5728, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 5751, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_attrs = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":5731 + /* "netCDF4/_netCDF4.pyx":5754 * self.ncattrs()] * ncdump_var.append('%s %s%s\n' %\ * (self.dtype,self._name,dimnames)) # <<<<<<<<<<<<<< * ncdump_var = ncdump_var + attrs * unlimdims = [] */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5731, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5754, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5731, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5754, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5731, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5754, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); @@ -72450,59 +72496,59 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_8__repr__(CYTHON_UNUSED __pyx_t_3 = 0; __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":5730 + /* "netCDF4/_netCDF4.pyx":5753 * attrs = [' %s: %s\n' % (name,self.__dict__[name]) for name in\ * self.ncattrs()] * ncdump_var.append('%s %s%s\n' %\ # <<<<<<<<<<<<<< * (self.dtype,self._name,dimnames)) * ncdump_var = ncdump_var + attrs */ - __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_s_s_s_2, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5730, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_s_s_s_2, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5753, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_6); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 5730, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_6); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 5753, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":5732 + /* "netCDF4/_netCDF4.pyx":5755 * ncdump_var.append('%s %s%s\n' %\ * (self.dtype,self._name,dimnames)) * ncdump_var = ncdump_var + attrs # <<<<<<<<<<<<<< * unlimdims = [] * for dimname in self.dimensions: */ - __pyx_t_6 = PyNumber_Add(__pyx_v_ncdump_var, __pyx_v_attrs); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5732, __pyx_L1_error) + __pyx_t_6 = PyNumber_Add(__pyx_v_ncdump_var, __pyx_v_attrs); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5755, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_ncdump_var, ((PyObject*)__pyx_t_6)); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":5733 + /* "netCDF4/_netCDF4.pyx":5756 * (self.dtype,self._name,dimnames)) * ncdump_var = ncdump_var + attrs * unlimdims = [] # <<<<<<<<<<<<<< * for dimname in self.dimensions: * dim = _find_dim(self._grp, dimname) */ - __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5733, __pyx_L1_error) + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5756, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_unlimdims = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":5734 + /* "netCDF4/_netCDF4.pyx":5757 * ncdump_var = ncdump_var + attrs * unlimdims = [] * for dimname in self.dimensions: # <<<<<<<<<<<<<< * dim = _find_dim(self._grp, dimname) * if dim.isunlimited(): */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5734, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5757, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) { __pyx_t_1 = __pyx_t_6; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5734, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5757, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5734, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5757, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; for (;;) { @@ -72510,17 +72556,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_8__repr__(CYTHON_UNUSED if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 5734, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 5757, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5734, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5757, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 5734, __pyx_L1_error) + __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 5757, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5734, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5757, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } @@ -72530,7 +72576,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_8__repr__(CYTHON_UNUSED 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, 5734, __pyx_L1_error) + else __PYX_ERR(0, 5757, __pyx_L1_error) } break; } @@ -72539,16 +72585,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_8__repr__(CYTHON_UNUSED __Pyx_XDECREF_SET(__pyx_v_dimname, __pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":5735 + /* "netCDF4/_netCDF4.pyx":5758 * unlimdims = [] * for dimname in self.dimensions: * dim = _find_dim(self._grp, dimname) # <<<<<<<<<<<<<< * if dim.isunlimited(): * unlimdims.append(str(dimname)) */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_find_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5735, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_find_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5758, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_grp_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5735, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_grp_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5758, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = NULL; __pyx_t_9 = 0; @@ -72565,7 +72611,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_8__repr__(CYTHON_UNUSED #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_2, __pyx_v_dimname}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5735, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5758, __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; @@ -72574,14 +72620,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_8__repr__(CYTHON_UNUSED #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_2, __pyx_v_dimname}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5735, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5758, __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_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5735, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5758, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; @@ -72592,7 +72638,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_8__repr__(CYTHON_UNUSED __Pyx_GIVEREF(__pyx_v_dimname); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_v_dimname); __pyx_t_2 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5735, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5758, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -72600,14 +72646,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_8__repr__(CYTHON_UNUSED __Pyx_XDECREF_SET(__pyx_v_dim, __pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":5736 + /* "netCDF4/_netCDF4.pyx":5759 * for dimname in self.dimensions: * dim = _find_dim(self._grp, dimname) * if dim.isunlimited(): # <<<<<<<<<<<<<< * unlimdims.append(str(dimname)) * ncdump_var.append('unlimited dimensions = %s\n' % repr(tuple(unlimdims))) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dim, __pyx_n_s_isunlimited); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5736, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dim, __pyx_n_s_isunlimited); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5759, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -72620,36 +72666,36 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_8__repr__(CYTHON_UNUSED } } if (__pyx_t_10) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5736, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5759, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } else { - __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5736, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5759, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5736, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5759, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_11) { - /* "netCDF4/_netCDF4.pyx":5737 + /* "netCDF4/_netCDF4.pyx":5760 * dim = _find_dim(self._grp, dimname) * if dim.isunlimited(): * unlimdims.append(str(dimname)) # <<<<<<<<<<<<<< * ncdump_var.append('unlimited dimensions = %s\n' % repr(tuple(unlimdims))) * ncdump_var.append('current size = %s\n' % repr(self.shape)) */ - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5737, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5760, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_dimname); __Pyx_GIVEREF(__pyx_v_dimname); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_dimname); - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5737, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5760, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_unlimdims, __pyx_t_3); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 5737, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_unlimdims, __pyx_t_3); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 5760, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":5736 + /* "netCDF4/_netCDF4.pyx":5759 * for dimname in self.dimensions: * dim = _find_dim(self._grp, dimname) * if dim.isunlimited(): # <<<<<<<<<<<<<< @@ -72658,7 +72704,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_8__repr__(CYTHON_UNUSED */ } - /* "netCDF4/_netCDF4.pyx":5734 + /* "netCDF4/_netCDF4.pyx":5757 * ncdump_var = ncdump_var + attrs * unlimdims = [] * for dimname in self.dimensions: # <<<<<<<<<<<<<< @@ -72668,43 +72714,43 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_8__repr__(CYTHON_UNUSED } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5738 + /* "netCDF4/_netCDF4.pyx":5761 * if dim.isunlimited(): * unlimdims.append(str(dimname)) * ncdump_var.append('unlimited dimensions = %s\n' % repr(tuple(unlimdims))) # <<<<<<<<<<<<<< * ncdump_var.append('current size = %s\n' % repr(self.shape)) * return ''.join(ncdump_var) */ - __pyx_t_1 = PyList_AsTuple(__pyx_v_unlimdims); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5738, __pyx_L1_error) + __pyx_t_1 = PyList_AsTuple(__pyx_v_unlimdims); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5761, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5738, __pyx_L1_error) + __pyx_t_3 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5761, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_unlimited_dimensions_s_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5738, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_unlimited_dimensions_s_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5761, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_1); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 5738, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_1); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 5761, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5739 + /* "netCDF4/_netCDF4.pyx":5762 * unlimdims.append(str(dimname)) * ncdump_var.append('unlimited dimensions = %s\n' % repr(tuple(unlimdims))) * ncdump_var.append('current size = %s\n' % repr(self.shape)) # <<<<<<<<<<<<<< * return ''.join(ncdump_var) * def __len__(self): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5739, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5739, __pyx_L1_error) + __pyx_t_3 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_current_size_s, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5739, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_current_size_s, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_1); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 5739, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_1); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 5762, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5740 + /* "netCDF4/_netCDF4.pyx":5763 * ncdump_var.append('unlimited dimensions = %s\n' % repr(tuple(unlimdims))) * ncdump_var.append('current size = %s\n' % repr(self.shape)) * return ''.join(ncdump_var) # <<<<<<<<<<<<<< @@ -72712,13 +72758,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_8__repr__(CYTHON_UNUSED * if not self._shape: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__2, __pyx_v_ncdump_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5740, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__2, __pyx_v_ncdump_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5763, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":5725 + /* "netCDF4/_netCDF4.pyx":5748 * except: * raise AttributeError(name) * def __repr__(self): # <<<<<<<<<<<<<< @@ -72749,7 +72795,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_8__repr__(CYTHON_UNUSED return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5741 +/* "netCDF4/_netCDF4.pyx":5764 * ncdump_var.append('current size = %s\n' % repr(self.shape)) * return ''.join(ncdump_var) * def __len__(self): # <<<<<<<<<<<<<< @@ -72781,34 +72827,34 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_10__len__(CYTHON_UNUSED PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__len__", 0); - /* "netCDF4/_netCDF4.pyx":5742 + /* "netCDF4/_netCDF4.pyx":5765 * return ''.join(ncdump_var) * def __len__(self): * if not self._shape: # <<<<<<<<<<<<<< * raise TypeError('len() of unsized object') * else: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shape_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5742, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shape_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5765, __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, 5742, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5765, __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":5743 + /* "netCDF4/_netCDF4.pyx":5766 * 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__120, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5743, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__124, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5766, __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, 5743, __pyx_L1_error) + __PYX_ERR(0, 5766, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5742 + /* "netCDF4/_netCDF4.pyx":5765 * return ''.join(ncdump_var) * def __len__(self): * if not self._shape: # <<<<<<<<<<<<<< @@ -72817,7 +72863,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_10__len__(CYTHON_UNUSED */ } - /* "netCDF4/_netCDF4.pyx":5745 + /* "netCDF4/_netCDF4.pyx":5768 * raise TypeError('len() of unsized object') * else: * return self._shape()[0] # <<<<<<<<<<<<<< @@ -72826,7 +72872,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_10__len__(CYTHON_UNUSED */ /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shape_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5745, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shape_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5768, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -72839,14 +72885,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_10__len__(CYTHON_UNUSED } } if (__pyx_t_5) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5745, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5768, __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, 5745, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5768, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __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, 5745, __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, 5768, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_4; @@ -72854,7 +72900,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_10__len__(CYTHON_UNUSED goto __pyx_L0; } - /* "netCDF4/_netCDF4.pyx":5741 + /* "netCDF4/_netCDF4.pyx":5764 * ncdump_var.append('current size = %s\n' % repr(self.shape)) * return ''.join(ncdump_var) * def __len__(self): # <<<<<<<<<<<<<< @@ -72875,7 +72921,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_10__len__(CYTHON_UNUSED return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5746 +/* "netCDF4/_netCDF4.pyx":5769 * else: * return self._shape()[0] * def _shape(self): # <<<<<<<<<<<<<< @@ -72907,29 +72953,29 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_12_shape(CYTHON_UNUSED P Py_ssize_t __pyx_t_4; __Pyx_RefNannySetupContext("_shape", 0); - /* "netCDF4/_netCDF4.pyx":5747 + /* "netCDF4/_netCDF4.pyx":5770 * return self._shape()[0] * def _shape(self): * recdimlen = len(self._dset.dimensions[self._recdimname]) # <<<<<<<<<<<<<< * return (recdimlen,) + self._mastervar.shape[1:] * def set_auto_maskandscale(self,val): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dset_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5747, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dset_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5770, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5747, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5770, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recdimname_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5747, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recdimname_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5770, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyObject_GetItem(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5747, __pyx_L1_error) + __pyx_t_3 = PyObject_GetItem(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5770, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_4 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 5747, __pyx_L1_error) + __pyx_t_4 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 5770, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_recdimlen = __pyx_t_4; - /* "netCDF4/_netCDF4.pyx":5748 + /* "netCDF4/_netCDF4.pyx":5771 * def _shape(self): * recdimlen = len(self._dset.dimensions[self._recdimname]) * return (recdimlen,) + self._mastervar.shape[1:] # <<<<<<<<<<<<<< @@ -72937,22 +72983,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_12_shape(CYTHON_UNUSED P * for v in self._recVar: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_recdimlen); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5748, __pyx_L1_error) + __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_recdimlen); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5771, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5748, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5771, __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 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mastervar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5748, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mastervar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5771, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5748, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5771, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_2, 1, 0, NULL, NULL, &__pyx_slice__121, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5748, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_2, 1, 0, NULL, NULL, &__pyx_slice__125, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5771, __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, 5748, __pyx_L1_error) + __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5771, __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; @@ -72960,7 +73006,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_12_shape(CYTHON_UNUSED P __pyx_t_2 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":5746 + /* "netCDF4/_netCDF4.pyx":5769 * else: * return self._shape()[0] * def _shape(self): # <<<<<<<<<<<<<< @@ -72981,7 +73027,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_12_shape(CYTHON_UNUSED P return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5749 +/* "netCDF4/_netCDF4.pyx":5772 * recdimlen = len(self._dset.dimensions[self._recdimname]) * return (recdimlen,) + self._mastervar.shape[1:] * def set_auto_maskandscale(self,val): # <<<<<<<<<<<<<< @@ -73018,11 +73064,11 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9_Variable_15set_auto_maskandscale( case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_val)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("set_auto_maskandscale", 1, 2, 2, 1); __PYX_ERR(0, 5749, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_auto_maskandscale", 1, 2, 2, 1); __PYX_ERR(0, 5772, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_auto_maskandscale") < 0)) __PYX_ERR(0, 5749, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_auto_maskandscale") < 0)) __PYX_ERR(0, 5772, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -73035,7 +73081,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9_Variable_15set_auto_maskandscale( } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("set_auto_maskandscale", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5749, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_auto_maskandscale", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5772, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("netCDF4._netCDF4._Variable.set_auto_maskandscale", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -73061,22 +73107,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_14set_auto_maskandscale( PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("set_auto_maskandscale", 0); - /* "netCDF4/_netCDF4.pyx":5750 + /* "netCDF4/_netCDF4.pyx":5773 * return (recdimlen,) + self._mastervar.shape[1:] * def set_auto_maskandscale(self,val): * for v in self._recVar: # <<<<<<<<<<<<<< * v.set_auto_maskandscale(val) * def set_auto_mask(self,val): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recVar); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5750, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recVar); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5773, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5750, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5773, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5750, __pyx_L1_error) + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5773, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -73084,17 +73130,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_14set_auto_maskandscale( if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 5750, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 5773, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5750, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5773, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 5750, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 5773, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5750, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5773, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -73104,7 +73150,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_14set_auto_maskandscale( 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, 5750, __pyx_L1_error) + else __PYX_ERR(0, 5773, __pyx_L1_error) } break; } @@ -73113,14 +73159,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_14set_auto_maskandscale( __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5751 + /* "netCDF4/_netCDF4.pyx":5774 * def set_auto_maskandscale(self,val): * for v in self._recVar: * v.set_auto_maskandscale(val) # <<<<<<<<<<<<<< * def set_auto_mask(self,val): * for v in self._recVar: */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_set_auto_maskandscale); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5751, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_set_auto_maskandscale); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5774, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -73133,13 +73179,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_14set_auto_maskandscale( } } if (!__pyx_t_6) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5751, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5774, __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_6, __pyx_v_val}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5751, __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, 5774, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -73147,19 +73193,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_14set_auto_maskandscale( #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_val}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5751, __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, 5774, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5751, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5774, __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_INCREF(__pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_val); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5751, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5774, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -73167,7 +73213,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_14set_auto_maskandscale( __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5750 + /* "netCDF4/_netCDF4.pyx":5773 * return (recdimlen,) + self._mastervar.shape[1:] * def set_auto_maskandscale(self,val): * for v in self._recVar: # <<<<<<<<<<<<<< @@ -73177,7 +73223,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_14set_auto_maskandscale( } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5749 + /* "netCDF4/_netCDF4.pyx":5772 * recdimlen = len(self._dset.dimensions[self._recdimname]) * return (recdimlen,) + self._mastervar.shape[1:] * def set_auto_maskandscale(self,val): # <<<<<<<<<<<<<< @@ -73203,7 +73249,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_14set_auto_maskandscale( return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5752 +/* "netCDF4/_netCDF4.pyx":5775 * for v in self._recVar: * v.set_auto_maskandscale(val) * def set_auto_mask(self,val): # <<<<<<<<<<<<<< @@ -73240,11 +73286,11 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9_Variable_17set_auto_mask(PyObject case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_val)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("set_auto_mask", 1, 2, 2, 1); __PYX_ERR(0, 5752, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_auto_mask", 1, 2, 2, 1); __PYX_ERR(0, 5775, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_auto_mask") < 0)) __PYX_ERR(0, 5752, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_auto_mask") < 0)) __PYX_ERR(0, 5775, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -73257,7 +73303,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9_Variable_17set_auto_mask(PyObject } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("set_auto_mask", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5752, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_auto_mask", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5775, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("netCDF4._netCDF4._Variable.set_auto_mask", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -73283,22 +73329,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16set_auto_mask(CYTHON_U PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("set_auto_mask", 0); - /* "netCDF4/_netCDF4.pyx":5753 + /* "netCDF4/_netCDF4.pyx":5776 * v.set_auto_maskandscale(val) * def set_auto_mask(self,val): * for v in self._recVar: # <<<<<<<<<<<<<< * v.set_auto_mask(val) * def set_auto_scale(self,val): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recVar); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5753, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recVar); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5776, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5753, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5776, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5753, __pyx_L1_error) + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5776, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -73306,17 +73352,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16set_auto_mask(CYTHON_U if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 5753, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 5776, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5753, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5776, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 5753, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 5776, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5753, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5776, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -73326,7 +73372,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16set_auto_mask(CYTHON_U 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, 5753, __pyx_L1_error) + else __PYX_ERR(0, 5776, __pyx_L1_error) } break; } @@ -73335,14 +73381,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16set_auto_mask(CYTHON_U __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5754 + /* "netCDF4/_netCDF4.pyx":5777 * def set_auto_mask(self,val): * for v in self._recVar: * v.set_auto_mask(val) # <<<<<<<<<<<<<< * def set_auto_scale(self,val): * for v in self._recVar: */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_set_auto_mask); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5754, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_set_auto_mask); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5777, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -73355,13 +73401,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16set_auto_mask(CYTHON_U } } if (!__pyx_t_6) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5754, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5777, __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_6, __pyx_v_val}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5754, __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, 5777, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -73369,19 +73415,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16set_auto_mask(CYTHON_U #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_val}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5754, __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, 5777, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5754, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5777, __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_INCREF(__pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_val); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5754, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5777, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -73389,7 +73435,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16set_auto_mask(CYTHON_U __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5753 + /* "netCDF4/_netCDF4.pyx":5776 * v.set_auto_maskandscale(val) * def set_auto_mask(self,val): * for v in self._recVar: # <<<<<<<<<<<<<< @@ -73399,7 +73445,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16set_auto_mask(CYTHON_U } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5752 + /* "netCDF4/_netCDF4.pyx":5775 * for v in self._recVar: * v.set_auto_maskandscale(val) * def set_auto_mask(self,val): # <<<<<<<<<<<<<< @@ -73425,7 +73471,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16set_auto_mask(CYTHON_U return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5755 +/* "netCDF4/_netCDF4.pyx":5778 * for v in self._recVar: * v.set_auto_mask(val) * def set_auto_scale(self,val): # <<<<<<<<<<<<<< @@ -73462,11 +73508,11 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9_Variable_19set_auto_scale(PyObjec case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_val)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("set_auto_scale", 1, 2, 2, 1); __PYX_ERR(0, 5755, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_auto_scale", 1, 2, 2, 1); __PYX_ERR(0, 5778, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_auto_scale") < 0)) __PYX_ERR(0, 5755, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_auto_scale") < 0)) __PYX_ERR(0, 5778, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -73479,7 +73525,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9_Variable_19set_auto_scale(PyObjec } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("set_auto_scale", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5755, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_auto_scale", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5778, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("netCDF4._netCDF4._Variable.set_auto_scale", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -73505,22 +73551,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_18set_auto_scale(CYTHON_ PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("set_auto_scale", 0); - /* "netCDF4/_netCDF4.pyx":5756 + /* "netCDF4/_netCDF4.pyx":5779 * v.set_auto_mask(val) * def set_auto_scale(self,val): * for v in self._recVar: # <<<<<<<<<<<<<< * v.set_auto_scale(val) * def __getitem__(self, elem): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recVar); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5756, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recVar); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5756, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5756, __pyx_L1_error) + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5779, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -73528,17 +73574,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_18set_auto_scale(CYTHON_ if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 5756, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 5779, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5756, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 5756, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 5779, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5756, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -73548,7 +73594,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_18set_auto_scale(CYTHON_ 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, 5756, __pyx_L1_error) + else __PYX_ERR(0, 5779, __pyx_L1_error) } break; } @@ -73557,14 +73603,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_18set_auto_scale(CYTHON_ __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5757 + /* "netCDF4/_netCDF4.pyx":5780 * def set_auto_scale(self,val): * for v in self._recVar: * v.set_auto_scale(val) # <<<<<<<<<<<<<< * def __getitem__(self, elem): * """Get records from a concatenated set of variables.""" */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_set_auto_scale); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5757, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_set_auto_scale); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5780, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -73577,13 +73623,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_18set_auto_scale(CYTHON_ } } if (!__pyx_t_6) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5757, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5780, __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_6, __pyx_v_val}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5757, __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, 5780, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -73591,19 +73637,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_18set_auto_scale(CYTHON_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_val}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5757, __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, 5780, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5757, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5780, __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_INCREF(__pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_val); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5757, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5780, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -73611,7 +73657,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_18set_auto_scale(CYTHON_ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5756 + /* "netCDF4/_netCDF4.pyx":5779 * v.set_auto_mask(val) * def set_auto_scale(self,val): * for v in self._recVar: # <<<<<<<<<<<<<< @@ -73621,7 +73667,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_18set_auto_scale(CYTHON_ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5755 + /* "netCDF4/_netCDF4.pyx":5778 * for v in self._recVar: * v.set_auto_mask(val) * def set_auto_scale(self,val): # <<<<<<<<<<<<<< @@ -73647,7 +73693,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_18set_auto_scale(CYTHON_ return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5758 +/* "netCDF4/_netCDF4.pyx":5781 * for v in self._recVar: * v.set_auto_scale(val) * def __getitem__(self, elem): # <<<<<<<<<<<<<< @@ -73685,11 +73731,11 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9_Variable_21__getitem__(PyObject * case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_elem)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, 1); __PYX_ERR(0, 5758, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, 1); __PYX_ERR(0, 5781, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getitem__") < 0)) __PYX_ERR(0, 5758, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getitem__") < 0)) __PYX_ERR(0, 5781, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -73702,7 +73748,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9_Variable_21__getitem__(PyObject * } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5758, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5781, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("netCDF4._netCDF4._Variable.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -73771,16 +73817,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU int __pyx_t_23; __Pyx_RefNannySetupContext("__getitem__", 0); - /* "netCDF4/_netCDF4.pyx":5767 + /* "netCDF4/_netCDF4.pyx":5790 * # to use. * start, count, stride, put_ind =\ * _StartCountStride(elem, self.shape) # <<<<<<<<<<<<<< * datashape = _out_array_shape(count) * data = ma.empty(datashape, dtype=self.dtype) */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_StartCountStride); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5767, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_StartCountStride); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5790, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5767, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5790, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -73797,7 +73843,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_elem, __pyx_t_3}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5767, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5790, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -73806,14 +73852,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_elem, __pyx_t_3}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5767, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5790, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5767, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5790, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -73824,7 +73870,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __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, 5767, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5790, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -73839,7 +73885,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU if (unlikely(size != 4)) { if (size > 4) __Pyx_RaiseTooManyValuesError(4); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 5766, __pyx_L1_error) + __PYX_ERR(0, 5789, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -73862,7 +73908,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU Py_ssize_t i; PyObject** temps[4] = {&__pyx_t_2,&__pyx_t_6,&__pyx_t_3,&__pyx_t_4}; for (i=0; i < 4; i++) { - PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 5766, __pyx_L1_error) + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 5789, __pyx_L1_error) __Pyx_GOTREF(item); *(temps[i]) = item; } @@ -73872,7 +73918,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU } else { Py_ssize_t index = -1; PyObject** temps[4] = {&__pyx_t_2,&__pyx_t_6,&__pyx_t_3,&__pyx_t_4}; - __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5766, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5789, __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; @@ -73881,7 +73927,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __Pyx_GOTREF(item); *(temps[index]) = item; } - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 4) < 0) __PYX_ERR(0, 5766, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 4) < 0) __PYX_ERR(0, 5789, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4_unpacking_done; @@ -73889,11 +73935,11 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 5766, __pyx_L1_error) + __PYX_ERR(0, 5789, __pyx_L1_error) __pyx_L4_unpacking_done:; } - /* "netCDF4/_netCDF4.pyx":5766 + /* "netCDF4/_netCDF4.pyx":5789 * # arguments to the nc_get_var() function, and is much more easy * # to use. * start, count, stride, put_ind =\ # <<<<<<<<<<<<<< @@ -73909,14 +73955,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __pyx_v_put_ind = __pyx_t_4; __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":5768 + /* "netCDF4/_netCDF4.pyx":5791 * start, count, stride, put_ind =\ * _StartCountStride(elem, self.shape) * datashape = _out_array_shape(count) # <<<<<<<<<<<<<< * data = ma.empty(datashape, dtype=self.dtype) * */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_out_array_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5768, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_out_array_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5791, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -73929,13 +73975,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU } } if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_count); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5768, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_count); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5791, __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_count}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5768, __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, 5791, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -73943,19 +73989,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_count}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5768, __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, 5791, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5768, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5791, __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_count); __Pyx_GIVEREF(__pyx_v_count); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_count); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5768, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5791, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -73964,30 +74010,30 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __pyx_v_datashape = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5769 + /* "netCDF4/_netCDF4.pyx":5792 * _StartCountStride(elem, self.shape) * datashape = _out_array_shape(count) * data = ma.empty(datashape, dtype=self.dtype) # <<<<<<<<<<<<<< * * # Determine which dimensions need to be squeezed */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5769, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5792, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5769, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5792, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5769, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5792, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_datashape); __Pyx_GIVEREF(__pyx_v_datashape); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_datashape); - __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5769, __pyx_L1_error) + __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5792, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5769, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5792, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(0, 5769, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(0, 5792, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5769, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5792, __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; @@ -73995,28 +74041,28 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __pyx_v_data = __pyx_t_3; __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":5775 + /* "netCDF4/_netCDF4.pyx":5798 * # The convention used is that for those cases, * # put_ind for this dimension is set to -1 by _StartCountStride. * squeeze = data.ndim * [slice(None),] # <<<<<<<<<<<<<< * for i,n in enumerate(put_ind.shape[:-1]): * if n == 1 and put_ind[...,i].ravel()[0] == -1: */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5775, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5798, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5775, __pyx_L1_error) + __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5798, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_INCREF(__pyx_slice__122); - __Pyx_GIVEREF(__pyx_slice__122); - PyList_SET_ITEM(__pyx_t_6, 0, __pyx_slice__122); - __pyx_t_1 = PyNumber_Multiply(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5775, __pyx_L1_error) + __Pyx_INCREF(__pyx_slice__126); + __Pyx_GIVEREF(__pyx_slice__126); + PyList_SET_ITEM(__pyx_t_6, 0, __pyx_slice__126); + __pyx_t_1 = PyNumber_Multiply(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5798, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_squeeze = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5776 + /* "netCDF4/_netCDF4.pyx":5799 * # put_ind for this dimension is set to -1 by _StartCountStride. * squeeze = data.ndim * [slice(None),] * for i,n in enumerate(put_ind.shape[:-1]): # <<<<<<<<<<<<<< @@ -74025,18 +74071,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU */ __Pyx_INCREF(__pyx_int_0); __pyx_t_1 = __pyx_int_0; - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_put_ind, __pyx_n_s_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5776, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_put_ind, __pyx_n_s_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5799, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_6, 0, -1L, NULL, NULL, &__pyx_slice__123, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5776, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_6, 0, -1L, NULL, NULL, &__pyx_slice__127, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5799, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_6 = __pyx_t_3; __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_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5776, __pyx_L1_error) + __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5799, __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, 5776, __pyx_L1_error) + __pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5799, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -74044,17 +74090,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU 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_3 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 5776, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 5799, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5776, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5799, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 5776, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 5799, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5776, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5799, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } @@ -74064,7 +74110,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU 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, 5776, __pyx_L1_error) + else __PYX_ERR(0, 5799, __pyx_L1_error) } break; } @@ -74074,29 +74120,29 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __pyx_t_3 = 0; __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1); - __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5776, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5799, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":5777 + /* "netCDF4/_netCDF4.pyx":5800 * squeeze = data.ndim * [slice(None),] * for i,n in enumerate(put_ind.shape[:-1]): * if n == 1 and put_ind[...,i].ravel()[0] == -1: # <<<<<<<<<<<<<< * squeeze[i] = 0 * */ - __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_v_n, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5777, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_v_n, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5800, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 5777, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 5800, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_12) { } else { __pyx_t_11 = __pyx_t_12; goto __pyx_L8_bool_binop_done; } - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5777, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5800, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(Py_Ellipsis); __Pyx_GIVEREF(Py_Ellipsis); @@ -74104,10 +74150,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __Pyx_INCREF(__pyx_v_i); __Pyx_GIVEREF(__pyx_v_i); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_i); - __pyx_t_2 = PyObject_GetItem(__pyx_v_put_ind, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5777, __pyx_L1_error) + __pyx_t_2 = PyObject_GetItem(__pyx_v_put_ind, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5800, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ravel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5777, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ravel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5800, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -74121,35 +74167,35 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU } } if (__pyx_t_2) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5777, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5800, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5777, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5800, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5777, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5800, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_t_4, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5777, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_t_4, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5800, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 5777, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 5800, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_11 = __pyx_t_12; __pyx_L8_bool_binop_done:; if (__pyx_t_11) { - /* "netCDF4/_netCDF4.pyx":5778 + /* "netCDF4/_netCDF4.pyx":5801 * for i,n in enumerate(put_ind.shape[:-1]): * if n == 1 and put_ind[...,i].ravel()[0] == -1: * squeeze[i] = 0 # <<<<<<<<<<<<<< * * # Reshape the arrays so we can iterate over them. */ - if (unlikely(PyObject_SetItem(__pyx_v_squeeze, __pyx_v_i, __pyx_int_0) < 0)) __PYX_ERR(0, 5778, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v_squeeze, __pyx_v_i, __pyx_int_0) < 0)) __PYX_ERR(0, 5801, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5777 + /* "netCDF4/_netCDF4.pyx":5800 * squeeze = data.ndim * [slice(None),] * for i,n in enumerate(put_ind.shape[:-1]): * if n == 1 and put_ind[...,i].ravel()[0] == -1: # <<<<<<<<<<<<<< @@ -74158,7 +74204,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU */ } - /* "netCDF4/_netCDF4.pyx":5776 + /* "netCDF4/_netCDF4.pyx":5799 * # put_ind for this dimension is set to -1 by _StartCountStride. * squeeze = data.ndim * [slice(None),] * for i,n in enumerate(put_ind.shape[:-1]): # <<<<<<<<<<<<<< @@ -74169,18 +74215,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5781 + /* "netCDF4/_netCDF4.pyx":5804 * * # Reshape the arrays so we can iterate over them. * strt = start.reshape((-1, self.ndim or 1)) # <<<<<<<<<<<<<< * cnt = count.reshape((-1, self.ndim or 1)) * strd = stride.reshape((-1, self.ndim or 1)) */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_start, __pyx_n_s_reshape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5781, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_start, __pyx_n_s_reshape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5804, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ndim); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5781, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ndim); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5804, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5781, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5804, __pyx_L1_error) if (!__pyx_t_11) { __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { @@ -74189,12 +74235,12 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L10_bool_binop_done; } - __pyx_t_4 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5781, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5804, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __pyx_t_4; __pyx_t_4 = 0; __pyx_L10_bool_binop_done:; - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5781, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5804, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); @@ -74213,14 +74259,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU } } if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5781, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5804, __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_6)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5781, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5804, __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; @@ -74229,20 +74275,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5781, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5804, __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_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5781, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5804, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5781, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5804, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -74251,18 +74297,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __pyx_v_strt = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5782 + /* "netCDF4/_netCDF4.pyx":5805 * # Reshape the arrays so we can iterate over them. * strt = start.reshape((-1, self.ndim or 1)) * cnt = count.reshape((-1, self.ndim or 1)) # <<<<<<<<<<<<<< * strd = stride.reshape((-1, self.ndim or 1)) * put_ind = put_ind.reshape((-1, self.ndim or 1)) */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_count, __pyx_n_s_reshape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5782, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_count, __pyx_n_s_reshape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5805, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ndim); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5782, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ndim); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5805, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5782, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5805, __pyx_L1_error) if (!__pyx_t_11) { __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { @@ -74271,12 +74317,12 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L12_bool_binop_done; } - __pyx_t_4 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5782, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5805, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __pyx_t_4; __pyx_t_4 = 0; __pyx_L12_bool_binop_done:; - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5782, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5805, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); @@ -74295,14 +74341,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU } } if (!__pyx_t_2) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5782, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5805, __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_6)) { PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5782, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5805, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -74311,20 +74357,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5782, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5805, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { - __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5782, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5805, __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_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5782, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5805, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -74333,18 +74379,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __pyx_v_cnt = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5783 + /* "netCDF4/_netCDF4.pyx":5806 * strt = start.reshape((-1, self.ndim or 1)) * cnt = count.reshape((-1, self.ndim or 1)) * strd = stride.reshape((-1, self.ndim or 1)) # <<<<<<<<<<<<<< * put_ind = put_ind.reshape((-1, self.ndim or 1)) * */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_stride, __pyx_n_s_reshape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5783, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_stride, __pyx_n_s_reshape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5806, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ndim); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5783, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ndim); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5806, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5783, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5806, __pyx_L1_error) if (!__pyx_t_11) { __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { @@ -74353,12 +74399,12 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L14_bool_binop_done; } - __pyx_t_4 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5783, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5806, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __pyx_t_4; __pyx_t_4 = 0; __pyx_L14_bool_binop_done:; - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5783, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5806, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); @@ -74377,14 +74423,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU } } if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5783, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5806, __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_6)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5783, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5806, __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; @@ -74393,20 +74439,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5783, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5806, __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_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5783, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5806, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5783, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5806, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -74415,18 +74461,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __pyx_v_strd = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5784 + /* "netCDF4/_netCDF4.pyx":5807 * cnt = count.reshape((-1, self.ndim or 1)) * strd = stride.reshape((-1, self.ndim or 1)) * put_ind = put_ind.reshape((-1, self.ndim or 1)) # <<<<<<<<<<<<<< * * # Fill output array with data chunks. */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_put_ind, __pyx_n_s_reshape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5784, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_put_ind, __pyx_n_s_reshape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ndim); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5784, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ndim); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5784, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5807, __pyx_L1_error) if (!__pyx_t_11) { __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { @@ -74435,12 +74481,12 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L16_bool_binop_done; } - __pyx_t_4 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5784, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __pyx_t_4; __pyx_t_4 = 0; __pyx_L16_bool_binop_done:; - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5784, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); @@ -74459,14 +74505,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU } } if (!__pyx_t_2) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5784, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5807, __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_6)) { PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5784, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5807, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -74475,20 +74521,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5784, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5807, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { - __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5784, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5807, __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_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5784, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -74497,27 +74543,27 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __Pyx_DECREF_SET(__pyx_v_put_ind, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5788 + /* "netCDF4/_netCDF4.pyx":5811 * # Fill output array with data chunks. * # Number of variables making up the MFVariable.Variable. * nv = len(self._recLen) # <<<<<<<<<<<<<< * for (start,count,stride,ind) in zip(strt, cnt, strd, put_ind): * # make sure count=-1 becomes count=1 */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recLen); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5788, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recLen); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5811, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 5788, __pyx_L1_error) + __pyx_t_9 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 5811, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_nv = __pyx_t_9; - /* "netCDF4/_netCDF4.pyx":5789 + /* "netCDF4/_netCDF4.pyx":5812 * # Number of variables making up the MFVariable.Variable. * nv = len(self._recLen) * for (start,count,stride,ind) in zip(strt, cnt, strd, put_ind): # <<<<<<<<<<<<<< * # make sure count=-1 becomes count=1 * count = [abs(cnt) for cnt in count] */ - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5789, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5812, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = NULL; __pyx_t_5 = 0; @@ -74534,7 +74580,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[5] = {__pyx_t_3, __pyx_v_strt, __pyx_v_cnt, __pyx_v_strd, __pyx_v_put_ind}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5789, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5812, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -74542,13 +74588,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[5] = {__pyx_t_3, __pyx_v_strt, __pyx_v_cnt, __pyx_v_strd, __pyx_v_put_ind}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5789, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5812, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_4 = PyTuple_New(4+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5789, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(4+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5812, __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; @@ -74565,7 +74611,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __Pyx_INCREF(__pyx_v_put_ind); __Pyx_GIVEREF(__pyx_v_put_ind); PyTuple_SET_ITEM(__pyx_t_4, 3+__pyx_t_5, __pyx_v_put_ind); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5789, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5812, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -74574,9 +74620,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __pyx_t_6 = __pyx_t_1; __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_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5789, __pyx_L1_error) + __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5812, __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, 5789, __pyx_L1_error) + __pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5812, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -74584,17 +74630,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU 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_1 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 5789, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 5812, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5789, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5812, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_9 >= 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_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 5789, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 5812, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5789, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5812, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -74604,7 +74650,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU 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, 5789, __pyx_L1_error) + else __PYX_ERR(0, 5812, __pyx_L1_error) } break; } @@ -74620,7 +74666,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU if (unlikely(size != 4)) { if (size > 4) __Pyx_RaiseTooManyValuesError(4); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 5789, __pyx_L1_error) + __PYX_ERR(0, 5812, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -74643,7 +74689,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU Py_ssize_t i; PyObject** temps[4] = {&__pyx_t_4,&__pyx_t_3,&__pyx_t_2,&__pyx_t_7}; for (i=0; i < 4; i++) { - PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 5789, __pyx_L1_error) + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 5812, __pyx_L1_error) __Pyx_GOTREF(item); *(temps[i]) = item; } @@ -74653,7 +74699,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU } else { Py_ssize_t index = -1; PyObject** temps[4] = {&__pyx_t_4,&__pyx_t_3,&__pyx_t_2,&__pyx_t_7}; - __pyx_t_13 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5789, __pyx_L1_error) + __pyx_t_13 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5812, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_13)->tp_iternext; @@ -74662,7 +74708,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __Pyx_GOTREF(item); *(temps[index]) = item; } - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_13), 4) < 0) __PYX_ERR(0, 5789, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_13), 4) < 0) __PYX_ERR(0, 5812, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L21_unpacking_done; @@ -74670,7 +74716,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 5789, __pyx_L1_error) + __PYX_ERR(0, 5812, __pyx_L1_error) __pyx_L21_unpacking_done:; } __Pyx_DECREF_SET(__pyx_v_start, __pyx_t_4); @@ -74682,39 +74728,39 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __Pyx_XDECREF_SET(__pyx_v_ind, __pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5791 + /* "netCDF4/_netCDF4.pyx":5814 * for (start,count,stride,ind) in zip(strt, cnt, strd, put_ind): * # make sure count=-1 becomes count=1 * count = [abs(cnt) for cnt in count] # <<<<<<<<<<<<<< * if (numpy.array(stride) < 0).any(): * raise IndexError('negative strides not allowed when slicing MFVariable Variable instance') */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5791, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5814, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_v_count)) || PyTuple_CheckExact(__pyx_v_count)) { __pyx_t_7 = __pyx_v_count; __Pyx_INCREF(__pyx_t_7); __pyx_t_14 = 0; __pyx_t_15 = NULL; } else { - __pyx_t_14 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_count); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5791, __pyx_L1_error) + __pyx_t_14 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_count); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5814, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_15 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5791, __pyx_L1_error) + __pyx_t_15 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5814, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_15)) { if (likely(PyList_CheckExact(__pyx_t_7))) { if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_14); __Pyx_INCREF(__pyx_t_2); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 5791, __pyx_L1_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_14); __Pyx_INCREF(__pyx_t_2); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 5814, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5791, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5814, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_14 >= PyTuple_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_14); __Pyx_INCREF(__pyx_t_2); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 5791, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_14); __Pyx_INCREF(__pyx_t_2); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 5814, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5791, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5814, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } @@ -74724,7 +74770,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU 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, 5791, __pyx_L1_error) + else __PYX_ERR(0, 5814, __pyx_L1_error) } break; } @@ -74732,25 +74778,25 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU } __Pyx_DECREF_SET(__pyx_v_cnt, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyNumber_Absolute(__pyx_v_cnt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5791, __pyx_L1_error) + __pyx_t_2 = PyNumber_Absolute(__pyx_v_cnt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5814, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 5791, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 5814, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF_SET(__pyx_v_count, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5792 + /* "netCDF4/_netCDF4.pyx":5815 * # make sure count=-1 becomes count=1 * count = [abs(cnt) for cnt in count] * if (numpy.array(stride) < 0).any(): # <<<<<<<<<<<<<< * raise IndexError('negative strides not allowed when slicing MFVariable Variable instance') * # Start, stop and step along 1st dimension, eg the unlimited */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5792, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5815, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5792, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5815, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -74764,13 +74810,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU } } if (!__pyx_t_2) { - __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_stride); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5792, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_stride); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5815, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_stride}; - __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5792, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5815, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_7); } else @@ -74778,27 +74824,27 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_stride}; - __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5792, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5815, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_7); } else #endif { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5792, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5815, __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_stride); __Pyx_GIVEREF(__pyx_v_stride); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_stride); - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5792, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5815, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_RichCompare(__pyx_t_7, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5792, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_7, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5815, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_any); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5792, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_any); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5815, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -74812,31 +74858,31 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5792, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5815, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5792, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5815, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5792, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5815, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_11) { - /* "netCDF4/_netCDF4.pyx":5793 + /* "netCDF4/_netCDF4.pyx":5816 * count = [abs(cnt) for cnt in count] * if (numpy.array(stride) < 0).any(): * raise IndexError('negative strides not allowed when slicing MFVariable Variable instance') # <<<<<<<<<<<<<< * # Start, stop and step along 1st dimension, eg the unlimited * # dimension. */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__124, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5793, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__128, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5816, __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, 5793, __pyx_L1_error) + __PYX_ERR(0, 5816, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5792 + /* "netCDF4/_netCDF4.pyx":5815 * # make sure count=-1 becomes count=1 * count = [abs(cnt) for cnt in count] * if (numpy.array(stride) < 0).any(): # <<<<<<<<<<<<<< @@ -74845,96 +74891,96 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU */ } - /* "netCDF4/_netCDF4.pyx":5796 + /* "netCDF4/_netCDF4.pyx":5819 * # Start, stop and step along 1st dimension, eg the unlimited * # dimension. * sta = start[0] # <<<<<<<<<<<<<< * step = stride[0] * stop = sta + count[0] * step */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_start, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5796, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_start, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5819, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_sta, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5797 + /* "netCDF4/_netCDF4.pyx":5820 * # dimension. * sta = start[0] * step = stride[0] # <<<<<<<<<<<<<< * stop = sta + count[0] * step * */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_stride, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5797, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_stride, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5820, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_step, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5798 + /* "netCDF4/_netCDF4.pyx":5821 * sta = start[0] * step = stride[0] * stop = sta + count[0] * step # <<<<<<<<<<<<<< * * # Build a list representing the concatenated list of all records in */ - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_count, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5798, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_count, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5821, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = PyNumber_Multiply(__pyx_t_1, __pyx_v_step); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5798, __pyx_L1_error) + __pyx_t_7 = PyNumber_Multiply(__pyx_t_1, __pyx_v_step); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5821, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Add(__pyx_v_sta, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5798, __pyx_L1_error) + __pyx_t_1 = PyNumber_Add(__pyx_v_sta, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5821, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF_SET(__pyx_v_stop, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5805 + /* "netCDF4/_netCDF4.pyx":5828 * # the record index inside the variables, from 0 to n * # the index of the Variable instance to which each record belongs * idx = [] # list of record indices # <<<<<<<<<<<<<< * vid = [] # list of Variable indices * for n in range(nv): */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5805, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5828, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_idx, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5806 + /* "netCDF4/_netCDF4.pyx":5829 * # the index of the Variable instance to which each record belongs * idx = [] # list of record indices * vid = [] # list of Variable indices # <<<<<<<<<<<<<< * for n in range(nv): * k = self._recLen[n] # number of records in this variable */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5806, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5829, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_vid, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5807 + /* "netCDF4/_netCDF4.pyx":5830 * idx = [] # list of record indices * vid = [] # list of Variable indices * for n in range(nv): # <<<<<<<<<<<<<< * k = self._recLen[n] # number of records in this variable * idx.extend(range(k)) */ - __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_nv); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5807, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_nv); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5830, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5807, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5830, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5807, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5830, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_7 = __pyx_t_1; __Pyx_INCREF(__pyx_t_7); __pyx_t_14 = 0; __pyx_t_15 = NULL; } else { - __pyx_t_14 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5807, __pyx_L1_error) + __pyx_t_14 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5830, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_15 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5807, __pyx_L1_error) + __pyx_t_15 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5830, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -74942,17 +74988,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU if (likely(PyList_CheckExact(__pyx_t_7))) { if (__pyx_t_14 >= 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_14); __Pyx_INCREF(__pyx_t_1); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 5807, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_14); __Pyx_INCREF(__pyx_t_1); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 5830, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_7, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5807, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_7, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5830, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_14 >= 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_14); __Pyx_INCREF(__pyx_t_1); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 5807, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_14); __Pyx_INCREF(__pyx_t_1); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 5830, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_7, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5807, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_7, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5830, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -74962,7 +75008,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU 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, 5807, __pyx_L1_error) + else __PYX_ERR(0, 5830, __pyx_L1_error) } break; } @@ -74971,60 +75017,60 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5808 + /* "netCDF4/_netCDF4.pyx":5831 * vid = [] # list of Variable indices * for n in range(nv): * k = self._recLen[n] # number of records in this variable # <<<<<<<<<<<<<< * idx.extend(range(k)) * vid.extend([n] * k) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recLen); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5808, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recLen); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5831, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyObject_GetItem(__pyx_t_1, __pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5808, __pyx_L1_error) + __pyx_t_3 = PyObject_GetItem(__pyx_t_1, __pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5831, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":5809 + /* "netCDF4/_netCDF4.pyx":5832 * for n in range(nv): * k = self._recLen[n] # number of records in this variable * idx.extend(range(k)) # <<<<<<<<<<<<<< * vid.extend([n] * k) * */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5809, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5832, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_k); __Pyx_GIVEREF(__pyx_v_k); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_k); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5809, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5832, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_16 = __Pyx_PyList_Extend(__pyx_v_idx, __pyx_t_1); if (unlikely(__pyx_t_16 == -1)) __PYX_ERR(0, 5809, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyList_Extend(__pyx_v_idx, __pyx_t_1); if (unlikely(__pyx_t_16 == -1)) __PYX_ERR(0, 5832, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5810 + /* "netCDF4/_netCDF4.pyx":5833 * k = self._recLen[n] # number of records in this variable * idx.extend(range(k)) * vid.extend([n] * k) # <<<<<<<<<<<<<< * * # Merge the two lists to get a list of 2-elem lists. */ - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5810, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5833, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_n); __Pyx_GIVEREF(__pyx_v_n); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_n); - { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_1, __pyx_v_k); if (unlikely(!__pyx_temp)) __PYX_ERR(0, 5810, __pyx_L1_error) + { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_1, __pyx_v_k); if (unlikely(!__pyx_temp)) __PYX_ERR(0, 5833, __pyx_L1_error) __Pyx_GOTREF(__pyx_temp); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = __pyx_temp; } - __pyx_t_16 = __Pyx_PyList_Extend(__pyx_v_vid, __pyx_t_1); if (unlikely(__pyx_t_16 == -1)) __PYX_ERR(0, 5810, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyList_Extend(__pyx_v_vid, __pyx_t_1); if (unlikely(__pyx_t_16 == -1)) __PYX_ERR(0, 5833, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5807 + /* "netCDF4/_netCDF4.pyx":5830 * idx = [] # list of record indices * vid = [] # list of Variable indices * for n in range(nv): # <<<<<<<<<<<<<< @@ -75034,14 +75080,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5814 + /* "netCDF4/_netCDF4.pyx":5837 * # Merge the two lists to get a list of 2-elem lists. * # Slice this list along the first dimension. * lst = list(zip(idx, vid)).__getitem__(slice(sta, stop, step)) # <<<<<<<<<<<<<< * * # Rebuild the slicing expression for dimensions 1 and ssq. */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5814, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5837, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -75058,7 +75104,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_idx, __pyx_v_vid}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5814, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5837, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -75066,13 +75112,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_idx, __pyx_v_vid}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5814, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5837, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_2 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5814, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5837, __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; @@ -75083,18 +75129,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __Pyx_INCREF(__pyx_v_vid); __Pyx_GIVEREF(__pyx_v_vid); PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_5, __pyx_v_vid); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5814, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5837, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5814, __pyx_L1_error) + __pyx_t_3 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5837, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getitem); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5814, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getitem); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5837, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PySlice_New(__pyx_v_sta, __pyx_v_stop, __pyx_v_step); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5814, __pyx_L1_error) + __pyx_t_3 = PySlice_New(__pyx_v_sta, __pyx_v_stop, __pyx_v_step); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5837, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -75107,14 +75153,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU } } if (!__pyx_t_2) { - __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5814, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5837, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_7); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_3}; - __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5814, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5837, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -75123,20 +75169,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_3}; - __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5814, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5837, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5814, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5837, __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_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5814, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5837, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -75145,32 +75191,32 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __Pyx_XDECREF_SET(__pyx_v_lst, __pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5817 + /* "netCDF4/_netCDF4.pyx":5840 * * # Rebuild the slicing expression for dimensions 1 and ssq. * newSlice = [slice(None, None, None)] # <<<<<<<<<<<<<< * for n in range(1, len(start)): # skip dimension 0 * s = slice(start[n],start[n] + count[n] * stride[n], stride[n]) */ - __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5817, __pyx_L1_error) + __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5840, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __Pyx_INCREF(__pyx_slice__125); - __Pyx_GIVEREF(__pyx_slice__125); - PyList_SET_ITEM(__pyx_t_7, 0, __pyx_slice__125); + __Pyx_INCREF(__pyx_slice__129); + __Pyx_GIVEREF(__pyx_slice__129); + PyList_SET_ITEM(__pyx_t_7, 0, __pyx_slice__129); __Pyx_XDECREF_SET(__pyx_v_newSlice, ((PyObject*)__pyx_t_7)); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5818 + /* "netCDF4/_netCDF4.pyx":5841 * # Rebuild the slicing expression for dimensions 1 and ssq. * newSlice = [slice(None, None, None)] * for n in range(1, len(start)): # skip dimension 0 # <<<<<<<<<<<<<< * s = slice(start[n],start[n] + count[n] * stride[n], stride[n]) * newSlice.append(s) */ - __pyx_t_14 = PyObject_Length(__pyx_v_start); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 5818, __pyx_L1_error) - __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5818, __pyx_L1_error) + __pyx_t_14 = PyObject_Length(__pyx_v_start); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 5841, __pyx_L1_error) + __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5818, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); @@ -75178,16 +75224,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5818, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) { __pyx_t_1 = __pyx_t_7; __Pyx_INCREF(__pyx_t_1); __pyx_t_14 = 0; __pyx_t_15 = NULL; } else { - __pyx_t_14 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5818, __pyx_L1_error) + __pyx_t_14 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_15 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5818, __pyx_L1_error) + __pyx_t_15 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5841, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; for (;;) { @@ -75195,17 +75241,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_14 >= 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_14); __Pyx_INCREF(__pyx_t_7); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 5818, __pyx_L1_error) + __pyx_t_7 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_14); __Pyx_INCREF(__pyx_t_7); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 5841, __pyx_L1_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5818, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } else { if (__pyx_t_14 >= 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_14); __Pyx_INCREF(__pyx_t_7); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 5818, __pyx_L1_error) + __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_14); __Pyx_INCREF(__pyx_t_7); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 5841, __pyx_L1_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5818, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } @@ -75215,7 +75261,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU 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, 5818, __pyx_L1_error) + else __PYX_ERR(0, 5841, __pyx_L1_error) } break; } @@ -75224,32 +75270,32 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5819 + /* "netCDF4/_netCDF4.pyx":5842 * newSlice = [slice(None, None, None)] * for n in range(1, len(start)): # skip dimension 0 * s = slice(start[n],start[n] + count[n] * stride[n], stride[n]) # <<<<<<<<<<<<<< * newSlice.append(s) * */ - __pyx_t_7 = PyObject_GetItem(__pyx_v_start, __pyx_v_n); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5819, __pyx_L1_error) + __pyx_t_7 = PyObject_GetItem(__pyx_v_start, __pyx_v_n); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_4 = PyObject_GetItem(__pyx_v_start, __pyx_v_n); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5819, __pyx_L1_error) + __pyx_t_4 = PyObject_GetItem(__pyx_v_start, __pyx_v_n); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_GetItem(__pyx_v_count, __pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5819, __pyx_L1_error) + __pyx_t_3 = PyObject_GetItem(__pyx_v_count, __pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyObject_GetItem(__pyx_v_stride, __pyx_v_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5819, __pyx_L1_error) + __pyx_t_2 = PyObject_GetItem(__pyx_v_stride, __pyx_v_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_13 = PyNumber_Multiply(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5819, __pyx_L1_error) + __pyx_t_13 = PyNumber_Multiply(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyNumber_Add(__pyx_t_4, __pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5819, __pyx_L1_error) + __pyx_t_2 = PyNumber_Add(__pyx_t_4, __pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __pyx_t_13 = PyObject_GetItem(__pyx_v_stride, __pyx_v_n); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5819, __pyx_L1_error) + __pyx_t_13 = PyObject_GetItem(__pyx_v_stride, __pyx_v_n); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); - __pyx_t_4 = PySlice_New(__pyx_t_7, __pyx_t_2, __pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5819, __pyx_L1_error) + __pyx_t_4 = PySlice_New(__pyx_t_7, __pyx_t_2, __pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -75257,16 +75303,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __Pyx_XDECREF_SET(__pyx_v_s, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":5820 + /* "netCDF4/_netCDF4.pyx":5843 * for n in range(1, len(start)): # skip dimension 0 * s = slice(start[n],start[n] + count[n] * stride[n], stride[n]) * newSlice.append(s) # <<<<<<<<<<<<<< * * # Apply the slicing expression to each var in turn, extracting records */ - __pyx_t_16 = __Pyx_PyList_Append(__pyx_v_newSlice, __pyx_v_s); if (unlikely(__pyx_t_16 == -1)) __PYX_ERR(0, 5820, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyList_Append(__pyx_v_newSlice, __pyx_v_s); if (unlikely(__pyx_t_16 == -1)) __PYX_ERR(0, 5843, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5818 + /* "netCDF4/_netCDF4.pyx":5841 * # Rebuild the slicing expression for dimensions 1 and ssq. * newSlice = [slice(None, None, None)] * for n in range(1, len(start)): # skip dimension 0 # <<<<<<<<<<<<<< @@ -75276,19 +75322,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5824 + /* "netCDF4/_netCDF4.pyx":5847 * # Apply the slicing expression to each var in turn, extracting records * # in a list of arrays. * lstArr = [] # <<<<<<<<<<<<<< * ismasked = False * for n in range(nv): */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5824, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_lstArr, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5825 + /* "netCDF4/_netCDF4.pyx":5848 * # in a list of arrays. * lstArr = [] * ismasked = False # <<<<<<<<<<<<<< @@ -75297,30 +75343,30 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU */ __pyx_v_ismasked = 0; - /* "netCDF4/_netCDF4.pyx":5826 + /* "netCDF4/_netCDF4.pyx":5849 * lstArr = [] * ismasked = False * for n in range(nv): # <<<<<<<<<<<<<< * # Get the list of indices for variable 'n'. * idx = [i for i,numv in lst if numv == n] */ - __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_nv); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5826, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_nv); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5849, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5826, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5849, __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 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5826, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5849, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_14 = 0; __pyx_t_15 = NULL; } else { - __pyx_t_14 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5826, __pyx_L1_error) + __pyx_t_14 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5849, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_15 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5826, __pyx_L1_error) + __pyx_t_15 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5849, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -75328,17 +75374,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_14); __Pyx_INCREF(__pyx_t_1); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 5826, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_14); __Pyx_INCREF(__pyx_t_1); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 5849, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5826, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5849, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_14 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_14); __Pyx_INCREF(__pyx_t_1); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 5826, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_14); __Pyx_INCREF(__pyx_t_1); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 5849, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5826, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5849, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -75348,7 +75394,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU 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, 5826, __pyx_L1_error) + else __PYX_ERR(0, 5849, __pyx_L1_error) } break; } @@ -75357,39 +75403,39 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5828 + /* "netCDF4/_netCDF4.pyx":5851 * for n in range(nv): * # Get the list of indices for variable 'n'. * idx = [i for i,numv in lst if numv == n] # <<<<<<<<<<<<<< * if idx: * # Rebuild slicing expression for dimension 0. */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5828, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5851, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_v_lst)) || PyTuple_CheckExact(__pyx_v_lst)) { __pyx_t_13 = __pyx_v_lst; __Pyx_INCREF(__pyx_t_13); __pyx_t_17 = 0; __pyx_t_18 = NULL; } else { - __pyx_t_17 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_v_lst); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5828, __pyx_L1_error) + __pyx_t_17 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_v_lst); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5851, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); - __pyx_t_18 = Py_TYPE(__pyx_t_13)->tp_iternext; if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 5828, __pyx_L1_error) + __pyx_t_18 = Py_TYPE(__pyx_t_13)->tp_iternext; if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 5851, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_18)) { if (likely(PyList_CheckExact(__pyx_t_13))) { if (__pyx_t_17 >= PyList_GET_SIZE(__pyx_t_13)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_17); __Pyx_INCREF(__pyx_t_2); __pyx_t_17++; if (unlikely(0 < 0)) __PYX_ERR(0, 5828, __pyx_L1_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_17); __Pyx_INCREF(__pyx_t_2); __pyx_t_17++; if (unlikely(0 < 0)) __PYX_ERR(0, 5851, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_13, __pyx_t_17); __pyx_t_17++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5828, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_13, __pyx_t_17); __pyx_t_17++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5851, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_17 >= PyTuple_GET_SIZE(__pyx_t_13)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_13, __pyx_t_17); __Pyx_INCREF(__pyx_t_2); __pyx_t_17++; if (unlikely(0 < 0)) __PYX_ERR(0, 5828, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_13, __pyx_t_17); __Pyx_INCREF(__pyx_t_2); __pyx_t_17++; if (unlikely(0 < 0)) __PYX_ERR(0, 5851, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_13, __pyx_t_17); __pyx_t_17++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5828, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_13, __pyx_t_17); __pyx_t_17++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5851, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } @@ -75399,7 +75445,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU 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, 5828, __pyx_L1_error) + else __PYX_ERR(0, 5851, __pyx_L1_error) } break; } @@ -75415,7 +75461,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 5828, __pyx_L1_error) + __PYX_ERR(0, 5851, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -75428,15 +75474,15 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_3); #else - __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5828, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5851, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5828, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5851, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; - __pyx_t_19 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 5828, __pyx_L1_error) + __pyx_t_19 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 5851, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_19)->tp_iternext; @@ -75444,7 +75490,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __Pyx_GOTREF(__pyx_t_7); index = 1; __pyx_t_3 = __pyx_t_8(__pyx_t_19); if (unlikely(!__pyx_t_3)) goto __pyx_L33_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_19), 2) < 0) __PYX_ERR(0, 5828, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_19), 2) < 0) __PYX_ERR(0, 5851, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; goto __pyx_L34_unpacking_done; @@ -75452,25 +75498,25 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 5828, __pyx_L1_error) + __PYX_ERR(0, 5851, __pyx_L1_error) __pyx_L34_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF_SET(__pyx_v_numv, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_2 = PyObject_RichCompare(__pyx_v_numv, __pyx_v_n, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5828, __pyx_L1_error) - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5828, __pyx_L1_error) + __pyx_t_2 = PyObject_RichCompare(__pyx_v_numv, __pyx_v_n, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5851, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5851, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_11) { - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_v_i))) __PYX_ERR(0, 5828, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_v_i))) __PYX_ERR(0, 5851, __pyx_L1_error) } } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF_SET(__pyx_v_idx, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5829 + /* "netCDF4/_netCDF4.pyx":5852 * # Get the list of indices for variable 'n'. * idx = [i for i,numv in lst if numv == n] * if idx: # <<<<<<<<<<<<<< @@ -75480,42 +75526,42 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __pyx_t_11 = (__pyx_v_idx != Py_None) && (PyList_GET_SIZE(__pyx_v_idx) != 0); if (__pyx_t_11) { - /* "netCDF4/_netCDF4.pyx":5831 + /* "netCDF4/_netCDF4.pyx":5854 * if idx: * # Rebuild slicing expression for dimension 0. * newSlice[0] = slice(idx[0], idx[-1] + 1, step) # <<<<<<<<<<<<<< * # Extract records from the var, and append them to a list * # of arrays. */ - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_idx, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5831, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_idx, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5854, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_13 = __Pyx_GetItemInt_List(__pyx_v_idx, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5831, __pyx_L1_error) + __pyx_t_13 = __Pyx_GetItemInt_List(__pyx_v_idx, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5854, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); - __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_13, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5831, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_13, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5854, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __pyx_t_13 = PySlice_New(__pyx_t_1, __pyx_t_2, __pyx_v_step); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5831, __pyx_L1_error) + __pyx_t_13 = PySlice_New(__pyx_t_1, __pyx_t_2, __pyx_v_step); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5854, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(__Pyx_SetItemInt(__pyx_v_newSlice, 0, __pyx_t_13, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(0, 5831, __pyx_L1_error) + if (unlikely(__Pyx_SetItemInt(__pyx_v_newSlice, 0, __pyx_t_13, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(0, 5854, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - /* "netCDF4/_netCDF4.pyx":5834 + /* "netCDF4/_netCDF4.pyx":5857 * # Extract records from the var, and append them to a list * # of arrays. * dat = Variable.__getitem__(self._recVar[n],tuple(newSlice)) # <<<<<<<<<<<<<< * if ma.isMA(dat) and not ismasked: * ismasked=True */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7netCDF4_8_netCDF4_Variable), __pyx_n_s_getitem); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5834, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7netCDF4_8_netCDF4_Variable), __pyx_n_s_getitem); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5857, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recVar); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5834, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recVar); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5857, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyObject_GetItem(__pyx_t_1, __pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5834, __pyx_L1_error) + __pyx_t_3 = PyObject_GetItem(__pyx_t_1, __pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5857, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyList_AsTuple(__pyx_v_newSlice); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5834, __pyx_L1_error) + __pyx_t_1 = PyList_AsTuple(__pyx_v_newSlice); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5857, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = NULL; __pyx_t_5 = 0; @@ -75532,7 +75578,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_3, __pyx_t_1}; - __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5834, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5857, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -75542,7 +75588,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_3, __pyx_t_1}; - __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5834, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5857, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -75550,7 +75596,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU } else #endif { - __pyx_t_19 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 5834, __pyx_L1_error) + __pyx_t_19 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 5857, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_19); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -75561,7 +75607,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU PyTuple_SET_ITEM(__pyx_t_19, 1+__pyx_t_5, __pyx_t_1); __pyx_t_3 = 0; __pyx_t_1 = 0; - __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_19, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5834, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_19, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5857, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; } @@ -75569,16 +75615,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __Pyx_XDECREF_SET(__pyx_v_dat, __pyx_t_13); __pyx_t_13 = 0; - /* "netCDF4/_netCDF4.pyx":5835 + /* "netCDF4/_netCDF4.pyx":5858 * # of arrays. * dat = Variable.__getitem__(self._recVar[n],tuple(newSlice)) * if ma.isMA(dat) and not ismasked: # <<<<<<<<<<<<<< * ismasked=True * fill_value = dat.fill_value */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5835, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5858, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_isMA); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 5835, __pyx_L1_error) + __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_isMA); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 5858, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -75592,13 +75638,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU } } if (!__pyx_t_2) { - __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_19, __pyx_v_dat); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5835, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_19, __pyx_v_dat); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5858, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_19)) { PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_dat}; - __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_19, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5835, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_19, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5858, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_13); } else @@ -75606,25 +75652,25 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_19)) { PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_dat}; - __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_19, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5835, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_19, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5858, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_13); } else #endif { - __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5835, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5858, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = NULL; __Pyx_INCREF(__pyx_v_dat); __Pyx_GIVEREF(__pyx_v_dat); PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_dat); - __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_19, __pyx_t_1, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5835, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_19, __pyx_t_1, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5858, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } } __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 5835, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 5858, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (__pyx_t_12) { } else { @@ -75636,7 +75682,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __pyx_L38_bool_binop_done:; if (__pyx_t_11) { - /* "netCDF4/_netCDF4.pyx":5836 + /* "netCDF4/_netCDF4.pyx":5859 * dat = Variable.__getitem__(self._recVar[n],tuple(newSlice)) * if ma.isMA(dat) and not ismasked: * ismasked=True # <<<<<<<<<<<<<< @@ -75645,19 +75691,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU */ __pyx_v_ismasked = 1; - /* "netCDF4/_netCDF4.pyx":5837 + /* "netCDF4/_netCDF4.pyx":5860 * if ma.isMA(dat) and not ismasked: * ismasked=True * fill_value = dat.fill_value # <<<<<<<<<<<<<< * lstArr.append(dat) * if ismasked: */ - __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_dat, __pyx_n_s_fill_value); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5837, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_dat, __pyx_n_s_fill_value); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5860, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_XDECREF_SET(__pyx_v_fill_value, __pyx_t_13); __pyx_t_13 = 0; - /* "netCDF4/_netCDF4.pyx":5835 + /* "netCDF4/_netCDF4.pyx":5858 * # of arrays. * dat = Variable.__getitem__(self._recVar[n],tuple(newSlice)) * if ma.isMA(dat) and not ismasked: # <<<<<<<<<<<<<< @@ -75666,16 +75712,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU */ } - /* "netCDF4/_netCDF4.pyx":5838 + /* "netCDF4/_netCDF4.pyx":5861 * ismasked=True * fill_value = dat.fill_value * lstArr.append(dat) # <<<<<<<<<<<<<< * if ismasked: * lstArr = ma.concatenate(lstArr) */ - __pyx_t_16 = __Pyx_PyObject_Append(__pyx_v_lstArr, __pyx_v_dat); if (unlikely(__pyx_t_16 == -1)) __PYX_ERR(0, 5838, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_Append(__pyx_v_lstArr, __pyx_v_dat); if (unlikely(__pyx_t_16 == -1)) __PYX_ERR(0, 5861, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5829 + /* "netCDF4/_netCDF4.pyx":5852 * # Get the list of indices for variable 'n'. * idx = [i for i,numv in lst if numv == n] * if idx: # <<<<<<<<<<<<<< @@ -75684,7 +75730,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU */ } - /* "netCDF4/_netCDF4.pyx":5826 + /* "netCDF4/_netCDF4.pyx":5849 * lstArr = [] * ismasked = False * for n in range(nv): # <<<<<<<<<<<<<< @@ -75694,7 +75740,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":5839 + /* "netCDF4/_netCDF4.pyx":5862 * fill_value = dat.fill_value * lstArr.append(dat) * if ismasked: # <<<<<<<<<<<<<< @@ -75704,16 +75750,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __pyx_t_11 = (__pyx_v_ismasked != 0); if (__pyx_t_11) { - /* "netCDF4/_netCDF4.pyx":5840 + /* "netCDF4/_netCDF4.pyx":5863 * lstArr.append(dat) * if ismasked: * lstArr = ma.concatenate(lstArr) # <<<<<<<<<<<<<< * else: * lstArr = numpy.concatenate(lstArr) */ - __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5840, __pyx_L1_error) + __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5863, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); - __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_concatenate); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 5840, __pyx_L1_error) + __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_concatenate); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 5863, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = NULL; @@ -75727,13 +75773,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU } } if (!__pyx_t_13) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_19, __pyx_v_lstArr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5840, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_19, __pyx_v_lstArr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5863, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_19)) { PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_v_lstArr}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_19, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5840, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_19, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5863, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_4); } else @@ -75741,19 +75787,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_19)) { PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_v_lstArr}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_19, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5840, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_19, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5863, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { - __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5840, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5863, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_13); __pyx_t_13 = NULL; __Pyx_INCREF(__pyx_v_lstArr); __Pyx_GIVEREF(__pyx_v_lstArr); PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_lstArr); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_19, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5840, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_19, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5863, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } @@ -75762,7 +75808,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __Pyx_DECREF_SET(__pyx_v_lstArr, __pyx_t_4); __pyx_t_4 = 0; - /* "netCDF4/_netCDF4.pyx":5839 + /* "netCDF4/_netCDF4.pyx":5862 * fill_value = dat.fill_value * lstArr.append(dat) * if ismasked: # <<<<<<<<<<<<<< @@ -75772,7 +75818,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU goto __pyx_L40; } - /* "netCDF4/_netCDF4.pyx":5842 + /* "netCDF4/_netCDF4.pyx":5865 * lstArr = ma.concatenate(lstArr) * else: * lstArr = numpy.concatenate(lstArr) # <<<<<<<<<<<<<< @@ -75780,9 +75826,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU * # sometimes there are legitimate singleton dimensions, in which */ /*else*/ { - __pyx_t_19 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 5842, __pyx_L1_error) + __pyx_t_19 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 5865, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_19); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_19, __pyx_n_s_concatenate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5842, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_19, __pyx_n_s_concatenate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5865, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = NULL; @@ -75796,13 +75842,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU } } if (!__pyx_t_19) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_lstArr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5842, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_lstArr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5865, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_19, __pyx_v_lstArr}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5842, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5865, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_GOTREF(__pyx_t_4); } else @@ -75810,19 +75856,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_19, __pyx_v_lstArr}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5842, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5865, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { - __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5842, __pyx_L1_error) + __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5865, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_19); __pyx_t_19 = NULL; __Pyx_INCREF(__pyx_v_lstArr); __Pyx_GIVEREF(__pyx_v_lstArr); PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_v_lstArr); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_13, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5842, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_13, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5865, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } @@ -75833,26 +75879,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU } __pyx_L40:; - /* "netCDF4/_netCDF4.pyx":5843 + /* "netCDF4/_netCDF4.pyx":5866 * else: * lstArr = numpy.concatenate(lstArr) * if lstArr.dtype != data.dtype: data = data.astype(lstArr.dtype) # <<<<<<<<<<<<<< * # sometimes there are legitimate singleton dimensions, in which * # case the array shapes won't conform. If so, a ValueError will */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_lstArr, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5843, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_lstArr, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5866, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5843, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5866, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_13 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5843, __pyx_L1_error) + __pyx_t_13 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5866, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5843, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5866, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (__pyx_t_11) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_astype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5843, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_astype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5866, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_lstArr, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5843, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_lstArr, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5866, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_19 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -75865,14 +75911,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU } } if (!__pyx_t_19) { - __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5843, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5866, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_13); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_19, __pyx_t_4}; - __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5843, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5866, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -75881,20 +75927,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_19, __pyx_t_4}; - __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5843, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5866, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { - __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5843, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5866, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_19); __pyx_t_19 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5843, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5866, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -75904,7 +75950,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __pyx_t_13 = 0; } - /* "netCDF4/_netCDF4.pyx":5847 + /* "netCDF4/_netCDF4.pyx":5870 * # case the array shapes won't conform. If so, a ValueError will * # result, and no squeeze will be done. * try: # <<<<<<<<<<<<<< @@ -75920,14 +75966,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __Pyx_XGOTREF(__pyx_t_22); /*try:*/ { - /* "netCDF4/_netCDF4.pyx":5848 + /* "netCDF4/_netCDF4.pyx":5871 * # result, and no squeeze will be done. * try: * data[tuple(ind)] = lstArr.squeeze() # <<<<<<<<<<<<<< * except ValueError: * data[tuple(ind)] = lstArr */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_lstArr, __pyx_n_s_squeeze); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5848, __pyx_L42_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_lstArr, __pyx_n_s_squeeze); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5871, __pyx_L42_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -75940,20 +75986,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU } } if (__pyx_t_2) { - __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5848, __pyx_L42_error) + __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5871, __pyx_L42_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { - __pyx_t_13 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5848, __pyx_L42_error) + __pyx_t_13 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5871, __pyx_L42_error) } __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PySequence_Tuple(__pyx_v_ind); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5848, __pyx_L42_error) + __pyx_t_1 = PySequence_Tuple(__pyx_v_ind); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5871, __pyx_L42_error) __Pyx_GOTREF(__pyx_t_1); - if (unlikely(PyObject_SetItem(__pyx_v_data, __pyx_t_1, __pyx_t_13) < 0)) __PYX_ERR(0, 5848, __pyx_L42_error) + if (unlikely(PyObject_SetItem(__pyx_v_data, __pyx_t_1, __pyx_t_13) < 0)) __PYX_ERR(0, 5871, __pyx_L42_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - /* "netCDF4/_netCDF4.pyx":5847 + /* "netCDF4/_netCDF4.pyx":5870 * # case the array shapes won't conform. If so, a ValueError will * # result, and no squeeze will be done. * try: # <<<<<<<<<<<<<< @@ -75975,7 +76021,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; - /* "netCDF4/_netCDF4.pyx":5849 + /* "netCDF4/_netCDF4.pyx":5872 * try: * data[tuple(ind)] = lstArr.squeeze() * except ValueError: # <<<<<<<<<<<<<< @@ -75985,21 +76031,21 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_5) { __Pyx_AddTraceback("netCDF4._netCDF4._Variable.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_13, &__pyx_t_1, &__pyx_t_2) < 0) __PYX_ERR(0, 5849, __pyx_L44_except_error) + if (__Pyx_GetException(&__pyx_t_13, &__pyx_t_1, &__pyx_t_2) < 0) __PYX_ERR(0, 5872, __pyx_L44_except_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_2); - /* "netCDF4/_netCDF4.pyx":5850 + /* "netCDF4/_netCDF4.pyx":5873 * data[tuple(ind)] = lstArr.squeeze() * except ValueError: * data[tuple(ind)] = lstArr # <<<<<<<<<<<<<< * * # Remove extra singleton dimensions. */ - __pyx_t_4 = PySequence_Tuple(__pyx_v_ind); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5850, __pyx_L44_except_error) + __pyx_t_4 = PySequence_Tuple(__pyx_v_ind); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5873, __pyx_L44_except_error) __Pyx_GOTREF(__pyx_t_4); - if (unlikely(PyObject_SetItem(__pyx_v_data, __pyx_t_4, __pyx_v_lstArr) < 0)) __PYX_ERR(0, 5850, __pyx_L44_except_error) + if (unlikely(PyObject_SetItem(__pyx_v_data, __pyx_t_4, __pyx_v_lstArr) < 0)) __PYX_ERR(0, 5873, __pyx_L44_except_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -76009,7 +76055,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU goto __pyx_L44_except_error; __pyx_L44_except_error:; - /* "netCDF4/_netCDF4.pyx":5847 + /* "netCDF4/_netCDF4.pyx":5870 * # case the array shapes won't conform. If so, a ValueError will * # result, and no squeeze will be done. * try: # <<<<<<<<<<<<<< @@ -76031,7 +76077,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __pyx_L49_try_end:; } - /* "netCDF4/_netCDF4.pyx":5789 + /* "netCDF4/_netCDF4.pyx":5812 * # Number of variables making up the MFVariable.Variable. * nv = len(self._recLen) * for (start,count,stride,ind) in zip(strt, cnt, strd, put_ind): # <<<<<<<<<<<<<< @@ -76041,31 +76087,31 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":5853 + /* "netCDF4/_netCDF4.pyx":5876 * * # Remove extra singleton dimensions. * data = data[tuple(squeeze)] # <<<<<<<<<<<<<< * * # if no masked elements, return numpy array. */ - __pyx_t_6 = PySequence_Tuple(__pyx_v_squeeze); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5853, __pyx_L1_error) + __pyx_t_6 = PySequence_Tuple(__pyx_v_squeeze); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5876, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = PyObject_GetItem(__pyx_v_data, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5853, __pyx_L1_error) + __pyx_t_2 = PyObject_GetItem(__pyx_v_data, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5876, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5856 + /* "netCDF4/_netCDF4.pyx":5879 * * # if no masked elements, return numpy array. * if ma.isMA(data) and not data.mask.any(): # <<<<<<<<<<<<<< * data = data.filled() * */ - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5856, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5879, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_isMA); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5856, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_isMA); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5879, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -76079,13 +76125,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU } } if (!__pyx_t_6) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5856, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5879, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_data}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5856, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5879, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -76093,34 +76139,34 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_data}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5856, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5879, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5856, __pyx_L1_error) + __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5879, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_INCREF(__pyx_v_data); __Pyx_GIVEREF(__pyx_v_data); PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_v_data); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_13, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5856, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_13, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5879, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 5856, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 5879, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_12) { } else { __pyx_t_11 = __pyx_t_12; goto __pyx_L53_bool_binop_done; } - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_mask); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5856, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_mask); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5879, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_any); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5856, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_any); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5879, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -76134,28 +76180,28 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU } } if (__pyx_t_1) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5856, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5879, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5856, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5879, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 5856, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 5879, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_23 = ((!__pyx_t_12) != 0); __pyx_t_11 = __pyx_t_23; __pyx_L53_bool_binop_done:; if (__pyx_t_11) { - /* "netCDF4/_netCDF4.pyx":5857 + /* "netCDF4/_netCDF4.pyx":5880 * # if no masked elements, return numpy array. * if ma.isMA(data) and not data.mask.any(): * data = data.filled() # <<<<<<<<<<<<<< * * return data */ - __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_filled); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5857, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_filled); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5880, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) { @@ -76168,17 +76214,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU } } if (__pyx_t_1) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5857, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5880, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5857, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5880, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5856 + /* "netCDF4/_netCDF4.pyx":5879 * * # if no masked elements, return numpy array. * if ma.isMA(data) and not data.mask.any(): # <<<<<<<<<<<<<< @@ -76187,7 +76233,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU */ } - /* "netCDF4/_netCDF4.pyx":5859 + /* "netCDF4/_netCDF4.pyx":5882 * data = data.filled() * * return data # <<<<<<<<<<<<<< @@ -76199,7 +76245,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU __pyx_r = __pyx_v_data; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":5758 + /* "netCDF4/_netCDF4.pyx":5781 * for v in self._recVar: * v.set_auto_scale(val) * def __getitem__(self, elem): # <<<<<<<<<<<<<< @@ -76251,7 +76297,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNU return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5897 +/* "netCDF4/_netCDF4.pyx":5920 * """ * * def __init__(self, time, units=None): # <<<<<<<<<<<<<< @@ -76292,7 +76338,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_6MFTime_1__init__(PyObject *__pyx_s case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_time)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); __PYX_ERR(0, 5897, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); __PYX_ERR(0, 5920, __pyx_L3_error) } case 2: if (kw_args > 0) { @@ -76301,7 +76347,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_6MFTime_1__init__(PyObject *__pyx_s } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 5897, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 5920, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -76318,7 +76364,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_6MFTime_1__init__(PyObject *__pyx_s } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5897, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5920, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("netCDF4._netCDF4.MFTime.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -76362,37 +76408,37 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb PyObject *__pyx_t_14 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - /* "netCDF4/_netCDF4.pyx":5909 + /* "netCDF4/_netCDF4.pyx":5932 * the units from the master variable. * """ * import datetime # <<<<<<<<<<<<<< * self.__time = time * */ - __pyx_t_1 = __Pyx_Import(__pyx_n_s_datetime, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5909, __pyx_L1_error) + __pyx_t_1 = __Pyx_Import(__pyx_n_s_datetime, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5932, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_datetime = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5910 + /* "netCDF4/_netCDF4.pyx":5933 * """ * import datetime * self.__time = time # <<<<<<<<<<<<<< * * # copy attributes from master time variable. */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_MFTime__time, __pyx_v_time) < 0) __PYX_ERR(0, 5910, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_MFTime__time, __pyx_v_time) < 0) __PYX_ERR(0, 5933, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5913 + /* "netCDF4/_netCDF4.pyx":5936 * * # copy attributes from master time variable. * for name, value in time.__dict__.items(): # <<<<<<<<<<<<<< * self.__dict__[name] = value * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_time, __pyx_n_s_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5913, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_time, __pyx_n_s_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5936, __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, 5913, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5936, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -76406,10 +76452,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb } } if (__pyx_t_2) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5913, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5936, __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, 5913, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5936, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -76417,9 +76463,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb __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, 5913, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5936, __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, 5913, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5936, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -76427,17 +76473,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb 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, 5913, __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, 5936, __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, 5913, __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, 5936, __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, 5913, __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, 5936, __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, 5913, __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, 5936, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -76447,7 +76493,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb 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, 5913, __pyx_L1_error) + else __PYX_ERR(0, 5936, __pyx_L1_error) } break; } @@ -76463,7 +76509,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 5913, __pyx_L1_error) + __PYX_ERR(0, 5936, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -76476,15 +76522,15 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb __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, 5913, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5936, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5913, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5936, __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, 5913, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5936, __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; @@ -76492,7 +76538,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb __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, 5913, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 5936, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_unpacking_done; @@ -76500,7 +76546,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 5913, __pyx_L1_error) + __PYX_ERR(0, 5936, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_2); @@ -76508,19 +76554,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":5914 + /* "netCDF4/_netCDF4.pyx":5937 * # copy attributes from master time variable. * for name, value in time.__dict__.items(): * self.__dict__[name] = value # <<<<<<<<<<<<<< * * # make sure calendar attribute present in all files. */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5914, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5937, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(0, 5914, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(0, 5937, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5913 + /* "netCDF4/_netCDF4.pyx":5936 * * # copy attributes from master time variable. * for name, value in time.__dict__.items(): # <<<<<<<<<<<<<< @@ -76530,22 +76576,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":5917 + /* "netCDF4/_netCDF4.pyx":5940 * * # make sure calendar attribute present in all files. * for t in self._recVar: # <<<<<<<<<<<<<< * if not hasattr(t,'calendar'): * raise ValueError('MFTime requires that the time variable in all files have a calendar attribute') */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recVar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5917, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recVar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5940, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5917, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5940, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5917, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5940, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -76553,17 +76599,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 5917, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 5940, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5917, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5940, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 5917, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 5940, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5917, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5940, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } @@ -76573,7 +76619,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb 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, 5917, __pyx_L1_error) + else __PYX_ERR(0, 5940, __pyx_L1_error) } break; } @@ -76582,31 +76628,31 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_3); __pyx_t_3 = 0; - /* "netCDF4/_netCDF4.pyx":5918 + /* "netCDF4/_netCDF4.pyx":5941 * # make sure calendar attribute present in all files. * for t in self._recVar: * if not hasattr(t,'calendar'): # <<<<<<<<<<<<<< * raise ValueError('MFTime requires that the time variable in all files have a calendar attribute') * */ - __pyx_t_9 = PyObject_HasAttr(__pyx_v_t, __pyx_n_s_calendar); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 5918, __pyx_L1_error) + __pyx_t_9 = PyObject_HasAttr(__pyx_v_t, __pyx_n_s_calendar); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 5941, __pyx_L1_error) __pyx_t_10 = ((!(__pyx_t_9 != 0)) != 0); if (__pyx_t_10) { - /* "netCDF4/_netCDF4.pyx":5919 + /* "netCDF4/_netCDF4.pyx":5942 * for t in self._recVar: * if not hasattr(t,'calendar'): * raise ValueError('MFTime requires that the time variable in all files have a calendar attribute') # <<<<<<<<<<<<<< * * # Check that calendar is the same in all files. */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__126, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5919, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__130, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5942, __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, 5919, __pyx_L1_error) + __PYX_ERR(0, 5942, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5918 + /* "netCDF4/_netCDF4.pyx":5941 * # make sure calendar attribute present in all files. * for t in self._recVar: * if not hasattr(t,'calendar'): # <<<<<<<<<<<<<< @@ -76615,7 +76661,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb */ } - /* "netCDF4/_netCDF4.pyx":5917 + /* "netCDF4/_netCDF4.pyx":5940 * * # make sure calendar attribute present in all files. * for t in self._recVar: # <<<<<<<<<<<<<< @@ -76625,24 +76671,24 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5922 + /* "netCDF4/_netCDF4.pyx":5945 * * # Check that calendar is the same in all files. * if len(set([t.calendar for t in self._recVar])) > 1: # <<<<<<<<<<<<<< * raise ValueError('MFTime requires that the same time calendar is used by all files.') * */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5922, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5945, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recVar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5922, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recVar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5945, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_6 = __pyx_t_3; __Pyx_INCREF(__pyx_t_6); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5922, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5945, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5922, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5945, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -76650,17 +76696,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb if (likely(PyList_CheckExact(__pyx_t_6))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 5922, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 5945, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5922, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5945, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 5922, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 5945, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5922, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5945, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } @@ -76670,7 +76716,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb 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, 5922, __pyx_L1_error) + else __PYX_ERR(0, 5945, __pyx_L1_error) } break; } @@ -76678,34 +76724,34 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb } __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_calendar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5922, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_calendar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5945, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 5922, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 5945, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PySet_New(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5922, __pyx_L1_error) + __pyx_t_6 = PySet_New(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5945, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_4 = PySet_GET_SIZE(__pyx_t_6); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 5922, __pyx_L1_error) + __pyx_t_4 = PySet_GET_SIZE(__pyx_t_6); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 5945, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_10 = ((__pyx_t_4 > 1) != 0); if (__pyx_t_10) { - /* "netCDF4/_netCDF4.pyx":5923 + /* "netCDF4/_netCDF4.pyx":5946 * # Check that calendar is the same in all files. * if len(set([t.calendar for t in self._recVar])) > 1: * raise ValueError('MFTime requires that the same time calendar is used by all files.') # <<<<<<<<<<<<<< * * # Override units if units is specified. */ - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__127, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5923, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__131, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5946, __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, 5923, __pyx_L1_error) + __PYX_ERR(0, 5946, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5922 + /* "netCDF4/_netCDF4.pyx":5945 * * # Check that calendar is the same in all files. * if len(set([t.calendar for t in self._recVar])) > 1: # <<<<<<<<<<<<<< @@ -76714,56 +76760,56 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb */ } - /* "netCDF4/_netCDF4.pyx":5926 + /* "netCDF4/_netCDF4.pyx":5949 * * # Override units if units is specified. * self.units = units or time.units # <<<<<<<<<<<<<< * * # Reference date to compute the difference between different time units. */ - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_units); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 5926, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_units); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 5949, __pyx_L1_error) if (!__pyx_t_10) { } else { __Pyx_INCREF(__pyx_v_units); __pyx_t_6 = __pyx_v_units; goto __pyx_L13_bool_binop_done; } - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_time, __pyx_n_s_units); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5926, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_time, __pyx_n_s_units); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5949, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_L13_bool_binop_done:; - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_units, __pyx_t_6) < 0) __PYX_ERR(0, 5926, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_units, __pyx_t_6) < 0) __PYX_ERR(0, 5949, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "netCDF4/_netCDF4.pyx":5929 + /* "netCDF4/_netCDF4.pyx":5952 * * # Reference date to compute the difference between different time units. * ref_date = datetime.datetime(1900,1,1) # <<<<<<<<<<<<<< * ref_num = date2num(ref_date, self.units, self.calendar) * */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_n_s_datetime); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5929, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_n_s_datetime); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5952, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__128, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5929, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__132, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5952, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_ref_date = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5930 + /* "netCDF4/_netCDF4.pyx":5953 * # Reference date to compute the difference between different time units. * ref_date = datetime.datetime(1900,1,1) * ref_num = date2num(ref_date, self.units, self.calendar) # <<<<<<<<<<<<<< * * # Create delta vector: delta = ref_num(ref_date) - num(ref_date) */ - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_date2num); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5930, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_date2num); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5953, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_units); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5930, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_units); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5953, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_calendar); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5930, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_calendar); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5953, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = NULL; __pyx_t_11 = 0; @@ -76780,7 +76826,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_ref_date, __pyx_t_3, __pyx_t_2}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5930, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5953, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -76790,7 +76836,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_ref_date, __pyx_t_3, __pyx_t_2}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5930, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5953, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -76798,7 +76844,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb } else #endif { - __pyx_t_12 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5930, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5953, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -76812,7 +76858,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb PyTuple_SET_ITEM(__pyx_t_12, 2+__pyx_t_11, __pyx_t_2); __pyx_t_3 = 0; __pyx_t_2 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5930, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5953, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } @@ -76820,22 +76866,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb __pyx_v_ref_num = __pyx_t_1; __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5934 + /* "netCDF4/_netCDF4.pyx":5957 * # Create delta vector: delta = ref_num(ref_date) - num(ref_date) * # So that ref_num(date) = num(date) + delta * self.__delta = numpy.empty(len(self), time.dtype) # <<<<<<<<<<<<<< * * i0 = 0; i1 = 0 */ - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5934, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5957, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5934, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5957, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_4 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 5934, __pyx_L1_error) - __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5934, __pyx_L1_error) + __pyx_t_4 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 5957, __pyx_L1_error) + __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5957, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_time, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5934, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_time, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5957, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_11 = 0; @@ -76852,7 +76898,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_12)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_6, __pyx_t_2}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5934, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5957, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -76862,7 +76908,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_6, __pyx_t_2}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5934, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5957, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -76870,7 +76916,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb } else #endif { - __pyx_t_7 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5934, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5957, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL; @@ -76881,15 +76927,15 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_11, __pyx_t_2); __pyx_t_6 = 0; __pyx_t_2 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5934, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5957, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_MFTime__delta, __pyx_t_1) < 0) __PYX_ERR(0, 5934, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_MFTime__delta, __pyx_t_1) < 0) __PYX_ERR(0, 5957, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5936 + /* "netCDF4/_netCDF4.pyx":5959 * self.__delta = numpy.empty(len(self), time.dtype) * * i0 = 0; i1 = 0 # <<<<<<<<<<<<<< @@ -76901,7 +76947,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb __Pyx_INCREF(__pyx_int_0); __pyx_v_i1 = __pyx_int_0; - /* "netCDF4/_netCDF4.pyx":5937 + /* "netCDF4/_netCDF4.pyx":5960 * * i0 = 0; i1 = 0 * for i,v in enumerate(self._recVar): # <<<<<<<<<<<<<< @@ -76910,15 +76956,15 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb */ __Pyx_INCREF(__pyx_int_0); __pyx_t_1 = __pyx_int_0; - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recVar); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5937, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recVar); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5960, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); if (likely(PyList_CheckExact(__pyx_t_12)) || PyTuple_CheckExact(__pyx_t_12)) { __pyx_t_7 = __pyx_t_12; __Pyx_INCREF(__pyx_t_7); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5937, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5960, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_5 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5937, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5960, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; for (;;) { @@ -76926,17 +76972,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb if (likely(PyList_CheckExact(__pyx_t_7))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_12 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_12); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 5937, __pyx_L1_error) + __pyx_t_12 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_12); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 5960, __pyx_L1_error) #else - __pyx_t_12 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5937, __pyx_L1_error) + __pyx_t_12 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5960, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_12); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 5937, __pyx_L1_error) + __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_12); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 5960, __pyx_L1_error) #else - __pyx_t_12 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5937, __pyx_L1_error) + __pyx_t_12 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5960, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); #endif } @@ -76946,7 +76992,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb 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, 5937, __pyx_L1_error) + else __PYX_ERR(0, 5960, __pyx_L1_error) } break; } @@ -76956,39 +77002,39 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb __pyx_t_12 = 0; __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1); - __pyx_t_12 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5937, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5960, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_12; __pyx_t_12 = 0; - /* "netCDF4/_netCDF4.pyx":5938 + /* "netCDF4/_netCDF4.pyx":5961 * i0 = 0; i1 = 0 * for i,v in enumerate(self._recVar): * n = self._recLen[i] # Length of time vector. # <<<<<<<<<<<<<< * num = date2num(ref_date, v.units, self.calendar) * i1 += n */ - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recLen); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5938, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recLen); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5961, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_2 = PyObject_GetItem(__pyx_t_12, __pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5938, __pyx_L1_error) + __pyx_t_2 = PyObject_GetItem(__pyx_t_12, __pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5961, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5939 + /* "netCDF4/_netCDF4.pyx":5962 * for i,v in enumerate(self._recVar): * n = self._recLen[i] # Length of time vector. * num = date2num(ref_date, v.units, self.calendar) # <<<<<<<<<<<<<< * i1 += n * self.__delta[i0:i1] = ref_num - num */ - __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_date2num); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5939, __pyx_L1_error) + __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_date2num); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5962, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_units); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5939, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_units); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5962, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_calendar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5939, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_calendar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5962, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_13 = NULL; __pyx_t_11 = 0; @@ -77005,7 +77051,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_12)) { PyObject *__pyx_temp[4] = {__pyx_t_13, __pyx_v_ref_date, __pyx_t_6, __pyx_t_3}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5939, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5962, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -77015,7 +77061,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) { PyObject *__pyx_temp[4] = {__pyx_t_13, __pyx_v_ref_date, __pyx_t_6, __pyx_t_3}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5939, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5962, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -77023,7 +77069,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb } else #endif { - __pyx_t_14 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5939, __pyx_L1_error) + __pyx_t_14 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5962, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); if (__pyx_t_13) { __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_13); __pyx_t_13 = NULL; @@ -77037,7 +77083,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb PyTuple_SET_ITEM(__pyx_t_14, 2+__pyx_t_11, __pyx_t_3); __pyx_t_6 = 0; __pyx_t_3 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_14, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5939, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_14, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5962, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } @@ -77045,46 +77091,46 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb __Pyx_XDECREF_SET(__pyx_v_num, __pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5940 + /* "netCDF4/_netCDF4.pyx":5963 * n = self._recLen[i] # Length of time vector. * num = date2num(ref_date, v.units, self.calendar) * i1 += n # <<<<<<<<<<<<<< * self.__delta[i0:i1] = ref_num - num * i0 += n */ - __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_i1, __pyx_v_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5940, __pyx_L1_error) + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_i1, __pyx_v_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5963, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_i1, __pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5941 + /* "netCDF4/_netCDF4.pyx":5964 * num = date2num(ref_date, v.units, self.calendar) * i1 += n * self.__delta[i0:i1] = ref_num - num # <<<<<<<<<<<<<< * i0 += n * */ - __pyx_t_2 = PyNumber_Subtract(__pyx_v_ref_num, __pyx_v_num); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5941, __pyx_L1_error) + __pyx_t_2 = PyNumber_Subtract(__pyx_v_ref_num, __pyx_v_num); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5964, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_MFTime__delta); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5941, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_MFTime__delta); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5964, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - if (__Pyx_PyObject_SetSlice(__pyx_t_12, __pyx_t_2, 0, 0, &__pyx_v_i0, &__pyx_v_i1, NULL, 0, 0, 1) < 0) __PYX_ERR(0, 5941, __pyx_L1_error) + if (__Pyx_PyObject_SetSlice(__pyx_t_12, __pyx_t_2, 0, 0, &__pyx_v_i0, &__pyx_v_i1, NULL, 0, 0, 1) < 0) __PYX_ERR(0, 5964, __pyx_L1_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5942 + /* "netCDF4/_netCDF4.pyx":5965 * i1 += n * self.__delta[i0:i1] = ref_num - num * i0 += n # <<<<<<<<<<<<<< * * */ - __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_i0, __pyx_v_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5942, __pyx_L1_error) + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_i0, __pyx_v_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5965, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_i0, __pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5937 + /* "netCDF4/_netCDF4.pyx":5960 * * i0 = 0; i1 = 0 * for i,v in enumerate(self._recVar): # <<<<<<<<<<<<<< @@ -77095,7 +77141,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":5897 + /* "netCDF4/_netCDF4.pyx":5920 * """ * * def __init__(self, time, units=None): # <<<<<<<<<<<<<< @@ -77135,7 +77181,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb return __pyx_r; } -/* "netCDF4/_netCDF4.pyx":5945 +/* "netCDF4/_netCDF4.pyx":5968 * * * def __getitem__(self, elem): # <<<<<<<<<<<<<< @@ -77171,11 +77217,11 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_6MFTime_3__getitem__(PyObject *__py case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_elem)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, 1); __PYX_ERR(0, 5945, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, 1); __PYX_ERR(0, 5968, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getitem__") < 0)) __PYX_ERR(0, 5945, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getitem__") < 0)) __PYX_ERR(0, 5968, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -77188,7 +77234,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_6MFTime_3__getitem__(PyObject *__py } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5945, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5968, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("netCDF4._netCDF4.MFTime.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -77209,23 +77255,23 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime_2__getitem__(CYTHON_UNUSED PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__getitem__", 0); - /* "netCDF4/_netCDF4.pyx":5946 + /* "netCDF4/_netCDF4.pyx":5969 * * def __getitem__(self, elem): * return self.__time[elem] + self.__delta[elem] # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_MFTime__time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5946, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_MFTime__time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5969, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_elem); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5946, __pyx_L1_error) + __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_elem); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5969, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_MFTime__delta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5946, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_MFTime__delta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5969, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyObject_GetItem(__pyx_t_1, __pyx_v_elem); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5946, __pyx_L1_error) + __pyx_t_3 = PyObject_GetItem(__pyx_t_1, __pyx_v_elem); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5969, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5946, __pyx_L1_error) + __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5969, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -77233,7 +77279,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime_2__getitem__(CYTHON_UNUSED __pyx_t_1 = 0; goto __pyx_L0; - /* "netCDF4/_netCDF4.pyx":5945 + /* "netCDF4/_netCDF4.pyx":5968 * * * def __getitem__(self, elem): # <<<<<<<<<<<<<< @@ -77276,6 +77322,7 @@ static PyObject *__pyx_tp_new_7netCDF4_8_netCDF4_Dataset(PyTypeObject *t, CYTHON p->enumtypes = Py_None; Py_INCREF(Py_None); p->__orthogonal_indexing__ = Py_None; Py_INCREF(Py_None); p->keepweakref = Py_None; Py_INCREF(Py_None); + p->_buffer.obj = NULL; return o; } @@ -77291,7 +77338,7 @@ static void __pyx_tp_dealloc_7netCDF4_8_netCDF4_Dataset(PyObject *o) { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); - __pyx_pw_7netCDF4_8_netCDF4_7Dataset_19__dealloc__(o); + __pyx_pw_7netCDF4_8_netCDF4_7Dataset_21__dealloc__(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } @@ -77354,6 +77401,9 @@ static int __pyx_tp_traverse_7netCDF4_8_netCDF4_Dataset(PyObject *o, visitproc v if (p->keepweakref) { e = (*v)(p->keepweakref, a); if (e) return e; } + if (p->_buffer.obj) { + e = (*v)(p->_buffer.obj, a); if (e) return e; + } return 0; } @@ -77399,6 +77449,7 @@ static int __pyx_tp_clear_7netCDF4_8_netCDF4_Dataset(PyObject *o) { tmp = ((PyObject*)p->keepweakref); p->keepweakref = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); + Py_CLEAR(p->_buffer.obj); return 0; } static PyObject *__pyx_sq_item_7netCDF4_8_netCDF4_Dataset(PyObject *o, Py_ssize_t i) { @@ -77413,17 +77464,17 @@ static PyObject *__pyx_tp_getattro_7netCDF4_8_netCDF4_Dataset(PyObject *o, PyObj PyObject *v = PyObject_GenericGetAttr(o, n); if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Clear(); - v = __pyx_pw_7netCDF4_8_netCDF4_7Dataset_65__getattr__(o, n); + v = __pyx_pw_7netCDF4_8_netCDF4_7Dataset_67__getattr__(o, n); } return v; } static int __pyx_tp_setattro_7netCDF4_8_netCDF4_Dataset(PyObject *o, PyObject *n, PyObject *v) { if (v) { - return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_63__setattr__(o, n, v); + return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_65__setattr__(o, n, v); } else { - return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_59__delattr__(o, n); + return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_61__delattr__(o, n); } } @@ -77629,35 +77680,36 @@ static PyMethodDef __pyx_methods_7netCDF4_8_netCDF4_Dataset[] = { {"__exit__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_5__exit__, METH_VARARGS|METH_KEYWORDS, 0}, {"filepath", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_9filepath, METH_NOARGS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_8filepath}, {"__unicode__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_13__unicode__, METH_NOARGS, 0}, - {"close", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_15close, METH_NOARGS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_14close}, - {"isopen", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_17isopen, METH_NOARGS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_16isopen}, - {"__reduce__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_21__reduce__, METH_NOARGS, 0}, - {"sync", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_23sync, METH_NOARGS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_22sync}, - {"_redef", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_25_redef, METH_NOARGS, 0}, - {"_enddef", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_27_enddef, METH_NOARGS, 0}, - {"set_fill_on", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_29set_fill_on, METH_NOARGS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_28set_fill_on}, - {"set_fill_off", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_31set_fill_off, METH_NOARGS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_30set_fill_off}, - {"createDimension", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_33createDimension, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_32createDimension}, - {"renameDimension", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_35renameDimension, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_34renameDimension}, - {"createCompoundType", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_37createCompoundType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_36createCompoundType}, - {"createVLType", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_39createVLType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_38createVLType}, - {"createEnumType", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_41createEnumType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_40createEnumType}, - {"createVariable", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_43createVariable, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_42createVariable}, - {"renameVariable", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_45renameVariable, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_44renameVariable}, - {"createGroup", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_47createGroup, METH_O, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_46createGroup}, - {"ncattrs", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_49ncattrs, METH_NOARGS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_48ncattrs}, - {"setncattr", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_51setncattr, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_50setncattr}, - {"setncattr_string", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_53setncattr_string, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_52setncattr_string}, - {"setncatts", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_55setncatts, METH_O, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_54setncatts}, - {"getncattr", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_57getncattr, METH_O, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_56getncattr}, - {"delncattr", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_61delncattr, METH_O, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_60delncattr}, - {"__getattr__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_65__getattr__, METH_O|METH_COEXIST, 0}, - {"renameAttribute", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_67renameAttribute, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_66renameAttribute}, - {"renameGroup", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_69renameGroup, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_68renameGroup}, - {"set_auto_maskandscale", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_71set_auto_maskandscale, METH_O, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_70set_auto_maskandscale}, - {"set_auto_mask", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_73set_auto_mask, METH_O, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_72set_auto_mask}, - {"set_auto_scale", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_75set_auto_scale, METH_O, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_74set_auto_scale}, - {"get_variables_by_attributes", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_77get_variables_by_attributes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_76get_variables_by_attributes}, + {"_close", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_15_close, METH_O, 0}, + {"close", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_17close, METH_NOARGS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_16close}, + {"isopen", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_19isopen, METH_NOARGS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_18isopen}, + {"__reduce__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_23__reduce__, METH_NOARGS, 0}, + {"sync", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_25sync, METH_NOARGS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_24sync}, + {"_redef", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_27_redef, METH_NOARGS, 0}, + {"_enddef", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_29_enddef, METH_NOARGS, 0}, + {"set_fill_on", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_31set_fill_on, METH_NOARGS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_30set_fill_on}, + {"set_fill_off", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_33set_fill_off, METH_NOARGS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_32set_fill_off}, + {"createDimension", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_35createDimension, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_34createDimension}, + {"renameDimension", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_37renameDimension, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_36renameDimension}, + {"createCompoundType", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_39createCompoundType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_38createCompoundType}, + {"createVLType", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_41createVLType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_40createVLType}, + {"createEnumType", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_43createEnumType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_42createEnumType}, + {"createVariable", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_45createVariable, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_44createVariable}, + {"renameVariable", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_47renameVariable, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_46renameVariable}, + {"createGroup", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_49createGroup, METH_O, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_48createGroup}, + {"ncattrs", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_51ncattrs, METH_NOARGS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_50ncattrs}, + {"setncattr", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_53setncattr, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_52setncattr}, + {"setncattr_string", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_55setncattr_string, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_54setncattr_string}, + {"setncatts", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_57setncatts, METH_O, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_56setncatts}, + {"getncattr", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_59getncattr, METH_O, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_58getncattr}, + {"delncattr", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_63delncattr, METH_O, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_62delncattr}, + {"__getattr__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_67__getattr__, METH_O|METH_COEXIST, 0}, + {"renameAttribute", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_69renameAttribute, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_68renameAttribute}, + {"renameGroup", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_71renameGroup, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_70renameGroup}, + {"set_auto_maskandscale", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_73set_auto_maskandscale, METH_O, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_72set_auto_maskandscale}, + {"set_auto_mask", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_75set_auto_mask, METH_O, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_74set_auto_mask}, + {"set_auto_scale", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_77set_auto_scale, METH_O, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_76set_auto_scale}, + {"get_variables_by_attributes", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_79get_variables_by_attributes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_78get_variables_by_attributes}, {0, 0, 0, 0} }; @@ -79350,7 +79402,7 @@ static struct PyModuleDef __pyx_moduledef = { PyModuleDef_HEAD_INIT, #endif "_netCDF4", - __pyx_k_Version_1_2_7_Introduction_netc, /* m_doc */ + __pyx_k_Version_1_2_8a0_Introduction_ne, /* m_doc */ -1, /* m_size */ __pyx_methods /* m_methods */, NULL, /* m_reload */ @@ -79365,7 +79417,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s_0m, __pyx_k_0m, sizeof(__pyx_k_0m), 0, 0, 1, 0}, {&__pyx_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0}, {&__pyx_kp_s_1_10, __pyx_k_1_10, sizeof(__pyx_k_1_10), 0, 0, 1, 0}, - {&__pyx_kp_s_1_2_7, __pyx_k_1_2_7, sizeof(__pyx_k_1_2_7), 0, 0, 1, 0}, + {&__pyx_kp_s_1_2_8a0, __pyx_k_1_2_8a0, sizeof(__pyx_k_1_2_8a0), 0, 0, 1, 0}, {&__pyx_kp_s_4_2_1, __pyx_k_4_2_1, sizeof(__pyx_k_4_2_1), 0, 0, 1, 0}, {&__pyx_kp_s_4_4_0, __pyx_k_4_4_0, sizeof(__pyx_k_4_4_0), 0, 0, 1, 0}, {&__pyx_kp_s_4_4_1, __pyx_k_4_4_1, sizeof(__pyx_k_4_4_1), 0, 0, 1, 0}, @@ -79472,7 +79524,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_UnicodeDecodeError, __pyx_k_UnicodeDecodeError, sizeof(__pyx_k_UnicodeDecodeError), 0, 0, 1, 1}, {&__pyx_n_s_UnicodeError, __pyx_k_UnicodeError, sizeof(__pyx_k_UnicodeError), 0, 0, 1, 1}, {&__pyx_kp_s_Unsupported_compound_type_elemen, __pyx_k_Unsupported_compound_type_elemen, sizeof(__pyx_k_Unsupported_compound_type_elemen), 0, 0, 1, 0}, - {&__pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_k_Users_jsw_python_netcdf4_python, sizeof(__pyx_k_Users_jsw_python_netcdf4_python), 0, 0, 1, 0}, + {&__pyx_kp_s_Users_amohr_dev_thehesiod_netcd, __pyx_k_Users_amohr_dev_thehesiod_netcd, sizeof(__pyx_k_Users_amohr_dev_thehesiod_netcd), 0, 0, 1, 0}, {&__pyx_n_s_V, __pyx_k_V, sizeof(__pyx_k_V), 0, 0, 1, 1}, {&__pyx_kp_s_VLType_dtype, __pyx_k_VLType_dtype, sizeof(__pyx_k_VLType_dtype), 0, 0, 1, 0}, {&__pyx_kp_s_VLType_is_not_picklable, __pyx_k_VLType_is_not_picklable, sizeof(__pyx_k_VLType_is_not_picklable), 0, 0, 1, 0}, @@ -79514,16 +79566,16 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s_WARNING_variable_s_has_unsupport_4, __pyx_k_WARNING_variable_s_has_unsupport_4, sizeof(__pyx_k_WARNING_variable_s_has_unsupport_4), 0, 0, 1, 0}, {&__pyx_kp_s__13, __pyx_k__13, sizeof(__pyx_k__13), 0, 0, 1, 0}, {&__pyx_kp_s__14, __pyx_k__14, sizeof(__pyx_k__14), 0, 0, 1, 0}, - {&__pyx_kp_s__15, __pyx_k__15, sizeof(__pyx_k__15), 0, 0, 1, 0}, - {&__pyx_kp_s__18, __pyx_k__18, sizeof(__pyx_k__18), 0, 0, 1, 0}, + {&__pyx_kp_s__17, __pyx_k__17, sizeof(__pyx_k__17), 0, 0, 1, 0}, {&__pyx_kp_s__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 1, 0}, {&__pyx_kp_s__20, __pyx_k__20, sizeof(__pyx_k__20), 0, 0, 1, 0}, - {&__pyx_kp_s__21, __pyx_k__21, sizeof(__pyx_k__21), 0, 0, 1, 0}, + {&__pyx_kp_s__22, __pyx_k__22, sizeof(__pyx_k__22), 0, 0, 1, 0}, {&__pyx_kp_s__23, __pyx_k__23, sizeof(__pyx_k__23), 0, 0, 1, 0}, - {&__pyx_kp_s__24, __pyx_k__24, sizeof(__pyx_k__24), 0, 0, 1, 0}, - {&__pyx_n_s__28, __pyx_k__28, sizeof(__pyx_k__28), 0, 0, 1, 1}, - {&__pyx_kp_s__36, __pyx_k__36, sizeof(__pyx_k__36), 0, 0, 1, 0}, - {&__pyx_kp_s__37, __pyx_k__37, sizeof(__pyx_k__37), 0, 0, 1, 0}, + {&__pyx_kp_s__25, __pyx_k__25, sizeof(__pyx_k__25), 0, 0, 1, 0}, + {&__pyx_kp_s__26, __pyx_k__26, sizeof(__pyx_k__26), 0, 0, 1, 0}, + {&__pyx_n_s__32, __pyx_k__32, sizeof(__pyx_k__32), 0, 0, 1, 1}, + {&__pyx_kp_s__40, __pyx_k__40, sizeof(__pyx_k__40), 0, 0, 1, 0}, + {&__pyx_kp_s__41, __pyx_k__41, sizeof(__pyx_k__41), 0, 0, 1, 0}, {&__pyx_n_s_a, __pyx_k_a, sizeof(__pyx_k_a), 0, 0, 1, 1}, {&__pyx_n_s_add_offset, __pyx_k_add_offset, sizeof(__pyx_k_add_offset), 0, 0, 1, 1}, {&__pyx_n_s_aggDimId, __pyx_k_aggDimId, sizeof(__pyx_k_aggDimId), 0, 0, 1, 1}, @@ -79553,6 +79605,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_bool, __pyx_k_bool, sizeof(__pyx_k_bool), 0, 0, 1, 1}, {&__pyx_n_s_bs, __pyx_k_bs, sizeof(__pyx_k_bs), 0, 0, 1, 1}, {&__pyx_n_s_buffer, __pyx_k_buffer, sizeof(__pyx_k_buffer), 0, 0, 1, 1}, + {&__pyx_n_s_buffer_2, __pyx_k_buffer_2, sizeof(__pyx_k_buffer_2), 0, 0, 1, 1}, {&__pyx_n_s_byteorder, __pyx_k_byteorder, sizeof(__pyx_k_byteorder), 0, 0, 1, 1}, {&__pyx_n_s_bytestr, __pyx_k_bytestr, sizeof(__pyx_k_bytestr), 0, 0, 1, 1}, {&__pyx_n_s_byteswap, __pyx_k_byteswap, sizeof(__pyx_k_byteswap), 0, 0, 1, 1}, @@ -79582,6 +79635,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s_chunksizes_must_be_a_sequence_wi, __pyx_k_chunksizes_must_be_a_sequence_wi, sizeof(__pyx_k_chunksizes_must_be_a_sequence_wi), 0, 0, 1, 0}, {&__pyx_n_s_clobber, __pyx_k_clobber, sizeof(__pyx_k_clobber), 0, 0, 1, 1}, {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1}, + {&__pyx_n_s_close_2, __pyx_k_close_2, sizeof(__pyx_k_close_2), 0, 0, 1, 1}, {&__pyx_n_s_cmptype, __pyx_k_cmptype, sizeof(__pyx_k_cmptype), 0, 0, 1, 1}, {&__pyx_n_s_cmptypes, __pyx_k_cmptypes, sizeof(__pyx_k_cmptypes), 0, 0, 1, 1}, {&__pyx_n_s_cnt, __pyx_k_cnt, sizeof(__pyx_k_cnt), 0, 0, 1, 1}, @@ -79727,6 +79781,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_has_lsd, __pyx_k_has_lsd, sizeof(__pyx_k_has_lsd), 0, 0, 1, 1}, {&__pyx_n_s_has_nc_inq_format_extended, __pyx_k_has_nc_inq_format_extended, sizeof(__pyx_k_has_nc_inq_format_extended), 0, 0, 1, 1}, {&__pyx_n_s_has_nc_inq_path, __pyx_k_has_nc_inq_path, sizeof(__pyx_k_has_nc_inq_path), 0, 0, 1, 1}, + {&__pyx_n_s_has_nc_open_mem, __pyx_k_has_nc_open_mem, sizeof(__pyx_k_has_nc_open_mem), 0, 0, 1, 1}, {&__pyx_n_s_has_rename_grp, __pyx_k_has_rename_grp, sizeof(__pyx_k_has_rename_grp), 0, 0, 1, 1}, {&__pyx_n_s_hdf5libversion, __pyx_k_hdf5libversion, sizeof(__pyx_k_hdf5libversion), 0, 0, 1, 1}, {&__pyx_n_s_hour, __pyx_k_hour, sizeof(__pyx_k_hour), 0, 0, 1, 1}, @@ -79797,6 +79852,8 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s_master_dataset_s_does_not_have_a, __pyx_k_master_dataset_s_does_not_have_a, sizeof(__pyx_k_master_dataset_s_does_not_have_a), 0, 0, 1, 0}, {&__pyx_kp_s_master_dataset_s_does_not_have_a_2, __pyx_k_master_dataset_s_does_not_have_a_2, sizeof(__pyx_k_master_dataset_s_does_not_have_a_2), 0, 0, 1, 0}, {&__pyx_n_s_mastervar, __pyx_k_mastervar, sizeof(__pyx_k_mastervar), 0, 0, 1, 1}, + {&__pyx_n_s_memory, __pyx_k_memory, sizeof(__pyx_k_memory), 0, 0, 1, 1}, + {&__pyx_kp_s_memory_mode_only_works_with_r_mo, __pyx_k_memory_mode_only_works_with_r_mo, sizeof(__pyx_k_memory_mode_only_works_with_r_mo), 0, 0, 1, 0}, {&__pyx_n_s_memoryview, __pyx_k_memoryview, sizeof(__pyx_k_memoryview), 0, 0, 1, 1}, {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1}, {&__pyx_n_s_microsec_units, __pyx_k_microsec_units, sizeof(__pyx_k_microsec_units), 0, 0, 1, 1}, @@ -79824,6 +79881,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_names, __pyx_k_names, sizeof(__pyx_k_names), 0, 0, 1, 1}, {&__pyx_n_s_native, __pyx_k_native, sizeof(__pyx_k_native), 0, 0, 1, 1}, {&__pyx_n_s_nbytes, __pyx_k_nbytes, sizeof(__pyx_k_nbytes), 0, 0, 1, 1}, + {&__pyx_kp_s_nc_open_mem_method_not_enabled, __pyx_k_nc_open_mem_method_not_enabled, sizeof(__pyx_k_nc_open_mem_method_not_enabled), 0, 0, 1, 0}, {&__pyx_n_s_nc_type, __pyx_k_nc_type, sizeof(__pyx_k_nc_type), 0, 0, 1, 1}, {&__pyx_n_s_ncattrs, __pyx_k_ncattrs, sizeof(__pyx_k_ncattrs), 0, 0, 1, 1}, {&__pyx_n_s_ncdump, __pyx_k_ncdump, sizeof(__pyx_k_ncdump), 0, 0, 1, 1}, @@ -80063,23 +80121,23 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { }; static int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 928, __pyx_L1_error) - __pyx_builtin_memoryview = __Pyx_GetBuiltinName(__pyx_n_s_memoryview); if (!__pyx_builtin_memoryview) __PYX_ERR(0, 1069, __pyx_L1_error) - __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 5685, __pyx_L1_error) - __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 1091, __pyx_L1_error) - __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(0, 1133, __pyx_L1_error) - __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 1141, __pyx_L1_error) - __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 1158, __pyx_L1_error) - __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 1186, __pyx_L1_error) - __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 1195, __pyx_L1_error) - __pyx_builtin_UnicodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeError); if (!__pyx_builtin_UnicodeError) __PYX_ERR(0, 1295, __pyx_L1_error) - __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 1310, __pyx_L1_error) - __pyx_builtin_IOError = __Pyx_GetBuiltinName(__pyx_n_s_IOError); if (!__pyx_builtin_IOError) __PYX_ERR(0, 1848, __pyx_L1_error) - __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 1899, __pyx_L1_error) - __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(0, 1992, __pyx_L1_error) - __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 3741, __pyx_L1_error) - __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(0, 4018, __pyx_L1_error) - __pyx_builtin_sum = __Pyx_GetBuiltinName(__pyx_n_s_sum); if (!__pyx_builtin_sum) __PYX_ERR(0, 4347, __pyx_L1_error) - __pyx_builtin_UnicodeDecodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeDecodeError); if (!__pyx_builtin_UnicodeDecodeError) __PYX_ERR(0, 5071, __pyx_L1_error) + __pyx_builtin_memoryview = __Pyx_GetBuiltinName(__pyx_n_s_memoryview); if (!__pyx_builtin_memoryview) __PYX_ERR(0, 1071, __pyx_L1_error) + __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 1583, __pyx_L1_error) + __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 5708, __pyx_L1_error) + __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 1093, __pyx_L1_error) + __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(0, 1135, __pyx_L1_error) + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 1143, __pyx_L1_error) + __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 1160, __pyx_L1_error) + __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 1188, __pyx_L1_error) + __pyx_builtin_UnicodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeError); if (!__pyx_builtin_UnicodeError) __PYX_ERR(0, 1297, __pyx_L1_error) + __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 1312, __pyx_L1_error) + __pyx_builtin_IOError = __Pyx_GetBuiltinName(__pyx_n_s_IOError); if (!__pyx_builtin_IOError) __PYX_ERR(0, 1879, __pyx_L1_error) + __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, 4041, __pyx_L1_error) + __pyx_builtin_sum = __Pyx_GetBuiltinName(__pyx_n_s_sum); if (!__pyx_builtin_sum) __PYX_ERR(0, 4370, __pyx_L1_error) + __pyx_builtin_UnicodeDecodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeDecodeError); if (!__pyx_builtin_UnicodeDecodeError) __PYX_ERR(0, 5094, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; @@ -80089,1246 +80147,1279 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); - /* "netCDF4/_netCDF4.pyx":1128 + /* "netCDF4/_netCDF4.pyx":1130 * else: * pstring =\ * value_arr.tostring().decode(default_encoding,unicode_error).replace('\x00','') # <<<<<<<<<<<<<< * return pstring * elif att_type == NC_STRING: */ - __pyx_tuple__3 = PyTuple_Pack(2, __pyx_kp_s_, __pyx_kp_s__2); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 1128, __pyx_L1_error) + __pyx_tuple__3 = PyTuple_Pack(2, __pyx_kp_s_, __pyx_kp_s__2); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 1130, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__3); __Pyx_GIVEREF(__pyx_tuple__3); - /* "netCDF4/_netCDF4.pyx":1140 + /* "netCDF4/_netCDF4.pyx":1142 * raise AttributeError((nc_strerror(ierr)).decode('ascii')) * try: * result = [values[j].decode(default_encoding,unicode_error).replace('\x00','') # <<<<<<<<<<<<<< * for j in range(att_len)] * finally: */ - __pyx_tuple__4 = PyTuple_Pack(2, __pyx_kp_s_, __pyx_kp_s__2); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 1140, __pyx_L1_error) + __pyx_tuple__4 = PyTuple_Pack(2, __pyx_kp_s_, __pyx_kp_s__2); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 1142, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__4); __Pyx_GIVEREF(__pyx_tuple__4); - /* "netCDF4/_netCDF4.pyx":1186 + /* "netCDF4/_netCDF4.pyx":1188 * # Private function to set the netCDF file format * if format not in _format_dict: * raise ValueError("unrecognized format requested") # <<<<<<<<<<<<<< * nc_set_default_format(_format_dict[format], NULL) * */ - __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_unrecognized_format_requested); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 1186, __pyx_L1_error) + __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_unrecognized_format_requested); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 1188, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__5); __Pyx_GIVEREF(__pyx_tuple__5); - /* "netCDF4/_netCDF4.pyx":1197 + /* "netCDF4/_netCDF4.pyx":1199 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * if formatp not in _reverse_format_dict: * raise ValueError('format not supported by python interface') # <<<<<<<<<<<<<< * return _reverse_format_dict[formatp] * */ - __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_format_not_supported_by_python_i); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 1197, __pyx_L1_error) + __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_format_not_supported_by_python_i); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 1199, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__6); __Pyx_GIVEREF(__pyx_tuple__6); - /* "netCDF4/_netCDF4.pyx":1257 + /* "netCDF4/_netCDF4.pyx":1259 * # if 64-bit datatype not supported, cast to 32 bit integers. * fmt = _get_format(grp._grpid) * is_netcdf3 = fmt.startswith('NETCDF3') or fmt == 'NETCDF4_CLASSIC' # <<<<<<<<<<<<<< * if value_arr.dtype.str[1:] == 'i8' and ('i8' not in _supportedtypes or\ * is_netcdf3): */ - __pyx_tuple__7 = PyTuple_Pack(1, __pyx_n_s_NETCDF3); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 1257, __pyx_L1_error) + __pyx_tuple__7 = PyTuple_Pack(1, __pyx_n_s_NETCDF3); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 1259, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); - /* "netCDF4/_netCDF4.pyx":1258 + /* "netCDF4/_netCDF4.pyx":1260 * fmt = _get_format(grp._grpid) * is_netcdf3 = fmt.startswith('NETCDF3') or fmt == 'NETCDF4_CLASSIC' * if value_arr.dtype.str[1:] == 'i8' and ('i8' not in _supportedtypes or\ # <<<<<<<<<<<<<< * is_netcdf3): * value_arr = value_arr.astype('i4') */ - __pyx_slice__8 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__8)) __PYX_ERR(0, 1258, __pyx_L1_error) + __pyx_slice__8 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__8)) __PYX_ERR(0, 1260, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__8); __Pyx_GIVEREF(__pyx_slice__8); - /* "netCDF4/_netCDF4.pyx":1260 + /* "netCDF4/_netCDF4.pyx":1262 * if value_arr.dtype.str[1:] == 'i8' and ('i8' not in _supportedtypes or\ * is_netcdf3): * value_arr = value_arr.astype('i4') # <<<<<<<<<<<<<< * # if array contains ascii strings, write a text attribute (stored as bytes). * # if array contains unicode strings, and data model is NETCDF4, */ - __pyx_tuple__9 = PyTuple_Pack(1, __pyx_n_s_i4); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 1260, __pyx_L1_error) + __pyx_tuple__9 = PyTuple_Pack(1, __pyx_n_s_i4); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 1262, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); - /* "netCDF4/_netCDF4.pyx":1309 + /* "netCDF4/_netCDF4.pyx":1311 * if value_arr.dtype.kind == 'V': # compound attribute. * xtype = _find_cmptype(grp,value_arr.dtype) * elif value_arr.dtype.str[1:] not in _supportedtypes: # <<<<<<<<<<<<<< * raise TypeError, 'illegal data type for attribute, must be one of %s, got %s' % (_supportedtypes, value_arr.dtype.str[1:]) * elif xtype == -99: # if xtype is not passed in as kwarg. */ - __pyx_slice__10 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__10)) __PYX_ERR(0, 1309, __pyx_L1_error) + __pyx_slice__10 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__10)) __PYX_ERR(0, 1311, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__10); __Pyx_GIVEREF(__pyx_slice__10); - /* "netCDF4/_netCDF4.pyx":1310 + /* "netCDF4/_netCDF4.pyx":1312 * xtype = _find_cmptype(grp,value_arr.dtype) * elif value_arr.dtype.str[1:] not in _supportedtypes: * raise TypeError, 'illegal data type for attribute, must be one of %s, got %s' % (_supportedtypes, value_arr.dtype.str[1:]) # <<<<<<<<<<<<<< * elif xtype == -99: # if xtype is not passed in as kwarg. * xtype = _nptonctype[value_arr.dtype.str[1:]] */ - __pyx_slice__11 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__11)) __PYX_ERR(0, 1310, __pyx_L1_error) + __pyx_slice__11 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__11)) __PYX_ERR(0, 1312, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__11); __Pyx_GIVEREF(__pyx_slice__11); - /* "netCDF4/_netCDF4.pyx":1312 + /* "netCDF4/_netCDF4.pyx":1314 * raise TypeError, 'illegal data type for attribute, must be one of %s, got %s' % (_supportedtypes, value_arr.dtype.str[1:]) * elif xtype == -99: # if xtype is not passed in as kwarg. * xtype = _nptonctype[value_arr.dtype.str[1:]] # <<<<<<<<<<<<<< * lenarr = PyArray_SIZE(value_arr) * ierr = nc_put_att(grp._grpid, varid, attname, xtype, lenarr, value_arr.data) */ - __pyx_slice__12 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__12)) __PYX_ERR(0, 1312, __pyx_L1_error) + __pyx_slice__12 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__12)) __PYX_ERR(0, 1314, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__12); __Pyx_GIVEREF(__pyx_slice__12); - /* "netCDF4/_netCDF4.pyx":1888 + /* "netCDF4/_netCDF4.pyx":1806 + * + * if memory is not None and (mode != 'r' or type(memory) != bytes): + * raise ValueError('memory mode only works with \'r\' modes and must be `bytes`') # <<<<<<<<<<<<<< + * + * if mode == 'w': + */ + __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_memory_mode_only_works_with_r_mo); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 1806, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__16); + __Pyx_GIVEREF(__pyx_tuple__16); + + /* "netCDF4/_netCDF4.pyx":1920 * # last name in path, could be a variable or group * dirname, lastname = posixpath.split(elem) * nestedgroups = dirname.split('/') # <<<<<<<<<<<<<< * group = self * # iterate over groups in path. */ - __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s__15); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 1888, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__16); - __Pyx_GIVEREF(__pyx_tuple__16); + __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s__17); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 1920, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__18); + __Pyx_GIVEREF(__pyx_tuple__18); - /* "netCDF4/_netCDF4.pyx":1946 + /* "netCDF4/_netCDF4.pyx":1978 * [_tostr(self.variables[varname].dtype)+' \033[4m'+_tostr(varname)+'\033[0m'+ * (((_tostr(self.variables[varname].dimensions) * .replace("u'",""))\ # <<<<<<<<<<<<<< * .replace("'",""))\ * .replace(", ",","))\ */ - __pyx_tuple__17 = PyTuple_Pack(2, __pyx_kp_s_u, __pyx_kp_s__2); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 1946, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__17); - __Pyx_GIVEREF(__pyx_tuple__17); + __pyx_tuple__19 = PyTuple_Pack(2, __pyx_kp_s_u, __pyx_kp_s__2); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 1978, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__19); + __Pyx_GIVEREF(__pyx_tuple__19); - /* "netCDF4/_netCDF4.pyx":1947 + /* "netCDF4/_netCDF4.pyx":1979 * (((_tostr(self.variables[varname].dimensions) * .replace("u'",""))\ * .replace("'",""))\ # <<<<<<<<<<<<<< * .replace(", ",","))\ * .replace(",)",")") for varname in self.variables.keys()]) */ - __pyx_tuple__19 = PyTuple_Pack(2, __pyx_kp_s__18, __pyx_kp_s__2); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 1947, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__19); - __Pyx_GIVEREF(__pyx_tuple__19); + __pyx_tuple__21 = PyTuple_Pack(2, __pyx_kp_s__20, __pyx_kp_s__2); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 1979, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__21); + __Pyx_GIVEREF(__pyx_tuple__21); - /* "netCDF4/_netCDF4.pyx":1948 + /* "netCDF4/_netCDF4.pyx":1980 * .replace("u'",""))\ * .replace("'",""))\ * .replace(", ",","))\ # <<<<<<<<<<<<<< * .replace(",)",")") for varname in self.variables.keys()]) * grpnames = tuple([_tostr(grpname) for grpname in self.groups.keys()]) */ - __pyx_tuple__22 = PyTuple_Pack(2, __pyx_kp_s__20, __pyx_kp_s__21); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 1948, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__22); - __Pyx_GIVEREF(__pyx_tuple__22); + __pyx_tuple__24 = PyTuple_Pack(2, __pyx_kp_s__22, __pyx_kp_s__23); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 1980, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__24); + __Pyx_GIVEREF(__pyx_tuple__24); - /* "netCDF4/_netCDF4.pyx":1949 + /* "netCDF4/_netCDF4.pyx":1981 * .replace("'",""))\ * .replace(", ",","))\ * .replace(",)",")") for varname in self.variables.keys()]) # <<<<<<<<<<<<<< * grpnames = tuple([_tostr(grpname) for grpname in self.groups.keys()]) * if self.path == '/': */ - __pyx_tuple__25 = PyTuple_Pack(2, __pyx_kp_s__23, __pyx_kp_s__24); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 1949, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__25); - __Pyx_GIVEREF(__pyx_tuple__25); + __pyx_tuple__27 = PyTuple_Pack(2, __pyx_kp_s__25, __pyx_kp_s__26); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 1981, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__27); + __Pyx_GIVEREF(__pyx_tuple__27); - /* "netCDF4/_netCDF4.pyx":1992 + /* "netCDF4/_netCDF4.pyx":2016 + * Close the Dataset. + * """ + * self._close(True) # <<<<<<<<<<<<<< + * + * def isopen(self): + */ + __pyx_tuple__28 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 2016, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__28); + __Pyx_GIVEREF(__pyx_tuple__28); + + /* "netCDF4/_netCDF4.pyx":2029 + * # close file when there are no references to object left + * if self._isopen: + * self._close(False) # <<<<<<<<<<<<<< + * + * def __reduce__(self): + */ + __pyx_tuple__29 = PyTuple_Pack(1, Py_False); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 2029, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__29); + __Pyx_GIVEREF(__pyx_tuple__29); + + /* "netCDF4/_netCDF4.pyx":2033 * def __reduce__(self): * # raise error is user tries to pickle a Dataset object. * raise NotImplementedError('Dataset is not picklable') # <<<<<<<<<<<<<< * * def sync(self): */ - __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_s_Dataset_is_not_picklable); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 1992, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__26); - __Pyx_GIVEREF(__pyx_tuple__26); + __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s_Dataset_is_not_picklable); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 2033, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__30); + __Pyx_GIVEREF(__pyx_tuple__30); - /* "netCDF4/_netCDF4.pyx":2309 + /* "netCDF4/_netCDF4.pyx":2343 * # if group specified as a path, split out group names * groupname = posixpath.normpath(groupname) * nestedgroups = groupname.split('/') # <<<<<<<<<<<<<< * group = self * # loop over group names, create parent groups if they do not already */ - __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_s__15); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 2309, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__27); - __Pyx_GIVEREF(__pyx_tuple__27); + __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_s__17); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 2343, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__31); + __Pyx_GIVEREF(__pyx_tuple__31); - /* "netCDF4/_netCDF4.pyx":2407 + /* "netCDF4/_netCDF4.pyx":2440 * if name not in _private_atts: * self.setncattr(name, value) * elif not name.endswith('__'): # <<<<<<<<<<<<<< * if hasattr(self,name): * raise AttributeError( */ - __pyx_tuple__29 = PyTuple_Pack(1, __pyx_n_s__28); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 2407, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__29); - __Pyx_GIVEREF(__pyx_tuple__29); + __pyx_tuple__33 = PyTuple_Pack(1, __pyx_n_s__32); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 2440, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__33); + __Pyx_GIVEREF(__pyx_tuple__33); - /* "netCDF4/_netCDF4.pyx":2417 + /* "netCDF4/_netCDF4.pyx":2450 * # if name in _private_atts, it is stored at the python * # level and not in the netCDF file. * if name.startswith('__') and name.endswith('__'): # <<<<<<<<<<<<<< * # if __dict__ requested, return a dict with netCDF attributes. * if name == '__dict__': */ - __pyx_tuple__30 = PyTuple_Pack(1, __pyx_n_s__28); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 2417, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__30); - __Pyx_GIVEREF(__pyx_tuple__30); - __pyx_tuple__31 = PyTuple_Pack(1, __pyx_n_s__28); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 2417, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__31); - __Pyx_GIVEREF(__pyx_tuple__31); + __pyx_tuple__34 = PyTuple_Pack(1, __pyx_n_s__32); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 2450, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__34); + __Pyx_GIVEREF(__pyx_tuple__34); + __pyx_tuple__35 = PyTuple_Pack(1, __pyx_n_s__32); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 2450, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__35); + __Pyx_GIVEREF(__pyx_tuple__35); - /* "netCDF4/_netCDF4.pyx":2679 + /* "netCDF4/_netCDF4.pyx":2703 * overrides `netCDF4.Dataset` close method which does not apply to `netCDF4.Group` * instances, raises IOError.""" * raise IOError('cannot close a `netCDF4.Group` (only applies to Dataset)') # <<<<<<<<<<<<<< * * def _getname(self): */ - __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_s_cannot_close_a_netCDF4_Group_onl); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 2679, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__32); - __Pyx_GIVEREF(__pyx_tuple__32); + __pyx_tuple__36 = PyTuple_Pack(1, __pyx_kp_s_cannot_close_a_netCDF4_Group_onl); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 2703, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__36); + __Pyx_GIVEREF(__pyx_tuple__36); - /* "netCDF4/_netCDF4.pyx":2696 + /* "netCDF4/_netCDF4.pyx":2719 * return self._getname() * def __set__(self,value): * raise AttributeError("name cannot be altered") # <<<<<<<<<<<<<< * * */ - __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_s_name_cannot_be_altered); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 2696, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__33); - __Pyx_GIVEREF(__pyx_tuple__33); + __pyx_tuple__37 = PyTuple_Pack(1, __pyx_kp_s_name_cannot_be_altered); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 2719, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__37); + __Pyx_GIVEREF(__pyx_tuple__37); - /* "netCDF4/_netCDF4.pyx":2783 + /* "netCDF4/_netCDF4.pyx":2806 * return self._getname() * def __set__(self,value): * raise AttributeError("name cannot be altered") # <<<<<<<<<<<<<< * * property size: */ - __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_s_name_cannot_be_altered); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 2783, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__34); - __Pyx_GIVEREF(__pyx_tuple__34); + __pyx_tuple__38 = PyTuple_Pack(1, __pyx_kp_s_name_cannot_be_altered); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 2806, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__38); + __Pyx_GIVEREF(__pyx_tuple__38); - /* "netCDF4/_netCDF4.pyx":2790 + /* "netCDF4/_netCDF4.pyx":2813 * return len(self) * def __set__(self,value): * raise AttributeError("size cannot be altered") # <<<<<<<<<<<<<< * * def __repr__(self): */ - __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_s_size_cannot_be_altered); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 2790, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__35); - __Pyx_GIVEREF(__pyx_tuple__35); + __pyx_tuple__39 = PyTuple_Pack(1, __pyx_kp_s_size_cannot_be_altered); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 2813, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__39); + __Pyx_GIVEREF(__pyx_tuple__39); - /* "netCDF4/_netCDF4.pyx":3118 + /* "netCDF4/_netCDF4.pyx":3141 * if datatype==str: * if grp.data_model != 'NETCDF4': * raise ValueError( # <<<<<<<<<<<<<< * 'Variable length strings are only supported for the ' * 'NETCDF4 format. For other formats, consider using ' */ - __pyx_tuple__38 = PyTuple_Pack(1, __pyx_kp_s_Variable_length_strings_are_only); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 3118, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__38); - __Pyx_GIVEREF(__pyx_tuple__38); + __pyx_tuple__42 = PyTuple_Pack(1, __pyx_kp_s_Variable_length_strings_are_only); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 3141, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__42); + __Pyx_GIVEREF(__pyx_tuple__42); - /* "netCDF4/_netCDF4.pyx":3128 + /* "netCDF4/_netCDF4.pyx":3151 * # dtype variable attribute is a numpy datatype object. * self.dtype = datatype.dtype * elif datatype.str[1:] in _supportedtypes: # <<<<<<<<<<<<<< * self._isprimitive = True * # find netCDF primitive data type corresponding to */ - __pyx_slice__39 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__39)) __PYX_ERR(0, 3128, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__39); - __Pyx_GIVEREF(__pyx_slice__39); + __pyx_slice__43 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__43)) __PYX_ERR(0, 3151, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__43); + __Pyx_GIVEREF(__pyx_slice__43); - /* "netCDF4/_netCDF4.pyx":3132 + /* "netCDF4/_netCDF4.pyx":3155 * # find netCDF primitive data type corresponding to * # specified numpy data type. * xtype = _nptonctype[datatype.str[1:]] # <<<<<<<<<<<<<< * # dtype variable attribute is a numpy datatype object. * self.dtype = datatype */ - __pyx_slice__40 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__40)) __PYX_ERR(0, 3132, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__40); - __Pyx_GIVEREF(__pyx_slice__40); + __pyx_slice__44 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__44)) __PYX_ERR(0, 3155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__44); + __Pyx_GIVEREF(__pyx_slice__44); - /* "netCDF4/_netCDF4.pyx":3172 + /* "netCDF4/_netCDF4.pyx":3195 * # of vars are created. This change only lasts as long as file is * # open. * if grp.data_model.startswith('NETCDF4') and chunk_cache is not None: # <<<<<<<<<<<<<< * ierr = nc_get_var_chunk_cache(self._grpid, self._varid, &sizep, * &nelemsp, &preemptionp) */ - __pyx_tuple__41 = PyTuple_Pack(1, __pyx_n_s_NETCDF4); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 3172, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__41); - __Pyx_GIVEREF(__pyx_tuple__41); + __pyx_tuple__45 = PyTuple_Pack(1, __pyx_n_s_NETCDF4); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 3195, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__45); + __Pyx_GIVEREF(__pyx_tuple__45); - /* "netCDF4/_netCDF4.pyx":3214 + /* "netCDF4/_netCDF4.pyx":3237 * icontiguous = NC_CONTIGUOUS * if chunksizes is not None: * raise ValueError('cannot specify chunksizes for a contiguous dataset') # <<<<<<<<<<<<<< * else: * icontiguous = NC_CHUNKED */ - __pyx_tuple__42 = PyTuple_Pack(1, __pyx_kp_s_cannot_specify_chunksizes_for_a); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 3214, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__42); - __Pyx_GIVEREF(__pyx_tuple__42); + __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_s_cannot_specify_chunksizes_for_a); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 3237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__46); + __Pyx_GIVEREF(__pyx_tuple__46); - /* "netCDF4/_netCDF4.pyx":3222 + /* "netCDF4/_netCDF4.pyx":3245 * if len(chunksizes) != len(dimensions): * if grp.data_model != 'NETCDF4': grp._enddef() * raise ValueError('chunksizes must be a sequence with the same length as dimensions') # <<<<<<<<<<<<<< * chunksizesp = malloc(sizeof(size_t) * ndims) * for n from 0 <= n < ndims: */ - __pyx_tuple__43 = PyTuple_Pack(1, __pyx_kp_s_chunksizes_must_be_a_sequence_wi); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 3222, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__43); - __Pyx_GIVEREF(__pyx_tuple__43); + __pyx_tuple__47 = PyTuple_Pack(1, __pyx_kp_s_chunksizes_must_be_a_sequence_wi); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 3245, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__47); + __Pyx_GIVEREF(__pyx_tuple__47); - /* "netCDF4/_netCDF4.pyx":3273 + /* "netCDF4/_netCDF4.pyx":3296 * if self._isprimitive or self._isenum: * fillval = numpy.array(fill_value, self.dtype) * if not fillval.dtype.isnative: fillval.byteswap(True) # <<<<<<<<<<<<<< * _set_att(self._grp, self._varid, '_FillValue',\ * fillval, xtype=xtype) */ - __pyx_tuple__44 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 3273, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__44); - __Pyx_GIVEREF(__pyx_tuple__44); + __pyx_tuple__48 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 3296, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__48); + __Pyx_GIVEREF(__pyx_tuple__48); - /* "netCDF4/_netCDF4.pyx":3277 + /* "netCDF4/_netCDF4.pyx":3300 * fillval, xtype=xtype) * else: * raise AttributeError("cannot set _FillValue attribute for VLEN or compound variable") # <<<<<<<<<<<<<< * if least_significant_digit is not None: * self.least_significant_digit = least_significant_digit */ - __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_s_cannot_set__FillValue_attribute); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 3277, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__45); - __Pyx_GIVEREF(__pyx_tuple__45); + __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_s_cannot_set__FillValue_attribute); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 3300, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__49); + __Pyx_GIVEREF(__pyx_tuple__49); - /* "netCDF4/_netCDF4.pyx":3359 + /* "netCDF4/_netCDF4.pyx":3382 * msg = 'filling on' * except AttributeError: * fillval = default_fillvals[self.dtype.str[1:]] # <<<<<<<<<<<<<< * if self.dtype.str[1:] in ['u1','i1']: * msg = 'filling on, default _FillValue of %s ignored\n' % fillval */ - __pyx_slice__46 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__46)) __PYX_ERR(0, 3359, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__46); - __Pyx_GIVEREF(__pyx_slice__46); + __pyx_slice__50 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__50)) __PYX_ERR(0, 3382, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__50); + __Pyx_GIVEREF(__pyx_slice__50); - /* "netCDF4/_netCDF4.pyx":3360 + /* "netCDF4/_netCDF4.pyx":3383 * except AttributeError: * fillval = default_fillvals[self.dtype.str[1:]] * if self.dtype.str[1:] in ['u1','i1']: # <<<<<<<<<<<<<< * msg = 'filling on, default _FillValue of %s ignored\n' % fillval * else: */ - __pyx_slice__47 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__47)) __PYX_ERR(0, 3360, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__47); - __Pyx_GIVEREF(__pyx_slice__47); + __pyx_slice__51 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__51)) __PYX_ERR(0, 3383, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__51); + __Pyx_GIVEREF(__pyx_slice__51); - /* "netCDF4/_netCDF4.pyx":3415 + /* "netCDF4/_netCDF4.pyx":3438 * return self._getname() * def __set__(self,value): * raise AttributeError("name cannot be altered") # <<<<<<<<<<<<<< * * property datatype: */ - __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_s_name_cannot_be_altered); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 3415, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__48); - __Pyx_GIVEREF(__pyx_tuple__48); + __pyx_tuple__52 = PyTuple_Pack(1, __pyx_kp_s_name_cannot_be_altered); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 3438, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__52); + __Pyx_GIVEREF(__pyx_tuple__52); - /* "netCDF4/_netCDF4.pyx":3441 + /* "netCDF4/_netCDF4.pyx":3464 * return shape * def __set__(self,value): * raise AttributeError("shape cannot be altered") # <<<<<<<<<<<<<< * * property size: */ - __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_s_shape_cannot_be_altered); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 3441, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__49); - __Pyx_GIVEREF(__pyx_tuple__49); + __pyx_tuple__53 = PyTuple_Pack(1, __pyx_kp_s_shape_cannot_be_altered); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 3464, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__53); + __Pyx_GIVEREF(__pyx_tuple__53); - /* "netCDF4/_netCDF4.pyx":3453 + /* "netCDF4/_netCDF4.pyx":3476 * return self._getdims() * def __set__(self,value): * raise AttributeError("dimensions cannot be altered") # <<<<<<<<<<<<<< * * */ - __pyx_tuple__50 = PyTuple_Pack(1, __pyx_kp_s_dimensions_cannot_be_altered); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 3453, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__50); - __Pyx_GIVEREF(__pyx_tuple__50); + __pyx_tuple__54 = PyTuple_Pack(1, __pyx_kp_s_dimensions_cannot_be_altered); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 3476, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__54); + __Pyx_GIVEREF(__pyx_tuple__54); - /* "netCDF4/_netCDF4.pyx":3680 + /* "netCDF4/_netCDF4.pyx":3703 * # (the same as the data) * value = numpy.array(value, self.dtype) * if not value.dtype.isnative: value.byteswap(True) # <<<<<<<<<<<<<< * self.setncattr(name, value) * elif not name.endswith('__'): */ - __pyx_tuple__51 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 3680, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__51); - __Pyx_GIVEREF(__pyx_tuple__51); + __pyx_tuple__55 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 3703, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__55); + __Pyx_GIVEREF(__pyx_tuple__55); - /* "netCDF4/_netCDF4.pyx":3682 + /* "netCDF4/_netCDF4.pyx":3705 * if not value.dtype.isnative: value.byteswap(True) * self.setncattr(name, value) * elif not name.endswith('__'): # <<<<<<<<<<<<<< * if hasattr(self,name): * raise AttributeError( */ - __pyx_tuple__52 = PyTuple_Pack(1, __pyx_n_s__28); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 3682, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__52); - __Pyx_GIVEREF(__pyx_tuple__52); + __pyx_tuple__56 = PyTuple_Pack(1, __pyx_n_s__32); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(0, 3705, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__56); + __Pyx_GIVEREF(__pyx_tuple__56); - /* "netCDF4/_netCDF4.pyx":3692 + /* "netCDF4/_netCDF4.pyx":3715 * # if name in _private_atts, it is stored at the python * # level and not in the netCDF file. * if name.startswith('__') and name.endswith('__'): # <<<<<<<<<<<<<< * # if __dict__ requested, return a dict with netCDF attributes. * if name == '__dict__': */ - __pyx_tuple__53 = PyTuple_Pack(1, __pyx_n_s__28); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 3692, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__53); - __Pyx_GIVEREF(__pyx_tuple__53); - __pyx_tuple__54 = PyTuple_Pack(1, __pyx_n_s__28); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 3692, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__54); - __Pyx_GIVEREF(__pyx_tuple__54); + __pyx_tuple__57 = PyTuple_Pack(1, __pyx_n_s__32); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 3715, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__57); + __Pyx_GIVEREF(__pyx_tuple__57); + __pyx_tuple__58 = PyTuple_Pack(1, __pyx_n_s__32); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(0, 3715, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__58); + __Pyx_GIVEREF(__pyx_tuple__58); - /* "netCDF4/_netCDF4.pyx":3740 + /* "netCDF4/_netCDF4.pyx":3763 * # The convention used is that for those cases, * # put_ind for this dimension is set to -1 by _StartCountStride. * squeeze = data.ndim * [slice(None),] # <<<<<<<<<<<<<< * for i,n in enumerate(put_ind.shape[:-1]): * if n == 1 and put_ind[...,i].ravel()[0] == -1: */ - __pyx_slice__55 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__55)) __PYX_ERR(0, 3740, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__55); - __Pyx_GIVEREF(__pyx_slice__55); + __pyx_slice__59 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__59)) __PYX_ERR(0, 3763, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__59); + __Pyx_GIVEREF(__pyx_slice__59); - /* "netCDF4/_netCDF4.pyx":3741 + /* "netCDF4/_netCDF4.pyx":3764 * # put_ind for this dimension is set to -1 by _StartCountStride. * squeeze = data.ndim * [slice(None),] * for i,n in enumerate(put_ind.shape[:-1]): # <<<<<<<<<<<<<< * if n == 1 and put_ind[...,i].ravel()[0] == -1: * squeeze[i] = 0 */ - __pyx_slice__56 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__56)) __PYX_ERR(0, 3741, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__56); - __Pyx_GIVEREF(__pyx_slice__56); + __pyx_slice__60 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__60)) __PYX_ERR(0, 3764, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__60); + __Pyx_GIVEREF(__pyx_slice__60); - /* "netCDF4/_netCDF4.pyx":3837 + /* "netCDF4/_netCDF4.pyx":3860 * # 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__57 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__57)) __PYX_ERR(0, 3837, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__57); - __Pyx_GIVEREF(__pyx_slice__57); + __pyx_slice__61 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__61)) __PYX_ERR(0, 3860, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__61); + __Pyx_GIVEREF(__pyx_slice__61); - /* "netCDF4/_netCDF4.pyx":3841 + /* "netCDF4/_netCDF4.pyx":3864 * 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__58 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__58)) __PYX_ERR(0, 3841, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__58); - __Pyx_GIVEREF(__pyx_slice__58); + __pyx_slice__62 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__62)) __PYX_ERR(0, 3864, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__62); + __Pyx_GIVEREF(__pyx_slice__62); - /* "netCDF4/_netCDF4.pyx":3906 + /* "netCDF4/_netCDF4.pyx":3929 * # 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__59 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__59)) __PYX_ERR(0, 3906, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__59); - __Pyx_GIVEREF(__pyx_slice__59); + __pyx_slice__63 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__63)) __PYX_ERR(0, 3929, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__63); + __Pyx_GIVEREF(__pyx_slice__63); - /* "netCDF4/_netCDF4.pyx":3907 + /* "netCDF4/_netCDF4.pyx":3930 * # 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__60 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__60)) __PYX_ERR(0, 3907, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__60); - __Pyx_GIVEREF(__pyx_slice__60); + __pyx_slice__64 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__64)) __PYX_ERR(0, 3930, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__64); + __Pyx_GIVEREF(__pyx_slice__64); - /* "netCDF4/_netCDF4.pyx":3938 + /* "netCDF4/_netCDF4.pyx":3961 * 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__61 = PyTuple_Pack(1, __pyx_kp_s_assign_vlen_method_only_for_use); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 3938, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__61); - __Pyx_GIVEREF(__pyx_tuple__61); + __pyx_tuple__65 = PyTuple_Pack(1, __pyx_kp_s_assign_vlen_method_only_for_use); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 3961, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__65); + __Pyx_GIVEREF(__pyx_tuple__65); - /* "netCDF4/_netCDF4.pyx":3950 + /* "netCDF4/_netCDF4.pyx":3973 * elem = self.shape[0]+elem * else: * raise IndexError("Illegal index") # <<<<<<<<<<<<<< * elif isinstance(elem, tuple): * if len(elem) != ndims: */ - __pyx_tuple__62 = PyTuple_Pack(1, __pyx_kp_s_Illegal_index); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 3950, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__62); - __Pyx_GIVEREF(__pyx_tuple__62); + __pyx_tuple__66 = PyTuple_Pack(1, __pyx_kp_s_Illegal_index); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 3973, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__66); + __Pyx_GIVEREF(__pyx_tuple__66); - /* "netCDF4/_netCDF4.pyx":3953 + /* "netCDF4/_netCDF4.pyx":3976 * elif isinstance(elem, tuple): * if len(elem) != ndims: * raise IndexError("Illegal index") # <<<<<<<<<<<<<< * elemnew = [] * for n,e in enumerate(elem): */ - __pyx_tuple__63 = PyTuple_Pack(1, __pyx_kp_s_Illegal_index); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 3953, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__63); - __Pyx_GIVEREF(__pyx_tuple__63); + __pyx_tuple__67 = PyTuple_Pack(1, __pyx_kp_s_Illegal_index); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 3976, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__67); + __Pyx_GIVEREF(__pyx_tuple__67); - /* "netCDF4/_netCDF4.pyx":3961 + /* "netCDF4/_netCDF4.pyx":3984 * enew = self.shape[n]+e * if enew < 0: * raise IndexError("Illegal index") # <<<<<<<<<<<<<< * else: * elemnew.append(self.shape[n]+e) */ - __pyx_tuple__64 = PyTuple_Pack(1, __pyx_kp_s_Illegal_index); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 3961, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__64); - __Pyx_GIVEREF(__pyx_tuple__64); + __pyx_tuple__68 = PyTuple_Pack(1, __pyx_kp_s_Illegal_index); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 3984, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__68); + __Pyx_GIVEREF(__pyx_tuple__68); - /* "netCDF4/_netCDF4.pyx":4133 + /* "netCDF4/_netCDF4.pyx":4156 * fillval = self._FillValue * else: * fillval = default_fillvals[self.dtype.str[1:]] # <<<<<<<<<<<<<< * data = data.filled(fill_value=fillval) * */ - __pyx_slice__65 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__65)) __PYX_ERR(0, 4133, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__65); - __Pyx_GIVEREF(__pyx_slice__65); + __pyx_slice__69 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__69)) __PYX_ERR(0, 4156, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__69); + __Pyx_GIVEREF(__pyx_slice__69); - /* "netCDF4/_netCDF4.pyx":4151 + /* "netCDF4/_netCDF4.pyx":4174 * def __len__(self): * if not self.shape: * raise TypeError('len() of unsized object') # <<<<<<<<<<<<<< * else: * return self.shape[0] */ - __pyx_tuple__66 = PyTuple_Pack(1, __pyx_kp_s_len_of_unsized_object); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 4151, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__66); - __Pyx_GIVEREF(__pyx_tuple__66); + __pyx_tuple__70 = PyTuple_Pack(1, __pyx_kp_s_len_of_unsized_object); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 4174, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__70); + __Pyx_GIVEREF(__pyx_tuple__70); - /* "netCDF4/_netCDF4.pyx":4163 + /* "netCDF4/_netCDF4.pyx":4186 * 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__67 = PyTuple_Pack(1, __pyx_kp_s_to_assign_values_to_a_non_scalar); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 4163, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__67); - __Pyx_GIVEREF(__pyx_tuple__67); + __pyx_tuple__71 = PyTuple_Pack(1, __pyx_kp_s_to_assign_values_to_a_non_scalar); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 4186, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__71); + __Pyx_GIVEREF(__pyx_tuple__71); - /* "netCDF4/_netCDF4.pyx":4164 + /* "netCDF4/_netCDF4.pyx":4187 * if len(self.dimensions): * raise IndexError('to assign values to a non-scalar variable, use a slice') * self[:]=val # <<<<<<<<<<<<<< * * def getValue(self): */ - __pyx_slice__68 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__68)) __PYX_ERR(0, 4164, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__68); - __Pyx_GIVEREF(__pyx_slice__68); + __pyx_slice__72 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__72)) __PYX_ERR(0, 4187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__72); + __Pyx_GIVEREF(__pyx_slice__72); - /* "netCDF4/_netCDF4.pyx":4173 + /* "netCDF4/_netCDF4.pyx":4196 * 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__69 = PyTuple_Pack(1, __pyx_kp_s_to_retrieve_values_from_a_non_sc); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(0, 4173, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__69); - __Pyx_GIVEREF(__pyx_tuple__69); + __pyx_tuple__73 = PyTuple_Pack(1, __pyx_kp_s_to_retrieve_values_from_a_non_sc); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 4196, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__73); + __Pyx_GIVEREF(__pyx_tuple__73); - /* "netCDF4/_netCDF4.pyx":4174 + /* "netCDF4/_netCDF4.pyx":4197 * 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__70 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__70)) __PYX_ERR(0, 4174, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__70); - __Pyx_GIVEREF(__pyx_slice__70); + __pyx_slice__74 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__74)) __PYX_ERR(0, 4197, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__74); + __Pyx_GIVEREF(__pyx_slice__74); - /* "netCDF4/_netCDF4.pyx":4321 + /* "netCDF4/_netCDF4.pyx":4344 * 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__71 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__71)) __PYX_ERR(0, 4321, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__71); - __Pyx_GIVEREF(__pyx_slice__71); + __pyx_slice__75 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__75)) __PYX_ERR(0, 4344, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__75); + __Pyx_GIVEREF(__pyx_slice__75); - /* "netCDF4/_netCDF4.pyx":4325 + /* "netCDF4/_netCDF4.pyx":4348 * 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__72 = PySlice_New(Py_None, Py_None, __pyx_int_1); if (unlikely(!__pyx_slice__72)) __PYX_ERR(0, 4325, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__72); - __Pyx_GIVEREF(__pyx_slice__72); + __pyx_slice__76 = PySlice_New(Py_None, Py_None, __pyx_int_1); if (unlikely(!__pyx_slice__76)) __PYX_ERR(0, 4348, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__76); + __Pyx_GIVEREF(__pyx_slice__76); - /* "netCDF4/_netCDF4.pyx":4331 + /* "netCDF4/_netCDF4.pyx":4354 * 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__73 = PyTuple_Pack(1, __pyx_kp_s_size_of_data_array_does_not_conf); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 4331, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__73); - __Pyx_GIVEREF(__pyx_tuple__73); + __pyx_tuple__77 = PyTuple_Pack(1, __pyx_kp_s_size_of_data_array_does_not_conf); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 4354, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__77); + __Pyx_GIVEREF(__pyx_tuple__77); - /* "netCDF4/_netCDF4.pyx":4357 + /* "netCDF4/_netCDF4.pyx":4380 * 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__74 = PyTuple_Pack(1, __pyx_kp_s_data_to_put_in_string_variable_m); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 4357, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__74); - __Pyx_GIVEREF(__pyx_tuple__74); + __pyx_tuple__78 = PyTuple_Pack(1, __pyx_kp_s_data_to_put_in_string_variable_m); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(0, 4380, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__78); + __Pyx_GIVEREF(__pyx_tuple__78); - /* "netCDF4/_netCDF4.pyx":4376 + /* "netCDF4/_netCDF4.pyx":4399 * 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__75 = PyTuple_Pack(1, __pyx_kp_s_strides_must_all_be_1_for_string); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 4376, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__75); - __Pyx_GIVEREF(__pyx_tuple__75); + __pyx_tuple__79 = PyTuple_Pack(1, __pyx_kp_s_strides_must_all_be_1_for_string); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 4399, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__79); + __Pyx_GIVEREF(__pyx_tuple__79); - /* "netCDF4/_netCDF4.pyx":4392 + /* "netCDF4/_netCDF4.pyx":4415 * 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__76 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__76)) __PYX_ERR(0, 4392, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__76); - __Pyx_GIVEREF(__pyx_slice__76); + __pyx_slice__80 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__80)) __PYX_ERR(0, 4415, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__80); + __Pyx_GIVEREF(__pyx_slice__80); - /* "netCDF4/_netCDF4.pyx":4404 + /* "netCDF4/_netCDF4.pyx":4427 * 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__77 = PyTuple_Pack(1, __pyx_kp_s_strides_must_all_be_1_for_vlen_v); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 4404, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__77); - __Pyx_GIVEREF(__pyx_tuple__77); + __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, 4427, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__81); + __Pyx_GIVEREF(__pyx_tuple__81); - /* "netCDF4/_netCDF4.pyx":4432 + /* "netCDF4/_netCDF4.pyx":4455 * for lendim in count: * if lendim == -1: * shapeout = shapeout + (1,) # <<<<<<<<<<<<<< * squeeze_out = True * else: */ - __pyx_tuple__78 = PyTuple_Pack(1, __pyx_int_1); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(0, 4432, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__78); - __Pyx_GIVEREF(__pyx_tuple__78); + __pyx_tuple__82 = PyTuple_Pack(1, __pyx_int_1); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(0, 4455, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__82); + __Pyx_GIVEREF(__pyx_tuple__82); - /* "netCDF4/_netCDF4.pyx":4453 + /* "netCDF4/_netCDF4.pyx":4476 * 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__79 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__79)) __PYX_ERR(0, 4453, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__79); - __Pyx_GIVEREF(__pyx_slice__79); + __pyx_slice__83 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__83)) __PYX_ERR(0, 4476, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__83); + __Pyx_GIVEREF(__pyx_slice__83); - /* "netCDF4/_netCDF4.pyx":4457 + /* "netCDF4/_netCDF4.pyx":4480 * 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__80 = PySlice_New(Py_None, Py_None, __pyx_int_1); if (unlikely(!__pyx_slice__80)) __PYX_ERR(0, 4457, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__80); - __Pyx_GIVEREF(__pyx_slice__80); + __pyx_slice__84 = PySlice_New(Py_None, Py_None, __pyx_int_1); if (unlikely(!__pyx_slice__84)) __PYX_ERR(0, 4480, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__84); + __Pyx_GIVEREF(__pyx_slice__84); - /* "netCDF4/_netCDF4.pyx":4490 + /* "netCDF4/_netCDF4.pyx":4513 * 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__81 = PyTuple_Pack(1, __pyx_kp_s_strides_must_all_be_1_for_string); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 4490, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__81); - __Pyx_GIVEREF(__pyx_tuple__81); + __pyx_tuple__85 = PyTuple_Pack(1, __pyx_kp_s_strides_must_all_be_1_for_string); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 4513, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__85); + __Pyx_GIVEREF(__pyx_tuple__85); - /* "netCDF4/_netCDF4.pyx":4520 + /* "netCDF4/_netCDF4.pyx":4543 * 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__82 = PyTuple_Pack(1, __pyx_kp_s_strides_must_all_be_1_for_vlen_v); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(0, 4520, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__82); - __Pyx_GIVEREF(__pyx_tuple__82); + __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, 4543, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__86); + __Pyx_GIVEREF(__pyx_tuple__86); - /* "netCDF4/_netCDF4.pyx":4553 + /* "netCDF4/_netCDF4.pyx":4576 * # (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__83 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 4553, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__83); - __Pyx_GIVEREF(__pyx_tuple__83); + __pyx_tuple__87 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 4576, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__87); + __Pyx_GIVEREF(__pyx_tuple__87); - /* "netCDF4/_netCDF4.pyx":4563 + /* "netCDF4/_netCDF4.pyx":4586 * def __reduce__(self): * # raise error is user tries to pickle a Variable object. * raise NotImplementedError('Variable is not picklable') # <<<<<<<<<<<<<< * * # Compound datatype support. */ - __pyx_tuple__84 = PyTuple_Pack(1, __pyx_kp_s_Variable_is_not_picklable); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(0, 4563, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__84); - __Pyx_GIVEREF(__pyx_tuple__84); + __pyx_tuple__88 = PyTuple_Pack(1, __pyx_kp_s_Variable_is_not_picklable); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 4586, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__88); + __Pyx_GIVEREF(__pyx_tuple__88); - /* "netCDF4/_netCDF4.pyx":4630 + /* "netCDF4/_netCDF4.pyx":4653 * 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__85 = PyTuple_Pack(1, __pyx_kp_s_CompoundType_is_not_picklable); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 4630, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__85); - __Pyx_GIVEREF(__pyx_tuple__85); + __pyx_tuple__89 = PyTuple_Pack(1, __pyx_kp_s_CompoundType_is_not_picklable); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(0, 4653, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__89); + __Pyx_GIVEREF(__pyx_tuple__89); - /* "netCDF4/_netCDF4.pyx":4660 + /* "netCDF4/_netCDF4.pyx":4683 * if format.kind != 'V': # scalar primitive type * try: * xtype_tmp = _nptonctype[format.str[1:]] # <<<<<<<<<<<<<< * except KeyError: * raise ValueError('Unsupported compound type element') */ - __pyx_slice__86 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__86)) __PYX_ERR(0, 4660, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__86); - __Pyx_GIVEREF(__pyx_slice__86); + __pyx_slice__90 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__90)) __PYX_ERR(0, 4683, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__90); + __Pyx_GIVEREF(__pyx_slice__90); - /* "netCDF4/_netCDF4.pyx":4662 + /* "netCDF4/_netCDF4.pyx":4685 * 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__87 = PyTuple_Pack(1, __pyx_kp_s_Unsupported_compound_type_elemen); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 4662, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__87); - __Pyx_GIVEREF(__pyx_tuple__87); + __pyx_tuple__91 = PyTuple_Pack(1, __pyx_kp_s_Unsupported_compound_type_elemen); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(0, 4685, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__91); + __Pyx_GIVEREF(__pyx_tuple__91); - /* "netCDF4/_netCDF4.pyx":4685 + /* "netCDF4/_netCDF4.pyx":4708 * 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__88 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__88)) __PYX_ERR(0, 4685, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__88); - __Pyx_GIVEREF(__pyx_slice__88); + __pyx_slice__92 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__92)) __PYX_ERR(0, 4708, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__92); + __Pyx_GIVEREF(__pyx_slice__92); - /* "netCDF4/_netCDF4.pyx":4687 + /* "netCDF4/_netCDF4.pyx":4710 * 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__89 = PyTuple_Pack(1, __pyx_kp_s_Unsupported_compound_type_elemen); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(0, 4687, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__89); - __Pyx_GIVEREF(__pyx_tuple__89); + __pyx_tuple__93 = PyTuple_Pack(1, __pyx_kp_s_Unsupported_compound_type_elemen); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(0, 4710, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__93); + __Pyx_GIVEREF(__pyx_tuple__93); - /* "netCDF4/_netCDF4.pyx":4725 + /* "netCDF4/_netCDF4.pyx":4748 * 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__90 = PyTuple_Pack(1, __pyx_kp_s_cannot_find_compound_type_in_thi); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(0, 4725, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__90); - __Pyx_GIVEREF(__pyx_tuple__90); + __pyx_tuple__94 = PyTuple_Pack(1, __pyx_kp_s_cannot_find_compound_type_in_thi); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(0, 4748, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__94); + __Pyx_GIVEREF(__pyx_tuple__94); - /* "netCDF4/_netCDF4.pyx":4727 + /* "netCDF4/_netCDF4.pyx":4750 * 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__91 = PyTuple_Pack(1, __pyx_kp_s_cannot_find_compound_type_in_thi); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(0, 4727, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__91); - __Pyx_GIVEREF(__pyx_tuple__91); + __pyx_tuple__95 = PyTuple_Pack(1, __pyx_kp_s_cannot_find_compound_type_in_thi); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(0, 4750, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__95); + __Pyx_GIVEREF(__pyx_tuple__95); - /* "netCDF4/_netCDF4.pyx":4801 + /* "netCDF4/_netCDF4.pyx":4824 * 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__92 = PyTuple_Pack(1, __pyx_kp_s_compound_field_of_an_unsupported); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(0, 4801, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__92); - __Pyx_GIVEREF(__pyx_tuple__92); + __pyx_tuple__96 = PyTuple_Pack(1, __pyx_kp_s_compound_field_of_an_unsupported); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(0, 4824, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__96); + __Pyx_GIVEREF(__pyx_tuple__96); - /* "netCDF4/_netCDF4.pyx":4877 + /* "netCDF4/_netCDF4.pyx":4900 * 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__93 = PyTuple_Pack(1, __pyx_kp_s_VLType_is_not_picklable); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(0, 4877, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__93); - __Pyx_GIVEREF(__pyx_tuple__93); + __pyx_tuple__97 = PyTuple_Pack(1, __pyx_kp_s_VLType_is_not_picklable); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(0, 4900, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__97); + __Pyx_GIVEREF(__pyx_tuple__97); - /* "netCDF4/_netCDF4.pyx":4894 + /* "netCDF4/_netCDF4.pyx":4917 * 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__94 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__94)) __PYX_ERR(0, 4894, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__94); - __Pyx_GIVEREF(__pyx_slice__94); + __pyx_slice__98 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__98)) __PYX_ERR(0, 4917, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__98); + __Pyx_GIVEREF(__pyx_slice__98); - /* "netCDF4/_netCDF4.pyx":4897 + /* "netCDF4/_netCDF4.pyx":4920 * # 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__95 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__95)) __PYX_ERR(0, 4897, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__95); - __Pyx_GIVEREF(__pyx_slice__95); + __pyx_slice__99 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__99)) __PYX_ERR(0, 4920, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__99); + __Pyx_GIVEREF(__pyx_slice__99); - /* "netCDF4/_netCDF4.pyx":4902 + /* "netCDF4/_netCDF4.pyx":4925 * raise RuntimeError((nc_strerror(ierr)).decode('ascii')) * else: * raise KeyError("unsupported datatype specified for VLEN") # <<<<<<<<<<<<<< * return xtype, dt * */ - __pyx_tuple__96 = PyTuple_Pack(1, __pyx_kp_s_unsupported_datatype_specified_f); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(0, 4902, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__96); - __Pyx_GIVEREF(__pyx_tuple__96); + __pyx_tuple__100 = PyTuple_Pack(1, __pyx_kp_s_unsupported_datatype_specified_f); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(0, 4925, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__100); + __Pyx_GIVEREF(__pyx_tuple__100); - /* "netCDF4/_netCDF4.pyx":4929 + /* "netCDF4/_netCDF4.pyx":4952 * 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__97 = PyTuple_Pack(1, __pyx_kp_s_unsupported_component_type_for_V); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(0, 4929, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__97); - __Pyx_GIVEREF(__pyx_tuple__97); + __pyx_tuple__101 = PyTuple_Pack(1, __pyx_kp_s_unsupported_component_type_for_V); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(0, 4952, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__101); + __Pyx_GIVEREF(__pyx_tuple__101); - /* "netCDF4/_netCDF4.pyx":4996 + /* "netCDF4/_netCDF4.pyx":5019 * 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__98 = PyTuple_Pack(1, __pyx_kp_s_EnumType_is_not_picklable); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(0, 4996, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__98); - __Pyx_GIVEREF(__pyx_tuple__98); + __pyx_tuple__102 = PyTuple_Pack(1, __pyx_kp_s_EnumType_is_not_picklable); if (unlikely(!__pyx_tuple__102)) __PYX_ERR(0, 5019, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__102); + __Pyx_GIVEREF(__pyx_tuple__102); - /* "netCDF4/_netCDF4.pyx":5008 + /* "netCDF4/_netCDF4.pyx":5031 * 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__99 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__99)) __PYX_ERR(0, 5008, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__99); - __Pyx_GIVEREF(__pyx_slice__99); + __pyx_slice__103 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__103)) __PYX_ERR(0, 5031, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__103); + __Pyx_GIVEREF(__pyx_slice__103); - /* "netCDF4/_netCDF4.pyx":5011 + /* "netCDF4/_netCDF4.pyx":5034 * # 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__100 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__100)) __PYX_ERR(0, 5011, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__100); - __Pyx_GIVEREF(__pyx_slice__100); + __pyx_slice__104 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__104)) __PYX_ERR(0, 5034, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__104); + __Pyx_GIVEREF(__pyx_slice__104); - /* "netCDF4/_netCDF4.pyx":5051 + /* "netCDF4/_netCDF4.pyx":5074 * 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__101 = PyTuple_Pack(1, __pyx_kp_s_unsupported_component_type_for_V); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(0, 5051, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__101); - __Pyx_GIVEREF(__pyx_tuple__101); + __pyx_tuple__105 = PyTuple_Pack(1, __pyx_kp_s_unsupported_component_type_for_V); if (unlikely(!__pyx_tuple__105)) __PYX_ERR(0, 5074, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__105); + __Pyx_GIVEREF(__pyx_tuple__105); - /* "netCDF4/_netCDF4.pyx":5079 + /* "netCDF4/_netCDF4.pyx":5102 * return str(bytestr,encoding='ascii') * else: * return bytestr.encode('ascii') # <<<<<<<<<<<<<< * * #---------------------------------------- */ - __pyx_tuple__102 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__102)) __PYX_ERR(0, 5079, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__102); - __Pyx_GIVEREF(__pyx_tuple__102); + __pyx_tuple__106 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(0, 5102, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__106); + __Pyx_GIVEREF(__pyx_tuple__106); - /* "netCDF4/_netCDF4.pyx":5099 + /* "netCDF4/_netCDF4.pyx":5122 * 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__103 = PyTuple_Pack(1, __pyx_kp_s_no_since_in_unit_string); if (unlikely(!__pyx_tuple__103)) __PYX_ERR(0, 5099, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__103); - __Pyx_GIVEREF(__pyx_tuple__103); + __pyx_tuple__107 = PyTuple_Pack(1, __pyx_kp_s_no_since_in_unit_string); if (unlikely(!__pyx_tuple__107)) __PYX_ERR(0, 5122, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__107); + __Pyx_GIVEREF(__pyx_tuple__107); - /* "netCDF4/_netCDF4.pyx":5101 + /* "netCDF4/_netCDF4.pyx":5124 * 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__104 = PyTuple_Pack(1, __pyx_n_s_since); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(0, 5101, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__104); - __Pyx_GIVEREF(__pyx_tuple__104); + __pyx_tuple__108 = PyTuple_Pack(1, __pyx_n_s_since); if (unlikely(!__pyx_tuple__108)) __PYX_ERR(0, 5124, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__108); + __Pyx_GIVEREF(__pyx_tuple__108); - /* "netCDF4/_netCDF4.pyx":5113 + /* "netCDF4/_netCDF4.pyx":5136 * basedate = netcdftime.datetime(year, month, day, hour, minute, second) * else: * raise ValueError('cannot use utc_offset for reference years <= 0') # <<<<<<<<<<<<<< * return basedate * */ - __pyx_tuple__105 = PyTuple_Pack(1, __pyx_kp_s_cannot_use_utc_offset_for_refere); if (unlikely(!__pyx_tuple__105)) __PYX_ERR(0, 5113, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__105); - __Pyx_GIVEREF(__pyx_tuple__105); + __pyx_tuple__109 = PyTuple_Pack(1, __pyx_kp_s_cannot_use_utc_offset_for_refere); if (unlikely(!__pyx_tuple__109)) __PYX_ERR(0, 5136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__109); + __Pyx_GIVEREF(__pyx_tuple__109); - /* "netCDF4/_netCDF4.pyx":5134 + /* "netCDF4/_netCDF4.pyx":5157 * (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__106 = PyTuple_Pack(1, __pyx_kp_s_dtype_must_string_or_unicode_S_o); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(0, 5134, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__106); - __Pyx_GIVEREF(__pyx_tuple__106); + __pyx_tuple__110 = PyTuple_Pack(1, __pyx_kp_s_dtype_must_string_or_unicode_S_o); if (unlikely(!__pyx_tuple__110)) __PYX_ERR(0, 5157, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__110); + __Pyx_GIVEREF(__pyx_tuple__110); - /* "netCDF4/_netCDF4.pyx":5153 + /* "netCDF4/_netCDF4.pyx":5176 * 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__107 = PyTuple_Pack(1, __pyx_kp_s_type_must_string_or_unicode_S_or); if (unlikely(!__pyx_tuple__107)) __PYX_ERR(0, 5153, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__107); - __Pyx_GIVEREF(__pyx_tuple__107); + __pyx_tuple__111 = PyTuple_Pack(1, __pyx_kp_s_type_must_string_or_unicode_S_or); if (unlikely(!__pyx_tuple__111)) __PYX_ERR(0, 5176, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__111); + __Pyx_GIVEREF(__pyx_tuple__111); - /* "netCDF4/_netCDF4.pyx":5172 + /* "netCDF4/_netCDF4.pyx":5195 * 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__108 = PyTuple_Pack(1, __pyx_kp_s_type_must_string_or_unicode_S_or); if (unlikely(!__pyx_tuple__108)) __PYX_ERR(0, 5172, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__108); - __Pyx_GIVEREF(__pyx_tuple__108); + __pyx_tuple__112 = PyTuple_Pack(1, __pyx_kp_s_type_must_string_or_unicode_S_or); if (unlikely(!__pyx_tuple__112)) __PYX_ERR(0, 5195, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__112); + __Pyx_GIVEREF(__pyx_tuple__112); - /* "netCDF4/_netCDF4.pyx":5176 + /* "netCDF4/_netCDF4.pyx":5199 * 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__109 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__109)) __PYX_ERR(0, 5176, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__109); - __Pyx_GIVEREF(__pyx_slice__109); + __pyx_slice__113 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__113)) __PYX_ERR(0, 5199, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__113); + __Pyx_GIVEREF(__pyx_slice__113); - /* "netCDF4/_netCDF4.pyx":5258 + /* "netCDF4/_netCDF4.pyx":5281 * times.append(totaltime/1.e6/3600./24.) * else: * raise ValueError('unsupported time units') # <<<<<<<<<<<<<< * if isscalar: * return times[0] */ - __pyx_tuple__110 = PyTuple_Pack(1, __pyx_kp_s_unsupported_time_units); if (unlikely(!__pyx_tuple__110)) __PYX_ERR(0, 5258, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__110); - __Pyx_GIVEREF(__pyx_tuple__110); + __pyx_tuple__114 = PyTuple_Pack(1, __pyx_kp_s_unsupported_time_units); if (unlikely(!__pyx_tuple__114)) __PYX_ERR(0, 5281, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__114); + __Pyx_GIVEREF(__pyx_tuple__114); - /* "netCDF4/_netCDF4.pyx":5352 + /* "netCDF4/_netCDF4.pyx":5375 * tsecs = time*86400. * else: * raise ValueError('unsupported time units') # <<<<<<<<<<<<<< * # compute time delta. * days = tsecs // 86400. */ - __pyx_tuple__111 = PyTuple_Pack(1, __pyx_kp_s_unsupported_time_units); if (unlikely(!__pyx_tuple__111)) __PYX_ERR(0, 5352, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__111); - __Pyx_GIVEREF(__pyx_tuple__111); + __pyx_tuple__115 = PyTuple_Pack(1, __pyx_kp_s_unsupported_time_units); if (unlikely(!__pyx_tuple__115)) __PYX_ERR(0, 5375, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__115); + __Pyx_GIVEREF(__pyx_tuple__115); - /* "netCDF4/_netCDF4.pyx":5404 + /* "netCDF4/_netCDF4.pyx":5427 * nctime.units * except AttributeError: * raise AttributeError("netcdf time variable is missing a 'units' attribute") # <<<<<<<<<<<<<< * if calendar == None: * calendar = getattr(nctime, 'calendar', 'standard') */ - __pyx_tuple__112 = PyTuple_Pack(1, __pyx_kp_s_netcdf_time_variable_is_missing); if (unlikely(!__pyx_tuple__112)) __PYX_ERR(0, 5404, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__112); - __Pyx_GIVEREF(__pyx_tuple__112); + __pyx_tuple__116 = PyTuple_Pack(1, __pyx_kp_s_netcdf_time_variable_is_missing); if (unlikely(!__pyx_tuple__116)) __PYX_ERR(0, 5427, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__116); + __Pyx_GIVEREF(__pyx_tuple__116); - /* "netCDF4/_netCDF4.pyx":5490 + /* "netCDF4/_netCDF4.pyx":5513 * # can be used like a CDF instance. * if isinstance(files, str): * if files.startswith('http'): # <<<<<<<<<<<<<< * msg='cannot using file globbing for remote (OPeNDAP) datasets' * raise ValueError(msg) */ - __pyx_tuple__113 = PyTuple_Pack(1, __pyx_n_s_http); if (unlikely(!__pyx_tuple__113)) __PYX_ERR(0, 5490, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__113); - __Pyx_GIVEREF(__pyx_tuple__113); + __pyx_tuple__117 = PyTuple_Pack(1, __pyx_n_s_http); if (unlikely(!__pyx_tuple__117)) __PYX_ERR(0, 5513, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__117); + __Pyx_GIVEREF(__pyx_tuple__117); - /* "netCDF4/_netCDF4.pyx":5552 + /* "netCDF4/_netCDF4.pyx":5575 * # Make sure each file defines the same aggregation variables as the master * # and that the variables are defined in the same way (name, shape and type) * for f in files[1:]: # <<<<<<<<<<<<<< * part = Dataset(f) * varInfo = part.variables */ - __pyx_slice__114 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__114)) __PYX_ERR(0, 5552, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__114); - __Pyx_GIVEREF(__pyx_slice__114); + __pyx_slice__118 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__118)) __PYX_ERR(0, 5575, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__118); + __Pyx_GIVEREF(__pyx_slice__118); - /* "netCDF4/_netCDF4.pyx":5563 + /* "netCDF4/_netCDF4.pyx":5586 * #if not vInst.dimensions[0] != aggDimName: * * masterDims, masterShape, masterType = masterRecVar[v][:3] # <<<<<<<<<<<<<< * extDims = varInfo[v].dimensions * extShape = varInfo[v].shape */ - __pyx_slice__115 = PySlice_New(Py_None, __pyx_int_3, Py_None); if (unlikely(!__pyx_slice__115)) __PYX_ERR(0, 5563, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__115); - __Pyx_GIVEREF(__pyx_slice__115); + __pyx_slice__119 = PySlice_New(Py_None, __pyx_int_3, Py_None); if (unlikely(!__pyx_slice__119)) __PYX_ERR(0, 5586, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__119); + __Pyx_GIVEREF(__pyx_slice__119); - /* "netCDF4/_netCDF4.pyx":5580 + /* "netCDF4/_netCDF4.pyx":5603 * "master %s (%s) and extension %s (%s)" % * (v, master, len(masterShape), f, len(extShape))) * if masterShape[1:] != extShape[1:]: # <<<<<<<<<<<<<< * raise IOError("variable %s : shape mismatch between " * "master %s (%s) and extension %s (%s)" % */ - __pyx_slice__116 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__116)) __PYX_ERR(0, 5580, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__116); - __Pyx_GIVEREF(__pyx_slice__116); - __pyx_slice__117 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__117)) __PYX_ERR(0, 5580, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__117); - __Pyx_GIVEREF(__pyx_slice__117); + __pyx_slice__120 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__120)) __PYX_ERR(0, 5603, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__120); + __Pyx_GIVEREF(__pyx_slice__120); + __pyx_slice__121 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__121)) __PYX_ERR(0, 5603, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__121); + __Pyx_GIVEREF(__pyx_slice__121); - /* "netCDF4/_netCDF4.pyx":5623 + /* "netCDF4/_netCDF4.pyx":5646 * for dset in self._cdf: * if dset.file_format == 'NETCDF4' or dset.data_model == 'NETCDF4': * raise ValueError('MFNetCDF4 only works with NETCDF3_* and NETCDF4_CLASSIC formatted files, not NETCDF4') # <<<<<<<<<<<<<< * self._file_format.append(dset.file_format) * self._data_model.append(dset.data_model) */ - __pyx_tuple__118 = PyTuple_Pack(1, __pyx_kp_s_MFNetCDF4_only_works_with_NETCDF); if (unlikely(!__pyx_tuple__118)) __PYX_ERR(0, 5623, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__118); - __Pyx_GIVEREF(__pyx_tuple__118); + __pyx_tuple__122 = PyTuple_Pack(1, __pyx_kp_s_MFNetCDF4_only_works_with_NETCDF); if (unlikely(!__pyx_tuple__122)) __PYX_ERR(0, 5646, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__122); + __Pyx_GIVEREF(__pyx_tuple__122); - /* "netCDF4/_netCDF4.pyx":5683 + /* "netCDF4/_netCDF4.pyx":5706 * def __reduce__(self): * # raise error is user tries to pickle a MFDataset object. * raise NotImplementedError('MFDataset is not picklable') # <<<<<<<<<<<<<< * * class _Dimension(object): */ - __pyx_tuple__119 = PyTuple_Pack(1, __pyx_kp_s_MFDataset_is_not_picklable); if (unlikely(!__pyx_tuple__119)) __PYX_ERR(0, 5683, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__119); - __Pyx_GIVEREF(__pyx_tuple__119); + __pyx_tuple__123 = PyTuple_Pack(1, __pyx_kp_s_MFDataset_is_not_picklable); if (unlikely(!__pyx_tuple__123)) __PYX_ERR(0, 5706, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__123); + __Pyx_GIVEREF(__pyx_tuple__123); - /* "netCDF4/_netCDF4.pyx":5743 + /* "netCDF4/_netCDF4.pyx":5766 * def __len__(self): * if not self._shape: * raise TypeError('len() of unsized object') # <<<<<<<<<<<<<< * else: * return self._shape()[0] */ - __pyx_tuple__120 = PyTuple_Pack(1, __pyx_kp_s_len_of_unsized_object); if (unlikely(!__pyx_tuple__120)) __PYX_ERR(0, 5743, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__120); - __Pyx_GIVEREF(__pyx_tuple__120); + __pyx_tuple__124 = PyTuple_Pack(1, __pyx_kp_s_len_of_unsized_object); if (unlikely(!__pyx_tuple__124)) __PYX_ERR(0, 5766, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__124); + __Pyx_GIVEREF(__pyx_tuple__124); - /* "netCDF4/_netCDF4.pyx":5748 + /* "netCDF4/_netCDF4.pyx":5771 * def _shape(self): * recdimlen = len(self._dset.dimensions[self._recdimname]) * return (recdimlen,) + self._mastervar.shape[1:] # <<<<<<<<<<<<<< * def set_auto_maskandscale(self,val): * for v in self._recVar: */ - __pyx_slice__121 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__121)) __PYX_ERR(0, 5748, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__121); - __Pyx_GIVEREF(__pyx_slice__121); + __pyx_slice__125 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__125)) __PYX_ERR(0, 5771, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__125); + __Pyx_GIVEREF(__pyx_slice__125); - /* "netCDF4/_netCDF4.pyx":5775 + /* "netCDF4/_netCDF4.pyx":5798 * # The convention used is that for those cases, * # put_ind for this dimension is set to -1 by _StartCountStride. * squeeze = data.ndim * [slice(None),] # <<<<<<<<<<<<<< * for i,n in enumerate(put_ind.shape[:-1]): * if n == 1 and put_ind[...,i].ravel()[0] == -1: */ - __pyx_slice__122 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__122)) __PYX_ERR(0, 5775, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__122); - __Pyx_GIVEREF(__pyx_slice__122); + __pyx_slice__126 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__126)) __PYX_ERR(0, 5798, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__126); + __Pyx_GIVEREF(__pyx_slice__126); - /* "netCDF4/_netCDF4.pyx":5776 + /* "netCDF4/_netCDF4.pyx":5799 * # put_ind for this dimension is set to -1 by _StartCountStride. * squeeze = data.ndim * [slice(None),] * for i,n in enumerate(put_ind.shape[:-1]): # <<<<<<<<<<<<<< * if n == 1 and put_ind[...,i].ravel()[0] == -1: * squeeze[i] = 0 */ - __pyx_slice__123 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__123)) __PYX_ERR(0, 5776, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__123); - __Pyx_GIVEREF(__pyx_slice__123); + __pyx_slice__127 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__127)) __PYX_ERR(0, 5799, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__127); + __Pyx_GIVEREF(__pyx_slice__127); - /* "netCDF4/_netCDF4.pyx":5793 + /* "netCDF4/_netCDF4.pyx":5816 * count = [abs(cnt) for cnt in count] * if (numpy.array(stride) < 0).any(): * raise IndexError('negative strides not allowed when slicing MFVariable Variable instance') # <<<<<<<<<<<<<< * # Start, stop and step along 1st dimension, eg the unlimited * # dimension. */ - __pyx_tuple__124 = PyTuple_Pack(1, __pyx_kp_s_negative_strides_not_allowed_whe); if (unlikely(!__pyx_tuple__124)) __PYX_ERR(0, 5793, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__124); - __Pyx_GIVEREF(__pyx_tuple__124); + __pyx_tuple__128 = PyTuple_Pack(1, __pyx_kp_s_negative_strides_not_allowed_whe); if (unlikely(!__pyx_tuple__128)) __PYX_ERR(0, 5816, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__128); + __Pyx_GIVEREF(__pyx_tuple__128); - /* "netCDF4/_netCDF4.pyx":5817 + /* "netCDF4/_netCDF4.pyx":5840 * * # Rebuild the slicing expression for dimensions 1 and ssq. * newSlice = [slice(None, None, None)] # <<<<<<<<<<<<<< * for n in range(1, len(start)): # skip dimension 0 * s = slice(start[n],start[n] + count[n] * stride[n], stride[n]) */ - __pyx_slice__125 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__125)) __PYX_ERR(0, 5817, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__125); - __Pyx_GIVEREF(__pyx_slice__125); + __pyx_slice__129 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__129)) __PYX_ERR(0, 5840, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__129); + __Pyx_GIVEREF(__pyx_slice__129); - /* "netCDF4/_netCDF4.pyx":5919 + /* "netCDF4/_netCDF4.pyx":5942 * for t in self._recVar: * if not hasattr(t,'calendar'): * raise ValueError('MFTime requires that the time variable in all files have a calendar attribute') # <<<<<<<<<<<<<< * * # Check that calendar is the same in all files. */ - __pyx_tuple__126 = PyTuple_Pack(1, __pyx_kp_s_MFTime_requires_that_the_time_va); if (unlikely(!__pyx_tuple__126)) __PYX_ERR(0, 5919, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__126); - __Pyx_GIVEREF(__pyx_tuple__126); + __pyx_tuple__130 = PyTuple_Pack(1, __pyx_kp_s_MFTime_requires_that_the_time_va); if (unlikely(!__pyx_tuple__130)) __PYX_ERR(0, 5942, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__130); + __Pyx_GIVEREF(__pyx_tuple__130); - /* "netCDF4/_netCDF4.pyx":5923 + /* "netCDF4/_netCDF4.pyx":5946 * # Check that calendar is the same in all files. * if len(set([t.calendar for t in self._recVar])) > 1: * raise ValueError('MFTime requires that the same time calendar is used by all files.') # <<<<<<<<<<<<<< * * # Override units if units is specified. */ - __pyx_tuple__127 = PyTuple_Pack(1, __pyx_kp_s_MFTime_requires_that_the_same_ti); if (unlikely(!__pyx_tuple__127)) __PYX_ERR(0, 5923, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__127); - __Pyx_GIVEREF(__pyx_tuple__127); + __pyx_tuple__131 = PyTuple_Pack(1, __pyx_kp_s_MFTime_requires_that_the_same_ti); if (unlikely(!__pyx_tuple__131)) __PYX_ERR(0, 5946, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__131); + __Pyx_GIVEREF(__pyx_tuple__131); - /* "netCDF4/_netCDF4.pyx":5929 + /* "netCDF4/_netCDF4.pyx":5952 * * # Reference date to compute the difference between different time units. * ref_date = datetime.datetime(1900,1,1) # <<<<<<<<<<<<<< * ref_num = date2num(ref_date, self.units, self.calendar) * */ - __pyx_tuple__128 = PyTuple_Pack(3, __pyx_int_1900, __pyx_int_1, __pyx_int_1); if (unlikely(!__pyx_tuple__128)) __PYX_ERR(0, 5929, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__128); - __Pyx_GIVEREF(__pyx_tuple__128); + __pyx_tuple__132 = PyTuple_Pack(3, __pyx_int_1900, __pyx_int_1, __pyx_int_1); if (unlikely(!__pyx_tuple__132)) __PYX_ERR(0, 5952, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__132); + __Pyx_GIVEREF(__pyx_tuple__132); /* "netCDF4/_netCDF4.pyx":932 * from ordereddict import OrderedDict @@ -81337,9 +81428,9 @@ static int __Pyx_InitCachedConstants(void) { * try: * from itertools import izip as zip */ - __pyx_tuple__129 = PyTuple_Pack(1, __pyx_kp_s_please_install_ordereddict_https); if (unlikely(!__pyx_tuple__129)) __PYX_ERR(0, 932, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__129); - __Pyx_GIVEREF(__pyx_tuple__129); + __pyx_tuple__133 = PyTuple_Pack(1, __pyx_kp_s_please_install_ordereddict_https); if (unlikely(!__pyx_tuple__133)) __PYX_ERR(0, 932, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__133); + __Pyx_GIVEREF(__pyx_tuple__133); /* "netCDF4/_netCDF4.pyx":958 * # check for required version of netcdf-4 and hdf5. @@ -81348,10 +81439,10 @@ static int __Pyx_InitCachedConstants(void) { * majorvers = H5_VERS_MAJOR * minorvers = H5_VERS_MINOR */ - __pyx_tuple__130 = PyTuple_Pack(4, __pyx_n_s_majorvers, __pyx_n_s_minorvers, __pyx_n_s_releasevers, __pyx_n_s_patchstring); if (unlikely(!__pyx_tuple__130)) __PYX_ERR(0, 958, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__130); - __Pyx_GIVEREF(__pyx_tuple__130); - __pyx_codeobj__131 = (PyObject*)__Pyx_PyCode_New(0, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__130, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_gethdf5libversion, 958, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__131)) __PYX_ERR(0, 958, __pyx_L1_error) + __pyx_tuple__134 = PyTuple_Pack(4, __pyx_n_s_majorvers, __pyx_n_s_minorvers, __pyx_n_s_releasevers, __pyx_n_s_patchstring); if (unlikely(!__pyx_tuple__134)) __PYX_ERR(0, 958, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__134); + __Pyx_GIVEREF(__pyx_tuple__134); + __pyx_codeobj__135 = (PyObject*)__Pyx_PyCode_New(0, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__134, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_amohr_dev_thehesiod_netcd, __pyx_n_s_gethdf5libversion, 958, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__135)) __PYX_ERR(0, 958, __pyx_L1_error) /* "netCDF4/_netCDF4.pyx":968 * return '%d.%d.%d-%s' % (majorvers,minorvers,releasevers,patchstring) @@ -81360,471 +81451,471 @@ static int __Pyx_InitCachedConstants(void) { * """ * **`getlibversion()`** */ - __pyx_codeobj__132 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_getlibversion, 968, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__132)) __PYX_ERR(0, 968, __pyx_L1_error) + __pyx_codeobj__136 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_amohr_dev_thehesiod_netcd, __pyx_n_s_getlibversion, 968, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__136)) __PYX_ERR(0, 968, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":984 - * __has_cdf5__ = HAS_CDF5_FORMAT + /* "netCDF4/_netCDF4.pyx":985 + * __has_nc_open_mem__ = HAS_NC_OPEN_MEM * _needsworkaround_issue485 = __netcdf4libversion__ < "4.4.0" or \ * (__netcdf4libversion__.startswith("4.4.0") and \ # <<<<<<<<<<<<<< * "-development" in __netcdf4libversion__) * */ - __pyx_tuple__133 = PyTuple_Pack(1, __pyx_kp_s_4_4_0); if (unlikely(!__pyx_tuple__133)) __PYX_ERR(0, 984, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__133); - __Pyx_GIVEREF(__pyx_tuple__133); + __pyx_tuple__137 = PyTuple_Pack(1, __pyx_kp_s_4_4_0); if (unlikely(!__pyx_tuple__137)) __PYX_ERR(0, 985, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__137); + __Pyx_GIVEREF(__pyx_tuple__137); - /* "netCDF4/_netCDF4.pyx":988 + /* "netCDF4/_netCDF4.pyx":989 * * # issue warning for hdf5 1.10 (issue #549) * if __netcdf4libversion__[0:5] < "4.4.1" and\ # <<<<<<<<<<<<<< * __hdf5libversion__.startswith("1.10"): * msg = """ */ - __pyx_slice__134 = PySlice_New(__pyx_int_0, __pyx_int_5, Py_None); if (unlikely(!__pyx_slice__134)) __PYX_ERR(0, 988, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__134); - __Pyx_GIVEREF(__pyx_slice__134); + __pyx_slice__138 = PySlice_New(__pyx_int_0, __pyx_int_5, Py_None); if (unlikely(!__pyx_slice__138)) __PYX_ERR(0, 989, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__138); + __Pyx_GIVEREF(__pyx_slice__138); - /* "netCDF4/_netCDF4.pyx":989 + /* "netCDF4/_netCDF4.pyx":990 * # issue warning for hdf5 1.10 (issue #549) * if __netcdf4libversion__[0:5] < "4.4.1" and\ * __hdf5libversion__.startswith("1.10"): # <<<<<<<<<<<<<< * msg = """ * WARNING: Backwards incompatible files will be created with HDF5 1.10.x */ - __pyx_tuple__135 = PyTuple_Pack(1, __pyx_kp_s_1_10); if (unlikely(!__pyx_tuple__135)) __PYX_ERR(0, 989, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__135); - __Pyx_GIVEREF(__pyx_tuple__135); + __pyx_tuple__139 = PyTuple_Pack(1, __pyx_kp_s_1_10); if (unlikely(!__pyx_tuple__139)) __PYX_ERR(0, 990, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__139); + __Pyx_GIVEREF(__pyx_tuple__139); - /* "netCDF4/_netCDF4.pyx":1054 + /* "netCDF4/_netCDF4.pyx":1055 * * # logical for native endian type. * is_native_little = numpy.dtype('f4').byteorder == '=' * */ - __pyx_tuple__136 = PyTuple_Pack(1, __pyx_kp_s_f4_2); if (unlikely(!__pyx_tuple__136)) __PYX_ERR(0, 1054, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__136); - __Pyx_GIVEREF(__pyx_tuple__136); + __pyx_tuple__140 = PyTuple_Pack(1, __pyx_kp_s_f4_2); if (unlikely(!__pyx_tuple__140)) __PYX_ERR(0, 1055, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__140); + __Pyx_GIVEREF(__pyx_tuple__140); - /* "netCDF4/_netCDF4.pyx":1055 + /* "netCDF4/_netCDF4.pyx":1056 * # logical for native endian type. * is_native_little = numpy.dtype('f4').byteorder == '=' # <<<<<<<<<<<<<< * - * # hard code this here, instead of importing from netcdf.h + * # hard code these here, instead of importing from netcdf.h */ - __pyx_tuple__137 = PyTuple_Pack(1, __pyx_kp_s_f4_3); if (unlikely(!__pyx_tuple__137)) __PYX_ERR(0, 1055, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__137); - __Pyx_GIVEREF(__pyx_tuple__137); + __pyx_tuple__141 = PyTuple_Pack(1, __pyx_kp_s_f4_3); if (unlikely(!__pyx_tuple__141)) __PYX_ERR(0, 1056, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__141); + __Pyx_GIVEREF(__pyx_tuple__141); - /* "netCDF4/_netCDF4.pyx":1183 + /* "netCDF4/_netCDF4.pyx":1185 * return value_arr * * def _set_default_format(object format='NETCDF4'): # <<<<<<<<<<<<<< * # Private function to set the netCDF file format * if format not in _format_dict: */ - __pyx_tuple__138 = PyTuple_Pack(1, __pyx_n_s_format); if (unlikely(!__pyx_tuple__138)) __PYX_ERR(0, 1183, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__138); - __Pyx_GIVEREF(__pyx_tuple__138); - __pyx_codeobj__139 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__138, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_set_default_format, 1183, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__139)) __PYX_ERR(0, 1183, __pyx_L1_error) + __pyx_tuple__142 = PyTuple_Pack(1, __pyx_n_s_format); if (unlikely(!__pyx_tuple__142)) __PYX_ERR(0, 1185, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__142); + __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_Users_amohr_dev_thehesiod_netcd, __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":5074 + /* "netCDF4/_netCDF4.pyx":5097 * return pystr # already bytes or unicode? * * def _to_ascii(bytestr): # <<<<<<<<<<<<<< * # encode a byte string to an ascii encoded string. * if python3: */ - __pyx_tuple__140 = PyTuple_Pack(1, __pyx_n_s_bytestr); if (unlikely(!__pyx_tuple__140)) __PYX_ERR(0, 5074, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__140); - __Pyx_GIVEREF(__pyx_tuple__140); - __pyx_codeobj__141 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_to_ascii, 5074, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__141)) __PYX_ERR(0, 5074, __pyx_L1_error) + __pyx_tuple__144 = PyTuple_Pack(1, __pyx_n_s_bytestr); if (unlikely(!__pyx_tuple__144)) __PYX_ERR(0, 5097, __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_Users_amohr_dev_thehesiod_netcd, __pyx_n_s_to_ascii, 5097, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__145)) __PYX_ERR(0, 5097, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5089 + /* "netCDF4/_netCDF4.pyx":5112 * * # start of the gregorian calendar * gregorian = datetime(1582,10,15) # <<<<<<<<<<<<<< * * def _dateparse(timestr): */ - __pyx_tuple__142 = PyTuple_Pack(3, __pyx_int_1582, __pyx_int_10, __pyx_int_15); if (unlikely(!__pyx_tuple__142)) __PYX_ERR(0, 5089, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__142); - __Pyx_GIVEREF(__pyx_tuple__142); + __pyx_tuple__146 = PyTuple_Pack(3, __pyx_int_1582, __pyx_int_10, __pyx_int_15); if (unlikely(!__pyx_tuple__146)) __PYX_ERR(0, 5112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__146); + __Pyx_GIVEREF(__pyx_tuple__146); - /* "netCDF4/_netCDF4.pyx":5091 + /* "netCDF4/_netCDF4.pyx":5114 * 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__143 = 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__143)) __PYX_ERR(0, 5091, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__143); - __Pyx_GIVEREF(__pyx_tuple__143); - __pyx_codeobj__144 = (PyObject*)__Pyx_PyCode_New(1, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__143, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_dateparse, 5091, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__144)) __PYX_ERR(0, 5091, __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, 5114, __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_Users_amohr_dev_thehesiod_netcd, __pyx_n_s_dateparse, 5114, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__148)) __PYX_ERR(0, 5114, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5116 + /* "netCDF4/_netCDF4.pyx":5139 * return basedate * * def stringtoarr(string,NUMCHARS,dtype='S'): # <<<<<<<<<<<<<< * """ * **`stringtoarr(a, NUMCHARS,dtype='S')`** */ - __pyx_tuple__145 = PyTuple_Pack(4, __pyx_n_s_string, __pyx_n_s_NUMCHARS, __pyx_n_s_dtype, __pyx_n_s_arr); if (unlikely(!__pyx_tuple__145)) __PYX_ERR(0, 5116, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__145); - __Pyx_GIVEREF(__pyx_tuple__145); - __pyx_codeobj__146 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__145, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_stringtoarr, 5116, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__146)) __PYX_ERR(0, 5116, __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, 5139, __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_Users_amohr_dev_thehesiod_netcd, __pyx_n_s_stringtoarr, 5139, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__150)) __PYX_ERR(0, 5139, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5139 + /* "netCDF4/_netCDF4.pyx":5162 * return arr * * def stringtochar(a): # <<<<<<<<<<<<<< * """ * **`stringtochar(a)`** */ - __pyx_tuple__147 = PyTuple_Pack(3, __pyx_n_s_a, __pyx_n_s_dtype, __pyx_n_s_b); if (unlikely(!__pyx_tuple__147)) __PYX_ERR(0, 5139, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__147); - __Pyx_GIVEREF(__pyx_tuple__147); - __pyx_codeobj__148 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__147, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_stringtochar, 5139, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__148)) __PYX_ERR(0, 5139, __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, 5162, __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_Users_amohr_dev_thehesiod_netcd, __pyx_n_s_stringtochar, 5162, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__152)) __PYX_ERR(0, 5162, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5158 + /* "netCDF4/_netCDF4.pyx":5181 * return b * * def chartostring(b): # <<<<<<<<<<<<<< * """ * **`chartostring(b)`** */ - __pyx_tuple__149 = 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__149)) __PYX_ERR(0, 5158, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__149); - __Pyx_GIVEREF(__pyx_tuple__149); - __pyx_codeobj__150 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__149, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_chartostring, 5158, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__150)) __PYX_ERR(0, 5158, __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, 5181, __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_Users_amohr_dev_thehesiod_netcd, __pyx_n_s_chartostring, 5181, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__154)) __PYX_ERR(0, 5181, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5179 + /* "netCDF4/_netCDF4.pyx":5202 * return a * * def date2num(dates,units,calendar='standard'): # <<<<<<<<<<<<<< * """ * **`date2num(dates,units,calendar='standard')`** */ - __pyx_tuple__151 = 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__151)) __PYX_ERR(0, 5179, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__151); - __Pyx_GIVEREF(__pyx_tuple__151); - __pyx_codeobj__152 = (PyObject*)__Pyx_PyCode_New(3, 0, 15, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__151, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_date2num, 5179, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__152)) __PYX_ERR(0, 5179, __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, 5202, __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_Users_amohr_dev_thehesiod_netcd, __pyx_n_s_date2num, 5202, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__156)) __PYX_ERR(0, 5202, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5267 + /* "netCDF4/_netCDF4.pyx":5290 * return cdftime.date2num(dates) * * def num2date(times,units,calendar='standard'): # <<<<<<<<<<<<<< * """ * **`num2date(times,units,calendar='standard')`** */ - __pyx_tuple__153 = 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__153)) __PYX_ERR(0, 5267, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__153); - __Pyx_GIVEREF(__pyx_tuple__153); - __pyx_codeobj__154 = (PyObject*)__Pyx_PyCode_New(3, 0, 20, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__153, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_num2date, 5267, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__154)) __PYX_ERR(0, 5267, __pyx_L1_error) + __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, 5290, __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_Users_amohr_dev_thehesiod_netcd, __pyx_n_s_num2date, 5290, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__158)) __PYX_ERR(0, 5290, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5370 + /* "netCDF4/_netCDF4.pyx":5393 * return cdftime.num2date(times) * * def date2index(dates, nctime, calendar=None, select='exact'): # <<<<<<<<<<<<<< * """ * **`date2index(dates, nctime, calendar=None, select='exact')`** */ - __pyx_tuple__155 = PyTuple_Pack(7, __pyx_n_s_dates, __pyx_n_s_nctime, __pyx_n_s_calendar, __pyx_n_s_select, __pyx_n_s_basedate, __pyx_n_s_msg, __pyx_n_s_times); if (unlikely(!__pyx_tuple__155)) __PYX_ERR(0, 5370, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__155); - __Pyx_GIVEREF(__pyx_tuple__155); - __pyx_codeobj__156 = (PyObject*)__Pyx_PyCode_New(4, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__155, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_date2index, 5370, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__156)) __PYX_ERR(0, 5370, __pyx_L1_error) + __pyx_tuple__159 = PyTuple_Pack(7, __pyx_n_s_dates, __pyx_n_s_nctime, __pyx_n_s_calendar, __pyx_n_s_select, __pyx_n_s_basedate, __pyx_n_s_msg, __pyx_n_s_times); if (unlikely(!__pyx_tuple__159)) __PYX_ERR(0, 5393, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__159); + __Pyx_GIVEREF(__pyx_tuple__159); + __pyx_codeobj__160 = (PyObject*)__Pyx_PyCode_New(4, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__159, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_amohr_dev_thehesiod_netcd, __pyx_n_s_date2index, 5393, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__160)) __PYX_ERR(0, 5393, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5456 + /* "netCDF4/_netCDF4.pyx":5479 * """ * * def __init__(self, files, check=False, aggdim=None, exclude=[]): # <<<<<<<<<<<<<< * """ * **`__init__(self, files, check=False, aggdim=None, exclude=[])`** */ - __pyx_tuple__157 = PyTuple_Pack(36, __pyx_n_s_self, __pyx_n_s_files, __pyx_n_s_check, __pyx_n_s_aggdim, __pyx_n_s_exclude, __pyx_n_s_msg, __pyx_n_s_master, __pyx_n_s_cdfm, __pyx_n_s_name, __pyx_n_s_value, __pyx_n_s_aggDimId, __pyx_n_s_dimname, __pyx_n_s_dim, __pyx_n_s_aggDimName, __pyx_n_s_masterRecVar, __pyx_n_s_vName, __pyx_n_s_v, __pyx_n_s_dims_2, __pyx_n_s_shape, __pyx_n_s_dtype, __pyx_n_s_cdf_2, __pyx_n_s_cdfVLen_2, __pyx_n_s_cdfRecVar_2, __pyx_n_s_f, __pyx_n_s_part, __pyx_n_s_varInfo, __pyx_n_s_masterDims, __pyx_n_s_masterShape, __pyx_n_s_masterType, __pyx_n_s_extDims, __pyx_n_s_extShape, __pyx_n_s_extType, __pyx_n_s_vInst, __pyx_n_s_varname, __pyx_n_s_var, __pyx_n_s_dset); if (unlikely(!__pyx_tuple__157)) __PYX_ERR(0, 5456, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__157); - __Pyx_GIVEREF(__pyx_tuple__157); - __pyx_codeobj__158 = (PyObject*)__Pyx_PyCode_New(5, 0, 36, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__157, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_init, 5456, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__158)) __PYX_ERR(0, 5456, __pyx_L1_error) + __pyx_tuple__161 = PyTuple_Pack(36, __pyx_n_s_self, __pyx_n_s_files, __pyx_n_s_check, __pyx_n_s_aggdim, __pyx_n_s_exclude, __pyx_n_s_msg, __pyx_n_s_master, __pyx_n_s_cdfm, __pyx_n_s_name, __pyx_n_s_value, __pyx_n_s_aggDimId, __pyx_n_s_dimname, __pyx_n_s_dim, __pyx_n_s_aggDimName, __pyx_n_s_masterRecVar, __pyx_n_s_vName, __pyx_n_s_v, __pyx_n_s_dims_2, __pyx_n_s_shape, __pyx_n_s_dtype, __pyx_n_s_cdf_2, __pyx_n_s_cdfVLen_2, __pyx_n_s_cdfRecVar_2, __pyx_n_s_f, __pyx_n_s_part, __pyx_n_s_varInfo, __pyx_n_s_masterDims, __pyx_n_s_masterShape, __pyx_n_s_masterType, __pyx_n_s_extDims, __pyx_n_s_extShape, __pyx_n_s_extType, __pyx_n_s_vInst, __pyx_n_s_varname, __pyx_n_s_var, __pyx_n_s_dset); if (unlikely(!__pyx_tuple__161)) __PYX_ERR(0, 5479, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__161); + __Pyx_GIVEREF(__pyx_tuple__161); + __pyx_codeobj__162 = (PyObject*)__Pyx_PyCode_New(5, 0, 36, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__161, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_amohr_dev_thehesiod_netcd, __pyx_n_s_init, 5479, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__162)) __PYX_ERR(0, 5479, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5629 + /* "netCDF4/_netCDF4.pyx":5652 * self._path = '/' * * def __setattr__(self, name, value): # <<<<<<<<<<<<<< * """override base class attribute creation""" * self.__dict__[name] = value */ - __pyx_tuple__159 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_name, __pyx_n_s_value); if (unlikely(!__pyx_tuple__159)) __PYX_ERR(0, 5629, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__159); - __Pyx_GIVEREF(__pyx_tuple__159); - __pyx_codeobj__160 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__159, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_setattr, 5629, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__160)) __PYX_ERR(0, 5629, __pyx_L1_error) + __pyx_tuple__163 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_name, __pyx_n_s_value); if (unlikely(!__pyx_tuple__163)) __PYX_ERR(0, 5652, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__163); + __Pyx_GIVEREF(__pyx_tuple__163); + __pyx_codeobj__164 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__163, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_amohr_dev_thehesiod_netcd, __pyx_n_s_setattr, 5652, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__164)) __PYX_ERR(0, 5652, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5633 + /* "netCDF4/_netCDF4.pyx":5656 * self.__dict__[name] = value * * def __getattribute__(self, name): # <<<<<<<<<<<<<< * if name in ['variables','dimensions','file_format','groups',\ * 'data_model','disk_format','path']: */ - __pyx_tuple__161 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_name); if (unlikely(!__pyx_tuple__161)) __PYX_ERR(0, 5633, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__161); - __Pyx_GIVEREF(__pyx_tuple__161); - __pyx_codeobj__162 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__161, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_getattribute, 5633, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__162)) __PYX_ERR(0, 5633, __pyx_L1_error) + __pyx_tuple__165 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_name); if (unlikely(!__pyx_tuple__165)) __PYX_ERR(0, 5656, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__165); + __Pyx_GIVEREF(__pyx_tuple__165); + __pyx_codeobj__166 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__165, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_amohr_dev_thehesiod_netcd, __pyx_n_s_getattribute, 5656, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__166)) __PYX_ERR(0, 5656, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5646 + /* "netCDF4/_netCDF4.pyx":5669 * return Dataset.__getattribute__(self, name) * * def ncattrs(self): # <<<<<<<<<<<<<< * """ * **`ncattrs(self)`** */ - __pyx_tuple__163 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__163)) __PYX_ERR(0, 5646, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__163); - __Pyx_GIVEREF(__pyx_tuple__163); - __pyx_codeobj__164 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__163, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_ncattrs, 5646, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__164)) __PYX_ERR(0, 5646, __pyx_L1_error) + __pyx_tuple__167 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__167)) __PYX_ERR(0, 5669, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__167); + __Pyx_GIVEREF(__pyx_tuple__167); + __pyx_codeobj__168 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__167, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_amohr_dev_thehesiod_netcd, __pyx_n_s_ncattrs, 5669, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__168)) __PYX_ERR(0, 5669, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5654 + /* "netCDF4/_netCDF4.pyx":5677 * return self._cdf[0].__dict__.keys() * * def close(self): # <<<<<<<<<<<<<< * """ * **`close(self)`** */ - __pyx_tuple__165 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_dset); if (unlikely(!__pyx_tuple__165)) __PYX_ERR(0, 5654, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__165); - __Pyx_GIVEREF(__pyx_tuple__165); - __pyx_codeobj__166 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__165, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_close, 5654, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__166)) __PYX_ERR(0, 5654, __pyx_L1_error) + __pyx_tuple__169 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_dset); if (unlikely(!__pyx_tuple__169)) __PYX_ERR(0, 5677, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__169); + __Pyx_GIVEREF(__pyx_tuple__169); + __pyx_codeobj__170 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__169, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_amohr_dev_thehesiod_netcd, __pyx_n_s_close, 5677, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__170)) __PYX_ERR(0, 5677, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5663 + /* "netCDF4/_netCDF4.pyx":5686 * dset.close() * * def __repr__(self): # <<<<<<<<<<<<<< * ncdump = ['%r\n' % type(self)] * dimnames = tuple([str(dimname) for dimname in self.dimensions.keys()]) */ - __pyx_tuple__167 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_ncdump, __pyx_n_s_dimnames, __pyx_n_s_varnames, __pyx_n_s_grpnames, __pyx_n_s_attrs, __pyx_n_s_dimname, __pyx_n_s_varname, __pyx_n_s_name); if (unlikely(!__pyx_tuple__167)) __PYX_ERR(0, 5663, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__167); - __Pyx_GIVEREF(__pyx_tuple__167); - __pyx_codeobj__168 = (PyObject*)__Pyx_PyCode_New(1, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__167, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_repr, 5663, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__168)) __PYX_ERR(0, 5663, __pyx_L1_error) + __pyx_tuple__171 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_ncdump, __pyx_n_s_dimnames, __pyx_n_s_varnames, __pyx_n_s_grpnames, __pyx_n_s_attrs, __pyx_n_s_dimname, __pyx_n_s_varname, __pyx_n_s_name); if (unlikely(!__pyx_tuple__171)) __PYX_ERR(0, 5686, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__171); + __Pyx_GIVEREF(__pyx_tuple__171); + __pyx_codeobj__172 = (PyObject*)__Pyx_PyCode_New(1, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__171, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_amohr_dev_thehesiod_netcd, __pyx_n_s_repr, 5686, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__172)) __PYX_ERR(0, 5686, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5681 + /* "netCDF4/_netCDF4.pyx":5704 * return ''.join(ncdump) * * def __reduce__(self): # <<<<<<<<<<<<<< * # raise error is user tries to pickle a MFDataset object. * raise NotImplementedError('MFDataset is not picklable') */ - __pyx_tuple__169 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__169)) __PYX_ERR(0, 5681, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__169); - __Pyx_GIVEREF(__pyx_tuple__169); - __pyx_codeobj__170 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__169, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_reduce, 5681, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__170)) __PYX_ERR(0, 5681, __pyx_L1_error) + __pyx_tuple__173 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__173)) __PYX_ERR(0, 5704, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__173); + __Pyx_GIVEREF(__pyx_tuple__173); + __pyx_codeobj__174 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__173, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_amohr_dev_thehesiod_netcd, __pyx_n_s_reduce, 5704, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__174)) __PYX_ERR(0, 5704, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5686 + /* "netCDF4/_netCDF4.pyx":5709 * * class _Dimension(object): * def __init__(self, dimname, dim, dimlens, dimtotlen): # <<<<<<<<<<<<<< * self.dimlens = dimlens * self.dimtotlen = dimtotlen */ - __pyx_tuple__171 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_dimname, __pyx_n_s_dim, __pyx_n_s_dimlens, __pyx_n_s_dimtotlen); if (unlikely(!__pyx_tuple__171)) __PYX_ERR(0, 5686, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__171); - __Pyx_GIVEREF(__pyx_tuple__171); - __pyx_codeobj__172 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__171, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_init, 5686, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__172)) __PYX_ERR(0, 5686, __pyx_L1_error) + __pyx_tuple__175 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_dimname, __pyx_n_s_dim, __pyx_n_s_dimlens, __pyx_n_s_dimtotlen); if (unlikely(!__pyx_tuple__175)) __PYX_ERR(0, 5709, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__175); + __Pyx_GIVEREF(__pyx_tuple__175); + __pyx_codeobj__176 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__175, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_amohr_dev_thehesiod_netcd, __pyx_n_s_init, 5709, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__176)) __PYX_ERR(0, 5709, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5690 + /* "netCDF4/_netCDF4.pyx":5713 * self.dimtotlen = dimtotlen * self._name = dimname * def __len__(self): # <<<<<<<<<<<<<< * return self.dimtotlen * def isunlimited(self): */ - __pyx_tuple__173 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__173)) __PYX_ERR(0, 5690, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__173); - __Pyx_GIVEREF(__pyx_tuple__173); - __pyx_codeobj__174 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__173, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_len, 5690, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__174)) __PYX_ERR(0, 5690, __pyx_L1_error) + __pyx_tuple__177 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__177)) __PYX_ERR(0, 5713, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__177); + __Pyx_GIVEREF(__pyx_tuple__177); + __pyx_codeobj__178 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__177, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_amohr_dev_thehesiod_netcd, __pyx_n_s_len, 5713, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__178)) __PYX_ERR(0, 5713, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5692 + /* "netCDF4/_netCDF4.pyx":5715 * def __len__(self): * return self.dimtotlen * def isunlimited(self): # <<<<<<<<<<<<<< * return True * def __repr__(self): */ - __pyx_tuple__175 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__175)) __PYX_ERR(0, 5692, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__175); - __Pyx_GIVEREF(__pyx_tuple__175); - __pyx_codeobj__176 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__175, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_isunlimited, 5692, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__176)) __PYX_ERR(0, 5692, __pyx_L1_error) + __pyx_tuple__179 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__179)) __PYX_ERR(0, 5715, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__179); + __Pyx_GIVEREF(__pyx_tuple__179); + __pyx_codeobj__180 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__179, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_amohr_dev_thehesiod_netcd, __pyx_n_s_isunlimited, 5715, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__180)) __PYX_ERR(0, 5715, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5694 + /* "netCDF4/_netCDF4.pyx":5717 * def isunlimited(self): * return True * def __repr__(self): # <<<<<<<<<<<<<< * if self.isunlimited(): * return repr(type(self))+" (unlimited): name = '%s', size = %s\n" % (self._name,len(self)) */ - __pyx_tuple__177 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__177)) __PYX_ERR(0, 5694, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__177); - __Pyx_GIVEREF(__pyx_tuple__177); - __pyx_codeobj__178 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__177, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_repr, 5694, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__178)) __PYX_ERR(0, 5694, __pyx_L1_error) + __pyx_tuple__181 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__181)) __PYX_ERR(0, 5717, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__181); + __Pyx_GIVEREF(__pyx_tuple__181); + __pyx_codeobj__182 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__181, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_amohr_dev_thehesiod_netcd, __pyx_n_s_repr, 5717, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__182)) __PYX_ERR(0, 5717, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5701 + /* "netCDF4/_netCDF4.pyx":5724 * * class _Variable(object): * def __init__(self, dset, varname, var, recdimname): # <<<<<<<<<<<<<< * self.dimensions = var.dimensions * self._dset = dset */ - __pyx_tuple__179 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_dset, __pyx_n_s_varname, __pyx_n_s_var, __pyx_n_s_recdimname, __pyx_n_s_name, __pyx_n_s_value); if (unlikely(!__pyx_tuple__179)) __PYX_ERR(0, 5701, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__179); - __Pyx_GIVEREF(__pyx_tuple__179); - __pyx_codeobj__180 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__179, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_init, 5701, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__180)) __PYX_ERR(0, 5701, __pyx_L1_error) + __pyx_tuple__183 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_dset, __pyx_n_s_varname, __pyx_n_s_var, __pyx_n_s_recdimname, __pyx_n_s_name, __pyx_n_s_value); if (unlikely(!__pyx_tuple__183)) __PYX_ERR(0, 5724, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__183); + __Pyx_GIVEREF(__pyx_tuple__183); + __pyx_codeobj__184 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__183, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_amohr_dev_thehesiod_netcd, __pyx_n_s_init, 5724, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__184)) __PYX_ERR(0, 5724, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5714 + /* "netCDF4/_netCDF4.pyx":5737 * for name, value in var.__dict__.items(): * self.__dict__[name] = value * def typecode(self): # <<<<<<<<<<<<<< * return self.dtype * def ncattrs(self): */ - __pyx_tuple__181 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__181)) __PYX_ERR(0, 5714, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__181); - __Pyx_GIVEREF(__pyx_tuple__181); - __pyx_codeobj__182 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__181, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_typecode, 5714, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__182)) __PYX_ERR(0, 5714, __pyx_L1_error) + __pyx_tuple__185 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__185)) __PYX_ERR(0, 5737, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__185); + __Pyx_GIVEREF(__pyx_tuple__185); + __pyx_codeobj__186 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__185, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_amohr_dev_thehesiod_netcd, __pyx_n_s_typecode, 5737, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__186)) __PYX_ERR(0, 5737, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5716 + /* "netCDF4/_netCDF4.pyx":5739 * def typecode(self): * return self.dtype * def ncattrs(self): # <<<<<<<<<<<<<< * return self._mastervar.__dict__.keys() * def __getattr__(self,name): */ - __pyx_tuple__183 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__183)) __PYX_ERR(0, 5716, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__183); - __Pyx_GIVEREF(__pyx_tuple__183); - __pyx_codeobj__184 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__183, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_ncattrs, 5716, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__184)) __PYX_ERR(0, 5716, __pyx_L1_error) + __pyx_tuple__187 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__187)) __PYX_ERR(0, 5739, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__187); + __Pyx_GIVEREF(__pyx_tuple__187); + __pyx_codeobj__188 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__187, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_amohr_dev_thehesiod_netcd, __pyx_n_s_ncattrs, 5739, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__188)) __PYX_ERR(0, 5739, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5718 + /* "netCDF4/_netCDF4.pyx":5741 * def ncattrs(self): * return self._mastervar.__dict__.keys() * def __getattr__(self,name): # <<<<<<<<<<<<<< * if name == 'shape': return self._shape() * if name == 'ndim': return len(self._shape()) */ - __pyx_tuple__185 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_name); if (unlikely(!__pyx_tuple__185)) __PYX_ERR(0, 5718, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__185); - __Pyx_GIVEREF(__pyx_tuple__185); - __pyx_codeobj__186 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__185, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_getattr, 5718, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__186)) __PYX_ERR(0, 5718, __pyx_L1_error) + __pyx_tuple__189 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_name); if (unlikely(!__pyx_tuple__189)) __PYX_ERR(0, 5741, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__189); + __Pyx_GIVEREF(__pyx_tuple__189); + __pyx_codeobj__190 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__189, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_amohr_dev_thehesiod_netcd, __pyx_n_s_getattr, 5741, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__190)) __PYX_ERR(0, 5741, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5725 + /* "netCDF4/_netCDF4.pyx":5748 * except: * raise AttributeError(name) * def __repr__(self): # <<<<<<<<<<<<<< * ncdump_var = ['%r\n' % type(self)] * dimnames = tuple([str(dimname) for dimname in self.dimensions]) */ - __pyx_tuple__187 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_ncdump_var, __pyx_n_s_dimnames, __pyx_n_s_attrs, __pyx_n_s_unlimdims, __pyx_n_s_dimname, __pyx_n_s_dim, __pyx_n_s_name); if (unlikely(!__pyx_tuple__187)) __PYX_ERR(0, 5725, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__187); - __Pyx_GIVEREF(__pyx_tuple__187); - __pyx_codeobj__188 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__187, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_repr, 5725, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__188)) __PYX_ERR(0, 5725, __pyx_L1_error) + __pyx_tuple__191 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_ncdump_var, __pyx_n_s_dimnames, __pyx_n_s_attrs, __pyx_n_s_unlimdims, __pyx_n_s_dimname, __pyx_n_s_dim, __pyx_n_s_name); if (unlikely(!__pyx_tuple__191)) __PYX_ERR(0, 5748, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__191); + __Pyx_GIVEREF(__pyx_tuple__191); + __pyx_codeobj__192 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__191, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_amohr_dev_thehesiod_netcd, __pyx_n_s_repr, 5748, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__192)) __PYX_ERR(0, 5748, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5741 + /* "netCDF4/_netCDF4.pyx":5764 * ncdump_var.append('current size = %s\n' % repr(self.shape)) * return ''.join(ncdump_var) * def __len__(self): # <<<<<<<<<<<<<< * if not self._shape: * raise TypeError('len() of unsized object') */ - __pyx_tuple__189 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__189)) __PYX_ERR(0, 5741, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__189); - __Pyx_GIVEREF(__pyx_tuple__189); - __pyx_codeobj__190 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__189, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_len, 5741, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__190)) __PYX_ERR(0, 5741, __pyx_L1_error) + __pyx_tuple__193 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__193)) __PYX_ERR(0, 5764, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__193); + __Pyx_GIVEREF(__pyx_tuple__193); + __pyx_codeobj__194 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__193, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_amohr_dev_thehesiod_netcd, __pyx_n_s_len, 5764, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__194)) __PYX_ERR(0, 5764, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5746 + /* "netCDF4/_netCDF4.pyx":5769 * else: * return self._shape()[0] * def _shape(self): # <<<<<<<<<<<<<< * recdimlen = len(self._dset.dimensions[self._recdimname]) * return (recdimlen,) + self._mastervar.shape[1:] */ - __pyx_tuple__191 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_recdimlen); if (unlikely(!__pyx_tuple__191)) __PYX_ERR(0, 5746, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__191); - __Pyx_GIVEREF(__pyx_tuple__191); - __pyx_codeobj__192 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__191, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_shape_2, 5746, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__192)) __PYX_ERR(0, 5746, __pyx_L1_error) + __pyx_tuple__195 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_recdimlen); if (unlikely(!__pyx_tuple__195)) __PYX_ERR(0, 5769, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__195); + __Pyx_GIVEREF(__pyx_tuple__195); + __pyx_codeobj__196 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__195, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_amohr_dev_thehesiod_netcd, __pyx_n_s_shape_2, 5769, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__196)) __PYX_ERR(0, 5769, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5749 + /* "netCDF4/_netCDF4.pyx":5772 * recdimlen = len(self._dset.dimensions[self._recdimname]) * return (recdimlen,) + self._mastervar.shape[1:] * def set_auto_maskandscale(self,val): # <<<<<<<<<<<<<< * for v in self._recVar: * v.set_auto_maskandscale(val) */ - __pyx_tuple__193 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_val, __pyx_n_s_v); if (unlikely(!__pyx_tuple__193)) __PYX_ERR(0, 5749, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__193); - __Pyx_GIVEREF(__pyx_tuple__193); - __pyx_codeobj__194 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__193, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_set_auto_maskandscale, 5749, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__194)) __PYX_ERR(0, 5749, __pyx_L1_error) + __pyx_tuple__197 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_val, __pyx_n_s_v); if (unlikely(!__pyx_tuple__197)) __PYX_ERR(0, 5772, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__197); + __Pyx_GIVEREF(__pyx_tuple__197); + __pyx_codeobj__198 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__197, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_amohr_dev_thehesiod_netcd, __pyx_n_s_set_auto_maskandscale, 5772, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__198)) __PYX_ERR(0, 5772, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5752 + /* "netCDF4/_netCDF4.pyx":5775 * for v in self._recVar: * v.set_auto_maskandscale(val) * def set_auto_mask(self,val): # <<<<<<<<<<<<<< * for v in self._recVar: * v.set_auto_mask(val) */ - __pyx_tuple__195 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_val, __pyx_n_s_v); if (unlikely(!__pyx_tuple__195)) __PYX_ERR(0, 5752, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__195); - __Pyx_GIVEREF(__pyx_tuple__195); - __pyx_codeobj__196 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__195, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_set_auto_mask, 5752, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__196)) __PYX_ERR(0, 5752, __pyx_L1_error) + __pyx_tuple__199 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_val, __pyx_n_s_v); if (unlikely(!__pyx_tuple__199)) __PYX_ERR(0, 5775, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__199); + __Pyx_GIVEREF(__pyx_tuple__199); + __pyx_codeobj__200 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__199, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_amohr_dev_thehesiod_netcd, __pyx_n_s_set_auto_mask, 5775, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__200)) __PYX_ERR(0, 5775, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5755 + /* "netCDF4/_netCDF4.pyx":5778 * for v in self._recVar: * v.set_auto_mask(val) * def set_auto_scale(self,val): # <<<<<<<<<<<<<< * for v in self._recVar: * v.set_auto_scale(val) */ - __pyx_tuple__197 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_val, __pyx_n_s_v); if (unlikely(!__pyx_tuple__197)) __PYX_ERR(0, 5755, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__197); - __Pyx_GIVEREF(__pyx_tuple__197); - __pyx_codeobj__198 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__197, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_set_auto_scale, 5755, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__198)) __PYX_ERR(0, 5755, __pyx_L1_error) + __pyx_tuple__201 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_val, __pyx_n_s_v); if (unlikely(!__pyx_tuple__201)) __PYX_ERR(0, 5778, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__201); + __Pyx_GIVEREF(__pyx_tuple__201); + __pyx_codeobj__202 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__201, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_amohr_dev_thehesiod_netcd, __pyx_n_s_set_auto_scale, 5778, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__202)) __PYX_ERR(0, 5778, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5758 + /* "netCDF4/_netCDF4.pyx":5781 * for v in self._recVar: * v.set_auto_scale(val) * def __getitem__(self, elem): # <<<<<<<<<<<<<< * """Get records from a concatenated set of variables.""" * */ - __pyx_tuple__199 = PyTuple_Pack(30, __pyx_n_s_self, __pyx_n_s_elem, __pyx_n_s_start, __pyx_n_s_count, __pyx_n_s_stride, __pyx_n_s_put_ind, __pyx_n_s_datashape, __pyx_n_s_data, __pyx_n_s_squeeze, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_strt, __pyx_n_s_cnt, __pyx_n_s_strd, __pyx_n_s_nv, __pyx_n_s_ind, __pyx_n_s_sta, __pyx_n_s_step, __pyx_n_s_stop, __pyx_n_s_idx, __pyx_n_s_vid, __pyx_n_s_k, __pyx_n_s_lst, __pyx_n_s_newSlice, __pyx_n_s_s_2, __pyx_n_s_lstArr, __pyx_n_s_ismasked, __pyx_n_s_dat, __pyx_n_s_fill_value, __pyx_n_s_numv); if (unlikely(!__pyx_tuple__199)) __PYX_ERR(0, 5758, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__199); - __Pyx_GIVEREF(__pyx_tuple__199); - __pyx_codeobj__200 = (PyObject*)__Pyx_PyCode_New(2, 0, 30, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__199, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_getitem, 5758, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__200)) __PYX_ERR(0, 5758, __pyx_L1_error) + __pyx_tuple__203 = PyTuple_Pack(30, __pyx_n_s_self, __pyx_n_s_elem, __pyx_n_s_start, __pyx_n_s_count, __pyx_n_s_stride, __pyx_n_s_put_ind, __pyx_n_s_datashape, __pyx_n_s_data, __pyx_n_s_squeeze, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_strt, __pyx_n_s_cnt, __pyx_n_s_strd, __pyx_n_s_nv, __pyx_n_s_ind, __pyx_n_s_sta, __pyx_n_s_step, __pyx_n_s_stop, __pyx_n_s_idx, __pyx_n_s_vid, __pyx_n_s_k, __pyx_n_s_lst, __pyx_n_s_newSlice, __pyx_n_s_s_2, __pyx_n_s_lstArr, __pyx_n_s_ismasked, __pyx_n_s_dat, __pyx_n_s_fill_value, __pyx_n_s_numv); if (unlikely(!__pyx_tuple__203)) __PYX_ERR(0, 5781, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__203); + __Pyx_GIVEREF(__pyx_tuple__203); + __pyx_codeobj__204 = (PyObject*)__Pyx_PyCode_New(2, 0, 30, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__203, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_amohr_dev_thehesiod_netcd, __pyx_n_s_getitem, 5781, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__204)) __PYX_ERR(0, 5781, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":5897 + /* "netCDF4/_netCDF4.pyx":5920 * """ * * def __init__(self, time, units=None): # <<<<<<<<<<<<<< * """ * **`__init__(self, time, units=None)`** */ - __pyx_tuple__201 = PyTuple_Pack(15, __pyx_n_s_self, __pyx_n_s_time, __pyx_n_s_units, __pyx_n_s_datetime, __pyx_n_s_name, __pyx_n_s_value, __pyx_n_s_t, __pyx_n_s_ref_date, __pyx_n_s_ref_num, __pyx_n_s_i0, __pyx_n_s_i1, __pyx_n_s_i, __pyx_n_s_v, __pyx_n_s_n, __pyx_n_s_num); if (unlikely(!__pyx_tuple__201)) __PYX_ERR(0, 5897, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__201); - __Pyx_GIVEREF(__pyx_tuple__201); - __pyx_codeobj__202 = (PyObject*)__Pyx_PyCode_New(3, 0, 15, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__201, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_init, 5897, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__202)) __PYX_ERR(0, 5897, __pyx_L1_error) - __pyx_tuple__203 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__203)) __PYX_ERR(0, 5897, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__203); - __Pyx_GIVEREF(__pyx_tuple__203); + __pyx_tuple__205 = PyTuple_Pack(15, __pyx_n_s_self, __pyx_n_s_time, __pyx_n_s_units, __pyx_n_s_datetime, __pyx_n_s_name, __pyx_n_s_value, __pyx_n_s_t, __pyx_n_s_ref_date, __pyx_n_s_ref_num, __pyx_n_s_i0, __pyx_n_s_i1, __pyx_n_s_i, __pyx_n_s_v, __pyx_n_s_n, __pyx_n_s_num); if (unlikely(!__pyx_tuple__205)) __PYX_ERR(0, 5920, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__205); + __Pyx_GIVEREF(__pyx_tuple__205); + __pyx_codeobj__206 = (PyObject*)__Pyx_PyCode_New(3, 0, 15, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__205, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_amohr_dev_thehesiod_netcd, __pyx_n_s_init, 5920, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__206)) __PYX_ERR(0, 5920, __pyx_L1_error) + __pyx_tuple__207 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__207)) __PYX_ERR(0, 5920, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__207); + __Pyx_GIVEREF(__pyx_tuple__207); - /* "netCDF4/_netCDF4.pyx":5945 + /* "netCDF4/_netCDF4.pyx":5968 * * * def __getitem__(self, elem): # <<<<<<<<<<<<<< * return self.__time[elem] + self.__delta[elem] */ - __pyx_tuple__204 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_elem); if (unlikely(!__pyx_tuple__204)) __PYX_ERR(0, 5945, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__204); - __Pyx_GIVEREF(__pyx_tuple__204); - __pyx_codeobj__205 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__204, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_getitem, 5945, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__205)) __PYX_ERR(0, 5945, __pyx_L1_error) + __pyx_tuple__208 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_elem); if (unlikely(!__pyx_tuple__208)) __PYX_ERR(0, 5968, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__208); + __Pyx_GIVEREF(__pyx_tuple__208); + __pyx_codeobj__209 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__208, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_amohr_dev_thehesiod_netcd, __pyx_n_s_getitem, 5968, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__209)) __PYX_ERR(0, 5968, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -81932,7 +82023,7 @@ PyMODINIT_FUNC PyInit__netCDF4(void) #endif /*--- Module creation code ---*/ #if PY_MAJOR_VERSION < 3 - __pyx_m = Py_InitModule4("_netCDF4", __pyx_methods, __pyx_k_Version_1_2_7_Introduction_netc, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); + __pyx_m = Py_InitModule4("_netCDF4", __pyx_methods, __pyx_k_Version_1_2_8a0_Introduction_ne, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); #else __pyx_m = PyModule_Create(&__pyx_moduledef); #endif @@ -81968,12 +82059,12 @@ PyMODINIT_FUNC PyInit__netCDF4(void) /*--- Variable export code ---*/ /*--- Function export code ---*/ /*--- Type init code ---*/ - __pyx_ptype_7netCDF4_8_netCDF4_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_7netCDF4_8_netCDF4_ndarray)) __PYX_ERR(1, 723, __pyx_L1_error) - if (PyType_Ready(&__pyx_type_7netCDF4_8_netCDF4_Dataset) < 0) __PYX_ERR(0, 1591, __pyx_L1_error) + __pyx_ptype_7netCDF4_8_netCDF4_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_7netCDF4_8_netCDF4_ndarray)) __PYX_ERR(1, 724, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_7netCDF4_8_netCDF4_Dataset) < 0) __PYX_ERR(0, 1597, __pyx_L1_error) __pyx_type_7netCDF4_8_netCDF4_Dataset.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_7netCDF4_8_netCDF4_Dataset, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1591, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_7netCDF4_8_netCDF4_Dataset, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1597, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_7netCDF4_8_netCDF4_7Dataset___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_7netCDF4_8_netCDF4_7Dataset___init__.doc = __pyx_doc_7netCDF4_8_netCDF4_7Dataset___init__; @@ -81981,15 +82072,15 @@ PyMODINIT_FUNC PyInit__netCDF4(void) } } #endif - if (PyObject_SetAttrString(__pyx_m, "Dataset", (PyObject *)&__pyx_type_7netCDF4_8_netCDF4_Dataset) < 0) __PYX_ERR(0, 1591, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "Dataset", (PyObject *)&__pyx_type_7netCDF4_8_netCDF4_Dataset) < 0) __PYX_ERR(0, 1597, __pyx_L1_error) if (__pyx_type_7netCDF4_8_netCDF4_Dataset.tp_weaklistoffset == 0) __pyx_type_7netCDF4_8_netCDF4_Dataset.tp_weaklistoffset = offsetof(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset, __weakref__); __pyx_ptype_7netCDF4_8_netCDF4_Dataset = &__pyx_type_7netCDF4_8_netCDF4_Dataset; __pyx_type_7netCDF4_8_netCDF4_Group.tp_base = __pyx_ptype_7netCDF4_8_netCDF4_Dataset; - if (PyType_Ready(&__pyx_type_7netCDF4_8_netCDF4_Group) < 0) __PYX_ERR(0, 2604, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_7netCDF4_8_netCDF4_Group) < 0) __PYX_ERR(0, 2631, __pyx_L1_error) __pyx_type_7netCDF4_8_netCDF4_Group.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_7netCDF4_8_netCDF4_Group, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 2604, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_7netCDF4_8_netCDF4_Group, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 2631, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_7netCDF4_8_netCDF4_5Group___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_7netCDF4_8_netCDF4_5Group___init__.doc = __pyx_doc_7netCDF4_8_netCDF4_5Group___init__; @@ -81997,14 +82088,14 @@ PyMODINIT_FUNC PyInit__netCDF4(void) } } #endif - if (PyObject_SetAttrString(__pyx_m, "Group", (PyObject *)&__pyx_type_7netCDF4_8_netCDF4_Group) < 0) __PYX_ERR(0, 2604, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "Group", (PyObject *)&__pyx_type_7netCDF4_8_netCDF4_Group) < 0) __PYX_ERR(0, 2631, __pyx_L1_error) if (__pyx_type_7netCDF4_8_netCDF4_Group.tp_weaklistoffset == 0) __pyx_type_7netCDF4_8_netCDF4_Group.tp_weaklistoffset = offsetof(struct __pyx_obj_7netCDF4_8_netCDF4_Group, __pyx_base.__weakref__); __pyx_ptype_7netCDF4_8_netCDF4_Group = &__pyx_type_7netCDF4_8_netCDF4_Group; - if (PyType_Ready(&__pyx_type_7netCDF4_8_netCDF4_Dimension) < 0) __PYX_ERR(0, 2699, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_7netCDF4_8_netCDF4_Dimension) < 0) __PYX_ERR(0, 2722, __pyx_L1_error) __pyx_type_7netCDF4_8_netCDF4_Dimension.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_7netCDF4_8_netCDF4_Dimension, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 2699, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_7netCDF4_8_netCDF4_Dimension, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 2722, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_7netCDF4_8_netCDF4_9Dimension___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_7netCDF4_8_netCDF4_9Dimension___init__.doc = __pyx_doc_7netCDF4_8_netCDF4_9Dimension___init__; @@ -82012,13 +82103,13 @@ PyMODINIT_FUNC PyInit__netCDF4(void) } } #endif - if (PyObject_SetAttrString(__pyx_m, "Dimension", (PyObject *)&__pyx_type_7netCDF4_8_netCDF4_Dimension) < 0) __PYX_ERR(0, 2699, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "Dimension", (PyObject *)&__pyx_type_7netCDF4_8_netCDF4_Dimension) < 0) __PYX_ERR(0, 2722, __pyx_L1_error) __pyx_ptype_7netCDF4_8_netCDF4_Dimension = &__pyx_type_7netCDF4_8_netCDF4_Dimension; - if (PyType_Ready(&__pyx_type_7netCDF4_8_netCDF4_Variable) < 0) __PYX_ERR(0, 2860, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_7netCDF4_8_netCDF4_Variable) < 0) __PYX_ERR(0, 2883, __pyx_L1_error) __pyx_type_7netCDF4_8_netCDF4_Variable.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_7netCDF4_8_netCDF4_Variable, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 2860, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_7netCDF4_8_netCDF4_Variable, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 2883, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_7netCDF4_8_netCDF4_8Variable___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_7netCDF4_8_netCDF4_8Variable___init__.doc = __pyx_doc_7netCDF4_8_netCDF4_8Variable___init__; @@ -82026,13 +82117,13 @@ PyMODINIT_FUNC PyInit__netCDF4(void) } } #endif - if (PyObject_SetAttrString(__pyx_m, "Variable", (PyObject *)&__pyx_type_7netCDF4_8_netCDF4_Variable) < 0) __PYX_ERR(0, 2860, __pyx_L1_error) + 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, 4567, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_7netCDF4_8_netCDF4_CompoundType) < 0) __PYX_ERR(0, 4590, __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, 4567, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_7netCDF4_8_netCDF4_CompoundType, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 4590, __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__; @@ -82040,13 +82131,13 @@ PyMODINIT_FUNC PyInit__netCDF4(void) } } #endif - if (PyObject_SetAttrString(__pyx_m, "CompoundType", (PyObject *)&__pyx_type_7netCDF4_8_netCDF4_CompoundType) < 0) __PYX_ERR(0, 4567, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "CompoundType", (PyObject *)&__pyx_type_7netCDF4_8_netCDF4_CompoundType) < 0) __PYX_ERR(0, 4590, __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, 4816, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_7netCDF4_8_netCDF4_VLType) < 0) __PYX_ERR(0, 4839, __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, 4816, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_7netCDF4_8_netCDF4_VLType, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 4839, __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__; @@ -82054,13 +82145,13 @@ PyMODINIT_FUNC PyInit__netCDF4(void) } } #endif - if (PyObject_SetAttrString(__pyx_m, "VLType", (PyObject *)&__pyx_type_7netCDF4_8_netCDF4_VLType) < 0) __PYX_ERR(0, 4816, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "VLType", (PyObject *)&__pyx_type_7netCDF4_8_netCDF4_VLType) < 0) __PYX_ERR(0, 4839, __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, 4934, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_7netCDF4_8_netCDF4_EnumType) < 0) __PYX_ERR(0, 4957, __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, 4934, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_7netCDF4_8_netCDF4_EnumType, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 4957, __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__; @@ -82068,9 +82159,9 @@ PyMODINIT_FUNC PyInit__netCDF4(void) } } #endif - if (PyObject_SetAttrString(__pyx_m, "EnumType", (PyObject *)&__pyx_type_7netCDF4_8_netCDF4_EnumType) < 0) __PYX_ERR(0, 4934, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "EnumType", (PyObject *)&__pyx_type_7netCDF4_8_netCDF4_EnumType) < 0) __PYX_ERR(0, 4957, __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, 1032, __pyx_L1_error) + 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; __pyx_ptype_7netCDF4_8_netCDF4___pyx_scope_struct__genexpr = &__pyx_type_7netCDF4_8_netCDF4___pyx_scope_struct__genexpr; /*--- Type import code ---*/ @@ -82289,7 +82380,7 @@ PyMODINIT_FUNC PyInit__netCDF4(void) * try: * from itertools import izip as zip */ - __pyx_t_14 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__129, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 932, __pyx_L14_except_error) + __pyx_t_14 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__133, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 932, __pyx_L14_except_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_Raise(__pyx_t_14, 0, 0, 0); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; @@ -82442,11 +82533,11 @@ PyMODINIT_FUNC PyInit__netCDF4(void) /* "netCDF4/_netCDF4.pyx":939 * pass * - * __version__ = "1.2.7" # <<<<<<<<<<<<<< + * __version__ = "1.2.8a0" # <<<<<<<<<<<<<< * * # Initialize numpy */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_kp_s_1_2_7) < 0) __PYX_ERR(0, 939, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_kp_s_1_2_8a0) < 0) __PYX_ERR(0, 939, __pyx_L1_error) /* "netCDF4/_netCDF4.pyx":942 * @@ -82525,7 +82616,7 @@ PyMODINIT_FUNC PyInit__netCDF4(void) * import warnings * from glob import glob # <<<<<<<<<<<<<< * from numpy import ma - * from libc.string cimport memcpy + * from libc.string cimport memcpy, memset */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 948, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -82545,7 +82636,7 @@ PyMODINIT_FUNC PyInit__netCDF4(void) * import warnings * from glob import glob * from numpy import ma # <<<<<<<<<<<<<< - * from libc.string cimport memcpy + * from libc.string cimport memcpy, memset * from libc.stdlib cimport malloc, free */ __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 949, __pyx_L1_error) @@ -82563,7 +82654,7 @@ PyMODINIT_FUNC PyInit__netCDF4(void) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "netCDF4/_netCDF4.pyx":952 - * from libc.string cimport memcpy + * from libc.string cimport memcpy, memset * from libc.stdlib cimport malloc, free * import_array() # <<<<<<<<<<<<<< * include "netCDF4.pxi" @@ -82702,7 +82793,7 @@ PyMODINIT_FUNC PyInit__netCDF4(void) * __has_nc_inq_path__ = HAS_NC_INQ_PATH * __has_nc_inq_format_extended__ = HAS_NC_INQ_FORMAT_EXTENDED # <<<<<<<<<<<<<< * __has_cdf5__ = HAS_CDF5_FORMAT - * _needsworkaround_issue485 = __netcdf4libversion__ < "4.4.0" or \ + * __has_nc_open_mem__ = HAS_NC_OPEN_MEM */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_has_nc_inq_format_extended, __pyx_int_0) < 0) __PYX_ERR(0, 981, __pyx_L1_error) @@ -82710,23 +82801,32 @@ PyMODINIT_FUNC PyInit__netCDF4(void) * __has_nc_inq_path__ = HAS_NC_INQ_PATH * __has_nc_inq_format_extended__ = HAS_NC_INQ_FORMAT_EXTENDED * __has_cdf5__ = HAS_CDF5_FORMAT # <<<<<<<<<<<<<< + * __has_nc_open_mem__ = HAS_NC_OPEN_MEM * _needsworkaround_issue485 = __netcdf4libversion__ < "4.4.0" or \ - * (__netcdf4libversion__.startswith("4.4.0") and \ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_has_cdf5, __pyx_int_0) < 0) __PYX_ERR(0, 982, __pyx_L1_error) /* "netCDF4/_netCDF4.pyx":983 * __has_nc_inq_format_extended__ = HAS_NC_INQ_FORMAT_EXTENDED * __has_cdf5__ = HAS_CDF5_FORMAT + * __has_nc_open_mem__ = HAS_NC_OPEN_MEM # <<<<<<<<<<<<<< + * _needsworkaround_issue485 = __netcdf4libversion__ < "4.4.0" or \ + * (__netcdf4libversion__.startswith("4.4.0") and \ + */ + if (PyDict_SetItem(__pyx_d, __pyx_n_s_has_nc_open_mem, __pyx_int_0) < 0) __PYX_ERR(0, 983, __pyx_L1_error) + + /* "netCDF4/_netCDF4.pyx":984 + * __has_cdf5__ = HAS_CDF5_FORMAT + * __has_nc_open_mem__ = HAS_NC_OPEN_MEM * _needsworkaround_issue485 = __netcdf4libversion__ < "4.4.0" or \ # <<<<<<<<<<<<<< * (__netcdf4libversion__.startswith("4.4.0") and \ * "-development" in __netcdf4libversion__) */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdf4libversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 983, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdf4libversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 984, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = PyObject_RichCompare(__pyx_t_2, __pyx_kp_s_4_4_0, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 983, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(__pyx_t_2, __pyx_kp_s_4_4_0, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 984, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 983, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 984, __pyx_L1_error) if (!__pyx_t_15) { __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { @@ -82736,22 +82836,22 @@ PyMODINIT_FUNC PyInit__netCDF4(void) goto __pyx_L30_bool_binop_done; } - /* "netCDF4/_netCDF4.pyx":984 - * __has_cdf5__ = HAS_CDF5_FORMAT + /* "netCDF4/_netCDF4.pyx":985 + * __has_nc_open_mem__ = HAS_NC_OPEN_MEM * _needsworkaround_issue485 = __netcdf4libversion__ < "4.4.0" or \ * (__netcdf4libversion__.startswith("4.4.0") and \ # <<<<<<<<<<<<<< * "-development" in __netcdf4libversion__) * */ - __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdf4libversion); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 984, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdf4libversion); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 985, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_startswith); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 984, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_startswith); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 985, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__133, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 984, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__137, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 985, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 984, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 985, __pyx_L1_error) if (__pyx_t_15) { __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { @@ -82761,40 +82861,40 @@ PyMODINIT_FUNC PyInit__netCDF4(void) goto __pyx_L30_bool_binop_done; } - /* "netCDF4/_netCDF4.pyx":985 + /* "netCDF4/_netCDF4.pyx":986 * _needsworkaround_issue485 = __netcdf4libversion__ < "4.4.0" or \ * (__netcdf4libversion__.startswith("4.4.0") and \ * "-development" in __netcdf4libversion__) # <<<<<<<<<<<<<< * * # issue warning for hdf5 1.10 (issue #549) */ - __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdf4libversion); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 985, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdf4libversion); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 986, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_15 = (__Pyx_PySequence_ContainsTF(__pyx_kp_s_development, __pyx_t_7, Py_EQ)); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 985, __pyx_L1_error) + __pyx_t_15 = (__Pyx_PySequence_ContainsTF(__pyx_kp_s_development, __pyx_t_7, Py_EQ)); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 986, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_t_15); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 985, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_t_15); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 986, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = __pyx_t_7; __pyx_t_7 = 0; __pyx_L30_bool_binop_done:; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_needsworkaround_issue485, __pyx_t_1) < 0) __PYX_ERR(0, 983, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_needsworkaround_issue485, __pyx_t_1) < 0) __PYX_ERR(0, 984, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":988 + /* "netCDF4/_netCDF4.pyx":989 * * # issue warning for hdf5 1.10 (issue #549) * if __netcdf4libversion__[0:5] < "4.4.1" and\ # <<<<<<<<<<<<<< * __hdf5libversion__.startswith("1.10"): * msg = """ */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdf4libversion); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 988, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdf4libversion); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 989, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 5, NULL, NULL, &__pyx_slice__134, 1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 988, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 5, NULL, NULL, &__pyx_slice__138, 1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 989, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_RichCompare(__pyx_t_7, __pyx_kp_s_4_4_1, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 988, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_t_7, __pyx_kp_s_4_4_1, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 989, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(0, 988, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(0, 989, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_16) { } else { @@ -82802,27 +82902,27 @@ PyMODINIT_FUNC PyInit__netCDF4(void) goto __pyx_L34_bool_binop_done; } - /* "netCDF4/_netCDF4.pyx":989 + /* "netCDF4/_netCDF4.pyx":990 * # issue warning for hdf5 1.10 (issue #549) * if __netcdf4libversion__[0:5] < "4.4.1" and\ * __hdf5libversion__.startswith("1.10"): # <<<<<<<<<<<<<< * msg = """ * WARNING: Backwards incompatible files will be created with HDF5 1.10.x */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdf5libversion); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 989, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdf5libversion); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 990, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_startswith); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 989, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_startswith); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 990, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__135, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 989, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__139, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 990, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(0, 989, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(0, 990, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_15 = __pyx_t_16; __pyx_L34_bool_binop_done:; - /* "netCDF4/_netCDF4.pyx":988 + /* "netCDF4/_netCDF4.pyx":989 * * # issue warning for hdf5 1.10 (issue #549) * if __netcdf4libversion__[0:5] < "4.4.1" and\ # <<<<<<<<<<<<<< @@ -82831,28 +82931,28 @@ PyMODINIT_FUNC PyInit__netCDF4(void) */ if (__pyx_t_15) { - /* "netCDF4/_netCDF4.pyx":990 + /* "netCDF4/_netCDF4.pyx":991 * if __netcdf4libversion__[0:5] < "4.4.1" and\ * __hdf5libversion__.startswith("1.10"): * msg = """ # <<<<<<<<<<<<<< * WARNING: Backwards incompatible files will be created with HDF5 1.10.x * and netCDF < 4.4.1. Upgrading to netCDF4 >= 4.4.1 or downgrading to */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_msg, __pyx_kp_s_WARNING_Backwards_incompatible) < 0) __PYX_ERR(0, 990, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_msg, __pyx_kp_s_WARNING_Backwards_incompatible) < 0) __PYX_ERR(0, 991, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":995 + /* "netCDF4/_netCDF4.pyx":996 * to HDF5 version 1.8.x is highly recommended * (see https://github.com/Unidata/netcdf-c/issues/250).""" * warnings.warn(msg) # <<<<<<<<<<<<<< * * # numpy data type <--> netCDF 4 data type mapping. */ - __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 995, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 996, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_warn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 995, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_warn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 996, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_msg); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 995, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_msg); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 996, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_13 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -82865,14 +82965,14 @@ PyMODINIT_FUNC PyInit__netCDF4(void) } } if (!__pyx_t_13) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 995, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 996, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_7}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 995, __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, 996, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -82881,20 +82981,20 @@ PyMODINIT_FUNC PyInit__netCDF4(void) #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_7}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 995, __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, 996, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { - __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 995, __pyx_L1_error) + __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 996, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_13); __pyx_t_13 = NULL; __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_7); __pyx_t_7 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 995, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 996, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } @@ -82902,7 +83002,7 @@ PyMODINIT_FUNC PyInit__netCDF4(void) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":988 + /* "netCDF4/_netCDF4.pyx":989 * * # issue warning for hdf5 1.10 (issue #549) * if __netcdf4libversion__[0:5] < "4.4.1" and\ # <<<<<<<<<<<<<< @@ -82911,576 +83011,576 @@ PyMODINIT_FUNC PyInit__netCDF4(void) */ } - /* "netCDF4/_netCDF4.pyx":998 + /* "netCDF4/_netCDF4.pyx":999 * * # numpy data type <--> netCDF 4 data type mapping. * _nptonctype = {'S1' : NC_CHAR, # <<<<<<<<<<<<<< * 'i1' : NC_BYTE, * 'u1' : NC_UBYTE, */ - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error) + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_From_int(NC_CHAR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 998, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(NC_CHAR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 999, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_S1, __pyx_t_2) < 0) __PYX_ERR(0, 998, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_S1, __pyx_t_2) < 0) __PYX_ERR(0, 999, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":999 + /* "netCDF4/_netCDF4.pyx":1000 * # numpy data type <--> netCDF 4 data type mapping. * _nptonctype = {'S1' : NC_CHAR, * 'i1' : NC_BYTE, # <<<<<<<<<<<<<< * 'u1' : NC_UBYTE, * 'i2' : NC_SHORT, */ - __pyx_t_2 = __Pyx_PyInt_From_int(NC_BYTE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 999, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(NC_BYTE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1000, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i1, __pyx_t_2) < 0) __PYX_ERR(0, 998, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i1, __pyx_t_2) < 0) __PYX_ERR(0, 999, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":1000 + /* "netCDF4/_netCDF4.pyx":1001 * _nptonctype = {'S1' : NC_CHAR, * 'i1' : NC_BYTE, * 'u1' : NC_UBYTE, # <<<<<<<<<<<<<< * 'i2' : NC_SHORT, * 'u2' : NC_USHORT, */ - __pyx_t_2 = __Pyx_PyInt_From_int(NC_UBYTE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1000, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(NC_UBYTE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1001, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_u1, __pyx_t_2) < 0) __PYX_ERR(0, 998, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_u1, __pyx_t_2) < 0) __PYX_ERR(0, 999, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":1001 + /* "netCDF4/_netCDF4.pyx":1002 * 'i1' : NC_BYTE, * 'u1' : NC_UBYTE, * 'i2' : NC_SHORT, # <<<<<<<<<<<<<< * 'u2' : NC_USHORT, * 'i4' : NC_INT, */ - __pyx_t_2 = __Pyx_PyInt_From_int(NC_SHORT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1001, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(NC_SHORT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1002, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i2, __pyx_t_2) < 0) __PYX_ERR(0, 998, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i2, __pyx_t_2) < 0) __PYX_ERR(0, 999, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":1002 + /* "netCDF4/_netCDF4.pyx":1003 * 'u1' : NC_UBYTE, * 'i2' : NC_SHORT, * 'u2' : NC_USHORT, # <<<<<<<<<<<<<< * 'i4' : NC_INT, * 'u4' : NC_UINT, */ - __pyx_t_2 = __Pyx_PyInt_From_int(NC_USHORT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1002, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(NC_USHORT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1003, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_u2, __pyx_t_2) < 0) __PYX_ERR(0, 998, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_u2, __pyx_t_2) < 0) __PYX_ERR(0, 999, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":1003 + /* "netCDF4/_netCDF4.pyx":1004 * 'i2' : NC_SHORT, * 'u2' : NC_USHORT, * 'i4' : NC_INT, # <<<<<<<<<<<<<< * 'u4' : NC_UINT, * 'i8' : NC_INT64, */ - __pyx_t_2 = __Pyx_PyInt_From_int(NC_INT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1003, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(NC_INT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1004, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i4, __pyx_t_2) < 0) __PYX_ERR(0, 998, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i4, __pyx_t_2) < 0) __PYX_ERR(0, 999, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":1004 + /* "netCDF4/_netCDF4.pyx":1005 * 'u2' : NC_USHORT, * 'i4' : NC_INT, * 'u4' : NC_UINT, # <<<<<<<<<<<<<< * 'i8' : NC_INT64, * 'u8' : NC_UINT64, */ - __pyx_t_2 = __Pyx_PyInt_From_int(NC_UINT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1004, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(NC_UINT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1005, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_u4, __pyx_t_2) < 0) __PYX_ERR(0, 998, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_u4, __pyx_t_2) < 0) __PYX_ERR(0, 999, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":1005 + /* "netCDF4/_netCDF4.pyx":1006 * 'i4' : NC_INT, * 'u4' : NC_UINT, * 'i8' : NC_INT64, # <<<<<<<<<<<<<< * 'u8' : NC_UINT64, * 'f4' : NC_FLOAT, */ - __pyx_t_2 = __Pyx_PyInt_From_int(NC_INT64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1005, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(NC_INT64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1006, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i8, __pyx_t_2) < 0) __PYX_ERR(0, 998, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i8, __pyx_t_2) < 0) __PYX_ERR(0, 999, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":1006 + /* "netCDF4/_netCDF4.pyx":1007 * 'u4' : NC_UINT, * 'i8' : NC_INT64, * 'u8' : NC_UINT64, # <<<<<<<<<<<<<< * 'f4' : NC_FLOAT, * 'f8' : NC_DOUBLE} */ - __pyx_t_2 = __Pyx_PyInt_From_int(NC_UINT64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1006, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(NC_UINT64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1007, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_u8, __pyx_t_2) < 0) __PYX_ERR(0, 998, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_u8, __pyx_t_2) < 0) __PYX_ERR(0, 999, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":1007 + /* "netCDF4/_netCDF4.pyx":1008 * 'i8' : NC_INT64, * 'u8' : NC_UINT64, * 'f4' : NC_FLOAT, # <<<<<<<<<<<<<< * 'f8' : NC_DOUBLE} * */ - __pyx_t_2 = __Pyx_PyInt_From_int(NC_FLOAT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1007, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(NC_FLOAT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1008, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_f4, __pyx_t_2) < 0) __PYX_ERR(0, 998, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_f4, __pyx_t_2) < 0) __PYX_ERR(0, 999, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":1008 + /* "netCDF4/_netCDF4.pyx":1009 * 'u8' : NC_UINT64, * 'f4' : NC_FLOAT, * 'f8' : NC_DOUBLE} # <<<<<<<<<<<<<< * * # just integer types. */ - __pyx_t_2 = __Pyx_PyInt_From_int(NC_DOUBLE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1008, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(NC_DOUBLE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1009, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_f8, __pyx_t_2) < 0) __PYX_ERR(0, 998, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_f8, __pyx_t_2) < 0) __PYX_ERR(0, 999, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_nptonctype, __pyx_t_1) < 0) __PYX_ERR(0, 998, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_nptonctype, __pyx_t_1) < 0) __PYX_ERR(0, 999, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1011 + /* "netCDF4/_netCDF4.pyx":1012 * * # just integer types. * _intnptonctype = {'i1' : NC_BYTE, # <<<<<<<<<<<<<< * 'u1' : NC_UBYTE, * 'i2' : NC_SHORT, */ - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1011, __pyx_L1_error) + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1012, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_From_int(NC_BYTE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1011, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(NC_BYTE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1012, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i1, __pyx_t_2) < 0) __PYX_ERR(0, 1011, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i1, __pyx_t_2) < 0) __PYX_ERR(0, 1012, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":1012 + /* "netCDF4/_netCDF4.pyx":1013 * # just integer types. * _intnptonctype = {'i1' : NC_BYTE, * 'u1' : NC_UBYTE, # <<<<<<<<<<<<<< * 'i2' : NC_SHORT, * 'u2' : NC_USHORT, */ - __pyx_t_2 = __Pyx_PyInt_From_int(NC_UBYTE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1012, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(NC_UBYTE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1013, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_u1, __pyx_t_2) < 0) __PYX_ERR(0, 1011, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_u1, __pyx_t_2) < 0) __PYX_ERR(0, 1012, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":1013 + /* "netCDF4/_netCDF4.pyx":1014 * _intnptonctype = {'i1' : NC_BYTE, * 'u1' : NC_UBYTE, * 'i2' : NC_SHORT, # <<<<<<<<<<<<<< * 'u2' : NC_USHORT, * 'i4' : NC_INT, */ - __pyx_t_2 = __Pyx_PyInt_From_int(NC_SHORT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1013, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(NC_SHORT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1014, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i2, __pyx_t_2) < 0) __PYX_ERR(0, 1011, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i2, __pyx_t_2) < 0) __PYX_ERR(0, 1012, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":1014 + /* "netCDF4/_netCDF4.pyx":1015 * 'u1' : NC_UBYTE, * 'i2' : NC_SHORT, * 'u2' : NC_USHORT, # <<<<<<<<<<<<<< * 'i4' : NC_INT, * 'u4' : NC_UINT, */ - __pyx_t_2 = __Pyx_PyInt_From_int(NC_USHORT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1014, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(NC_USHORT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1015, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_u2, __pyx_t_2) < 0) __PYX_ERR(0, 1011, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_u2, __pyx_t_2) < 0) __PYX_ERR(0, 1012, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":1015 + /* "netCDF4/_netCDF4.pyx":1016 * 'i2' : NC_SHORT, * 'u2' : NC_USHORT, * 'i4' : NC_INT, # <<<<<<<<<<<<<< * 'u4' : NC_UINT, * 'i8' : NC_INT64, */ - __pyx_t_2 = __Pyx_PyInt_From_int(NC_INT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1015, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(NC_INT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1016, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i4, __pyx_t_2) < 0) __PYX_ERR(0, 1011, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i4, __pyx_t_2) < 0) __PYX_ERR(0, 1012, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":1016 + /* "netCDF4/_netCDF4.pyx":1017 * 'u2' : NC_USHORT, * 'i4' : NC_INT, * 'u4' : NC_UINT, # <<<<<<<<<<<<<< * 'i8' : NC_INT64, * 'u8' : NC_UINT64} */ - __pyx_t_2 = __Pyx_PyInt_From_int(NC_UINT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1016, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(NC_UINT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_u4, __pyx_t_2) < 0) __PYX_ERR(0, 1011, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_u4, __pyx_t_2) < 0) __PYX_ERR(0, 1012, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":1017 + /* "netCDF4/_netCDF4.pyx":1018 * 'i4' : NC_INT, * 'u4' : NC_UINT, * 'i8' : NC_INT64, # <<<<<<<<<<<<<< * 'u8' : NC_UINT64} * */ - __pyx_t_2 = __Pyx_PyInt_From_int(NC_INT64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1017, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(NC_INT64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1018, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i8, __pyx_t_2) < 0) __PYX_ERR(0, 1011, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i8, __pyx_t_2) < 0) __PYX_ERR(0, 1012, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":1018 + /* "netCDF4/_netCDF4.pyx":1019 * 'u4' : NC_UINT, * 'i8' : NC_INT64, * 'u8' : NC_UINT64} # <<<<<<<<<<<<<< * * # create dictionary mapping string identifiers to netcdf format codes */ - __pyx_t_2 = __Pyx_PyInt_From_int(NC_UINT64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1018, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(NC_UINT64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1019, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_u8, __pyx_t_2) < 0) __PYX_ERR(0, 1011, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_u8, __pyx_t_2) < 0) __PYX_ERR(0, 1012, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_intnptonctype, __pyx_t_1) < 0) __PYX_ERR(0, 1011, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_intnptonctype, __pyx_t_1) < 0) __PYX_ERR(0, 1012, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1021 + /* "netCDF4/_netCDF4.pyx":1022 * * # create dictionary mapping string identifiers to netcdf format codes * _format_dict = {'NETCDF3_CLASSIC' : NC_FORMAT_CLASSIC, # <<<<<<<<<<<<<< * 'NETCDF4_CLASSIC' : NC_FORMAT_NETCDF4_CLASSIC, * 'NETCDF4' : NC_FORMAT_NETCDF4} */ - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1021, __pyx_L1_error) + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1022, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_From_int(NC_FORMAT_CLASSIC); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1021, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(NC_FORMAT_CLASSIC); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1022, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_NETCDF3_CLASSIC, __pyx_t_2) < 0) __PYX_ERR(0, 1021, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_NETCDF3_CLASSIC, __pyx_t_2) < 0) __PYX_ERR(0, 1022, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":1022 + /* "netCDF4/_netCDF4.pyx":1023 * # create dictionary mapping string identifiers to netcdf format codes * _format_dict = {'NETCDF3_CLASSIC' : NC_FORMAT_CLASSIC, * 'NETCDF4_CLASSIC' : NC_FORMAT_NETCDF4_CLASSIC, # <<<<<<<<<<<<<< * 'NETCDF4' : NC_FORMAT_NETCDF4} * IF HAS_CDF5_FORMAT: */ - __pyx_t_2 = __Pyx_PyInt_From_int(NC_FORMAT_NETCDF4_CLASSIC); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1022, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(NC_FORMAT_NETCDF4_CLASSIC); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1023, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_NETCDF4_CLASSIC, __pyx_t_2) < 0) __PYX_ERR(0, 1021, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_NETCDF4_CLASSIC, __pyx_t_2) < 0) __PYX_ERR(0, 1022, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":1023 + /* "netCDF4/_netCDF4.pyx":1024 * _format_dict = {'NETCDF3_CLASSIC' : NC_FORMAT_CLASSIC, * 'NETCDF4_CLASSIC' : NC_FORMAT_NETCDF4_CLASSIC, * 'NETCDF4' : NC_FORMAT_NETCDF4} # <<<<<<<<<<<<<< * IF HAS_CDF5_FORMAT: * # NETCDF3_64BIT deprecated, saved for compatibility. */ - __pyx_t_2 = __Pyx_PyInt_From_int(NC_FORMAT_NETCDF4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1023, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(NC_FORMAT_NETCDF4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1024, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_NETCDF4, __pyx_t_2) < 0) __PYX_ERR(0, 1021, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_NETCDF4, __pyx_t_2) < 0) __PYX_ERR(0, 1022, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_format_dict, __pyx_t_1) < 0) __PYX_ERR(0, 1021, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_format_dict, __pyx_t_1) < 0) __PYX_ERR(0, 1022, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1030 + /* "netCDF4/_netCDF4.pyx":1031 * _format_dict['NETCDF3_64BIT_DATA'] = NC_FORMAT_64BIT_DATA * ELSE: * _format_dict['NETCDF3_64BIT'] = NC_FORMAT_64BIT # <<<<<<<<<<<<<< * # invert dictionary mapping * _reverse_format_dict = dict((v, k) for k, v in _format_dict.iteritems()) */ - __pyx_t_1 = __Pyx_PyInt_From_int(NC_FORMAT_64BIT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1030, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(NC_FORMAT_64BIT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1031, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_format_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1030, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_format_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1031, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_n_s_NETCDF3_64BIT, __pyx_t_1) < 0)) __PYX_ERR(0, 1030, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_n_s_NETCDF3_64BIT, __pyx_t_1) < 0)) __PYX_ERR(0, 1031, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1032 + /* "netCDF4/_netCDF4.pyx":1033 * _format_dict['NETCDF3_64BIT'] = NC_FORMAT_64BIT * # invert dictionary mapping * _reverse_format_dict = dict((v, k) for k, v in _format_dict.iteritems()) # <<<<<<<<<<<<<< * # add duplicate entry (NETCDF3_64BIT == NETCDF3_64BIT_OFFSET) * IF HAS_CDF5_FORMAT: */ - __pyx_t_1 = __pyx_pf_7netCDF4_8_netCDF4_22genexpr(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1032, __pyx_L1_error) + __pyx_t_1 = __pyx_pf_7netCDF4_8_netCDF4_22genexpr(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1033, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_Generator_Next(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1032, __pyx_L1_error) + __pyx_t_2 = __Pyx_Generator_Next(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1033, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_reverse_format_dict, __pyx_t_2) < 0) __PYX_ERR(0, 1032, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_reverse_format_dict, __pyx_t_2) < 0) __PYX_ERR(0, 1033, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":1037 + /* "netCDF4/_netCDF4.pyx":1038 * _format_dict['NETCDF3_64BIT'] = NC_FORMAT_64BIT_OFFSET * ELSE: * _format_dict['NETCDF3_64BIT_OFFSET'] = NC_FORMAT_64BIT # <<<<<<<<<<<<<< * * # default fill_value to numpy datatype mapping. */ - __pyx_t_2 = __Pyx_PyInt_From_int(NC_FORMAT_64BIT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1037, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(NC_FORMAT_64BIT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1038, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_format_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1037, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_format_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1038, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_n_s_NETCDF3_64BIT_OFFSET, __pyx_t_2) < 0)) __PYX_ERR(0, 1037, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_n_s_NETCDF3_64BIT_OFFSET, __pyx_t_2) < 0)) __PYX_ERR(0, 1038, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":1041 + /* "netCDF4/_netCDF4.pyx":1042 * # default fill_value to numpy datatype mapping. * default_fillvals = {#'S1':NC_FILL_CHAR, * 'S1':'\0', # <<<<<<<<<<<<<< * 'i1':NC_FILL_BYTE, * 'u1':NC_FILL_UBYTE, */ - __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1041, __pyx_L1_error) + __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1042, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_S1, __pyx_kp_s_) < 0) __PYX_ERR(0, 1041, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_S1, __pyx_kp_s_) < 0) __PYX_ERR(0, 1042, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1042 + /* "netCDF4/_netCDF4.pyx":1043 * default_fillvals = {#'S1':NC_FILL_CHAR, * 'S1':'\0', * 'i1':NC_FILL_BYTE, # <<<<<<<<<<<<<< * 'u1':NC_FILL_UBYTE, * 'i2':NC_FILL_SHORT, */ - __pyx_t_1 = __Pyx_PyInt_From_int(NC_FILL_BYTE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1042, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(NC_FILL_BYTE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1043, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_i1, __pyx_t_1) < 0) __PYX_ERR(0, 1041, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_i1, __pyx_t_1) < 0) __PYX_ERR(0, 1042, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1043 + /* "netCDF4/_netCDF4.pyx":1044 * 'S1':'\0', * 'i1':NC_FILL_BYTE, * 'u1':NC_FILL_UBYTE, # <<<<<<<<<<<<<< * 'i2':NC_FILL_SHORT, * 'u2':NC_FILL_USHORT, */ - __pyx_t_1 = __Pyx_PyInt_From_int(NC_FILL_UBYTE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1043, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(NC_FILL_UBYTE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1044, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_u1, __pyx_t_1) < 0) __PYX_ERR(0, 1041, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_u1, __pyx_t_1) < 0) __PYX_ERR(0, 1042, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1044 + /* "netCDF4/_netCDF4.pyx":1045 * 'i1':NC_FILL_BYTE, * 'u1':NC_FILL_UBYTE, * 'i2':NC_FILL_SHORT, # <<<<<<<<<<<<<< * 'u2':NC_FILL_USHORT, * 'i4':NC_FILL_INT, */ - __pyx_t_1 = __Pyx_PyInt_From_int(NC_FILL_SHORT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1044, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(NC_FILL_SHORT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_i2, __pyx_t_1) < 0) __PYX_ERR(0, 1041, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_i2, __pyx_t_1) < 0) __PYX_ERR(0, 1042, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1045 + /* "netCDF4/_netCDF4.pyx":1046 * 'u1':NC_FILL_UBYTE, * 'i2':NC_FILL_SHORT, * 'u2':NC_FILL_USHORT, # <<<<<<<<<<<<<< * 'i4':NC_FILL_INT, * 'u4':NC_FILL_UINT, */ - __pyx_t_1 = __Pyx_PyInt_From_int(NC_FILL_USHORT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1045, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(NC_FILL_USHORT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1046, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_u2, __pyx_t_1) < 0) __PYX_ERR(0, 1041, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_u2, __pyx_t_1) < 0) __PYX_ERR(0, 1042, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1046 + /* "netCDF4/_netCDF4.pyx":1047 * 'i2':NC_FILL_SHORT, * 'u2':NC_FILL_USHORT, * 'i4':NC_FILL_INT, # <<<<<<<<<<<<<< * 'u4':NC_FILL_UINT, * 'i8':NC_FILL_INT64, */ - __pyx_t_1 = __Pyx_PyInt_From_long(NC_FILL_INT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1046, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_long(NC_FILL_INT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1047, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_i4, __pyx_t_1) < 0) __PYX_ERR(0, 1041, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_i4, __pyx_t_1) < 0) __PYX_ERR(0, 1042, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1047 + /* "netCDF4/_netCDF4.pyx":1048 * 'u2':NC_FILL_USHORT, * 'i4':NC_FILL_INT, * 'u4':NC_FILL_UINT, # <<<<<<<<<<<<<< * 'i8':NC_FILL_INT64, * 'u8':NC_FILL_UINT64, */ - __pyx_t_1 = __Pyx_PyInt_From_unsigned_long(NC_FILL_UINT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1047, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_unsigned_long(NC_FILL_UINT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1048, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_u4, __pyx_t_1) < 0) __PYX_ERR(0, 1041, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_u4, __pyx_t_1) < 0) __PYX_ERR(0, 1042, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1048 + /* "netCDF4/_netCDF4.pyx":1049 * 'i4':NC_FILL_INT, * 'u4':NC_FILL_UINT, * 'i8':NC_FILL_INT64, # <<<<<<<<<<<<<< * 'u8':NC_FILL_UINT64, * 'f4':NC_FILL_FLOAT, */ - __pyx_t_1 = __Pyx_PyInt_From_PY_LONG_LONG(NC_FILL_INT64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1048, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_PY_LONG_LONG(NC_FILL_INT64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_i8, __pyx_t_1) < 0) __PYX_ERR(0, 1041, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_i8, __pyx_t_1) < 0) __PYX_ERR(0, 1042, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1049 + /* "netCDF4/_netCDF4.pyx":1050 * 'u4':NC_FILL_UINT, * 'i8':NC_FILL_INT64, * 'u8':NC_FILL_UINT64, # <<<<<<<<<<<<<< * 'f4':NC_FILL_FLOAT, * 'f8':NC_FILL_DOUBLE} */ - __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(NC_FILL_UINT64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1049, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(NC_FILL_UINT64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1050, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_u8, __pyx_t_1) < 0) __PYX_ERR(0, 1041, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_u8, __pyx_t_1) < 0) __PYX_ERR(0, 1042, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1050 + /* "netCDF4/_netCDF4.pyx":1051 * 'i8':NC_FILL_INT64, * 'u8':NC_FILL_UINT64, * 'f4':NC_FILL_FLOAT, # <<<<<<<<<<<<<< * 'f8':NC_FILL_DOUBLE} * */ - __pyx_t_1 = PyFloat_FromDouble(NC_FILL_FLOAT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1050, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(NC_FILL_FLOAT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1051, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_f4, __pyx_t_1) < 0) __PYX_ERR(0, 1041, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_f4, __pyx_t_1) < 0) __PYX_ERR(0, 1042, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1051 + /* "netCDF4/_netCDF4.pyx":1052 * 'u8':NC_FILL_UINT64, * 'f4':NC_FILL_FLOAT, * 'f8':NC_FILL_DOUBLE} # <<<<<<<<<<<<<< * * # logical for native endian type. */ - __pyx_t_1 = PyFloat_FromDouble(NC_FILL_DOUBLE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1051, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(NC_FILL_DOUBLE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1052, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_f8, __pyx_t_1) < 0) __PYX_ERR(0, 1041, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_f8, __pyx_t_1) < 0) __PYX_ERR(0, 1042, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_default_fillvals, __pyx_t_2) < 0) __PYX_ERR(0, 1040, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_default_fillvals, __pyx_t_2) < 0) __PYX_ERR(0, 1041, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":1054 + /* "netCDF4/_netCDF4.pyx":1055 * * # logical for native endian type. * is_native_little = numpy.dtype('f4').byteorder == '=' * */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1054, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1054, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__136, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1054, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__140, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1055, __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_byteorder); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1054, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_byteorder); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_kp_s__36, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1054, __pyx_L1_error) + __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_kp_s__40, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1055, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_native_little, __pyx_t_2) < 0) __PYX_ERR(0, 1054, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_native_little, __pyx_t_2) < 0) __PYX_ERR(0, 1055, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":1055 + /* "netCDF4/_netCDF4.pyx":1056 * # logical for native endian type. * is_native_little = numpy.dtype('f4').byteorder == '=' # <<<<<<<<<<<<<< * - * # hard code this here, instead of importing from netcdf.h + * # hard code these here, instead of importing from netcdf.h */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1055, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1056, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1055, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1056, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__137, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1055, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__141, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1056, __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_byteorder); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1055, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_byteorder); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1056, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_kp_s__36, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1055, __pyx_L1_error) + __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_kp_s__40, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1056, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_native_big, __pyx_t_2) < 0) __PYX_ERR(0, 1055, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_native_big, __pyx_t_2) < 0) __PYX_ERR(0, 1056, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":1059 - * # hard code this here, instead of importing from netcdf.h + /* "netCDF4/_netCDF4.pyx":1060 + * # hard code these here, instead of importing from netcdf.h * # so it will compile with versions <= 4.2. * NC_DISKLESS = 0x0008 # <<<<<<<<<<<<<< + * * # encoding used to convert strings to bytes when writing text data - * # to the netcdf file, and for converting bytes to strings when reading */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NC_DISKLESS, __pyx_int_8) < 0) __PYX_ERR(0, 1059, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NC_DISKLESS, __pyx_int_8) < 0) __PYX_ERR(0, 1060, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1063 + /* "netCDF4/_netCDF4.pyx":1065 * # to the netcdf file, and for converting bytes to strings when reading * # from the netcdf file. * default_encoding = 'utf-8' # <<<<<<<<<<<<<< * # unicode decode/encode error handling. Replace bad chars with "?" * # can be set to 'strict' or 'ignore'. */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_default_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(0, 1063, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_default_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(0, 1065, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1066 + /* "netCDF4/_netCDF4.pyx":1068 * # unicode decode/encode error handling. Replace bad chars with "?" * # can be set to 'strict' or 'ignore'. * unicode_error = 'replace' # <<<<<<<<<<<<<< * python3 = sys.version_info[0] > 2 * if python3: */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_unicode_error, __pyx_n_s_replace) < 0) __PYX_ERR(0, 1066, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_unicode_error, __pyx_n_s_replace) < 0) __PYX_ERR(0, 1068, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1067 + /* "netCDF4/_netCDF4.pyx":1069 * # can be set to 'strict' or 'ignore'. * unicode_error = 'replace' * python3 = sys.version_info[0] > 2 # <<<<<<<<<<<<<< * if python3: * buffer = memoryview */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1067, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1069, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_version_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1067, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_version_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1069, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1067, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1069, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_2, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1067, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_2, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1069, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_python3, __pyx_t_1) < 0) __PYX_ERR(0, 1067, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_python3, __pyx_t_1) < 0) __PYX_ERR(0, 1069, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1068 + /* "netCDF4/_netCDF4.pyx":1070 * unicode_error = 'replace' * python3 = sys.version_info[0] > 2 * if python3: # <<<<<<<<<<<<<< * buffer = memoryview * */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1068, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1070, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 1068, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 1070, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_15) { - /* "netCDF4/_netCDF4.pyx":1069 + /* "netCDF4/_netCDF4.pyx":1071 * python3 = sys.version_info[0] > 2 * if python3: * buffer = memoryview # <<<<<<<<<<<<<< * * _nctonptype = {} */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_buffer, __pyx_builtin_memoryview) < 0) __PYX_ERR(0, 1069, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_buffer, __pyx_builtin_memoryview) < 0) __PYX_ERR(0, 1071, __pyx_L1_error) - /* "netCDF4/_netCDF4.pyx":1068 + /* "netCDF4/_netCDF4.pyx":1070 * unicode_error = 'replace' * python3 = sys.version_info[0] > 2 * if python3: # <<<<<<<<<<<<<< @@ -83489,28 +83589,28 @@ PyMODINIT_FUNC PyInit__netCDF4(void) */ } - /* "netCDF4/_netCDF4.pyx":1071 + /* "netCDF4/_netCDF4.pyx":1073 * buffer = memoryview * * _nctonptype = {} # <<<<<<<<<<<<<< * for _key,_value in _nptonctype.items(): * _nctonptype[_value] = _key */ - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1071, __pyx_L1_error) + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1073, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_nctonptype, __pyx_t_1) < 0) __PYX_ERR(0, 1071, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_nctonptype, __pyx_t_1) < 0) __PYX_ERR(0, 1073, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1072 + /* "netCDF4/_netCDF4.pyx":1074 * * _nctonptype = {} * for _key,_value in _nptonctype.items(): # <<<<<<<<<<<<<< * _nctonptype[_value] = _key * _supportedtypes = _nptonctype.keys() */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1072, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_items); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1072, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_items); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -83524,10 +83624,10 @@ PyMODINIT_FUNC PyInit__netCDF4(void) } } if (__pyx_t_2) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1072, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1074, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1072, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1074, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; @@ -83535,9 +83635,9 @@ PyMODINIT_FUNC PyInit__netCDF4(void) __pyx_t_11 = __pyx_t_1; __Pyx_INCREF(__pyx_t_11); __pyx_t_17 = 0; __pyx_t_18 = NULL; } else { - __pyx_t_17 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1072, __pyx_L1_error) + __pyx_t_17 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_18 = Py_TYPE(__pyx_t_11)->tp_iternext; if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1072, __pyx_L1_error) + __pyx_t_18 = Py_TYPE(__pyx_t_11)->tp_iternext; if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1074, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -83545,17 +83645,17 @@ PyMODINIT_FUNC PyInit__netCDF4(void) if (likely(PyList_CheckExact(__pyx_t_11))) { if (__pyx_t_17 >= 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_17); __Pyx_INCREF(__pyx_t_1); __pyx_t_17++; if (unlikely(0 < 0)) __PYX_ERR(0, 1072, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_17); __Pyx_INCREF(__pyx_t_1); __pyx_t_17++; if (unlikely(0 < 0)) __PYX_ERR(0, 1074, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_11, __pyx_t_17); __pyx_t_17++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1072, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_11, __pyx_t_17); __pyx_t_17++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_17 >= 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_17); __Pyx_INCREF(__pyx_t_1); __pyx_t_17++; if (unlikely(0 < 0)) __PYX_ERR(0, 1072, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_17); __Pyx_INCREF(__pyx_t_1); __pyx_t_17++; if (unlikely(0 < 0)) __PYX_ERR(0, 1074, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_11, __pyx_t_17); __pyx_t_17++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1072, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_11, __pyx_t_17); __pyx_t_17++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -83565,7 +83665,7 @@ PyMODINIT_FUNC PyInit__netCDF4(void) 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, 1072, __pyx_L1_error) + else __PYX_ERR(0, 1074, __pyx_L1_error) } break; } @@ -83581,7 +83681,7 @@ PyMODINIT_FUNC PyInit__netCDF4(void) if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1072, __pyx_L1_error) + __PYX_ERR(0, 1074, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -83594,15 +83694,15 @@ PyMODINIT_FUNC PyInit__netCDF4(void) __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_7); #else - __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1072, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1072, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_13 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1072, __pyx_L1_error) + __pyx_t_13 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_19 = Py_TYPE(__pyx_t_13)->tp_iternext; @@ -83610,7 +83710,7 @@ PyMODINIT_FUNC PyInit__netCDF4(void) __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_7 = __pyx_t_19(__pyx_t_13); if (unlikely(!__pyx_t_7)) goto __pyx_L39_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_19(__pyx_t_13), 2) < 0) __PYX_ERR(0, 1072, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_19(__pyx_t_13), 2) < 0) __PYX_ERR(0, 1074, __pyx_L1_error) __pyx_t_19 = NULL; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L40_unpacking_done; @@ -83618,33 +83718,33 @@ PyMODINIT_FUNC PyInit__netCDF4(void) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_19 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1072, __pyx_L1_error) + __PYX_ERR(0, 1074, __pyx_L1_error) __pyx_L40_unpacking_done:; } - if (PyDict_SetItem(__pyx_d, __pyx_n_s_key, __pyx_t_2) < 0) __PYX_ERR(0, 1072, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_key, __pyx_t_2) < 0) __PYX_ERR(0, 1074, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_value_2, __pyx_t_7) < 0) __PYX_ERR(0, 1072, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_value_2, __pyx_t_7) < 0) __PYX_ERR(0, 1074, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":1073 + /* "netCDF4/_netCDF4.pyx":1075 * _nctonptype = {} * for _key,_value in _nptonctype.items(): * _nctonptype[_value] = _key # <<<<<<<<<<<<<< * _supportedtypes = _nptonctype.keys() * # make sure NC_CHAR points to S1 */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1073, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1075, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1073, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1075, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_value_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1073, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_value_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1075, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_t_2, __pyx_t_1) < 0)) __PYX_ERR(0, 1073, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_t_2, __pyx_t_1) < 0)) __PYX_ERR(0, 1075, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netCDF4/_netCDF4.pyx":1072 + /* "netCDF4/_netCDF4.pyx":1074 * * _nctonptype = {} * for _key,_value in _nptonctype.items(): # <<<<<<<<<<<<<< @@ -83654,16 +83754,16 @@ PyMODINIT_FUNC PyInit__netCDF4(void) } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":1074 + /* "netCDF4/_netCDF4.pyx":1076 * for _key,_value in _nptonctype.items(): * _nctonptype[_value] = _key * _supportedtypes = _nptonctype.keys() # <<<<<<<<<<<<<< * # make sure NC_CHAR points to S1 * _nctonptype[NC_CHAR]='S1' */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1074, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1076, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1074, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1076, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -83677,48 +83777,59 @@ PyMODINIT_FUNC PyInit__netCDF4(void) } } if (__pyx_t_1) { - __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1074, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1076, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { - __pyx_t_11 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1074, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1076, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_supportedtypes, __pyx_t_11) < 0) __PYX_ERR(0, 1074, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_supportedtypes, __pyx_t_11) < 0) __PYX_ERR(0, 1076, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":1076 + /* "netCDF4/_netCDF4.pyx":1078 * _supportedtypes = _nptonctype.keys() * # make sure NC_CHAR points to S1 * _nctonptype[NC_CHAR]='S1' # <<<<<<<<<<<<<< * * # internal C functions. */ - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1076, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1078, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (unlikely(__Pyx_SetItemInt(__pyx_t_11, NC_CHAR, __pyx_n_s_S1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) __PYX_ERR(0, 1076, __pyx_L1_error) + if (unlikely(__Pyx_SetItemInt(__pyx_t_11, NC_CHAR, __pyx_n_s_S1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) __PYX_ERR(0, 1078, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":1183 + /* "netCDF4/_netCDF4.pyx":1185 * return value_arr * * def _set_default_format(object format='NETCDF4'): # <<<<<<<<<<<<<< * # Private function to set the netCDF file format * if format not in _format_dict: */ - __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_5_set_default_format, NULL, __pyx_n_s_netCDF4__netCDF4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1183, __pyx_L1_error) + __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_5_set_default_format, NULL, __pyx_n_s_netCDF4__netCDF4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_default_format, __pyx_t_11) < 0) __PYX_ERR(0, 1183, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_default_format, __pyx_t_11) < 0) __PYX_ERR(0, 1185, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":1585 + /* "netCDF4/_netCDF4.pyx":1583 + * return variables + * + * cdef _ensure_nc_success(ierr, err_cls=RuntimeError): # <<<<<<<<<<<<<< + * if ierr != NC_NOERR: + * raise err_cls((nc_strerror(ierr)).decode('ascii')) + */ + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_k__15 = __pyx_builtin_RuntimeError; + __Pyx_GIVEREF(__pyx_builtin_RuntimeError); + + /* "netCDF4/_netCDF4.pyx":1591 * - * _private_atts =\ + * _private_atts = \ * ['_grpid','_grp','_varid','groups','dimensions','variables','dtype','data_model','disk_format', # <<<<<<<<<<<<<< * '_nunlimdim','path','parent','ndim','mask','scale','cmptypes','vltypes','enumtypes','_isprimitive', * 'file_format','_isvlen','_isenum','_iscompound','_cmptype','_vltype','_enumtype','name', */ - __pyx_t_11 = PyList_New(30); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1585, __pyx_L1_error) + __pyx_t_11 = PyList_New(31); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(__pyx_n_s_grpid); __Pyx_GIVEREF(__pyx_n_s_grpid); @@ -83810,425 +83921,428 @@ PyMODINIT_FUNC PyInit__netCDF4(void) __Pyx_INCREF(__pyx_n_s_has_lsd); __Pyx_GIVEREF(__pyx_n_s_has_lsd); PyList_SET_ITEM(__pyx_t_11, 29, __pyx_n_s_has_lsd); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_private_atts, __pyx_t_11) < 0) __PYX_ERR(0, 1584, __pyx_L1_error) + __Pyx_INCREF(__pyx_n_s_buffer_2); + __Pyx_GIVEREF(__pyx_n_s_buffer_2); + PyList_SET_ITEM(__pyx_t_11, 30, __pyx_n_s_buffer_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_private_atts, __pyx_t_11) < 0) __PYX_ERR(0, 1590, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":1589 + /* "netCDF4/_netCDF4.pyx":1595 * 'file_format','_isvlen','_isenum','_iscompound','_cmptype','_vltype','_enumtype','name', - * '__orthogoral_indexing__','keepweakref','_has_lsd'] + * '__orthogoral_indexing__','keepweakref','_has_lsd', '_buffer'] * __pdoc__ = {} # <<<<<<<<<<<<<< * * cdef class Dataset: */ - __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1589, __pyx_L1_error) + __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_pdoc, __pyx_t_11) < 0) __PYX_ERR(0, 1589, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pdoc, __pyx_t_11) < 0) __PYX_ERR(0, 1595, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":1665 + /* "netCDF4/_netCDF4.pyx":1672 * keepweakref * # Docstrings for class variables (used by pdoc). * __pdoc__['Dataset.dimensions']=\ # <<<<<<<<<<<<<< * """The `dimensions` dictionary maps the names of * dimensions defined for the `netCDF4.Group` or `netCDF4.Dataset` to instances of the */ - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1665, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1672, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Dataset_dimensions, __pyx_kp_s_The_dimensions_dictionary_maps_t) < 0)) __PYX_ERR(0, 1665, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Dataset_dimensions, __pyx_kp_s_The_dimensions_dictionary_maps_t) < 0)) __PYX_ERR(0, 1672, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":1669 + /* "netCDF4/_netCDF4.pyx":1676 * dimensions defined for the `netCDF4.Group` or `netCDF4.Dataset` to instances of the * `netCDF4.Dimension` class.""" * __pdoc__['Dataset.variables']=\ # <<<<<<<<<<<<<< * """The `variables` dictionary maps the names of variables * defined for this `netCDF4.Dataset` or `netCDF4.Group` to instances of the `netCDF4.Variable` */ - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1669, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Dataset_variables, __pyx_kp_s_The_variables_dictionary_maps_th) < 0)) __PYX_ERR(0, 1669, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Dataset_variables, __pyx_kp_s_The_variables_dictionary_maps_th) < 0)) __PYX_ERR(0, 1676, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":1673 + /* "netCDF4/_netCDF4.pyx":1680 * defined for this `netCDF4.Dataset` or `netCDF4.Group` to instances of the `netCDF4.Variable` * class.""" * __pdoc__['Dataset.groups']=\ # <<<<<<<<<<<<<< * """The groups dictionary maps the names of groups created for * this `netCDF4.Dataset` or `netCDF4.Group` to instances of the `netCDF4.Group` class (the */ - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1673, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Dataset_groups, __pyx_kp_s_The_groups_dictionary_maps_the_n) < 0)) __PYX_ERR(0, 1673, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Dataset_groups, __pyx_kp_s_The_groups_dictionary_maps_the_n) < 0)) __PYX_ERR(0, 1680, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":1678 + /* "netCDF4/_netCDF4.pyx":1685 * `netCDF4.Dataset` class is simply a special case of the `netCDF4.Group` class which * describes the root group in the netCDF4 file).""" * __pdoc__['Dataset.cmptypes']=\ # <<<<<<<<<<<<<< * """The `cmptypes` dictionary maps the names of * compound types defined for the `netCDF4.Group` or `netCDF4.Dataset` to instances of the */ - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1678, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Dataset_cmptypes, __pyx_kp_s_The_cmptypes_dictionary_maps_the) < 0)) __PYX_ERR(0, 1678, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Dataset_cmptypes, __pyx_kp_s_The_cmptypes_dictionary_maps_the) < 0)) __PYX_ERR(0, 1685, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":1682 + /* "netCDF4/_netCDF4.pyx":1689 * compound types defined for the `netCDF4.Group` or `netCDF4.Dataset` to instances of the * `netCDF4.CompoundType` class.""" * __pdoc__['Dataset.vltypes']=\ # <<<<<<<<<<<<<< * """The `vltypes` dictionary maps the names of * variable-length types defined for the `netCDF4.Group` or `netCDF4.Dataset` to instances of the */ - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1682, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Dataset_vltypes, __pyx_kp_s_The_vltypes_dictionary_maps_the) < 0)) __PYX_ERR(0, 1682, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Dataset_vltypes, __pyx_kp_s_The_vltypes_dictionary_maps_the) < 0)) __PYX_ERR(0, 1689, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":1686 + /* "netCDF4/_netCDF4.pyx":1693 * variable-length types defined for the `netCDF4.Group` or `netCDF4.Dataset` to instances of the * `netCDF4.VLType` class.""" * __pdoc__['Dataset.enumtypes']=\ # <<<<<<<<<<<<<< * """The `enumtypes` dictionary maps the names of * Enum types defined for the `netCDF4.Group` or `netCDF4.Dataset` to instances of the */ - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1686, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Dataset_enumtypes, __pyx_kp_s_The_enumtypes_dictionary_maps_th) < 0)) __PYX_ERR(0, 1686, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Dataset_enumtypes, __pyx_kp_s_The_enumtypes_dictionary_maps_th) < 0)) __PYX_ERR(0, 1693, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":1690 + /* "netCDF4/_netCDF4.pyx":1697 * Enum types defined for the `netCDF4.Group` or `netCDF4.Dataset` to instances of the * `netCDF4.EnumType` class.""" * __pdoc__['Dataset.data_model']=\ # <<<<<<<<<<<<<< * """`data_model` describes the netCDF * data model version, one of `NETCDF3_CLASSIC`, `NETCDF4`, */ - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1690, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1697, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Dataset_data_model, __pyx_kp_s_data_model_describes_the_netCDF) < 0)) __PYX_ERR(0, 1690, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Dataset_data_model, __pyx_kp_s_data_model_describes_the_netCDF) < 0)) __PYX_ERR(0, 1697, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":1694 + /* "netCDF4/_netCDF4.pyx":1701 * data model version, one of `NETCDF3_CLASSIC`, `NETCDF4`, * `NETCDF4_CLASSIC`, `NETCDF3_64BIT_OFFSET` or `NETCDF3_64BIT_DATA`.""" * __pdoc__['Dataset.file_format']=\ # <<<<<<<<<<<<<< * """same as `data_model`, retained for backwards compatibility.""" * __pdoc__['Dataset.disk_format']=\ */ - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1694, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Dataset_file_format, __pyx_kp_s_same_as_data_model_retained_for) < 0)) __PYX_ERR(0, 1694, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Dataset_file_format, __pyx_kp_s_same_as_data_model_retained_for) < 0)) __PYX_ERR(0, 1701, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":1696 + /* "netCDF4/_netCDF4.pyx":1703 * __pdoc__['Dataset.file_format']=\ * """same as `data_model`, retained for backwards compatibility.""" * __pdoc__['Dataset.disk_format']=\ # <<<<<<<<<<<<<< * """`disk_format` describes the underlying * file format, one of `NETCDF3`, `HDF5`, `HDF4`, */ - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1696, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1703, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Dataset_disk_format, __pyx_kp_s_disk_format_describes_the_under) < 0)) __PYX_ERR(0, 1696, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Dataset_disk_format, __pyx_kp_s_disk_format_describes_the_under) < 0)) __PYX_ERR(0, 1703, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":1702 + /* "netCDF4/_netCDF4.pyx":1709 * netcdf C library version >= 4.3.1, otherwise will always return * `UNDEFINED`.""" * __pdoc__['Dataset.parent']=\ # <<<<<<<<<<<<<< * """`parent` is a reference to the parent * `netCDF4.Group` instance. `None` for the root group or `netCDF4.Dataset` instance""" */ - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1702, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1709, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Dataset_parent, __pyx_kp_s_parent_is_a_reference_to_the_pa) < 0)) __PYX_ERR(0, 1702, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Dataset_parent, __pyx_kp_s_parent_is_a_reference_to_the_pa) < 0)) __PYX_ERR(0, 1709, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":1705 + /* "netCDF4/_netCDF4.pyx":1712 * """`parent` is a reference to the parent * `netCDF4.Group` instance. `None` for the root group or `netCDF4.Dataset` instance""" * __pdoc__['Dataset.path']=\ # <<<<<<<<<<<<<< * """`path` shows the location of the `netCDF4.Group` in * the `netCDF4.Dataset` in a unix directory format (the names of groups in the */ - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1705, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Dataset_path, __pyx_kp_s_path_shows_the_location_of_the) < 0)) __PYX_ERR(0, 1705, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Dataset_path, __pyx_kp_s_path_shows_the_location_of_the) < 0)) __PYX_ERR(0, 1712, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":1710 + /* "netCDF4/_netCDF4.pyx":1717 * hierarchy separated by backslashes). A `netCDF4.Dataset` instance is the root * group, so the path is simply `'/'`.""" * __pdoc__['Dataset.keepweakref']=\ # <<<<<<<<<<<<<< * """If `True`, child Dimension and Variables objects only keep weak references to * the parent Dataset or Group.""" */ - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1710, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1717, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Dataset_keepweakref, __pyx_kp_s_If_True_child_Dimension_and_Vari) < 0)) __PYX_ERR(0, 1710, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Dataset_keepweakref, __pyx_kp_s_If_True_child_Dimension_and_Vari) < 0)) __PYX_ERR(0, 1717, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":2621 + /* "netCDF4/_netCDF4.pyx":2648 * """ * # Docstrings for class variables (used by pdoc). * __pdoc__['Group.name']=\ # <<<<<<<<<<<<<< * """A string describing the name of the `netCDF4.Group`.""" * def __init__(self, parent, name, **kwargs): */ - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2621, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2648, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Group_name, __pyx_kp_s_A_string_describing_the_name_of) < 0)) __PYX_ERR(0, 2621, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Group_name, __pyx_kp_s_A_string_describing_the_name_of) < 0)) __PYX_ERR(0, 2648, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":2720 + /* "netCDF4/_netCDF4.pyx":2743 * cdef public _data_model, _name, _grp * # Docstrings for class variables (used by pdoc). * __pdoc__['Dimension.name']=\ # <<<<<<<<<<<<<< * """A string describing the name of the `netCDF4.Dimension` - used when creating a * `netCDF4.Variable` instance with `netCDF4.Dataset.createVariable`.""" */ - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2720, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2743, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Dimension_name, __pyx_kp_s_A_string_describing_the_name_of_2) < 0)) __PYX_ERR(0, 2720, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Dimension_name, __pyx_kp_s_A_string_describing_the_name_of_2) < 0)) __PYX_ERR(0, 2743, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":2916 + /* "netCDF4/_netCDF4.pyx":2939 * __orthogonal_indexing__, _has_lsd * # Docstrings for class variables (used by pdoc). * __pdoc__['Variable.dimensions'] = \ # <<<<<<<<<<<<<< * """A tuple containing the names of the * dimensions associated with this variable.""" */ - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2916, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2939, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Variable_dimensions, __pyx_kp_s_A_tuple_containing_the_names_of) < 0)) __PYX_ERR(0, 2916, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Variable_dimensions, __pyx_kp_s_A_tuple_containing_the_names_of) < 0)) __PYX_ERR(0, 2939, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":2919 + /* "netCDF4/_netCDF4.pyx":2942 * """A tuple containing the names of the * dimensions associated with this variable.""" * __pdoc__['Variable.dtype'] = \ # <<<<<<<<<<<<<< * """A numpy dtype object describing the * variable's data type.""" */ - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2919, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2942, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Variable_dtype, __pyx_kp_s_A_numpy_dtype_object_describing) < 0)) __PYX_ERR(0, 2919, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Variable_dtype, __pyx_kp_s_A_numpy_dtype_object_describing) < 0)) __PYX_ERR(0, 2942, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":2922 + /* "netCDF4/_netCDF4.pyx":2945 * """A numpy dtype object describing the * variable's data type.""" * __pdoc__['Variable.ndim'] = \ # <<<<<<<<<<<<<< * """The number of variable dimensions.""" * __pdoc__['Variable.scale'] = \ */ - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2922, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2945, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Variable_ndim, __pyx_kp_s_The_number_of_variable_dimension) < 0)) __PYX_ERR(0, 2922, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Variable_ndim, __pyx_kp_s_The_number_of_variable_dimension) < 0)) __PYX_ERR(0, 2945, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":2924 + /* "netCDF4/_netCDF4.pyx":2947 * __pdoc__['Variable.ndim'] = \ * """The number of variable dimensions.""" * __pdoc__['Variable.scale'] = \ # <<<<<<<<<<<<<< * """if True, `scale_factor` and `add_offset` are * applied. Default is `True`, can be reset using `netCDF4.Variable.set_auto_scale` and */ - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2924, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2947, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Variable_scale, __pyx_kp_s_if_True_scale_factor_and_add_off) < 0)) __PYX_ERR(0, 2924, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Variable_scale, __pyx_kp_s_if_True_scale_factor_and_add_off) < 0)) __PYX_ERR(0, 2947, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":2928 + /* "netCDF4/_netCDF4.pyx":2951 * applied. Default is `True`, can be reset using `netCDF4.Variable.set_auto_scale` and * `netCDF4.Variable.set_auto_maskandscale` methods.""" * __pdoc__['Variable.mask'] = \ # <<<<<<<<<<<<<< * """If True, data is automatically converted to/from masked * arrays when missing values or fill values are present. Default is `True`, can be */ - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2928, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2951, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Variable_mask, __pyx_kp_s_If_True_data_is_automatically_co) < 0)) __PYX_ERR(0, 2928, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Variable_mask, __pyx_kp_s_If_True_data_is_automatically_co) < 0)) __PYX_ERR(0, 2951, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":2933 + /* "netCDF4/_netCDF4.pyx":2956 * reset using `netCDF4.Variable.set_auto_mask` and `netCDF4.Variable.set_auto_maskandscale` * methods.""" * __pdoc__['Variable.least_significant_digit'] = \ # <<<<<<<<<<<<<< * """Describes the power of ten of the * smallest decimal place in the data the contains a reliable value. Data is */ - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2933, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2956, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Variable_least_significant_digit, __pyx_kp_s_Describes_the_power_of_ten_of_th) < 0)) __PYX_ERR(0, 2933, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Variable_least_significant_digit, __pyx_kp_s_Describes_the_power_of_ten_of_th) < 0)) __PYX_ERR(0, 2956, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":2938 + /* "netCDF4/_netCDF4.pyx":2961 * truncated to this decimal place when it is assigned to the `netCDF4.Variable` * instance. If `None`, the data is not truncated.""" * __pdoc__['Variable.__orthogonal_indexing__'] = \ # <<<<<<<<<<<<<< * """Always `True`. Indicates to client code * that the object supports 'orthogonal indexing', which means that slices */ - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2938, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2961, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Variable___orthogonal_indexing, __pyx_kp_s_Always_True_Indicates_to_client) < 0)) __PYX_ERR(0, 2938, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Variable___orthogonal_indexing, __pyx_kp_s_Always_True_Indicates_to_client) < 0)) __PYX_ERR(0, 2961, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":2943 + /* "netCDF4/_netCDF4.pyx":2966 * that are 1d arrays or lists slice along each dimension independently. This * behavior is similar to Fortran or Matlab, but different than numpy.""" * __pdoc__['Variable.datatype'] = \ # <<<<<<<<<<<<<< * """numpy data type (for primitive data types) or * VLType/CompoundType/EnumType instance (for compound, vlen or enum */ - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2943, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2966, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Variable_datatype, __pyx_kp_s_numpy_data_type_for_primitive_da) < 0)) __PYX_ERR(0, 2943, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Variable_datatype, __pyx_kp_s_numpy_data_type_for_primitive_da) < 0)) __PYX_ERR(0, 2966, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":2947 + /* "netCDF4/_netCDF4.pyx":2970 * VLType/CompoundType/EnumType instance (for compound, vlen or enum * data types).""" * __pdoc__['Variable.name'] = \ # <<<<<<<<<<<<<< * """String name.""" * __pdoc__['Variable.shape'] = \ */ - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2947, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2970, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Variable_name, __pyx_kp_s_String_name) < 0)) __PYX_ERR(0, 2947, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Variable_name, __pyx_kp_s_String_name) < 0)) __PYX_ERR(0, 2970, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":2949 + /* "netCDF4/_netCDF4.pyx":2972 * __pdoc__['Variable.name'] = \ * """String name.""" * __pdoc__['Variable.shape'] = \ # <<<<<<<<<<<<<< * """A tuple with the current shape (length of all dimensions).""" * __pdoc__['Variable.size'] = \ */ - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2949, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2972, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Variable_shape, __pyx_kp_s_A_tuple_with_the_current_shape_l) < 0)) __PYX_ERR(0, 2949, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Variable_shape, __pyx_kp_s_A_tuple_with_the_current_shape_l) < 0)) __PYX_ERR(0, 2972, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":2951 + /* "netCDF4/_netCDF4.pyx":2974 * __pdoc__['Variable.shape'] = \ * """A tuple with the current shape (length of all dimensions).""" * __pdoc__['Variable.size'] = \ # <<<<<<<<<<<<<< * """The number of stored elements.""" * */ - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2951, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2974, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Variable_size, __pyx_kp_s_The_number_of_stored_elements) < 0)) __PYX_ERR(0, 2951, __pyx_L1_error) + 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":4580 + /* "netCDF4/_netCDF4.pyx":4603 * 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, 4580, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4603, __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, 4580, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_CompoundType_name, __pyx_kp_s_String_name) < 0)) __PYX_ERR(0, 4603, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":4582 + /* "netCDF4/_netCDF4.pyx":4605 * __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, 4582, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4605, __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, 4582, __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, 4605, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":4828 + /* "netCDF4/_netCDF4.pyx":4851 * 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, 4828, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4851, __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, 4828, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_VLType_name, __pyx_kp_s_String_name) < 0)) __PYX_ERR(0, 4851, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":4830 + /* "netCDF4/_netCDF4.pyx":4853 * __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, 4830, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4853, __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, 4830, __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, 4853, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":4946 + /* "netCDF4/_netCDF4.pyx":4969 * 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, 4946, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4969, __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, 4946, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_EnumType_name, __pyx_kp_s_String_name) < 0)) __PYX_ERR(0, 4969, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":4948 + /* "netCDF4/_netCDF4.pyx":4971 * __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, 4948, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4971, __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, 4948, __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, 4971, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":4950 + /* "netCDF4/_netCDF4.pyx":4973 * __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, 4950, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4973, __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, 4950, __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, 4973, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":5074 + /* "netCDF4/_netCDF4.pyx":5097 * 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, 5074, __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, 5097, __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, 5074, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_to_ascii, __pyx_t_11) < 0) __PYX_ERR(0, 5097, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":5084 + /* "netCDF4/_netCDF4.pyx":5107 * # 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, 5084, __pyx_L1_error) + __pyx_t_11 = PyList_New(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(__pyx_n_s_timedelta); __Pyx_GIVEREF(__pyx_n_s_timedelta); @@ -84239,31 +84353,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, 5084, __pyx_L1_error) + __pyx_t_2 = __Pyx_Import(__pyx_n_s_datetime, __pyx_t_11, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5107, __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, 5084, __pyx_L1_error) + __pyx_t_11 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_timedelta); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_timedelta, __pyx_t_11) < 0) __PYX_ERR(0, 5084, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_timedelta, __pyx_t_11) < 0) __PYX_ERR(0, 5107, __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, 5084, __pyx_L1_error) + __pyx_t_11 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_datetime); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_datetime, __pyx_t_11) < 0) __PYX_ERR(0, 5084, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_datetime, __pyx_t_11) < 0) __PYX_ERR(0, 5107, __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, 5084, __pyx_L1_error) + __pyx_t_11 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_MINYEAR); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_MINYEAR, __pyx_t_11) < 0) __PYX_ERR(0, 5084, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_MINYEAR, __pyx_t_11) < 0) __PYX_ERR(0, 5107, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5085 + /* "netCDF4/_netCDF4.pyx":5108 * #---------------------------------------- * 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, 5085, __pyx_L1_error) + __pyx_t_2 = PyList_New(7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_parse_date); __Pyx_GIVEREF(__pyx_n_s_parse_date); @@ -84286,558 +84400,558 @@ 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, 5085, __pyx_L1_error) + __pyx_t_11 = __Pyx_Import(__pyx_n_s_netcdftime, __pyx_t_2, -1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5108, __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, 5085, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_11, __pyx_n_s_parse_date); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5108, __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, 5085, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse_date, __pyx_t_2) < 0) __PYX_ERR(0, 5108, __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, 5085, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_11, __pyx_n_s_microsec_units); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5108, __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, 5085, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_microsec_units, __pyx_t_2) < 0) __PYX_ERR(0, 5108, __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, 5085, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_11, __pyx_n_s_millisec_units); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5108, __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, 5085, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_millisec_units, __pyx_t_2) < 0) __PYX_ERR(0, 5108, __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, 5085, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_11, __pyx_n_s_sec_units); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5108, __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, 5086, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_sec_units, __pyx_t_2) < 0) __PYX_ERR(0, 5109, __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, 5085, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_11, __pyx_n_s_min_units); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5108, __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, 5086, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_min_units, __pyx_t_2) < 0) __PYX_ERR(0, 5109, __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, 5085, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_11, __pyx_n_s_hr_units); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5108, __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, 5086, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_hr_units, __pyx_t_2) < 0) __PYX_ERR(0, 5109, __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, 5085, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_11, __pyx_n_s_day_units); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5108, __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, 5086, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_day_units, __pyx_t_2) < 0) __PYX_ERR(0, 5109, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "netCDF4/_netCDF4.pyx":5089 + /* "netCDF4/_netCDF4.pyx":5112 * * # 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, 5089, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__142, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5089, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__146, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5112, __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, 5089, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_gregorian, __pyx_t_2) < 0) __PYX_ERR(0, 5112, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5091 + /* "netCDF4/_netCDF4.pyx":5114 * 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, 5091, __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, 5114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_dateparse, __pyx_t_2) < 0) __PYX_ERR(0, 5091, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_dateparse, __pyx_t_2) < 0) __PYX_ERR(0, 5114, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5116 + /* "netCDF4/_netCDF4.pyx":5139 * 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, 5116, __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, 5139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_stringtoarr, __pyx_t_2) < 0) __PYX_ERR(0, 5116, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_stringtoarr, __pyx_t_2) < 0) __PYX_ERR(0, 5139, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5139 + /* "netCDF4/_netCDF4.pyx":5162 * 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, 5139, __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, 5162, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_stringtochar, __pyx_t_2) < 0) __PYX_ERR(0, 5139, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_stringtochar, __pyx_t_2) < 0) __PYX_ERR(0, 5162, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5158 + /* "netCDF4/_netCDF4.pyx":5181 * 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, 5158, __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, 5181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_chartostring, __pyx_t_2) < 0) __PYX_ERR(0, 5158, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_chartostring, __pyx_t_2) < 0) __PYX_ERR(0, 5181, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5179 + /* "netCDF4/_netCDF4.pyx":5202 * 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, 5179, __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, 5202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_date2num, __pyx_t_2) < 0) __PYX_ERR(0, 5179, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_date2num, __pyx_t_2) < 0) __PYX_ERR(0, 5202, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5267 + /* "netCDF4/_netCDF4.pyx":5290 * 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, 5267, __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, 5290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_num2date, __pyx_t_2) < 0) __PYX_ERR(0, 5267, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_num2date, __pyx_t_2) < 0) __PYX_ERR(0, 5290, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5370 + /* "netCDF4/_netCDF4.pyx":5393 * return cdftime.num2date(times) * * def date2index(dates, nctime, calendar=None, select='exact'): # <<<<<<<<<<<<<< * """ * **`date2index(dates, nctime, calendar=None, select='exact')`** */ - __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_21date2index, NULL, __pyx_n_s_netCDF4__netCDF4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5370, __pyx_L1_error) + __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_21date2index, NULL, __pyx_n_s_netCDF4__netCDF4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5393, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_date2index, __pyx_t_2) < 0) __PYX_ERR(0, 5370, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_date2index, __pyx_t_2) < 0) __PYX_ERR(0, 5393, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5426 + /* "netCDF4/_netCDF4.pyx":5449 * return netcdftime.date2index(dates, nctime, calendar, select) * * class MFDataset(Dataset): # <<<<<<<<<<<<<< * """ * Class for reading multi-file netCDF Datasets, making variables */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5426, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_ptype_7netCDF4_8_netCDF4_Dataset)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_7netCDF4_8_netCDF4_Dataset)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_7netCDF4_8_netCDF4_Dataset)); - __pyx_t_11 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5426, __pyx_L1_error) + __pyx_t_11 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_11, __pyx_t_2, __pyx_n_s_MFDataset, __pyx_n_s_MFDataset, (PyObject *) NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_kp_s_Class_for_reading_multi_file_ne); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5426, __pyx_L1_error) + __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_11, __pyx_t_2, __pyx_n_s_MFDataset, __pyx_n_s_MFDataset, (PyObject *) NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_kp_s_Class_for_reading_multi_file_ne); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "netCDF4/_netCDF4.pyx":5456 + /* "netCDF4/_netCDF4.pyx":5479 * """ * * def __init__(self, files, check=False, aggdim=None, exclude=[]): # <<<<<<<<<<<<<< * """ * **`__init__(self, files, check=False, aggdim=None, exclude=[])`** */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9MFDataset_1__init__, 0, __pyx_n_s_MFDataset___init, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__158)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5456, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9MFDataset_1__init__, 0, __pyx_n_s_MFDataset___init, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__162)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (!__Pyx_CyFunction_InitDefaults(__pyx_t_7, sizeof(__pyx_defaults), 1)) __PYX_ERR(0, 5456, __pyx_L1_error) - __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5456, __pyx_L1_error) + if (!__Pyx_CyFunction_InitDefaults(__pyx_t_7, sizeof(__pyx_defaults), 1)) __PYX_ERR(0, 5479, __pyx_L1_error) + __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_7)->__pyx_arg_exclude = __pyx_t_13; __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_7, __pyx_pf_7netCDF4_8_netCDF4_25__defaults__); - if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_init, __pyx_t_7) < 0) __PYX_ERR(0, 5456, __pyx_L1_error) + if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_init, __pyx_t_7) < 0) __PYX_ERR(0, 5479, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5629 + /* "netCDF4/_netCDF4.pyx":5652 * self._path = '/' * * def __setattr__(self, name, value): # <<<<<<<<<<<<<< * """override base class attribute creation""" * self.__dict__[name] = value */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9MFDataset_3__setattr__, 0, __pyx_n_s_MFDataset___setattr, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__160)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5629, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9MFDataset_3__setattr__, 0, __pyx_n_s_MFDataset___setattr, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__164)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5652, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_setattr, __pyx_t_7) < 0) __PYX_ERR(0, 5629, __pyx_L1_error) + if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_setattr, __pyx_t_7) < 0) __PYX_ERR(0, 5652, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5633 + /* "netCDF4/_netCDF4.pyx":5656 * self.__dict__[name] = value * * def __getattribute__(self, name): # <<<<<<<<<<<<<< * if name in ['variables','dimensions','file_format','groups',\ * 'data_model','disk_format','path']: */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9MFDataset_5__getattribute__, 0, __pyx_n_s_MFDataset___getattribute, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__162)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5633, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9MFDataset_5__getattribute__, 0, __pyx_n_s_MFDataset___getattribute, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__166)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_getattribute, __pyx_t_7) < 0) __PYX_ERR(0, 5633, __pyx_L1_error) + if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_getattribute, __pyx_t_7) < 0) __PYX_ERR(0, 5656, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5646 + /* "netCDF4/_netCDF4.pyx":5669 * return Dataset.__getattribute__(self, name) * * def ncattrs(self): # <<<<<<<<<<<<<< * """ * **`ncattrs(self)`** */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9MFDataset_7ncattrs, 0, __pyx_n_s_MFDataset_ncattrs, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__164)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5646, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9MFDataset_7ncattrs, 0, __pyx_n_s_MFDataset_ncattrs, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__168)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_ncattrs, __pyx_t_7) < 0) __PYX_ERR(0, 5646, __pyx_L1_error) + if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_ncattrs, __pyx_t_7) < 0) __PYX_ERR(0, 5669, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5654 + /* "netCDF4/_netCDF4.pyx":5677 * return self._cdf[0].__dict__.keys() * * def close(self): # <<<<<<<<<<<<<< * """ * **`close(self)`** */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9MFDataset_9close, 0, __pyx_n_s_MFDataset_close, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__166)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5654, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9MFDataset_9close, 0, __pyx_n_s_MFDataset_close, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__170)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5677, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_close, __pyx_t_7) < 0) __PYX_ERR(0, 5654, __pyx_L1_error) + if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_close, __pyx_t_7) < 0) __PYX_ERR(0, 5677, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5663 + /* "netCDF4/_netCDF4.pyx":5686 * dset.close() * * def __repr__(self): # <<<<<<<<<<<<<< * ncdump = ['%r\n' % type(self)] * dimnames = tuple([str(dimname) for dimname in self.dimensions.keys()]) */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9MFDataset_11__repr__, 0, __pyx_n_s_MFDataset___repr, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__168)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5663, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9MFDataset_11__repr__, 0, __pyx_n_s_MFDataset___repr, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__172)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5686, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_repr, __pyx_t_7) < 0) __PYX_ERR(0, 5663, __pyx_L1_error) + if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_repr, __pyx_t_7) < 0) __PYX_ERR(0, 5686, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5681 + /* "netCDF4/_netCDF4.pyx":5704 * return ''.join(ncdump) * * def __reduce__(self): # <<<<<<<<<<<<<< * # raise error is user tries to pickle a MFDataset object. * raise NotImplementedError('MFDataset is not picklable') */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9MFDataset_13__reduce__, 0, __pyx_n_s_MFDataset___reduce, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__170)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5681, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9MFDataset_13__reduce__, 0, __pyx_n_s_MFDataset___reduce, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__174)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5704, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_reduce, __pyx_t_7) < 0) __PYX_ERR(0, 5681, __pyx_L1_error) + if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_reduce, __pyx_t_7) < 0) __PYX_ERR(0, 5704, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5426 + /* "netCDF4/_netCDF4.pyx":5449 * return netcdftime.date2index(dates, nctime, calendar, select) * * class MFDataset(Dataset): # <<<<<<<<<<<<<< * """ * Class for reading multi-file netCDF Datasets, making variables */ - __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_11, __pyx_n_s_MFDataset, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5426, __pyx_L1_error) + __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_11, __pyx_n_s_MFDataset, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_MFDataset, __pyx_t_7) < 0) __PYX_ERR(0, 5426, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_MFDataset, __pyx_t_7) < 0) __PYX_ERR(0, 5449, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5685 + /* "netCDF4/_netCDF4.pyx":5708 * raise NotImplementedError('MFDataset is not picklable') * * class _Dimension(object): # <<<<<<<<<<<<<< * def __init__(self, dimname, dim, dimlens, dimtotlen): * self.dimlens = dimlens */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5685, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); - __pyx_t_11 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5685, __pyx_L1_error) + __pyx_t_11 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_11, __pyx_t_2, __pyx_n_s_Dimension, __pyx_n_s_Dimension, (PyObject *) NULL, __pyx_n_s_netCDF4__netCDF4, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5685, __pyx_L1_error) + __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_11, __pyx_t_2, __pyx_n_s_Dimension, __pyx_n_s_Dimension, (PyObject *) NULL, __pyx_n_s_netCDF4__netCDF4, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "netCDF4/_netCDF4.pyx":5686 + /* "netCDF4/_netCDF4.pyx":5709 * * class _Dimension(object): * def __init__(self, dimname, dim, dimlens, dimtotlen): # <<<<<<<<<<<<<< * self.dimlens = dimlens * self.dimtotlen = dimtotlen */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_10_Dimension_1__init__, 0, __pyx_n_s_Dimension___init, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__172)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5686, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_10_Dimension_1__init__, 0, __pyx_n_s_Dimension___init, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__176)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5709, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_init, __pyx_t_7) < 0) __PYX_ERR(0, 5686, __pyx_L1_error) + if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_init, __pyx_t_7) < 0) __PYX_ERR(0, 5709, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5690 + /* "netCDF4/_netCDF4.pyx":5713 * self.dimtotlen = dimtotlen * self._name = dimname * def __len__(self): # <<<<<<<<<<<<<< * return self.dimtotlen * def isunlimited(self): */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_10_Dimension_3__len__, 0, __pyx_n_s_Dimension___len, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__174)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5690, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_10_Dimension_3__len__, 0, __pyx_n_s_Dimension___len, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__178)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5713, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_len, __pyx_t_7) < 0) __PYX_ERR(0, 5690, __pyx_L1_error) + if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_len, __pyx_t_7) < 0) __PYX_ERR(0, 5713, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5692 + /* "netCDF4/_netCDF4.pyx":5715 * def __len__(self): * return self.dimtotlen * def isunlimited(self): # <<<<<<<<<<<<<< * return True * def __repr__(self): */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_10_Dimension_5isunlimited, 0, __pyx_n_s_Dimension_isunlimited, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__176)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5692, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_10_Dimension_5isunlimited, 0, __pyx_n_s_Dimension_isunlimited, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__180)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5715, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_isunlimited, __pyx_t_7) < 0) __PYX_ERR(0, 5692, __pyx_L1_error) + if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_isunlimited, __pyx_t_7) < 0) __PYX_ERR(0, 5715, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5694 + /* "netCDF4/_netCDF4.pyx":5717 * def isunlimited(self): * return True * def __repr__(self): # <<<<<<<<<<<<<< * if self.isunlimited(): * return repr(type(self))+" (unlimited): name = '%s', size = %s\n" % (self._name,len(self)) */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_10_Dimension_7__repr__, 0, __pyx_n_s_Dimension___repr, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__178)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5694, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_10_Dimension_7__repr__, 0, __pyx_n_s_Dimension___repr, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__182)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5717, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_repr, __pyx_t_7) < 0) __PYX_ERR(0, 5694, __pyx_L1_error) + if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_repr, __pyx_t_7) < 0) __PYX_ERR(0, 5717, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5685 + /* "netCDF4/_netCDF4.pyx":5708 * raise NotImplementedError('MFDataset is not picklable') * * class _Dimension(object): # <<<<<<<<<<<<<< * def __init__(self, dimname, dim, dimlens, dimtotlen): * self.dimlens = dimlens */ - __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_11, __pyx_n_s_Dimension, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5685, __pyx_L1_error) + __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_11, __pyx_n_s_Dimension, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_Dimension, __pyx_t_7) < 0) __PYX_ERR(0, 5685, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Dimension, __pyx_t_7) < 0) __PYX_ERR(0, 5708, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5700 + /* "netCDF4/_netCDF4.pyx":5723 * return repr(type(self))+": name = '%s', size = %s\n" % (self._name,len(self)) * * class _Variable(object): # <<<<<<<<<<<<<< * def __init__(self, dset, varname, var, recdimname): * self.dimensions = var.dimensions */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5700, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); - __pyx_t_11 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5700, __pyx_L1_error) + __pyx_t_11 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_11, __pyx_t_2, __pyx_n_s_Variable, __pyx_n_s_Variable, (PyObject *) NULL, __pyx_n_s_netCDF4__netCDF4, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5700, __pyx_L1_error) + __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_11, __pyx_t_2, __pyx_n_s_Variable, __pyx_n_s_Variable, (PyObject *) NULL, __pyx_n_s_netCDF4__netCDF4, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "netCDF4/_netCDF4.pyx":5701 + /* "netCDF4/_netCDF4.pyx":5724 * * class _Variable(object): * def __init__(self, dset, varname, var, recdimname): # <<<<<<<<<<<<<< * self.dimensions = var.dimensions * self._dset = dset */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9_Variable_1__init__, 0, __pyx_n_s_Variable___init, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__180)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5701, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9_Variable_1__init__, 0, __pyx_n_s_Variable___init, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__184)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5724, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_init, __pyx_t_7) < 0) __PYX_ERR(0, 5701, __pyx_L1_error) + if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_init, __pyx_t_7) < 0) __PYX_ERR(0, 5724, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5714 + /* "netCDF4/_netCDF4.pyx":5737 * for name, value in var.__dict__.items(): * self.__dict__[name] = value * def typecode(self): # <<<<<<<<<<<<<< * return self.dtype * def ncattrs(self): */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9_Variable_3typecode, 0, __pyx_n_s_Variable_typecode, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__182)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5714, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9_Variable_3typecode, 0, __pyx_n_s_Variable_typecode, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__186)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5737, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_typecode, __pyx_t_7) < 0) __PYX_ERR(0, 5714, __pyx_L1_error) + if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_typecode, __pyx_t_7) < 0) __PYX_ERR(0, 5737, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5716 + /* "netCDF4/_netCDF4.pyx":5739 * def typecode(self): * return self.dtype * def ncattrs(self): # <<<<<<<<<<<<<< * return self._mastervar.__dict__.keys() * def __getattr__(self,name): */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9_Variable_5ncattrs, 0, __pyx_n_s_Variable_ncattrs, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__184)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5716, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9_Variable_5ncattrs, 0, __pyx_n_s_Variable_ncattrs, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__188)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5739, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_ncattrs, __pyx_t_7) < 0) __PYX_ERR(0, 5716, __pyx_L1_error) + if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_ncattrs, __pyx_t_7) < 0) __PYX_ERR(0, 5739, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5718 + /* "netCDF4/_netCDF4.pyx":5741 * def ncattrs(self): * return self._mastervar.__dict__.keys() * def __getattr__(self,name): # <<<<<<<<<<<<<< * if name == 'shape': return self._shape() * if name == 'ndim': return len(self._shape()) */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9_Variable_7__getattr__, 0, __pyx_n_s_Variable___getattr, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__186)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5718, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9_Variable_7__getattr__, 0, __pyx_n_s_Variable___getattr, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__190)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5741, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_getattr, __pyx_t_7) < 0) __PYX_ERR(0, 5718, __pyx_L1_error) + if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_getattr, __pyx_t_7) < 0) __PYX_ERR(0, 5741, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5725 + /* "netCDF4/_netCDF4.pyx":5748 * except: * raise AttributeError(name) * def __repr__(self): # <<<<<<<<<<<<<< * ncdump_var = ['%r\n' % type(self)] * dimnames = tuple([str(dimname) for dimname in self.dimensions]) */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9_Variable_9__repr__, 0, __pyx_n_s_Variable___repr, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__188)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5725, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9_Variable_9__repr__, 0, __pyx_n_s_Variable___repr, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__192)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5748, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_repr, __pyx_t_7) < 0) __PYX_ERR(0, 5725, __pyx_L1_error) + if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_repr, __pyx_t_7) < 0) __PYX_ERR(0, 5748, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5741 + /* "netCDF4/_netCDF4.pyx":5764 * ncdump_var.append('current size = %s\n' % repr(self.shape)) * return ''.join(ncdump_var) * def __len__(self): # <<<<<<<<<<<<<< * if not self._shape: * raise TypeError('len() of unsized object') */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9_Variable_11__len__, 0, __pyx_n_s_Variable___len, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__190)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5741, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9_Variable_11__len__, 0, __pyx_n_s_Variable___len, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__194)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5764, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_len, __pyx_t_7) < 0) __PYX_ERR(0, 5741, __pyx_L1_error) + if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_len, __pyx_t_7) < 0) __PYX_ERR(0, 5764, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5746 + /* "netCDF4/_netCDF4.pyx":5769 * else: * return self._shape()[0] * def _shape(self): # <<<<<<<<<<<<<< * recdimlen = len(self._dset.dimensions[self._recdimname]) * return (recdimlen,) + self._mastervar.shape[1:] */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9_Variable_13_shape, 0, __pyx_n_s_Variable__shape, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__192)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5746, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9_Variable_13_shape, 0, __pyx_n_s_Variable__shape, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__196)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5769, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_shape_2, __pyx_t_7) < 0) __PYX_ERR(0, 5746, __pyx_L1_error) + if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_shape_2, __pyx_t_7) < 0) __PYX_ERR(0, 5769, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5749 + /* "netCDF4/_netCDF4.pyx":5772 * recdimlen = len(self._dset.dimensions[self._recdimname]) * return (recdimlen,) + self._mastervar.shape[1:] * def set_auto_maskandscale(self,val): # <<<<<<<<<<<<<< * for v in self._recVar: * v.set_auto_maskandscale(val) */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9_Variable_15set_auto_maskandscale, 0, __pyx_n_s_Variable_set_auto_maskandscale, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__194)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5749, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9_Variable_15set_auto_maskandscale, 0, __pyx_n_s_Variable_set_auto_maskandscale, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__198)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5772, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_set_auto_maskandscale, __pyx_t_7) < 0) __PYX_ERR(0, 5749, __pyx_L1_error) + if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_set_auto_maskandscale, __pyx_t_7) < 0) __PYX_ERR(0, 5772, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5752 + /* "netCDF4/_netCDF4.pyx":5775 * for v in self._recVar: * v.set_auto_maskandscale(val) * def set_auto_mask(self,val): # <<<<<<<<<<<<<< * for v in self._recVar: * v.set_auto_mask(val) */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9_Variable_17set_auto_mask, 0, __pyx_n_s_Variable_set_auto_mask, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__196)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5752, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9_Variable_17set_auto_mask, 0, __pyx_n_s_Variable_set_auto_mask, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__200)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_set_auto_mask, __pyx_t_7) < 0) __PYX_ERR(0, 5752, __pyx_L1_error) + if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_set_auto_mask, __pyx_t_7) < 0) __PYX_ERR(0, 5775, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5755 + /* "netCDF4/_netCDF4.pyx":5778 * for v in self._recVar: * v.set_auto_mask(val) * def set_auto_scale(self,val): # <<<<<<<<<<<<<< * for v in self._recVar: * v.set_auto_scale(val) */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9_Variable_19set_auto_scale, 0, __pyx_n_s_Variable_set_auto_scale, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__198)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5755, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9_Variable_19set_auto_scale, 0, __pyx_n_s_Variable_set_auto_scale, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__202)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5778, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_set_auto_scale, __pyx_t_7) < 0) __PYX_ERR(0, 5755, __pyx_L1_error) + if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_set_auto_scale, __pyx_t_7) < 0) __PYX_ERR(0, 5778, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5758 + /* "netCDF4/_netCDF4.pyx":5781 * for v in self._recVar: * v.set_auto_scale(val) * def __getitem__(self, elem): # <<<<<<<<<<<<<< * """Get records from a concatenated set of variables.""" * */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9_Variable_21__getitem__, 0, __pyx_n_s_Variable___getitem, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__200)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5758, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9_Variable_21__getitem__, 0, __pyx_n_s_Variable___getitem, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__204)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5781, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_getitem, __pyx_t_7) < 0) __PYX_ERR(0, 5758, __pyx_L1_error) + if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_getitem, __pyx_t_7) < 0) __PYX_ERR(0, 5781, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5700 + /* "netCDF4/_netCDF4.pyx":5723 * return repr(type(self))+": name = '%s', size = %s\n" % (self._name,len(self)) * * class _Variable(object): # <<<<<<<<<<<<<< * def __init__(self, dset, varname, var, recdimname): * self.dimensions = var.dimensions */ - __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_11, __pyx_n_s_Variable, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5700, __pyx_L1_error) + __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_11, __pyx_n_s_Variable, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_Variable, __pyx_t_7) < 0) __PYX_ERR(0, 5700, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Variable, __pyx_t_7) < 0) __PYX_ERR(0, 5723, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "netCDF4/_netCDF4.pyx":5862 + /* "netCDF4/_netCDF4.pyx":5885 * * * class MFTime(_Variable): # <<<<<<<<<<<<<< * """ * Class providing an interface to a MFDataset time Variable by imposing a unique common */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Variable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5862, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Variable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5885, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5862, __pyx_L1_error) + __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5885, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5862, __pyx_L1_error) + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5885, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_11, __pyx_n_s_MFTime, __pyx_n_s_MFTime, (PyObject *) NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_kp_s_Class_providing_an_interface_to); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5862, __pyx_L1_error) + __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_11, __pyx_n_s_MFTime, __pyx_n_s_MFTime, (PyObject *) NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_kp_s_Class_providing_an_interface_to); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5885, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "netCDF4/_netCDF4.pyx":5897 + /* "netCDF4/_netCDF4.pyx":5920 * """ * * def __init__(self, time, units=None): # <<<<<<<<<<<<<< * """ * **`__init__(self, time, units=None)`** */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_6MFTime_1__init__, 0, __pyx_n_s_MFTime___init, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__202)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5897, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_6MFTime_1__init__, 0, __pyx_n_s_MFTime___init, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__206)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5920, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_tuple__203); - if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_init, __pyx_t_7) < 0) __PYX_ERR(0, 5897, __pyx_L1_error) + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_tuple__207); + if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_init, __pyx_t_7) < 0) __PYX_ERR(0, 5920, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5945 + /* "netCDF4/_netCDF4.pyx":5968 * * * def __getitem__(self, elem): # <<<<<<<<<<<<<< * return self.__time[elem] + self.__delta[elem] */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_6MFTime_3__getitem__, 0, __pyx_n_s_MFTime___getitem, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__205)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5945, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_6MFTime_3__getitem__, 0, __pyx_n_s_MFTime___getitem, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__209)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5968, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_getitem, __pyx_t_7) < 0) __PYX_ERR(0, 5945, __pyx_L1_error) + if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_getitem, __pyx_t_7) < 0) __PYX_ERR(0, 5968, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "netCDF4/_netCDF4.pyx":5862 + /* "netCDF4/_netCDF4.pyx":5885 * * * class MFTime(_Variable): # <<<<<<<<<<<<<< * """ * Class providing an interface to a MFDataset time Variable by imposing a unique common */ - __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_MFTime, __pyx_t_11, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5862, __pyx_L1_error) + __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_MFTime, __pyx_t_11, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5885, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_MFTime, __pyx_t_7) < 0) __PYX_ERR(0, 5862, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_MFTime, __pyx_t_7) < 0) __PYX_ERR(0, 5885, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -84845,7 +84959,7 @@ PyMODINIT_FUNC PyInit__netCDF4(void) /* "netCDF4/_netCDF4.pyx":1 * """ # <<<<<<<<<<<<<< - * Version 1.2.7 + * Version 1.2.8a0 * ------------- */ __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1, __pyx_L1_error) @@ -85136,10 +85250,8 @@ static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, P PyCFunctionObject *func = (PyCFunctionObject*)func_obj; PyCFunction meth = PyCFunction_GET_FUNCTION(func); PyObject *self = PyCFunction_GET_SELF(func); - PyObject *result; - int flags; assert(PyCFunction_Check(func)); - assert(METH_FASTCALL == PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)); + assert(METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST))); assert(nargs >= 0); assert(nargs == 0 || args != NULL); /* _PyCFunction_FastCallDict() must not be called with an exception set, @@ -86220,6 +86332,48 @@ static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* value } #endif +/* WriteUnraisableException */ + static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, + CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename, + int full_traceback, CYTHON_UNUSED int nogil) { + PyObject *old_exc, *old_val, *old_tb; + PyObject *ctx; + __Pyx_PyThreadState_declare +#ifdef WITH_THREAD + PyGILState_STATE state; + if (nogil) + state = PyGILState_Ensure(); +#ifdef _MSC_VER + else state = (PyGILState_STATE)-1; +#endif +#endif + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); + if (full_traceback) { + Py_XINCREF(old_exc); + Py_XINCREF(old_val); + Py_XINCREF(old_tb); + __Pyx_ErrRestore(old_exc, old_val, old_tb); + PyErr_PrintEx(1); + } + #if PY_MAJOR_VERSION < 3 + ctx = PyString_FromString(name); + #else + ctx = PyUnicode_FromString(name); + #endif + __Pyx_ErrRestore(old_exc, old_val, old_tb); + if (!ctx) { + PyErr_WriteUnraisable(Py_None); + } else { + PyErr_WriteUnraisable(ctx); + Py_DECREF(ctx); + } +#ifdef WITH_THREAD + if (nogil) + PyGILState_Release(state); +#endif +} + /* KeywordStringCheck */ static CYTHON_INLINE int __Pyx_CheckKeywordStrings( PyObject *kwdict, diff --git a/netCDF4/_netCDF4.pyx b/netCDF4/_netCDF4.pyx index 6ac4fcdc4..c43d42cf3 100644 --- a/netCDF4/_netCDF4.pyx +++ b/netCDF4/_netCDF4.pyx @@ -1,5 +1,5 @@ """ -Version 1.2.7 +Version 1.2.8a0 ------------- - - - @@ -916,8 +916,8 @@ PERFORMANCE OF THIS SOFTWARE. """ # Make changes to this file, not the c-wrappers that Cython generates. - from cpython.mem cimport PyMem_Malloc, PyMem_Free +from cpython.buffer cimport PyObject_GetBuffer, PyBuffer_Release, PyBUF_SIMPLE, PyBUF_ANY_CONTIGUOUS # pure python utilities from .utils import (_StartCountStride, _quantize, _find_dim, _walk_grps, @@ -936,7 +936,7 @@ except ImportError: # python3: zip is already python2's itertools.izip pass -__version__ = "1.2.7" +__version__ = "1.2.8a0" # Initialize numpy import posixpath @@ -947,7 +947,7 @@ import sys import warnings from glob import glob from numpy import ma -from libc.string cimport memcpy +from libc.string cimport memcpy, memset from libc.stdlib cimport malloc, free import_array() include "netCDF4.pxi" @@ -980,6 +980,7 @@ __has_rename_grp__ = HAS_RENAME_GRP __has_nc_inq_path__ = HAS_NC_INQ_PATH __has_nc_inq_format_extended__ = HAS_NC_INQ_FORMAT_EXTENDED __has_cdf5__ = HAS_CDF5_FORMAT +__has_nc_open_mem__ = HAS_NC_OPEN_MEM _needsworkaround_issue485 = __netcdf4libversion__ < "4.4.0" or \ (__netcdf4libversion__.startswith("4.4.0") and \ "-development" in __netcdf4libversion__) @@ -1054,9 +1055,10 @@ default_fillvals = {#'S1':NC_FILL_CHAR, is_native_little = numpy.dtype('f4').byteorder == '=' -# hard code this here, instead of importing from netcdf.h +# hard code these here, instead of importing from netcdf.h # so it will compile with versions <= 4.2. NC_DISKLESS = 0x0008 + # encoding used to convert strings to bytes when writing text data # to the netcdf file, and for converting bytes to strings when reading # from the netcdf file. @@ -1578,14 +1580,18 @@ cdef _get_vars(group): free(varids) # free pointer holding variable ids. return variables +cdef _ensure_nc_success(ierr, err_cls=RuntimeError): + if ierr != NC_NOERR: + raise err_cls((nc_strerror(ierr)).decode('ascii')) + # these are class attributes that # only exist at the python level (not in the netCDF file). -_private_atts =\ +_private_atts = \ ['_grpid','_grp','_varid','groups','dimensions','variables','dtype','data_model','disk_format', '_nunlimdim','path','parent','ndim','mask','scale','cmptypes','vltypes','enumtypes','_isprimitive', 'file_format','_isvlen','_isenum','_iscompound','_cmptype','_vltype','_enumtype','name', - '__orthogoral_indexing__','keepweakref','_has_lsd'] + '__orthogoral_indexing__','keepweakref','_has_lsd', '_buffer'] __pdoc__ = {} cdef class Dataset: @@ -1658,6 +1664,7 @@ references to the parent Dataset or Group. cdef object __weakref__ cdef public int _grpid cdef public int _isopen + cdef Py_buffer _buffer cdef public groups, dimensions, variables, disk_format, path, parent,\ file_format, data_model, cmptypes, vltypes, enumtypes, __orthogonal_indexing__, \ keepweakref @@ -1712,7 +1719,7 @@ references to the parent Dataset or Group. the parent Dataset or Group.""" def __init__(self, filename, mode='r', clobber=True, format='NETCDF4', - diskless=False, persist=False, keepweakref=False, **kwargs): + diskless=False, persist=False, keepweakref=False, memory=None, **kwargs): """ **`__init__(self, filename, mode="r", clobber=True, diskless=False, persist=False, keepweakref=False, format='NETCDF4')`** @@ -1720,7 +1727,8 @@ references to the parent Dataset or Group. `netCDF4.Dataset` constructor. **`filename`**: Name of netCDF file to hold dataset. Can also - be a python 3 pathlib instance or the URL of an OpenDAP dataset. + be a python 3 pathlib instance or the URL of an OpenDAP dataset. When memory is + set this is just used to set the `filepath()`. **`mode`**: access mode. `r` means read-only; no data can be modified. `w` means write; a new file is created, an existing file with @@ -1776,10 +1784,16 @@ references to the parent Dataset or Group. reducing memory usage and open file handles. However, in many cases this is not desirable, since the associated Variable instances may still be needed, but are rendered unusable when the parent Dataset instance is garbage collected. + + **`memory`**: if not `None`, open file with contents taken from this block of memory. + Must be a sequence of bytes. Note this only works with "r" mode. """ cdef int grpid, ierr, numgrps, numdims, numvars cdef char *path cdef char namstring[NC_MAX_NAME+1] + + memset(&self._buffer, 0, sizeof(self._buffer)) + # flag to indicate that Variables in this Dataset support orthogonal indexing. self.__orthogonal_indexing__ = True if diskless and __netcdf4libversion__ < '4.2.1': @@ -1787,6 +1801,10 @@ references to the parent Dataset or Group. raise ValueError('diskless mode requires netcdf lib >= 4.2.1, you have %s' % __netcdf4libversion__) bytestr = _strencode(str(filename)) path = bytestr + + if memory is not None and (mode != 'r' or type(memory) != bytes): + raise ValueError('memory mode only works with \'r\' modes and must be `bytes`') + if mode == 'w': _set_default_format(format=format) if clobber: @@ -1811,7 +1829,20 @@ references to the parent Dataset or Group. # 4.3.0 of the netcdf library (add a version check here?). _set_default_format(format='NETCDF3_64BIT_OFFSET') elif mode == 'r': - if diskless: + if memory is not None: + IF HAS_NC_OPEN_MEM: + # Store reference to memory + result = PyObject_GetBuffer(memory, &self._buffer, PyBUF_SIMPLE | PyBUF_ANY_CONTIGUOUS) + if result != 0: + raise ValueError("Unable to retrieve Buffer from %s" % (memory,)) + + ierr = nc_open_mem(path, 0, self._buffer.len, self._buffer.buf, &grpid) + ELSE: + msg = """ + nc_open_mem method not enabled. To enable, install Cython, make sure you have + version 4.4.1 or higher of the netcdf C lib, and rebuild netcdf4-python.""" + raise ValueError(msg) + elif diskless: ierr = nc_open(path, NC_NOWRITE | NC_DISKLESS, &grpid) else: ierr = nc_open(path, NC_NOWRITE, &grpid) @@ -1844,8 +1875,9 @@ references to the parent Dataset or Group. ierr = nc_create(path, NC_SHARE | NC_NOCLOBBER, &grpid) else: raise ValueError("mode must be 'w', 'r', 'a' or 'r+', got '%s'" % mode) - if ierr != NC_NOERR: - raise IOError((nc_strerror(ierr)).decode('ascii')) + + _ensure_nc_success(ierr, IOError) + # data model and file format attributes self.data_model = _get_format(grpid) # data_model attribute used to be file_format (versions < 1.0.8), retain @@ -1910,16 +1942,16 @@ open/create the Dataset. Requires netcdf >= 4.1.2""" IF HAS_NC_INQ_PATH: with nogil: ierr = nc_inq_path(self._grpid, &pathlen, NULL) - if ierr != NC_NOERR: - raise RuntimeError((nc_strerror(ierr)).decode('ascii')) + _ensure_nc_success(ierr) + c_path = malloc(sizeof(char) * (pathlen + 1)) if not c_path: raise MemoryError() try: with nogil: ierr = nc_inq_path(self._grpid, &pathlen, c_path) - if ierr != NC_NOERR: - raise RuntimeError((nc_strerror(ierr)).decode('ascii')) + _ensure_nc_success(ierr) + py_path = c_path[:pathlen] # makes a copy of pathlen bytes from c_string finally: free(c_path) @@ -1961,17 +1993,27 @@ version 4.1.2 or higher of the netcdf C lib, and rebuild netcdf4-python.""" ncdump.append(' groups: %s\n' % ', '.join(grpnames)) return ''.join(ncdump) + def _close(self, check_err): + cdef int ierr = nc_close(self._grpid) + + if check_err: + _ensure_nc_success(ierr) + + self._isopen = 0 # indicates file already closed, checked by __dealloc__ + + # Only release buffer if close succeeded + # per impl of PyBuffer_Release: https://github.com/python/cpython/blob/master/Objects/abstract.c#L667 + # view.obj is checked, ref on obj is decremented and obj will be null'd out + PyBuffer_Release(&self._buffer) + + def close(self): """ **`close(self)`** Close the Dataset. """ - cdef int ierr - ierr = nc_close(self._grpid) - if ierr != NC_NOERR: - raise RuntimeError((nc_strerror(ierr)).decode('ascii')) - self._isopen = 0 # indicates file already closed, checked by __dealloc__ + self._close(True) def isopen(self): """ @@ -1983,9 +2025,8 @@ is the Dataset open or closed? def __dealloc__(self): # close file when there are no references to object left - cdef int ierr if self._isopen: - ierr = nc_close(self._grpid) + self._close(False) def __reduce__(self): # raise error is user tries to pickle a Dataset object. @@ -1996,10 +2037,7 @@ is the Dataset open or closed? **`sync(self)`** Writes all buffered data in the `netCDF4.Dataset` to the disk file.""" - cdef int ierr - ierr = nc_sync(self._grpid) - if ierr != NC_NOERR: - raise RuntimeError((nc_strerror(ierr)).decode('ascii')) + _ensure_nc_success(nc_sync(self._grpid)) def _redef(self): cdef int ierr @@ -2022,10 +2060,8 @@ separately for each variable type). The default behavior of the netCDF library corresponds to `set_fill_on`. Data which are equal to the `_Fill_Value` indicate that the variable was created, but never written to.""" - cdef int ierr, oldmode - ierr = nc_set_fill (self._grpid, NC_FILL, &oldmode) - if ierr != NC_NOERR: - raise RuntimeError((nc_strerror(ierr)).decode('ascii')) + cdef int oldmode + _ensure_nc_success(nc_set_fill(self._grpid, NC_FILL, &oldmode)) def set_fill_off(self): """ @@ -2036,10 +2072,8 @@ Sets the fill mode for a `netCDF4.Dataset` open for writing to `off`. This will prevent the data from being pre-filled with fill values, which may result in some performance improvements. However, you must then make sure the data is actually written before being read.""" - cdef int ierr, oldmode - ierr = nc_set_fill (self._grpid, NC_NOFILL, &oldmode) - if ierr != NC_NOERR: - raise RuntimeError((nc_strerror(ierr)).decode('ascii')) + cdef int oldmode + _ensure_nc_success(nc_set_fill(self._grpid, NC_NOFILL, &oldmode)) def createDimension(self, dimname, size=None): """ @@ -2072,8 +2106,8 @@ rename a `netCDF4.Dimension` named `oldname` to `newname`.""" raise KeyError('%s not a valid dimension name' % oldname) ierr = nc_rename_dim(self._grpid, dim._dimid, namstring) if self.data_model != 'NETCDF4': self._enddef() - if ierr != NC_NOERR: - raise RuntimeError((nc_strerror(ierr)).decode('ascii')) + + _ensure_nc_success(ierr) # remove old key from dimensions dict. self.dimensions.pop(oldname) # add new key. @@ -2282,8 +2316,8 @@ rename a `netCDF4.Variable` named `oldname` to `newname`""" if self.data_model != 'NETCDF4': self._redef() ierr = nc_rename_var(self._grpid, var._varid, namstring) if self.data_model != 'NETCDF4': self._enddef() - if ierr != NC_NOERR: - raise RuntimeError((nc_strerror(ierr)).decode('ascii')) + + _ensure_nc_success(ierr) # remove old key from dimensions dict. self.variables.pop(oldname) # add new key. @@ -2396,8 +2430,7 @@ attributes.""" if self.data_model != 'NETCDF4': self._redef() ierr = nc_del_att(self._grpid, NC_GLOBAL, attname) if self.data_model != 'NETCDF4': self._enddef() - if ierr != NC_NOERR: - raise AttributeError((nc_strerror(ierr)).decode('ascii')) + _ensure_nc_success(ierr) def __setattr__(self,name,value): # if name in _private_atts, it is stored at the python @@ -2434,23 +2467,19 @@ attributes.""" **`renameAttribute(self, oldname, newname)`** rename a `netCDF4.Dataset` or `netCDF4.Group` attribute named `oldname` to `newname`.""" - cdef int ierr cdef char *oldnamec cdef char *newnamec bytestr = _strencode(oldname) oldnamec = bytestr bytestr = _strencode(newname) newnamec = bytestr - ierr = nc_rename_att(self._grpid, NC_GLOBAL, oldnamec, newnamec) - if ierr != NC_NOERR: - raise RuntimeError((nc_strerror(ierr)).decode('ascii')) + _ensure_nc_success(nc_rename_att(self._grpid, NC_GLOBAL, oldnamec, newnamec)) def renameGroup(self, oldname, newname): """ **`renameGroup(self, oldname, newname)`** rename a `netCDF4.Group` named `oldname` to `newname` (requires netcdf >= 4.3.1).""" - cdef int ierr cdef char *newnamec IF HAS_RENAME_GRP: bytestr = _strencode(newname) @@ -2459,9 +2488,7 @@ rename a `netCDF4.Group` named `oldname` to `newname` (requires netcdf >= 4.3.1) grp = self.groups[oldname] except KeyError: raise KeyError('%s not a valid group name' % oldname) - ierr = nc_rename_grp(grp._grpid, newnamec) - if ierr != NC_NOERR: - raise RuntimeError((nc_strerror(ierr)).decode('ascii')) + _ensure_nc_success(nc_rename_grp(grp._grpid, newnamec)) # remove old key from groups dict. self.groups.pop(oldname) # add new key. @@ -2634,7 +2661,6 @@ Additional read-only class variables: `netCDF4.Dataset.createGroup` method of a `netCDF4.Dataset` instance, or another `netCDF4.Group` instance, not using this class directly. """ - cdef int ierr cdef char *groupname # flag to indicate that Variables in this Group support orthogonal indexing. self.__orthogonal_indexing__ = True @@ -2660,9 +2686,7 @@ Additional read-only class variables: else: bytestr = _strencode(name) groupname = bytestr - ierr = nc_def_grp(parent._grpid, groupname, &self._grpid) - if ierr != NC_NOERR: - raise RuntimeError((nc_strerror(ierr)).decode('ascii')) + _ensure_nc_success(nc_def_grp(parent._grpid, groupname, &self._grpid)) self.cmptypes = OrderedDict() self.vltypes = OrderedDict() self.enumtypes = OrderedDict() @@ -2680,12 +2704,11 @@ instances, raises IOError.""" def _getname(self): # private method to get name associated with instance. - cdef int err + cdef int ierr cdef char namstring[NC_MAX_NAME+1] with nogil: ierr = nc_inq_grpname(self._grpid, namstring) - if ierr != NC_NOERR: - raise RuntimeError((nc_strerror(ierr)).decode('ascii')) + _ensure_nc_success(ierr) return namstring.decode(default_encoding,unicode_error) property name: diff --git a/setup.py b/setup.py index c72e88046..a8b93a923 100644 --- a/setup.py +++ b/setup.py @@ -72,11 +72,16 @@ def check_api(inc_dirs): has_nc_inq_path = False has_nc_inq_format_extended = False has_cdf5_format = False + has_nc_open_mem = False + for d in inc_dirs: try: - f = open(os.path.join(d,'netcdf.h'),**open_kwargs) + f = open(os.path.join(d, 'netcdf.h'), **open_kwargs) except IOError: continue + + has_nc_open_mem = os.path.exists(os.path.join(d, 'netcdf_mem.h')) + for line in f: if line.startswith('nc_rename_grp'): has_rename_grp = True @@ -87,8 +92,9 @@ def check_api(inc_dirs): if line.startswith('#define NC_FORMAT_64BIT_DATA'): has_cdf5_format = True break + return has_rename_grp, has_nc_inq_path, has_nc_inq_format_extended,\ - has_cdf5_format + has_cdf5_format, has_nc_open_mem def getnetcdfvers(libdirs): """ @@ -235,7 +241,7 @@ def getnetcdfvers(libdirs): else: # otherwise, just hope it's in the users PATH. ncconfig = 'nc-config' try: - retcode = subprocess.call([ncconfig,'--libs'],stdout=subprocess.PIPE) + retcode = subprocess.call([ncconfig,'--libs'], stdout=subprocess.PIPE) except: retcode = 1 else: @@ -267,7 +273,7 @@ def getnetcdfvers(libdirs): inc_dirs.extend([str(i[2:].decode()) for i in dep.split() if i[0:2].decode() == '-I']) # If nc-config and pkg-config both didn't work (it won't on Windows), fall back on brute force method. else: - dirstosearch = [os.path.expanduser('~'),'/usr/local','/sw','/opt','/opt/local', '/usr'] + dirstosearch = [os.path.expanduser('~'), '/usr/local', '/sw', '/opt', '/opt/local', '/usr'] if HDF5_incdir is None and HDF5_dir is None: sys.stdout.write(""" @@ -322,12 +328,13 @@ def getnetcdfvers(libdirs): netCDF4_libdir = os.path.join(netCDF4_dir, 'lib') if sys.platform=='win32': - libs = ['netcdf','hdf5_hl','hdf5','zlib'] + libs = ['netcdf', 'hdf5_hl', 'hdf5', 'zlib'] else: - libs = ['netcdf','hdf5_hl','hdf5','z'] - if netCDF4_libdir is not None: lib_dirs=[netCDF4_libdir] + libs = ['netcdf', 'hdf5_hl', 'hdf5', 'z'] + + if netCDF4_libdir is not None: lib_dirs = [netCDF4_libdir] if HDF5_libdir is not None: lib_dirs.append(HDF5_libdir) - if netCDF4_incdir is not None: inc_dirs=[netCDF4_incdir] + if netCDF4_incdir is not None: inc_dirs = [netCDF4_incdir] if HDF5_incdir is not None: inc_dirs.append(HDF5_incdir) # add szip to link if desired. @@ -409,32 +416,43 @@ def getnetcdfvers(libdirs): os.remove(netcdf4_src_c) # this determines whether renameGroup and filepath methods will work. has_rename_grp, has_nc_inq_path, has_nc_inq_format_extended, \ - has_cdf5_format = check_api(inc_dirs) - f = open(osp.join('include', 'constants.pyx'),'w') + has_cdf5_format, has_nc_open_mem = check_api(inc_dirs) + f = open(osp.join('include', 'constants.pyx'), 'w') if has_rename_grp: sys.stdout.write('netcdf lib has group rename capability\n') f.write('DEF HAS_RENAME_GRP = 1\n') else: sys.stdout.write('netcdf lib does not have group rename capability\n') f.write('DEF HAS_RENAME_GRP = 0\n') + if has_nc_inq_path: sys.stdout.write('netcdf lib has nc_inq_path function\n') f.write('DEF HAS_NC_INQ_PATH = 1\n') else: sys.stdout.write('netcdf lib does not have nc_inq_path function\n') f.write('DEF HAS_NC_INQ_PATH = 0\n') + if has_nc_inq_format_extended: sys.stdout.write('netcdf lib has nc_inq_format_extended function\n') f.write('DEF HAS_NC_INQ_FORMAT_EXTENDED = 1\n') else: sys.stdout.write('netcdf lib does not have nc_inq_format_extended function\n') f.write('DEF HAS_NC_INQ_FORMAT_EXTENDED = 0\n') + + if has_nc_open_mem: + sys.stdout.write('netcdf lib has nc_open_mem function\n') + f.write('DEF HAS_NC_OPEN_MEM = 1\n') + else: + sys.stdout.write('netcdf lib does not have nc_open_mem function\n') + f.write('DEF HAS_NC_OPEN_MEM = 0\n') + if has_cdf5_format: sys.stdout.write('netcdf lib has cdf-5 format capability\n') f.write('DEF HAS_CDF5_FORMAT = 1\n') else: sys.stdout.write('netcdf lib does not have cdf-5 format capability\n') f.write('DEF HAS_CDF5_FORMAT = 0\n') + f.close() ext_modules = cythonize(extensions, include_path=['include']) else: @@ -449,7 +467,7 @@ def getnetcdfvers(libdirs): setup(name = "netCDF4", cmdclass = cmdclass, - version = "1.2.7", + version = "1.2.8a0", long_description = "netCDF version 4 has many features not found in earlier versions of the library, such as hierarchical groups, zlib compression, multiple unlimited dimensions, and new data types. It is implemented on top of HDF5. This module implements most of the new features, and can read and write netCDF files compatible with older versions of the library. The API is modelled after Scientific.IO.NetCDF, and should be familiar to users of that module.\n\nThis project has a `Subversion repository `_ where you may access the most up-to-date source.", author = "Jeff Whitaker", author_email = "jeffrey.s.whitaker@noaa.gov", diff --git a/test/tst_open_mem.py b/test/tst_open_mem.py new file mode 100644 index 000000000..fdad570dc --- /dev/null +++ b/test/tst_open_mem.py @@ -0,0 +1,32 @@ +import os +import unittest +import netCDF4 + +CURRENT_DIR = os.path.dirname(os.path.realpath(__file__)) + + +class TestOpenMem(unittest.TestCase): + def test_mem_open(self): + fpath = os.path.join(CURRENT_DIR, "netcdf_dummy_file.nc") + + with open(fpath, 'rb') as f: + nc_bytes = f.read() + + if not netCDF4.__has_nc_open_mem__: + with self.assertRaises(ValueError): + netCDF4.Dataset('foo_bar', memory=nc_bytes) + return + + # Needs: https://github.com/Unidata/netcdf-c/pull/400 + if netCDF4.__netcdf4libversion__ < '4.4.1.2': + with self.assertRaises(IOError): + netCDF4.Dataset('foo_bar', memory=nc_bytes) + return + + with netCDF4.Dataset('foo_bar', memory=nc_bytes) as nc: + print(nc.filepath()) + assert nc.filepath() == 'foo_bar' + assert nc.project_summary == 'Dummy netCDF file' + +if __name__ == '__main__': + unittest.main()